Made hunger factor lower.

Raised fattening plank by 2.5 times.
Lowered the speed decreasement by 2 times.
Added "random look" option in character creation screen. The colors are weightd towards natural, but there's always a chance of "punk" coloring.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@542 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Rygzengrho
2010-12-05 20:40:52 +00:00
parent 0e858125e1
commit f35ae5edf9
7 changed files with 210 additions and 62 deletions

View File

@@ -29,6 +29,13 @@
icon_closed = "emergency" icon_closed = "emergency"
icon_opened = "emergencyopen" icon_opened = "emergencyopen"
/obj/closet/firecloset
desc = "A bulky (yet mobile) closet. Comes with supplies to fight fire."
name = "Fire Closet"
icon_state = "firecloset"
icon_closed = "firecloset"
icon_opened = "fireclosetopen"
/obj/closet/jcloset /obj/closet/jcloset
desc = "A bulky (yet mobile) closet. Comes with janitor's clothes and biohazard gear." desc = "A bulky (yet mobile) closet. Comes with janitor's clothes and biohazard gear."
name = "Custodial Closet" name = "Custodial Closet"

View File

@@ -235,7 +235,9 @@ var/showadminmessages = 1
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.") message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
del(M.client) del(M.client)
del(M) //del(M)
if("Cancel")
return
if (href_list["remove"]) if (href_list["remove"])
if ((src.rank in list( "Administrator", "Primary Administrator", "Shit Guy", "Coder", "Host" ))) if ((src.rank in list( "Administrator", "Primary Administrator", "Shit Guy", "Coder", "Host" )))

View File

@@ -120,8 +120,8 @@
var/health_deficiency = (100 - src.health) var/health_deficiency = (100 - src.health)
if(health_deficiency >= 40) tally += (health_deficiency / 25) if(health_deficiency >= 40) tally += (health_deficiency / 25)
var/hungry = (400 - src.nutrition)/5 // So overeat would be 100 and default level would be 80 var/hungry = (500 - src.nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/25 if (hungry >= 70) tally += hungry/50
if(src.wear_suit) if(src.wear_suit)
switch(src.wear_suit.type) switch(src.wear_suit.type)

View File

@@ -554,22 +554,20 @@
handle_chemicals_in_body() handle_chemicals_in_body()
if(reagents) reagents.metabolize(src) if(reagents) reagents.metabolize(src)
if(overeatduration > 200 && !(src.mutations & 32)) if(overeatduration > 500 && !(src.mutations & 32))
if(prob(5 + round((src.nutrition - 200) / 2))) src << "\red You suddenly feel blubbery!"
src << "\red You suddenly feel blubbery!" src.mutations |= 32
src.mutations |= 32 update_body()
update_body() if (overeatduration < 100 && src.mutations & 32)
if (overeatduration < 50 && src.mutations & 32) src << "\blue You feel fit again!"
if(prob(round((50 - src.nutrition) / 100))) src.mutations &= ~32
src << "\blue You feel fit again!" update_body()
src.mutations &= ~32
update_body()
// nutrition decrease // nutrition decrease
if (nutrition > 0 && src.stat != 2) if (nutrition > 0 && src.stat != 2)
nutrition = max (0, nutrition - HUNGER_FACTOR) nutrition = max (0, nutrition - HUNGER_FACTOR)
if (nutrition > 400) if (nutrition > 450)
overeatduration++ overeatduration++
else else
overeatduration = max (0, overeatduration - 1) overeatduration = max (0, overeatduration - 1)

View File

