mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
resolve conflicts
This commit is contained in:
@@ -182,7 +182,7 @@
|
||||
return amount
|
||||
|
||||
/datum/reagents/proc/set_reagent_temp(new_temp = T0C, react = TRUE)
|
||||
chem_temp = Clamp(new_temp, temperature_min, temperature_max)
|
||||
chem_temp = clamp(new_temp, temperature_min, temperature_max)
|
||||
if(react)
|
||||
temperature_react()
|
||||
handle_reactions()
|
||||
@@ -623,7 +623,7 @@
|
||||
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
|
||||
if(amount <= 0)
|
||||
return 0
|
||||
chem_temp = Clamp((chem_temp * total_volume + reagtemp * amount) / (total_volume + amount), temperature_min, temperature_max) //equalize with new chems
|
||||
chem_temp = clamp((chem_temp * total_volume + reagtemp * amount) / (total_volume + amount), temperature_min, temperature_max) //equalize with new chems
|
||||
|
||||
for(var/A in reagent_list)
|
||||
|
||||
|
||||
@@ -118,10 +118,10 @@
|
||||
if(href_list["adjust_temperature"])
|
||||
var/val = href_list["adjust_temperature"]
|
||||
if(isnum(val))
|
||||
desired_temp = Clamp(desired_temp+val, 0, 1000)
|
||||
desired_temp = clamp(desired_temp+val, 0, 1000)
|
||||
else if(val == "input")
|
||||
var/target = input("Please input the target temperature", name) as num
|
||||
desired_temp = Clamp(target, 0, 1000)
|
||||
desired_temp = clamp(target, 0, 1000)
|
||||
else
|
||||
return FALSE
|
||||
. = 1
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
/datum/reagent/blob/proc/reagent_vortex(mob/living/M, setting_type, volume)
|
||||
var/turf/pull = get_turf(M)
|
||||
var/range_power = Clamp(round(volume/5, 1), 1, 5)
|
||||
var/range_power = clamp(round(volume/5, 1), 1, 5)
|
||||
for(var/atom/movable/X in range(range_power,pull))
|
||||
if(istype(X, /obj/effect))
|
||||
continue
|
||||
|
||||
@@ -543,7 +543,7 @@
|
||||
M.AdjustConfused(-5)
|
||||
update_flags |= M.SetWeakened(0, FALSE)
|
||||
if(volume >= 70 && prob(25))
|
||||
if(M.reagents.has_reagent("thc") <= 20)
|
||||
if(M.reagents.get_reagent_amount("thc") <= 20)
|
||||
M.Drowsy(10)
|
||||
if(prob(25))
|
||||
update_flags |= M.adjustBruteLoss(-2, FALSE)
|
||||
|
||||
@@ -61,8 +61,9 @@ obj/item/reagent_containers/proc/add_initial_reagents()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/wash(mob/user, atom/source)
|
||||
if(is_open_container())
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time)
|
||||
if(charge_tick < recharge_time)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
|
||||
@@ -126,4 +126,9 @@
|
||||
if(empty)
|
||||
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
/obj/item/reagent_containers/borghypo/basic
|
||||
name = "Basic Medical Hypospray"
|
||||
desc = "A very basic medical hypospray, capable of providing simple medical treatment in emergencies."
|
||||
reagent_ids = list("salglu_solution", "epinephrine")
|
||||
|
||||
#undef BORGHYPO_REFILL_VALUE
|
||||
|
||||
@@ -14,38 +14,7 @@
|
||||
container_type = OPENCONTAINER
|
||||
has_lid = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
|
||||
var/label_text = ""
|
||||
// the fucking asshole who designed this can go die in a fire - Iamgoofball
|
||||
var/list/can_be_placed_into = list(
|
||||
/obj/machinery/chem_master/,
|
||||
/obj/machinery/chem_heater/,
|
||||
/obj/machinery/chem_dispenser/,
|
||||
/obj/machinery/reagentgrinder,
|
||||
/obj/structure/table,
|
||||
/obj/structure/closet,
|
||||
/obj/structure/sink,
|
||||
/obj/structure/toilet,
|
||||
/obj/item/storage,
|
||||
/obj/machinery/atmospherics/unary/cryo_cell,
|
||||
/obj/machinery/dna_scannernew,
|
||||
/obj/item/grenade/chem_grenade,
|
||||
/mob/living/simple_animal/bot/medbot,
|
||||
/obj/item/storage/secure/safe,
|
||||
/obj/machinery/iv_drip,
|
||||
/obj/machinery/computer/pandemic,
|
||||
/obj/machinery/disposal,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/obj/machinery/sleeper,
|
||||
/obj/machinery/smartfridge/,
|
||||
/obj/machinery/biogenerator,
|
||||
/obj/machinery/hydroponics,
|
||||
/obj/machinery/constructable_frame,
|
||||
/obj/machinery/icemachine,
|
||||
/obj/item/bombcore/chemical,
|
||||
/obj/machinery/vending,
|
||||
/obj/machinery/fishtank)
|
||||
|
||||
/obj/item/reagent_containers/glass/New()
|
||||
..()
|
||||
@@ -98,56 +67,44 @@
|
||||
reagents.reaction(M, REAGENT_INGEST, fraction)
|
||||
addtimer(CALLBACK(reagents, /datum/reagents.proc/trans_to, M, 5), 5)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
if((!proximity) || !check_allowed_items(target,target_self = TRUE))
|
||||
return
|
||||
|
||||
if(!is_open_container())
|
||||
return
|
||||
|
||||
for(var/type in can_be_placed_into)
|
||||
if(istype(target, type))
|
||||
if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
if(target.reagents && !target.reagents.total_volume)
|
||||
if(target.reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
if(reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
|
||||
|
||||
else if(target.is_refillable() && is_drainable()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] units of the solution to [target].</span>")
|
||||
|
||||
else if(istype(target, /obj/item/reagent_containers/glass) && !target.is_open_container())
|
||||
to_chat(user, "<span class='warning'>You cannot fill [target] while it is sealed.</span>")
|
||||
return
|
||||
|
||||
else if(istype(target, /obj/effect/decal)) //stops splashing while scooping up fluids
|
||||
return
|
||||
|
||||
else if(reagents.total_volume && user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.reaction(target, REAGENT_TOUCH)
|
||||
reagents.clear_reagents()
|
||||
else if(reagents.total_volume)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.reaction(target, REAGENT_TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = Clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
|
||||
rounded_vol = clamp(round((reagents.total_volume / volume * 15), 5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
|
||||
Reference in New Issue
Block a user