mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Fixing a few issues with the nutrition adjustment proc and the circuit printer. (#12320)
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
if(!material_amount)
|
||||
to_chat(user, "<span class='warning'>[I] does not contain sufficient materials to be accepted by [parent].</span>")
|
||||
return
|
||||
if(!has_space(material_amount))
|
||||
if((!precise_insertion || !GLOB.typecache_stack[I]) && !has_space(material_amount))
|
||||
to_chat(user, "<span class='warning'>[parent] has not enough space. Please remove materials from [parent] in order to insert more.</span>")
|
||||
return
|
||||
user_insert(I, user)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
desc = "Produces electricity from chemicals."
|
||||
icon_state = "chemical_cell"
|
||||
extended_desc = "This is effectively an internal beaker. It will consume and produce power from plasma, slime jelly, welding fuel, carbon,\
|
||||
ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy."
|
||||
ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy. But no fuel can be compared with blood of living human."
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list("volume used" = IC_PINTYPE_NUMBER, "self reference" = IC_PINTYPE_SELFREF)
|
||||
@@ -102,10 +102,8 @@
|
||||
var/lfwb =TRUE
|
||||
|
||||
/obj/item/integrated_circuit/passive/power/chemical_cell/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
create_reagents(volume, OPENCONTAINER)
|
||||
extended_desc +="But no fuel can be compared with blood of living human."
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/passive/power/chemical_cell/interact(mob/user)
|
||||
set_pin_data(IC_OUTPUT, 2, WEAKREF(src))
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
. = ..()
|
||||
if(!slime_check)
|
||||
return
|
||||
if(nutrition == max)
|
||||
if(nutrition >= get_grow_nutrition())
|
||||
if(powerlevel<10)
|
||||
if(prob(30-powerlevel*2))
|
||||
powerlevel++
|
||||
|
||||
@@ -1051,7 +1051,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
|
||||
///Adjust the nutrition of a mob
|
||||
/mob/proc/adjust_nutrition(change, max = INFINITY) //Honestly FUCK the oldcoders for putting nutrition on /mob someone else can move it up because holy hell I'd have to fix SO many typechecks
|
||||
nutrition = clamp(0, nutrition + change, max)
|
||||
nutrition = clamp(nutrition + change, 0, max)
|
||||
|
||||
///Force set the mob nutrition
|
||||
/mob/proc/set_nutrition(var/change) //Seriously fuck you oldcoders.
|
||||
|
||||
Reference in New Issue
Block a user