Skip to content
Snippets Groups Projects
Commit d21c85f1 authored by Travis Savo's avatar Travis Savo
Browse files

Refactoring bodies and command structures. Still a ways to go on all this.

parent 925ba30e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -9,3 +9,4 @@ npm-debug.log*
shippable
test-results.xml
.idea
*.js.map
Loading
Loading
@@ -13,5 +13,6 @@
| Wercker | [![wercker status](https://app.wercker.com/status/2d07c3e55a5ce14178ca10d00653c3d0/s/master "wercker status")](https://app.wercker.com/project/byKey/2d07c3e55a5ce14178ca10d00653c3d0) |
| Codacy Grade | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/868a65096baa466b86b0412868f34c5d)](https://www.codacy.com/app/evilgenius/Malice?utm_source=github.com&utm_medium=referral&utm_content=TSavo/Malice&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/868a65096baa466b86b0412868f34c5d)](https://www.codacy.com/app/evilgenius/Malice?utm_source=github.com&utm_medium=referral&utm_content=TSavo/Malice&utm_campaign=Badge_Coverage) |
| Code Climate | [![Code Climate](https://codeclimate.com/github/TSavo/Malice/badges/gpa.svg)](https://codeclimate.com/github/TSavo/Malice) [![Test Coverage](https://codeclimate.com/github/TSavo/Malice/badges/coverage.svg)](https://codeclimate.com/github/TSavo/Malice/coverage) [![Issue Count](https://codeclimate.com/github/TSavo/Malice/badges/issue_count.svg)](https://codeclimate.com/github/TSavo/Malice) |
| Drone.io | [![Build Status](https://drone.io/github.com/TSavo/Malice/status.png)](https://drone.io/github.com/TSavo/Malice/latest) |
| Magnum CI | [![Magnum CI](https://magnum-ci.com/status/231d6835620015c564d80ac62ece7374.png)](https://magnum-ci.com/projects/4715) |
| Circle CI | [![CircleCI](https://circleci.com/gh/TSavo/Malice.svg?style=svg)](https://circleci.com/gh/TSavo/Malice) |
\ No newline at end of file
Loading
Loading
@@ -78,7 +78,6 @@ body.tell = (what)->
@owner.tell(what)
 
body.see = body.sees = (what)->
console.log(@canSee())
@tell(what) if @concious and @canSee()
 
body.hear = body.hears = (what)->
Loading
Loading
@@ -88,7 +87,6 @@ body.feel = body.feels = (what)->
@tell(what) if @concious and @canFeel()
 
body.smells = (what)->
console.log(@canSmell())
@tell(what) if @concious and @canSmell()
 
body.tastes = (what)->
Loading
Loading
Loading
Loading
@@ -19,7 +19,6 @@ part.init = (@name, @bones, @coverable, @removable, @critical, @parts = {})->
@contents = []
 
part.findPart = (name)->
console.log(name, @name)
return this if name is @name
_ = require("underscore")
_(@parts).chain().map (myPart)->
Loading
Loading
Loading
Loading
@@ -24,7 +24,6 @@ charGen.start = (socket)->
if remaining.length is 0 and not options.finish then options.finish = "Finish".green.bold
socket.choice(prompt, options)
.then (option)->
console.log("option: " + option)
if option is "abort" then throw new Error("Aborting...")
if option is "finish"
socket.tell("This is how you're character is going to start:")
Loading
Loading
@@ -42,7 +41,6 @@ charGen.start = (socket)->
setTimeout makePlayerLoop, 0
global.$game.common.charGen[option](socket)
.then (stats) ->
console.log("stat: " + stats)
results[option] = stats
remaining.remove options[option]
setTimeout makePlayerLoop, 0
Loading
Loading
@@ -217,7 +215,6 @@ charGen.stats = (socket) ->
socket.tell("The 'average' weight and height for people is about 1.7 meters and 75 kilograms (or about 6 foot tall and 180 pounds). Deviation from that is going to impact your play style.")
formatHeight = global.$game.constants.body.human.formatHeight
formatWeight = global.$game.constants.body.human.formatWeight
console.log(formatHeight)
askQuestion = ->
heightPrompt = """
What is the #{'height'.bold} of your character? Please answer in meters, between 0.5 and 3.
Loading
Loading
@@ -229,7 +226,6 @@ For example, if your character was 1.8 meters (about 6 feet tall), you would typ
.then (heightInput) ->
height = Math.floor(heightInput * 100) / 100
heightWord = formatHeight(height)
console.log "Ok " + heightWord
socket.question "That would make you " + heightWord + ". And your weight in kilograms?\n", (criteria) ->
return "Please enter a number between 15 and 300." if isNaN(parseInt(criteria)) or parseInt(criteria) < 15 or parseInt(criteria) > 300
.then (weightInput)->
Loading
Loading
@@ -268,15 +264,6 @@ charGen.appearance = (socket) ->
socket.choice "Great. And what's the #{'skin color'.bold} of your #{skinStyle}?", global.$game.constants.body.human.skinColor
.then (skinColorChoice)->
skinColor = global.$game.constants.body.human.skinColor[skinColorChoice]
console.log({
hairCut:hairCut,
hairColor:hairColor,
hairStyle:hairStyle,
eyeColor:eyeColor,
eyeStyle:eyeStyle,
skinColor:skinColor,
skinStyle:skinStyle
})
return {
hairCut:hairCut,
hairColor:hairColor,
Loading
Loading
Loading
Loading
@@ -31,7 +31,6 @@ user.tell = (what) ->
@getSocket()?.tell(what) if typeof what is "string"
 
user.isConnected = ->
console.log("Ah hell")
!!global.$driver.getSocket(this)
 
user.goIC = () ->
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment