mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user