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
@@ -94,8 +94,17 @@ datum
|
||||
R.on_mob_life(M)
|
||||
update_total()
|
||||
|
||||
handle_reactions()
|
||||
conditional_update_move(var/atom/A, var/Running = 0)
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
R.on_move (A, Running)
|
||||
update_total()
|
||||
|
||||
conditional_update(var/atom/A, )
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
R.on_update (A)
|
||||
update_total()
|
||||
|
||||
handle_reactions()
|
||||
if(ismob(my_atom)) return //No reactions inside mobs :I
|
||||
|
||||
for(var/A in typesof(/datum/chemical_reaction) - /datum/chemical_reaction)
|
||||
@@ -243,6 +252,14 @@ datum
|
||||
|
||||
return 0
|
||||
|
||||
get_reagents()
|
||||
var/res = ""
|
||||
for(var/datum/reagent/A in reagent_list)
|
||||
if (res != "") res += ","
|
||||
res += A.name
|
||||
|
||||
return res
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,12 @@ datum
|
||||
holder.remove_reagent(src.id, 0.4) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
on_move(var/mob/M)
|
||||
return
|
||||
|
||||
on_update(var/atom/A)
|
||||
return
|
||||
|
||||
metroid
|
||||
name = "Metroid Jam"
|
||||
id = "metroid"
|
||||
@@ -533,6 +539,18 @@ datum
|
||||
M << "\red \the [O] melts."
|
||||
del(O)
|
||||
|
||||
glycerol
|
||||
name = "Glycerol"
|
||||
id = "glycerol"
|
||||
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
|
||||
reagent_state = LIQUID
|
||||
|
||||
nitroglycerin
|
||||
name = "Nitroglycerin"
|
||||
id = "nitroglycerin"
|
||||
description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol."
|
||||
reagent_state = LIQUID
|
||||
|
||||
radium
|
||||
name = "Radium"
|
||||
id = "radium"
|
||||
@@ -885,6 +903,18 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
imidazoline
|
||||
name = "imidazoline"
|
||||
id = "imidazoline"
|
||||
description = "Heals eye damage"
|
||||
reagent_state = LIQUID
|
||||
on_mob_life(var/mob/M)
|
||||
if(!M) M = holder.my_atom
|
||||
M:eye_blurry = max(M:eye_blurry-5 , 0)
|
||||
M:eye_blind = max(M:eye_blind-5 , 0)
|
||||
..()
|
||||
return
|
||||
|
||||
arithrazine
|
||||
name = "Arithrazine"
|
||||
id = "arithrazine"
|
||||
@@ -1057,7 +1087,7 @@ datum
|
||||
data++
|
||||
..()
|
||||
return
|
||||
/*
|
||||
/*
|
||||
addiction //Is a generic "addiction" reagent that is produced by any chemical that is addictive.
|
||||
name = "Addiction" // It should never be seen by the player since it only exists inside the body.
|
||||
id = "addiction"
|
||||
@@ -1115,6 +1145,7 @@ datum
|
||||
..()
|
||||
return
|
||||
*/
|
||||
|
||||
/////////////////////////Food Reagents////////////////////////////
|
||||
// Part of the food code. Nutriment is used instead of the old "heal_amt" code. Also is where all the food
|
||||
// condiments, additives, and such go.
|
||||
@@ -1125,8 +1156,8 @@ datum
|
||||
reagent_state = SOLID
|
||||
on_mob_life(var/mob/M)
|
||||
if(!M) M = holder.my_atom
|
||||
if(prob(50))M:bruteloss--
|
||||
M:nutrition += 20 //This is the bit that makes you fat.
|
||||
if(prob(50)) M:bruteloss--
|
||||
M:nutrition += 10 // For hunger and fatness
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -25,17 +25,14 @@ datum
|
||||
id = "explosion_potassium"
|
||||
result = null
|
||||
required_reagents = list("water" = 1, "potassium" = 1)
|
||||
result_amount = null
|
||||
result_amount = 2
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
for(var/mob/M in viewers(5, location))
|
||||
M << "\red The solution violently explodes."
|
||||
for(var/mob/M in viewers(1, location))
|
||||
M << "\red The explosion knocks you down."
|
||||
M:weakened += 3
|
||||
var/datum/effects/system/reagents_explosion/e = new()
|
||||
e.set_up(round (created_volume/10, 1), location, 0, 0)
|
||||
e.start()
|
||||
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
silicate
|
||||
@@ -206,6 +203,13 @@ datum
|
||||
required_reagents = list("cryptobiolin" = 1, "inaprovaline" = 1)
|
||||
result_amount = 2
|
||||
|
||||
imidazoline
|
||||
name = "imidazoline"
|
||||
id = "imidazoline"
|
||||
result = "imidazoline"
|
||||
required_reagents = list("carbon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
|
||||
result_amount = 2
|
||||
|
||||
ethylredoxrazine
|
||||
name = "Ethylredoxrazine"
|
||||
id = "ethylredoxrazine"
|
||||
@@ -220,6 +224,28 @@ datum
|
||||
required_reagents = list("ethylredoxrazine" = 1, "ethanol" = 1)
|
||||
result_amount = 2
|
||||
|
||||
glycerol
|
||||
name = "Glycerol"
|
||||
id = "glycerol"
|
||||
result = "glycerol"
|
||||
required_reagents = list("oliveoil" = 3, "acid" = 1)
|
||||
result_amount = 1
|
||||
|
||||
nitroglycerin
|
||||
name = "Nitroglycerin"
|
||||
id = "nitroglycerin"
|
||||
result = "nitroglycerin"
|
||||
required_reagents = list("glycerol" = 1, "pacid" = 1, "acid" = 1)
|
||||
result_amount = 2
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effects/system/reagents_explosion/e = new()
|
||||
e.set_up(round (created_volume/2, 1), location, 0, 0)
|
||||
e.start()
|
||||
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
sodiumchloride
|
||||
name = "Sodium Chloride"
|
||||
id = "sodiumchloride"
|
||||
|
||||
@@ -781,11 +781,30 @@
|
||||
return 0
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(M == user) //If you're eating it yourself.
|
||||
M << "\blue You take a bite of [src]."
|
||||
if (M.nutrition <= 50)
|
||||
M << "\red You hungrily chew out a piece of [src] and gobble it!"
|
||||
if (M.nutrition > 50 && M.nutrition <= 150)
|
||||
M << "\blue You hungrily begin to eat [src]."
|
||||
if (M.nutrition > 150 && M.nutrition <= 350)
|
||||
M << "\blue You take a bite of [src]."
|
||||
if (M.nutrition > 350 && M.nutrition <= 550)
|
||||
M << "\blue You unwillingly chew a bit of [src]."
|
||||
if (M.nutrition > (550 * (1 + M.overeatduration / 1000))) // The more he eats - the more he can eat
|
||||
M << "\red You cannot force any more of [src] to go down your throat."
|
||||
return 0
|
||||
else //If you're feeding it to someone else.
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] attempts to feed [M] [src].", 1)
|
||||
if (M.nutrition <= (550 * (1 + M.overeatduration / 1000)))
|
||||
O.show_message("\red [user] attempts to feed [M] [src].", 1)
|
||||
else
|
||||
O.show_message("\red [user] cannot force anymore of [src] down [M] throat.", 1)
|
||||
return 0
|
||||
|
||||
if(!do_mob(user, M)) return
|
||||
|
||||
M.attack_log += text("[] <b>[]/[]</b> feeds <b>[]/[]</b> with <b>[]</b>", world.time, user, user.client, M, M.client, src)
|
||||
user.attack_log += text("[] <b>[]/[]</b> feeds <b>[]/[]</b> with <b>[]</b>", world.time, user, user.client, M, M.client, src)
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
if(reagents) //Handle ingestion of the reagent.
|
||||
@@ -1001,10 +1020,10 @@
|
||||
m_amt = 200
|
||||
g_amt = 0
|
||||
|
||||
amount_per_transfer_from_this = 10
|
||||
amount_per_transfer_from_this = 20
|
||||
flags = FPRINT | OPENCONTAINER
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(30)
|
||||
var/datum/reagents/R = new/datum/reagents(90)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ var
|
||||
scientistMax = 3
|
||||
chemistMax = 1
|
||||
geneticistMax = 2
|
||||
securityMax = 7
|
||||
securityMax = 6
|
||||
hopMax = 1
|
||||
hosMax = 1
|
||||
directorMax = 1
|
||||
@@ -97,6 +97,7 @@ var
|
||||
librarianMax = 1
|
||||
lawyerMax = 1
|
||||
viroMax = 1
|
||||
wardenMax = 1
|
||||
cmoMax = 1
|
||||
|
||||
list/bombers = list( )
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/obj/screen/bodytemp = null
|
||||
var/obj/screen/healths = null
|
||||
var/obj/screen/throw_icon = null
|
||||
var/obj/screen/nutrition_icon = null
|
||||
|
||||
// var/list/obj/hallucination/hallucinations = list() - Not used at all - Skie
|
||||
|
||||
@@ -32,6 +33,7 @@
|
||||
var/computer_id = null
|
||||
var/lastattacker = null
|
||||
var/lastattacked = null
|
||||
var/attack_log = list( )
|
||||
var/already_placed = 0.0
|
||||
var/obj/machinery/machine = null
|
||||
var/other_mobs = null
|
||||
@@ -79,11 +81,13 @@
|
||||
var/is_jittery = 0
|
||||
var/jitteriness = 0
|
||||
var/charges = 0.0
|
||||
var/nutrition = 0.0
|
||||
var/nutrition = 400.0
|
||||
var/overeatduration = 0 // How long this guy is overeating
|
||||
var/paralysis = 0.0
|
||||
var/stunned = 0.0
|
||||
var/weakened = 0.0
|
||||
var/losebreath = 0.0
|
||||
var/metabslow = 0 // Metabolism slowed
|
||||
var/muted = null
|
||||
var/intent = null
|
||||
var/shakecamera = 0
|
||||
|
||||
@@ -203,9 +203,6 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/mustardbomb/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (src.det_time == 80)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#define ui_fire "EAST+1, NORTH-8"
|
||||
#define ui_temp "EAST+1, NORTH-10"
|
||||
#define ui_health "EAST+1, NORTH-11"
|
||||
#define ui_nutrition "EAST+1, NORTH-12"
|
||||
#define ui_pull "SOUTH-1,10"
|
||||
#define ui_hand "SOUTH-1,6"
|
||||
#define ui_sleep "EAST+1, NORTH-13"
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
icon = 'Cryogenic2.dmi'
|
||||
icon_state = "sleeper_0"
|
||||
density = 1
|
||||
var/occupied = 0 // So there won't be multiple persons trying to get into one sleeper
|
||||
var/mob/occupant = null
|
||||
anchored = 1
|
||||
|
||||
@@ -226,6 +227,7 @@
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.metabslow = 0
|
||||
src.occupant = null
|
||||
src.icon_state = "sleeper_0"
|
||||
return
|
||||
@@ -281,6 +283,8 @@
|
||||
return
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
|
||||
occupied = 0
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/verb/move_inside()
|
||||
@@ -289,23 +293,27 @@
|
||||
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (src.occupant)
|
||||
if (occupied)
|
||||
usr << "\blue <B>The sleeper is already occupied!</B>"
|
||||
return
|
||||
/* if (usr.abiotic()) // Removing the requirement for user to be naked -- TLE
|
||||
usr << "Subject may not have abiotic items on."
|
||||
return*/
|
||||
for (var/mob/V in viewers(usr))
|
||||
occupied = 1
|
||||
V.show_message("[usr] starts climbing into the sleeper.", 3)
|
||||
if(do_after(usr, 20))
|
||||
usr.pulling = null
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.metabslow = 1
|
||||
src.occupant = usr
|
||||
src.icon_state = "sleeper_1"
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
else
|
||||
occupied = 0
|
||||
return
|
||||
@@ -163,6 +163,7 @@
|
||||
src.L += new /obj/item/weapon/weldingtool(src)
|
||||
src.L += new /obj/item/clothing/head/helmet/welding(src)
|
||||
src.L += new /obj/item/device/multitool(src)
|
||||
src.L += new /obj/item/weapon/airlock_electronics(src)
|
||||
src.L += new /obj/item/device/flashlight(src)
|
||||
src.L += new /obj/item/weapon/extinguisher(src)
|
||||
src.L += new /obj/item/weapon/sheet/metal(src)
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
if(!ismob(G:affecting))
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "\blue <B>The sleeper is already occupied!</B>"
|
||||
user << "\blue <B>The cryo cell is already occupied!</B>"
|
||||
return
|
||||
if (G:affecting.abiotic())
|
||||
user << "Subject may not have abiotic items on."
|
||||
@@ -220,6 +220,7 @@
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.metabslow = 0
|
||||
src.occupant = null
|
||||
build_icon()
|
||||
return
|
||||
@@ -252,6 +253,7 @@
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.metabslow = 1
|
||||
src.occupant = usr
|
||||
/*for(var/obj/O in src)
|
||||
O.loc = src.loc*/
|
||||
|
||||
@@ -77,6 +77,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
autoclose = 1
|
||||
var/doortype = 0
|
||||
var/justzap = 0
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
|
||||
/obj/machinery/door/airlock/command
|
||||
name = "Airlock"
|
||||
@@ -902,7 +903,15 @@ About the new airlock wires panel:
|
||||
if(5) new/obj/door_assembly/door_assembly_mai( src.loc )
|
||||
if(6) new/obj/door_assembly/door_assembly_ext( src.loc )
|
||||
if(7) new/obj/door_assembly/door_assembly_g( src.loc )
|
||||
new/obj/item/device/multitool( src.loc )
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae.conf_access = src.req_access
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
|
||||
del(src)
|
||||
return
|
||||
else if (src.arePowerSystemsOn() || !(stat & NOPOWER))
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/obj/machinery/gibber/New()
|
||||
..()
|
||||
src.overlays += image('kitchen.dmi', "grindnotinuse")
|
||||
@@ -79,18 +77,29 @@
|
||||
src.dirty += 1
|
||||
var/sourcename = src.occupant.real_name
|
||||
var/sourcejob = src.occupant.job
|
||||
var/sourcenutriment = src.occupant.nutrition / 15
|
||||
var/sourcetotalreagents = src.occupant.reagents.total_volume
|
||||
var/totalslabs = 3
|
||||
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/humanmeat/newmeat1 = new /obj/item/weapon/reagent_containers/food/snacks/humanmeat
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/humanmeat/newmeat2 = new /obj/item/weapon/reagent_containers/food/snacks/humanmeat
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/humanmeat/newmeat3 = new /obj/item/weapon/reagent_containers/food/snacks/humanmeat
|
||||
|
||||
newmeat1.name = sourcename + newmeat1.name
|
||||
newmeat1.subjectname = sourcename
|
||||
newmeat1.subjectjob = sourcejob
|
||||
newmeat1.reagents.add_reagent ("nutriment", sourcenutriment / totalslabs) // Thehehe. Fat guys go first
|
||||
src.occupant.reagents.trans_to (newmeat1, round (sourcetotalreagents / totalslabs, 1)) // Transfer all the reagents from the body to meat
|
||||
newmeat2.name = sourcename + newmeat2.name
|
||||
newmeat2.subjectname = sourcename
|
||||
newmeat2.subjectjob = sourcejob
|
||||
newmeat2.reagents.add_reagent ("nutriment", sourcenutriment / totalslabs)
|
||||
src.occupant.reagents.trans_to (newmeat2, round (sourcetotalreagents / totalslabs, 1))
|
||||
newmeat3.name = sourcename + newmeat3.name
|
||||
newmeat3.subjectname = sourcename
|
||||
newmeat3.subjectjob = sourcejob
|
||||
newmeat3.reagents.add_reagent ("nutriment", sourcenutriment / totalslabs)
|
||||
src.occupant.reagents.trans_to (newmeat3, round (sourcetotalreagents / totalslabs, 1))
|
||||
if(src.occupant.client)
|
||||
var/mob/dead/observer/newmob
|
||||
newmob = new/mob/dead/observer(src.occupant)
|
||||
|
||||
@@ -454,21 +454,7 @@ Please clean it before use!</TT><BR>
|
||||
if(src.extra_item)
|
||||
if (src.extra_item.type == R.extra_item) thing = 1
|
||||
if(R.extra_item == null || thing) // Just in case the recipe doesn't have an extra item in it
|
||||
src.egg_amount = 0 // If so remove all the eggs
|
||||
src.flour_amount = 0 // And the flour
|
||||
src.water_amount = 0 //And the water
|
||||
src.cheese_amount = 0 //And the cheese
|
||||
src.xenomeat_amount = 0
|
||||
src.monkeymeat_amount = 0
|
||||
src.humanmeat_amount = 0
|
||||
src.donkpocket_amount = 0
|
||||
src.milk_amount = 0
|
||||
src.tofu_amount = 0
|
||||
src.hotsauce_amount = 0
|
||||
src.coldsauce_amount = 0
|
||||
src.soysauce_amount = 0
|
||||
src.ketchup_amount = 0
|
||||
src.berryjuice_amount = 0
|
||||
src.clear()
|
||||
src.extra_item = null // And the extra item
|
||||
cooked_item = R.creates // Store the item that will be created
|
||||
|
||||
@@ -477,21 +463,7 @@ Please clean it before use!</TT><BR>
|
||||
src.operating = 1 // Turn it on
|
||||
src.icon_state = "mw1"
|
||||
src.updateUsrDialog()
|
||||
src.egg_amount = 0 //Clear all the values as this crap is what makes the mess inside!!
|
||||
src.flour_amount = 0
|
||||
src.cheese_amount = 0
|
||||
src.xenomeat_amount = 0
|
||||
src.water_amount = 0
|
||||
src.humanmeat_amount = 0
|
||||
src.monkeymeat_amount = 0
|
||||
src.donkpocket_amount = 0
|
||||
src.milk_amount = 0
|
||||
src.tofu_amount = 0
|
||||
src.hotsauce_amount = 0
|
||||
src.coldsauce_amount = 0
|
||||
src.soysauce_amount = 0
|
||||
src.ketchup_amount = 0
|
||||
src.berryjuice_amount = 0
|
||||
src.clear()
|
||||
sleep(40) // Half way through
|
||||
playsound(src.loc, 'splat.ogg', 50, 1) // Play a splat sound
|
||||
icon_state = "mwbloody1" // Make it look dirty!!
|
||||
@@ -510,21 +482,7 @@ Please clean it before use!</TT><BR>
|
||||
src.operating = 1 // Turn it on
|
||||
src.icon_state = "mw1"
|
||||
src.updateUsrDialog()
|
||||
src.egg_amount = 0 //Clear all the values as this crap is gone when it breaks!!
|
||||
src.flour_amount = 0
|
||||
src.xenomeat_amount = 0
|
||||
src.cheese_amount = 0
|
||||
src.water_amount = 0
|
||||
src.humanmeat_amount = 0
|
||||
src.monkeymeat_amount = 0
|
||||
src.donkpocket_amount = 0
|
||||
src.tofu_amount = 0
|
||||
src.milk_amount = 0
|
||||
src.hotsauce_amount = 0
|
||||
src.coldsauce_amount = 0
|
||||
src.soysauce_amount = 0
|
||||
src.ketchup_amount = 0
|
||||
src.berryjuice_amount = 0
|
||||
src.clear()
|
||||
sleep(60) // Wait a while
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
@@ -548,21 +506,7 @@ Please clean it before use!</TT><BR>
|
||||
src.operating = 0
|
||||
|
||||
if(operation == 2) // If dispose was pressed, empty the microwave
|
||||
src.egg_amount = 0
|
||||
src.flour_amount = 0
|
||||
src.xenomeat_amount = 0
|
||||
src.cheese_amount = 0
|
||||
src.water_amount = 0
|
||||
src.humanmeat_amount = 0
|
||||
src.monkeymeat_amount = 0
|
||||
src.donkpocket_amount = 0
|
||||
src.milk_amount = 0
|
||||
src.hotsauce_amount = 0
|
||||
src.coldsauce_amount = 0
|
||||
src.soysauce_amount = 0
|
||||
src.tofu_amount = 0
|
||||
src.ketchup_amount = 0
|
||||
src.berryjuice_amount = 0
|
||||
src.clear()
|
||||
if(src.extra_item != null)
|
||||
src.extra_item.loc = get_turf(src) // Eject the extra item so important shit like the disk can't be destroyed in there
|
||||
src.extra_item = null
|
||||
@@ -600,6 +544,24 @@ Please clean it before use!</TT><BR>
|
||||
else
|
||||
return
|
||||
|
||||
/obj/machinery/microwave/proc/clear()
|
||||
src.egg_amount = 0
|
||||
src.flour_amount = 0
|
||||
src.xenomeat_amount = 0
|
||||
src.cheese_amount = 0
|
||||
src.water_amount = 0
|
||||
src.humanmeat_amount = 0
|
||||
src.monkeymeat_amount = 0
|
||||
src.donkpocket_amount = 0
|
||||
src.milk_amount = 0
|
||||
src.hotsauce_amount = 0
|
||||
src.coldsauce_amount = 0
|
||||
src.soysauce_amount = 0
|
||||
src.tofu_amount = 0
|
||||
src.ketchup_amount = 0
|
||||
src.berryjuice_amount = 0
|
||||
//src.temp.reagents.clear_reagents()
|
||||
return
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -8,6 +8,7 @@ obj/door_assembly
|
||||
var/doortype = 0
|
||||
var/state = 0
|
||||
var/glass = 0
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
|
||||
door_assembly_0
|
||||
name = "Airlock Assembly"
|
||||
@@ -156,10 +157,12 @@ obj/door_assembly
|
||||
if(6) src.icon_state = "door_as0_ext"
|
||||
if(7) src.icon_state = "door_as0_g"
|
||||
src.name = "Secured Airlock Assembly"
|
||||
else if(istype(W, /obj/item/device/multitool) && state == 1 )
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
user << "\blue You installed the airlock electronics!"
|
||||
@@ -174,7 +177,11 @@ obj/door_assembly
|
||||
if(6) src.icon_state = "door_as2_ext"
|
||||
if(7) src.icon_state = "door_as2_g"
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
del(W)
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
|
||||
//del(W)
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
@@ -193,7 +200,13 @@ obj/door_assembly
|
||||
if(6) src.icon_state = "door_as1_ext"
|
||||
if(7) src.icon_state = "door_as1_g"
|
||||
src.name = "Wired Airlock Assembly"
|
||||
new/obj/item/device/multitool( src.loc )
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/sheet/rglass) && glass == 0)
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
@@ -216,17 +229,22 @@ obj/door_assembly
|
||||
sleep(40)
|
||||
if(get_turf(user) == T)
|
||||
user << "\blue You finish the airlock!"
|
||||
var/obj/machinery/door/airlock/door
|
||||
if (!src.glass)
|
||||
switch(src.doortype)
|
||||
if(0) new/obj/machinery/door/airlock( src.loc )
|
||||
if(1) new/obj/machinery/door/airlock/command( src.loc )
|
||||
if(2) new/obj/machinery/door/airlock/security( src.loc )
|
||||
if(3) new/obj/machinery/door/airlock/engineering( src.loc )
|
||||
if(4) new/obj/machinery/door/airlock/medical( src.loc )
|
||||
if(5) new/obj/machinery/door/airlock/maintenance( src.loc )
|
||||
if(6) new/obj/machinery/door/airlock/external( src.loc )
|
||||
if(0) door = new/obj/machinery/door/airlock( src.loc )
|
||||
if(1) door = new/obj/machinery/door/airlock/command( src.loc )
|
||||
if(2) door = new/obj/machinery/door/airlock/security( src.loc )
|
||||
if(3) door = new/obj/machinery/door/airlock/engineering( src.loc )
|
||||
if(4) door = new/obj/machinery/door/airlock/medical( src.loc )
|
||||
if(5) door = new/obj/machinery/door/airlock/maintenance( src.loc )
|
||||
if(6) door = new/obj/machinery/door/airlock/external( src.loc )
|
||||
else
|
||||
new/obj/machinery/door/airlock/glass( src.loc )
|
||||
door = new/obj/machinery/door/airlock/glass( src.loc )
|
||||
//door.req_access = src.req_access
|
||||
door.electronics = src.electronics
|
||||
door.req_access = src.electronics.conf_access
|
||||
src.electronics.loc = door
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
@@ -870,4 +870,57 @@ steam.start() -- spawns the effect
|
||||
|
||||
return 1
|
||||
|
||||
/datum/effects/system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/turf/location
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
|
||||
|
||||
/datum/effects/system/reagents_explosion/proc/set_up (amt, loc, flash = 0, flash_fact = 0)
|
||||
amount = amt
|
||||
if(istype(loc, /turf/))
|
||||
location = loc
|
||||
else
|
||||
location = get_turf(loc)
|
||||
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
|
||||
return
|
||||
|
||||
/datum/effects/system/reagents_explosion/proc/start()
|
||||
if (amount <= 2)
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
M << "\red The solution violently explodes."
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
M << "\red The explosion knocks you down."
|
||||
M.weakened += rand (1, 5)
|
||||
return
|
||||
else
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if (round(amount/12) > 0)
|
||||
devastation = min (MAX_EXPLOSION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if (round(amount/6) > 0)
|
||||
heavy = min (MAX_EXPLOSION_RANGE, heavy + round(amount/6))
|
||||
|
||||
if (round(amount/3) > 0)
|
||||
light = min (MAX_EXPLOSION_RANGE, light + round(amount/3))
|
||||
|
||||
if (flash && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
for(var/mob/M in viewers(8, location))
|
||||
M << "\red The solution violently explodes."
|
||||
|
||||
explosion(location, devastation, heavy, light, flash)
|
||||
@@ -71,7 +71,19 @@
|
||||
return 0
|
||||
|
||||
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W, /obj/item/weapon/sheet/metal))
|
||||
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
|
||||
B.loc = user
|
||||
if (user.r_hand == W)
|
||||
user.u_equip(W)
|
||||
user.r_hand = B
|
||||
else
|
||||
user.u_equip(W)
|
||||
user.l_hand = B
|
||||
B.layer = 20
|
||||
user << "You armed the robot frame"
|
||||
del(W)
|
||||
del(src)
|
||||
if(istype(W, /obj/item/robot_parts/l_leg))
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
|
||||
@@ -195,8 +195,6 @@ var/ordernum=0
|
||||
containertype = "/obj/crate"
|
||||
containername = "Replacement lights"
|
||||
|
||||
|
||||
|
||||
/datum/supply_packs/plasma
|
||||
name = "Plasma assembly crate"
|
||||
contains = list("/obj/item/weapon/tank/plasma",
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -235,3 +235,21 @@ 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)
|
||||
|
||||
/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")
|
||||
|
||||
@@ -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"
|
||||
@@ -525,3 +552,12 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
emergency_shuttle.recall()
|
||||
|
||||
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]"
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
src.mutations &= ~32
|
||||
// update_body()
|
||||
if (src.nutrition > 0)
|
||||
src.nutrition--
|
||||
src.nutrition -= HUNGER_FACTOR
|
||||
|
||||
if (src.drowsyness)
|
||||
src.drowsyness--
|
||||
|
||||
@@ -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--
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>"
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16
|
||||
//Amount of air needed before pass out/suffocation commences
|
||||
|
||||
// Factor of how fast mob nutriment decreases
|
||||
#define HUNGER_FACTOR 0.2
|
||||
|
||||
|
||||
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05
|
||||
//Minimum ratio of air that must move to/from a tile to suspend group processing
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/announcer"
|
||||
#define FILE_DIR "sound/bots"
|
||||
#define FILE_DIR "sound/effects"
|
||||
#define FILE_DIR "sound/items"
|
||||
#define FILE_DIR "sound/machines"
|
||||
@@ -357,6 +358,7 @@
|
||||
#include "code\game\machinery\atmoalter\scrubber.dm"
|
||||
#include "code\game\machinery\bots\bots.dm"
|
||||
#include "code\game\machinery\bots\cleanbot.dm"
|
||||
#include "code\game\machinery\bots\ed209bot.dm"
|
||||
#include "code\game\machinery\bots\floorbot.dm"
|
||||
#include "code\game\machinery\bots\medbot.dm"
|
||||
#include "code\game\machinery\bots\mulebot.dm"
|
||||
@@ -377,6 +379,7 @@
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
#include "code\game\machinery\computer\shuttle.dm"
|
||||
#include "code\game\machinery\doors\airlock.dm"
|
||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||
#include "code\game\machinery\doors\brigdoors.dm"
|
||||
#include "code\game\machinery\doors\checkForMultipleDoors.dm"
|
||||
#include "code\game\machinery\doors\door.dm"
|
||||
@@ -447,6 +450,7 @@
|
||||
#include "code\game\objects\alien\resin.dm"
|
||||
#include "code\game\objects\alien\weeds.dm"
|
||||
#include "code\game\objects\closets\emergency.dm"
|
||||
#include "code\game\objects\closets\firecloset.dm"
|
||||
#include "code\game\objects\closets\gmcloset.dm"
|
||||
#include "code\game\objects\closets\janitor.dm"
|
||||
#include "code\game\objects\closets\kitchen.dm"
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 899 B |