@@ -8,6 +8,7 @@ datum/preferences
var/midis = 1 var/midis = 1
var/ooccolor = "#b82e00" var/ooccolor = "#b82e00"
var/be_random_name = 0 var/be_random_name = 0
var/be_random_look = 0
var/underwear = 1 var/underwear = 1
var/occupation1 = "No Preference" var/occupation1 = "No Preference"
@@ -45,6 +46,112 @@ datum/preferences
else else
real_name = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names))) real_name = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
proc/randomize_hair_color(var/target = "hair")
var/red
var/green
var/blue
var/col = pick ("blonde", "black", "chestnut", "copper", "brown", "wheat", "old", "punk")
switch (col)
if ("blonde")
red = 226
green = 209
blue = 140
if ("black")
red = 0
green = 0
blue = 0
if ("chestnut")
red = 98
green = 77
blue = 60
if ("copper")
red = 152
green = 81
blue = 63
if ("brown")
red = 73
green = 52
blue = 39
if ("wheat")
red = 210
green = 191
blue = 158
if ("old")
red = rand (100, 255)
green = red
blue = red
if ("punk")
red = rand (0, 255)
green = rand (0, 255)
blue = rand (0, 255)
red = max(min(red + rand (-10, 10), 255), 0)
green = max(min(green + rand (-10, 10), 255), 0)
blue = max(min(blue + rand (-10, 10), 255), 0)
switch (target)
if ("hair")
r_hair = red
g_hair = green
b_hair = blue
if ("facial")
r_facial = red
g_facial = green
b_facial = blue
proc/randomize_eyes_color()
var/red
var/green
var/blue
var/col = pick ("black", "grey", "brown", "chestnut", "blue", "lightblue", "green", "albino", "weird")
switch (col)
if ("black")
red = 0
green = 0
blue = 0
if ("grey")
red = rand (100, 200)
green = red
blue = red
if ("brown")
red = 60
green = 30
blue = 19
if ("chestnut")
red = 127
green = 79
blue = 31
if ("blue")
red = 53
green = 51
blue = 64
if ("lightblue")
red = 94
green = 101
blue = 115
if ("green")
red = 115
green = 114
blue = 84
if ("albino")
red = rand (100, 255)
green = rand (0, 70)
blue = rand (0, 70)
if ("weird")
red = rand (0, 255)
green = rand (0, 255)
blue = rand (0, 255)
red = max(min(red + rand (-10, 10), 255), 0)
green = max(min(green + rand (-10, 10), 255), 0)
blue = max(min(blue + rand (-10, 10), 255), 0)
r_eyes = red
g_eyes = green
b_eyes = blue
proc/update_preview_icon() proc/update_preview_icon()
del(src.preview_icon) del(src.preview_icon)
@@ -190,9 +297,11 @@ datum/preferences
else else
dat += "\t<a href=\"byond://?src=\ref[user];preferences=1;occ=1\">No Preference</a><br>" dat += "\t<a href=\"byond://?src=\ref[user];preferences=1;occ=1\">No Preference</a><br>"
dat += "<hr><table><tr><td><b>Body</b><br>" dat += "<hr><table><tr><td><b>Body</b>"
dat += " (<a href=\"byond://?src=\ref[user];preferences=1;s_tone=random;underwear=random;age=random;b_type=random;hair=random;h_style=random;facial=random;f_style=random;eyes=random\">&reg;</A>)<br>" // Random look
dat += "Blood Type: <a href='byond://?src=\ref[user];preferences=1;b_type=input'>[src.b_type]</a><br>" dat += "Blood Type: <a href='byond://?src=\ref[user];preferences=1;b_type=input'>[src.b_type]</a><br>"
dat += "Skin Tone: <a href='byond://?src=\ref[user];preferences=1;s_tone=input'>[-src.s_tone + 35]/220</a><br>" dat += "Skin Tone: <a href='byond://?src=\ref[user];preferences=1;s_tone=input'>[-src.s_tone + 35]/220<br></a>"
if (!IsGuestKey(user.key)) if (!IsGuestKey(user.key))
dat += "Underwear: <a href =\"byond://?src=\ref[user];preferences=1;underwear=1\"><b>[src.underwear == 1 ? "Yes" : "No"]</b></a><br>" dat += "Underwear: <a href =\"byond://?src=\ref[user];preferences=1;underwear=1\"><b>[src.underwear == 1 ? "Yes" : "No"]</b></a><br>"
dat += "</td><td><b>Preview</b><br><img src=previewicon.png height=64 width=64></td></tr></table>" dat += "</td><td><b>Preview</b><br><img src=previewicon.png height=64 width=64></td></tr></table>"
@@ -379,33 +488,43 @@ datum/preferences
return return
if("random") if("random")
if (src.gender == MALE) src.randomize_name()
new_name = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
new_name = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
if(new_name) if(new_name)
if(length(new_name) >= 26) if(length(new_name) >= 26)
new_name = copytext(new_name, 1, 26) new_name = copytext(new_name, 1, 26)
src.real_name = new_name src.real_name = new_name
if (link_tags["age"]) if (link_tags["age"])
var/new_age = input(user, "Please select type in age: 20-45", "Character Generation") as num switch(link_tags["age"])
if ("input")
if(new_age) var/new_age = input(user, "Please select type in age: 20-45", "Character Generation") as num
src.age = max(min(round(text2num(new_age)), 45), 20) if(new_age)
src.age = max(min(round(text2num(new_age)), 45), 20)
if ("random")
src.age = rand (20, 45)
if (link_tags["b_type"]) if (link_tags["b_type"])
var/new_b_type = input(user, "Please select a blood type:", "Character Generation") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" ) switch(link_tags["b_type"])
if ("input")
var/new_b_type = input(user, "Please select a blood type:", "Character Generation") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
if (new_b_type)
src.b_type = new_b_type
if ("random")
src.b_type = pick ("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
if (new_b_type)
src.b_type = new_b_type
if (link_tags["hair"]) if (link_tags["hair"])
var/new_hair = input(user, "Please select hair color.", "Character Generation") as color switch(link_tags["hair"])
if(new_hair) if ("input")
src.r_hair = hex2num(copytext(new_hair, 2, 4)) var/new_hair = input(user, "Please select hair color.", "Character Generation") as color
src.g_hair = hex2num(copytext(new_hair, 4, 6)) if(new_hair)
src.b_hair = hex2num(copytext(new_hair, 6, 8)) src.r_hair = hex2num(copytext(new_hair, 2, 4))
src.g_hair = hex2num(copytext(new_hair, 4, 6))
src.b_hair = hex2num(copytext(new_hair, 6, 8))
if ("random")
randomize_hair_color("hair")
/* /*
if (link_tags["r_hair"]) if (link_tags["r_hair"])
var/new_component = input(user, "Please select red hair component: 1-255", "Character Generation") as text var/new_component = input(user, "Please select red hair component: 1-255", "Character Generation") as text
@@ -427,11 +546,16 @@ datum/preferences
*/ */
if (link_tags["facial"]) if (link_tags["facial"])
var/new_facial = input(user, "Please select facial hair color.", "Character Generation") as color switch(link_tags["facial"])
if(new_facial) if ("input")
src.r_facial = hex2num(copytext(new_facial, 2, 4)) var/new_facial = input(user, "Please select facial hair color.", "Character Generation") as color
src.g_facial = hex2num(copytext(new_facial, 4, 6)) if(new_facial)
src.b_facial = hex2num(copytext(new_facial, 6, 8)) src.r_facial = hex2num(copytext(new_facial, 2, 4))
src.g_facial = hex2num(copytext(new_facial, 4, 6))
src.b_facial = hex2num(copytext(new_facial, 6, 8))
if ("random")
randomize_hair_color("facial")
/* /*
if (link_tags["r_facial"]) if (link_tags["r_facial"])
var/new_component = input(user, "Please select red facial component: 1-255", "Character Generation") as text var/new_component = input(user, "Please select red facial component: 1-255", "Character Generation") as text
@@ -452,11 +576,16 @@ datum/preferences
src.b_facial = max(min(round(text2num(new_component)), 255), 1) src.b_facial = max(min(round(text2num(new_component)), 255), 1)
*/ */
if (link_tags["eyes"]) if (link_tags["eyes"])
var/new_eyes = input(user, "Please select eye color.", "Character Generation") as color switch(link_tags["eyes"])
if(new_eyes) if ("input")
src.r_eyes = hex2num(copytext(new_eyes, 2, 4)) var/new_eyes = input(user, "Please select eye color.", "Character Generation") as color
src.g_eyes = hex2num(copytext(new_eyes, 4, 6)) if(new_eyes)
src.b_eyes = hex2num(copytext(new_eyes, 6, 8)) src.r_eyes = hex2num(copytext(new_eyes, 2, 4))
src.g_eyes = hex2num(copytext(new_eyes, 4, 6))
src.b_eyes = hex2num(copytext(new_eyes, 6, 8))
if ("random")
randomize_eyes_color()
/* /*
if (link_tags["r_eyes"]) if (link_tags["r_eyes"])
var/new_component = input(user, "Please select red eyes component: 1-255", "Character Generation") as text var/new_component = input(user, "Please select red eyes component: 1-255", "Character Generation") as text
@@ -477,17 +606,23 @@ datum/preferences
src.b_eyes = max(min(round(text2num(new_component)), 255), 1) src.b_eyes = max(min(round(text2num(new_component)), 255), 1)
*/ */
if (link_tags["s_tone"]) if (link_tags["s_tone"])
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text switch(link_tags["s_tone"])
if ("random")
if (new_tone) src.s_tone = -(rand (1, 220))
src.s_tone = max(min(round(text2num(new_tone)), 220), 1) if("input")
src.s_tone = -src.s_tone + 35 var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
if (new_tone)
src.s_tone = max(min(round(text2num(new_tone)), 220), 1)
src.s_tone = -src.s_tone + 35
if (link_tags["h_style"]) if (link_tags["h_style"])
var/new_style = input(user, "Please select hair style", "Character Generation") as null|anything in list( "Cut Hair", "Short Hair", "Long Hair", "Mohawk", "Balding", "Fag", "Bedhead", "Dreadlocks", "Bald" ) switch(link_tags["h_style"])
if ("random")
if (new_style) src.h_style = pick ("Cut Hair", "Short Hair", "Long Hair", "Mohawk", "Balding", "Fag", "Bedhead", "Dreadlocks", "Bald")
src.h_style = new_style if("input")
var/new_style = input(user, "Please select hair style", "Character Generation") as null|anything in list( "Cut Hair", "Short Hair", "Long Hair", "Mohawk", "Balding", "Fag", "Bedhead", "Dreadlocks", "Bald" )
if (new_style)
src.h_style = new_style
if (link_tags["ooccolor"]) if (link_tags["ooccolor"])
var/ooccolor = input(user, "Please select OOC colour.", "OOC colour") as color var/ooccolor = input(user, "Please select OOC colour.", "OOC colour") as color
@@ -496,10 +631,13 @@ datum/preferences
src.ooccolor = ooccolor src.ooccolor = ooccolor
if (link_tags["f_style"]) if (link_tags["f_style"])
var/new_style = input(user, "Please select facial style", "Character Generation") as null|anything in list("Watson", "Chaplin", "Selleck", "Full Beard", "Long Beard", "Neckbeard", "Van Dyke", "Elvis", "Abe", "Chinstrap", "Hipster", "Goatee", "Hogan", "Shaved") switch(link_tags["f_style"])
if ("random")
if (new_style) src.f_style = pick ("Watson", "Chaplin", "Selleck", "Full Beard", "Long Beard", "Neckbeard", "Van Dyke", "Elvis", "Abe", "Chinstrap", "Hipster", "Goatee", "Hogan", "Shaved")
src.f_style = new_style if("input")
var/new_style = input(user, "Please select facial style", "Character Generation") as null|anything in list("Watson", "Chaplin", "Selleck", "Full Beard", "Long Beard", "Neckbeard", "Van Dyke", "Elvis", "Abe", "Chinstrap", "Hipster", "Goatee", "Hogan", "Shaved")
if (new_style)
src.f_style = new_style
if (link_tags["gender"]) if (link_tags["gender"])
if (src.gender == MALE) if (src.gender == MALE)
@@ -521,10 +659,14 @@ datum/preferences
if (link_tags["underwear"]) if (link_tags["underwear"])
if(!IsGuestKey(user.key)) if(!IsGuestKey(user.key))
if (src.underwear == 1) switch(link_tags["underwear"])
src.underwear = 0 if ("random")
else src.underwear = rand (0, 1)
src.underwear = 1 if("input")
if (src.underwear == 1)
src.underwear = 0
else
src.underwear = 1
if (link_tags["b_syndicate"]) if (link_tags["b_syndicate"])
src.be_syndicate = !( src.be_syndicate ) src.be_syndicate = !( src.be_syndicate )

View File

@@ -18,8 +18,8 @@
#define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16 #define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16
//Amount of air needed before pass out/suffocation commences //Amount of air needed before pass out/suffocation commences
// Factor of how fast mob nutriment decreases // Factor of how fast mob nutrition decreases
#define HUNGER_FACTOR 0.1 #define HUNGER_FACTOR 0.07
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 #define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05

View File

@@ -574,7 +574,6 @@
#include "code\modules\mob\dead\observer\login.dm" #include "code\modules\mob\dead\observer\login.dm"
#include "code\modules\mob\dead\observer\observer.dm" #include "code\modules\mob\dead\observer\observer.dm"
#include "code\modules\mob\dead\observer\say.dm" #include "code\modules\mob\dead\observer\say.dm"
#include "code\modules\mob\living\say.dm"
#include "code\modules\mob\living\carbon\carbon.dm" #include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\alien\say.dm" #include "code\modules\mob\living\carbon\alien\say.dm"
#include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm" #include "code\modules\mob\living\carbon\alien\humanoid\alien_powers.dm"