New nutrition system:

UI icon for your nutrition status. If not working - will be fixed a little later.
Walking makes you hungry faster. Running makes you hungry even faster.
Big hunger makes you slower.
Overeating for a prolonged period makes you fat.
Meat from gibber depends on nutrition of person who was put into it. Fatties go first.
If a person is in a sleeper or Cryo Cell, all his processes running 5 times slower.
Fixed bug when multiple persons could move into one sleeper.
Warden is now choosable after the game started.
Added ED-209 assembly process. Frame - Metal sheet - leg - leg - weld - security vest - helmet - proximity - wires - taser - battery. Security should reprogram it to patrol after that.
Added ED-209 sounds.
Added Airlock Electronics. When you want to make airlock - you take one, swipe your ID, if it is ok, you choose desired access and put it into the assembly instead of multitool. Also when disassembling, you get one.
Added prototype of chemical explosions system. WIP.
Added Imidazoline, Glycerol, Niroglicerin.
Added Explosion verb to the admins.
Added Attack Log verb. Does not work yet. WIP
Added output of jobban messages to the jobbaned person.
Standing/lying icon updates accordingly to your state.
Bucket now has volume 90. It was strange that beaker was larger than a bucket.
Changed Master Controller to introduce the new status output - loop frequency. If it will lag - revert just master controller file back.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@522 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
Rygzengrho
2010-12-03 10:52:37 +00:00
parent 899274b60a
commit fa8844dd49
39 changed files with 4339 additions and 4041 deletions

View File

@@ -158,11 +158,14 @@ var/showadminmessages = 1
return
if (jobban_isbanned(M, job))
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
M << "\red<BIG><B>You have been un-jobbanned by [usr.client.ckey] from [job].</B></BIG>"
message_admins("\blue [key_name_admin(usr)] unbanned [key_name_admin(M)] from [job]", 1)
jobban_unban(M, job)
href_list["jobban2"] = 1
else
log_admin("[key_name(usr)] banned [key_name(M)] from [job]")
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from [job].</B></BIG>"
M << "\red Jooban can be lifted only on demand."
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [job]", 1)
jobban_fullban(M, job)
href_list["jobban2"] = 1 // lets it fall through and refresh
@@ -196,7 +199,7 @@ var/showadminmessages = 1
if ((M.client && M.client.holder && (M.client.holder.level >= src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
switch(alert("Temporary Ban?",,"Yes","No"))
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num
if(!mins)
@@ -645,10 +648,10 @@ var/showadminmessages = 1
foo += text("<B>Hasn't Entered Game</B> | ")
foo += text("<A HREF='?src=\ref[src];forcespeech=\ref[M]'>Say</A> | ")
foo += text("<A href='?src=\ref[src];mute2=\ref[M]'>Mute: [(M.muted ? "Muted" : "Voiced")]</A> | ")
foo += text("<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> | ")
foo += text("<A href='?src=\ref[src];boot2=\ref[M]'>Boot</A> | ")
foo += text("<A href='?src=\ref[src];jumpto=\ref[M]'>Jump to</A> | ")
foo += text("<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> \]")
foo += text("<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> | ")
dat += text("<body>[foo]</body></html>")
usr << browse(dat, "window=adminplayeropts;size=480x100")

View File

@@ -49,6 +49,7 @@
src.verbs += /client/proc/cmd_admin_delete
src.verbs += /client/proc/cmd_admin_direct_narrate // -- TLE
src.verbs += /client/proc/cmd_admin_drop_everything
src.verbs += /client/proc/cmd_admin_explosion
src.verbs += /client/proc/cmd_admin_gib
src.verbs += /client/proc/cmd_admin_gib_self
src.verbs += /client/proc/cmd_admin_godmode
@@ -63,6 +64,7 @@
src.verbs += /client/proc/cmd_admin_world_narrate // -- TLE
src.verbs += /client/proc/cmd_debug_del_all
src.verbs += /client/proc/cmd_modify_ticker_variables
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/deadchat //toggles deadchat
src.verbs += /client/proc/Debug2 //debug toggle switch
src.verbs += /client/proc/drop_bomb // -- TLE
@@ -144,6 +146,7 @@
src.verbs += /client/proc/cmd_admin_delete
src.verbs += /client/proc/cmd_admin_direct_narrate // -- TLE
src.verbs += /client/proc/cmd_admin_drop_everything
src.verbs += /client/proc/cmd_admin_explosion
src.verbs += /client/proc/cmd_admin_gib
src.verbs += /client/proc/cmd_admin_gib_self
src.verbs += /client/proc/cmd_admin_godmode
@@ -159,6 +162,7 @@
src.verbs += /client/proc/cmd_debug_del_all
src.verbs += /client/proc/cmd_debug_tog_aliens
src.verbs += /client/proc/cmd_modify_ticker_variables
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/deadchat //toggles deadchat
src.verbs += /client/proc/Debug2 //debug toggle switch
src.verbs += /client/proc/dsay
@@ -516,6 +520,7 @@
src.verbs -= /client/proc/cmd_admin_say
src.verbs -= /client/proc/dsay
src.verbs -= /client/proc/play_sound
src.verbs -= /client/proc/cmd_admin_explosion
src.verbs -= /client/proc/cmd_admin_gib
src.verbs -= /client/proc/cmd_admin_gib_self
// src.verbs -= /client/proc/modifytemperature
@@ -534,6 +539,7 @@
src.verbs -= /client/proc/jumptokey
src.verbs -= /client/proc/cmd_admin_alienize
src.verbs -= /client/proc/cmd_admin_changelinginize
src.verbs -= /client/proc/cmd_admin_grantfullaccess
// src.verbs -= /client/proc/cmd_admin_list_admins
src.verbs -= /client/proc/Getmob
src.verbs -= /client/proc/sendmob
@@ -899,6 +905,7 @@
src.verbs += /client/proc/cmd_debug_del_all
src.verbs += /client/proc/play_sound
src.verbs += /client/proc/modifytemperature
src.verbs += /client/proc/cmd_admin_explosion
src.verbs += /client/proc/cmd_admin_gib
src.verbs += /client/proc/cmd_admin_gib_self
src.verbs += /proc/toggle_adminmsg
@@ -920,6 +927,7 @@
// src.verbs += /client/proc/getmobs
// src.verbs += /client/proc/cmd_admin_list_admins
src.verbs += /client/proc/cmd_admin_list_occ
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /proc/togglebuildmode
src.verbs += /client/proc/jumptokey
src.verbs += /client/proc/Getmob
@@ -978,6 +986,7 @@
src.verbs += /client/proc/cmd_debug_del_all
src.verbs += /client/proc/play_sound
src.verbs += /client/proc/modifytemperature
src.verbs += /client/proc/cmd_admin_explosion
src.verbs += /client/proc/cmd_admin_gib
src.verbs += /client/proc/cmd_admin_gib_self
// src.verbs += /proc/toggleai
@@ -1001,6 +1010,7 @@
// src.verbs += /client/proc/getmobs
// src.verbs += /client/proc/cmd_admin_list_admins
src.verbs += /client/proc/cmd_admin_list_occ
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/jumptokey
src.verbs += /client/proc/Getmob
src.verbs += /client/proc/jobbans
@@ -1311,6 +1321,7 @@
src.verbs -= /client/proc/cmd_modify_object_variables
src.verbs -= /client/proc/cmd_modify_ticker_variables
src.verbs -= /client/proc/cmd_admin_check_contents
src.verbs -= /client/proc/cmd_admin_explosion
src.verbs -= /client/proc/cmd_admin_gib
src.verbs -= /client/proc/cmd_admin_pm
src.verbs += /client/proc/cmd_admin_gib_self
@@ -1333,6 +1344,7 @@
// src.verbs += /client/proc/getmobs
// src.verbs += /client/proc/cmd_admin_list_admins
src.verbs += /client/proc/cmd_admin_list_occ
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs -= /proc/togglebuildmode
src.verbs -= /client/proc/jumptokey
src.verbs -= /client/proc/Getmob
@@ -1391,6 +1403,7 @@
src.verbs += /client/proc/cmd_debug_del_all
src.verbs += /client/proc/play_sound
src.verbs += /client/proc/modifytemperature
src.verbs -= /client/proc/cmd_admin_explosion
src.verbs -= /client/proc/cmd_admin_gib
src.verbs += /client/proc/cmd_admin_gib_self
// src.verbs += /proc/toggleai
@@ -1414,6 +1427,7 @@
// src.verbs += /client/proc/getmobs
// src.verbs += /client/proc/cmd_admin_list_admins
src.verbs += /client/proc/cmd_admin_list_occ
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs -= /client/proc/jumptokey
src.verbs -= /client/proc/Getmob
src.verbs += /client/proc/jobbans

View File

@@ -234,4 +234,22 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
aliens_allowed = !aliens_allowed
log_admin("[key_name(src)] has turned aliens [aliens_allowed ? "on" : "off"].")
message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0)
message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0)
/client/proc/cmd_admin_grantfullaccess(var/mob/M in world)
set category = "Admin"
set name = "Grant Full Access"
if (!ticker)
alert("Wait until the game starts")
return
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if (H.wear_id)
log_admin("[key_name(src)] has granted [M.key] full access.")
H.wear_id.icon_state = "gold"
H.wear_id.access = get_all_accesses()
else
alert("Invalid ID card")
else
alert("Invalid mob")

View File

@@ -289,6 +289,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
M.weakened = 0
M.radiation = 0
M.health = 100
M.nutrition = 400
M.updatehealth()
M.buckled = initial(M.buckled)
M.handcuffed = initial(M.handcuffed)
@@ -348,6 +349,32 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
for(var/t in occupations)
src << "[t]<br>"
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
set category = "Special Verbs"
set name = "Explosion"
if (!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num
var/light = input("Range of light impact. -1 to none", text("Input")) as num
var/flash = input("Range of flash. -1 to none", text("Input")) as num
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
if ((devastation > 20) || (heavy > 20) || (light > 20))
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
return
explosion (O, devastation, heavy, light, flash)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flash]) at ([O.x],[O.y],[O.z])", 1)
return
else
return
/client/proc/cmd_admin_gib(mob/M as mob in world)
set category = "Special Verbs"
set name = "Gib"
@@ -524,4 +551,13 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
emergency_shuttle.recall()
return
return
/client/proc/cmd_admin_attack_log(mob/M as mob in world)
set category = "Special Verbs"
set name = "Attack Log"
//var/list/L = M.get_contents()
usr << text("\red <b>Attack Log <20><><EFBFBD> []</b>", mob)
for(var/t in M.attack_log)
usr << "[t]"

View File

@@ -352,7 +352,7 @@
src.mutations &= ~32
// update_body()
if (src.nutrition > 0)
src.nutrition--
src.nutrition -= HUNGER_FACTOR
if (src.drowsyness)
src.drowsyness--

View File

@@ -258,7 +258,7 @@
if(reagents) reagents.metabolize(src)
if(src.nutrition > 400 && !(src.mutations & 32))
if(src.nutrition > 500 && !(src.mutations & 32))
if(prob(5 + round((src.nutrition - 200) / 2)))
src << "\red You suddenly feel blubbery!"
src.mutations |= 32
@@ -269,7 +269,7 @@
src.mutations &= ~32
// update_body()
if (src.nutrition > 0)
src.nutrition--
src.nutrition-= HUNGER_FACTOR
if (src.drowsyness)
src.drowsyness--

View File

@@ -1,8 +1,10 @@
/mob/living/carbon/Move(NewLoc, direct)
. = ..()
if(.)
if(src.nutrition)
src.nutrition--
if(src.nutrition && src.stat != 2)
src.nutrition -= HUNGER_FACTOR/2
if(src.m_intent == "run")
src.nutrition -= HUNGER_FACTOR/2
if(src.mutations & 32 && src.m_intent == "run")
src.bodytemperature += 2

View File

@@ -101,6 +101,14 @@
else
usr << "\red <B>[src.name] looks severely burned!</B>"
if (src.nutrition < 100)
usr << "\red [src.name] looks like flesh and bones."
else if (src.nutrition >= 600)
if (usr.nutrition < 100)
usr << "\red [src.name] looks very round and delicious. Like a little piggy. A tasty piggy."
else
usr << "\blue [src.name] looks quite chubby."
if (src.stat == 1)
usr << "\red [src.name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep."
else if (src.brainloss >= 60)

View File

@@ -426,6 +426,12 @@
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.nutrition_icon = new /obj/screen( null )
mymob.nutrition_icon.icon = 'fullness.dmi'
mymob.nutrition_icon.icon_state = "fullness0"
mymob.nutrition_icon.name = "fullness"
mymob.nutrition_icon.screen_loc = ui_nutrition
mymob.pullin = new /obj/screen( null )
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"

View File

@@ -120,6 +120,9 @@
var/health_deficiency = (100 - src.health)
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
if (hungry >= 70) tally += hungry/25
if(src.wear_suit)
switch(src.wear_suit.type)
if(/obj/item/clothing/suit/straight_jacket)

View File

@@ -553,21 +553,26 @@
TakeDamage("r_hand", 0, 0.25*discomfort)
handle_chemicals_in_body()
if(reagents) reagents.metabolize(src)
if(src.nutrition > 400 && !(src.mutations & 32))
if(overeatduration > 200 && !(src.mutations & 32))
if(prob(5 + round((src.nutrition - 200) / 2)))
src << "\red You suddenly feel blubbery!"
src.mutations |= 32
update_body()
if (src.nutrition < 100 && src.mutations & 32)
if (overeatduration < 50 && src.mutations & 32)
if(prob(round((50 - src.nutrition) / 100)))
src << "\blue You feel fit again!"
src.mutations &= ~32
update_body()
if (src.nutrition > 0)
src.nutrition--
// nutrition decrease
if (nutrition > 0 && src.stat != 2)
nutrition = max (0, nutrition - HUNGER_FACTOR)
if (nutrition > 400)
overeatduration++
else
overeatduration = max (0, overeatduration - 1)
if (src.drowsyness)
src.drowsyness--
@@ -734,8 +739,23 @@
else
src.healths.icon_state = "health7"
if (src.nutrition_icon)
switch(nutrition)
if(450 to INFINITY)
src.nutrition_icon.icon_state = "fullness0"
if(350 to 450)
src.nutrition_icon.icon_state = "fullness1"
if(250 to 350)
src.nutrition_icon.icon_state = "fullness2"
if(150 to 250)
src.nutrition_icon.icon_state = "fullness3"
else
src.nutrition_icon.icon_state = "fullness4"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
if(src.resting || src.lying || src.sleeping) src.rest.icon_state = "rest[(src.resting || src.lying || src.sleeping) ? 1 : 0]"
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
@@ -835,6 +855,15 @@
if(!M.nodamage)
M.bruteloss += 5
src.nutrition += 10
/*
// Commented out so hunger system won't be such shock
// Damage and effects from not eating
if(src.nutrition <= 50)
src.bruteloss++
if (prob (10))
src << "You feel very weak"
src.weakened += rand(2, 3)
*/
/*
snippets

View File

@@ -2021,6 +2021,8 @@
if (src.client && src.client.holder)
stat(null, "([x], [y], [z])")
stat(null, "CPU: [world.cpu]")
//if (master_controller)
// stat(null, "Loop: [master_controller.loop_freq]")
/client/proc/station_explosion_cinematic(var/derp)
if(src.mob)

View File

@@ -215,6 +215,8 @@ mob/new_player
AttemptLateSpawn("Cargo Technician", cargotechMax)
if ("27")
AttemptLateSpawn("Chief Medical Officer", cmoMax)
if ("28")
AttemptLateSpawn("Warden", wardenMax)
if(!ready && href_list["preferences"])
preferences.process_link(src, href_list)
@@ -375,6 +377,8 @@ mob/new_player
dat += "<a href='byond://?src=\ref[src];SelectedJob=26'>Cargo Technician</a><br>"
if (IsJobAvailable("Chief Medical Officer",cmoMax))
dat += "<a href='byond://?src=\ref[src];SelectedJob=27'>Chief Medical Officer</a><br>"
if (IsJobAvailable("Warden", wardenMax))
dat += "<a href='byond://?src=\ref[src];SelectedJob=28'>Warden</a><br>"
if (!jobban_isbanned(src,"Assistant"))
dat += "<a href='byond://?src=\ref[src];SelectedJob=18'>Assistant</a><br>"