mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Patch rework (#13062)
* Patch Rework Part 1 * applicator * fixes * fixes * temperature settings * single application patches * additional * new line fix * fox is a derp sometimes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
desc = "A hazard vest used in the recovery of bodies."
|
||||
icon_state = "paramedic-vest"
|
||||
item_state = "paramedic-vest"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe,
|
||||
/obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10, fire = 50, acid = 50)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
desc = "A vest often worn by doctors caring for inmates."
|
||||
icon_state = "brigphysician-vest"
|
||||
item_state = "brigphysician-vest"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe,
|
||||
/obj/item/healthanalyzer, /obj/item/flashlight, \
|
||||
/obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser)
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0, fire = 50, acid = 50)
|
||||
@@ -341,7 +341,7 @@
|
||||
icon_state = "fr_jacket_open"
|
||||
item_state = "fr_jacket_open"
|
||||
blood_overlay_type = "armor"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe,
|
||||
/obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser)
|
||||
ignore_suitadjust = 0
|
||||
suit_adjusted = 1
|
||||
@@ -381,5 +381,5 @@
|
||||
desc = "A tweed mantle, worn by the Research Director. Smells like science."
|
||||
icon_state = "rdmantle"
|
||||
item_state = "rdmantle"
|
||||
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/rad_laser)
|
||||
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/rad_laser)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
suit_adjusted = 1
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list(/obj/item/analyzer,/obj/item/stack/medical,/obj/item/dnainjector,/obj/item/reagent_containers/dropper,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/hypospray,/obj/item/healthanalyzer,/obj/item/flashlight/pen,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/food/pill,/obj/item/storage/pill_bottle,/obj/item/paper,/obj/item/rad_laser)
|
||||
allowed = list(/obj/item/analyzer,/obj/item/stack/medical,/obj/item/dnainjector,/obj/item/reagent_containers/dropper,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/hypospray,/obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/food/pill,/obj/item/storage/pill_bottle,/obj/item/paper,/obj/item/rad_laser)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
species_exception = list(/datum/species/golem)
|
||||
sprite_sheets = list(
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
name = "medical winter coat"
|
||||
icon_state = "wintercoat_med"
|
||||
item_state = "coatmedical"
|
||||
allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic)
|
||||
allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 0, "acid" = 45)
|
||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/medical
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
name = "science winter coat"
|
||||
icon_state = "wintercoat_sci"
|
||||
item_state = "coatscience"
|
||||
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic)
|
||||
allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator,/obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/science
|
||||
|
||||
|
||||
@@ -9,12 +9,18 @@
|
||||
qdel(item)
|
||||
QDEL_LIST(internal_organs)
|
||||
QDEL_LIST(stomach_contents)
|
||||
QDEL_LIST(processing_patches)
|
||||
var/mob/living/simple_animal/borer/B = has_brain_worms()
|
||||
if(B)
|
||||
B.leave_host()
|
||||
qdel(B)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/handle_atom_del(atom/A)
|
||||
if(A in processing_patches)
|
||||
processing_patches -= A
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/blob_act(obj/structure/blob/B)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
@@ -1073,8 +1079,9 @@ so that different stomachs can handle things in different ways VB*/
|
||||
if(can_taste_container)
|
||||
taste(toEat.reagents)
|
||||
var/fraction = min(this_bite/toEat.reagents.total_volume, 1)
|
||||
toEat.reagents.reaction(src, toEat.apply_type, fraction)
|
||||
toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency)
|
||||
if(fraction)
|
||||
toEat.reagents.reaction(src, toEat.apply_type, fraction)
|
||||
toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency)
|
||||
|
||||
/mob/living/carbon/get_access()
|
||||
. = ..()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
gender = MALE
|
||||
pressure_resistance = 15
|
||||
var/list/stomach_contents = list()
|
||||
var/list/processing_patches = list()
|
||||
var/list/internal_organs = list()
|
||||
var/list/internal_organs_slot = list() //Same as above, but stores "slot ID" - "organ" pairs for easy access.
|
||||
var/antibodies = 0
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
O.on_life()
|
||||
|
||||
handle_patches()
|
||||
handle_changeling()
|
||||
handle_wetness(times_fired)
|
||||
|
||||
@@ -438,3 +439,22 @@
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
/mob/living/carbon/proc/handle_patches()
|
||||
if(LAZYLEN(processing_patches))
|
||||
var/multiple_patch_multiplier = processing_patches.len > 1 ? (processing_patches.len * 1.5) : 1
|
||||
var/applied_amount = 0.35 * multiple_patch_multiplier
|
||||
|
||||
for(var/patch in processing_patches)
|
||||
var/obj/item/reagent_containers/food/pill/patch/P = patch
|
||||
|
||||
if(P.reagents && P.reagents.total_volume)
|
||||
var/fractional_applied_amount = applied_amount / P.reagents.total_volume
|
||||
P.reagents.reaction(src, REAGENT_TOUCH, fractional_applied_amount, P.needs_to_apply_reagents)
|
||||
P.needs_to_apply_reagents = FALSE
|
||||
P.reagents.trans_to(src, applied_amount * 0.5)
|
||||
P.reagents.remove_any(applied_amount * 0.5)
|
||||
else
|
||||
if(!P.reagents || P.reagents.total_volume <= 0)
|
||||
processing_patches -= P
|
||||
qdel(P)
|
||||
|
||||
@@ -406,6 +406,8 @@
|
||||
QDEL_LIST(C.reagents.addiction_list)
|
||||
C.reagents.addiction_threshold_accumulated.Cut()
|
||||
|
||||
QDEL_LIST(C.processing_patches)
|
||||
|
||||
// rejuvenate: Called by `revive` to get the mob into a revivable state
|
||||
// the admin "rejuvenate" command calls `revive`, not this proc.
|
||||
/mob/living/proc/rejuvenate()
|
||||
|
||||
@@ -8,13 +8,19 @@
|
||||
var/maximum_volume = 100
|
||||
var/atom/my_atom = null
|
||||
var/chem_temp = T20C
|
||||
var/temperature_min = 0
|
||||
var/temperature_max = 10000
|
||||
var/list/datum/reagent/addiction_list = new/list()
|
||||
var/list/addiction_threshold_accumulated = new/list()
|
||||
var/flags
|
||||
var/list/reagents_generated_per_cycle = new/list()
|
||||
|
||||
/datum/reagents/New(maximum = 100)
|
||||
/datum/reagents/New(maximum = 100, min_temp, max_temp)
|
||||
maximum_volume = maximum
|
||||
if(min_temp)
|
||||
temperature_min = min_temp
|
||||
if(max_temp)
|
||||
temperature_max = max_temp
|
||||
if(!(flags & REAGENT_NOREACT))
|
||||
START_PROCESSING(SSobj, src)
|
||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||
@@ -179,7 +185,7 @@
|
||||
return amount
|
||||
|
||||
/datum/reagents/proc/set_reagent_temp(new_temp = T0C, react = TRUE)
|
||||
chem_temp = new_temp
|
||||
chem_temp = Clamp(new_temp, temperature_max, temperature_min)
|
||||
if(react)
|
||||
temperature_react()
|
||||
handle_reactions()
|
||||
@@ -197,7 +203,7 @@
|
||||
else if(exposed_temperature < chem_temp)
|
||||
chem_temp -= change
|
||||
|
||||
chem_temp = max(min(chem_temp, 10000), 0) //Cap for the moment.
|
||||
chem_temp = max(min(chem_temp, temperature_max), temperature_min) //Cap for the moment.
|
||||
temperature_react()
|
||||
|
||||
handle_reactions()
|
||||
@@ -569,7 +575,7 @@
|
||||
can_process = 1
|
||||
return can_process
|
||||
|
||||
/datum/reagents/proc/reaction(atom/A, method = REAGENT_TOUCH, volume_modifier = 1)
|
||||
/datum/reagents/proc/reaction(atom/A, method = REAGENT_TOUCH, volume_modifier = 1, show_message = TRUE)
|
||||
var/react_type
|
||||
if(isliving(A))
|
||||
react_type = "LIVING"
|
||||
@@ -614,7 +620,7 @@
|
||||
var/check = reaction_check(A, R)
|
||||
if(!check)
|
||||
continue
|
||||
R.reaction_mob(A, method, R.volume * volume_modifier)
|
||||
R.reaction_mob(A, method, R.volume * volume_modifier, show_message)
|
||||
if("TURF")
|
||||
R.reaction_turf(A, R.volume * volume_modifier)
|
||||
if("OBJ")
|
||||
@@ -632,7 +638,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 = (chem_temp * total_volume + reagtemp * amount) / (total_volume + amount) //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)
|
||||
|
||||
@@ -870,8 +876,8 @@
|
||||
|
||||
// Convenience proc to create a reagents holder for an atom
|
||||
// Max vol is maximum volume of holder
|
||||
/atom/proc/create_reagents(max_vol)
|
||||
reagents = new/datum/reagents(max_vol)
|
||||
/atom/proc/create_reagents(max_vol, min_temp, max_temp)
|
||||
reagents = new /datum/reagents(max_vol, min_temp, max_temp)
|
||||
reagents.my_atom = src
|
||||
|
||||
/proc/get_random_reagent_id() // Returns a random reagent ID minus blacklisted reagents
|
||||
|
||||
@@ -347,8 +347,8 @@
|
||||
if(count > 20)
|
||||
count = 20 //Pevent people from creating huge stacks of patches easily. Maybe move the number to defines?
|
||||
var/amount_per_patch = reagents.total_volume/count
|
||||
if(amount_per_patch > 40)
|
||||
amount_per_patch = 40
|
||||
if(amount_per_patch > 30)
|
||||
amount_per_patch = 30
|
||||
var/name = clean_input("Name:", "Name your patch!", "[reagents.get_master_reagent_name()] ([amount_per_patch]u)")
|
||||
if(!name)
|
||||
return
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/datum/reagent/proc/reaction_temperature(exposed_temperature, exposed_volume) //By default we do nothing.
|
||||
return
|
||||
|
||||
/datum/reagent/proc/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
|
||||
/datum/reagent/proc/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume, show_message = TRUE) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
|
||||
if(holder) //for catching rare runtimes
|
||||
if(method == REAGENT_TOUCH && penetrates_skin)
|
||||
var/block = M.get_permeability_protection()
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
id = "silver_sulfadiazine"
|
||||
description = "This antibacterial compound is used to treat burn victims."
|
||||
reagent_state = LIQUID
|
||||
color = "#F0C814"
|
||||
color = "#F0DC00"
|
||||
metabolization_rate = 3
|
||||
harmless = FALSE //toxic if ingested, and I am NOT going to account for the difference
|
||||
taste_description = "burn cream"
|
||||
@@ -205,7 +205,7 @@
|
||||
id = "styptic_powder"
|
||||
description = "Styptic (aluminum sulfate) powder helps control bleeding and heal physical wounds."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC"
|
||||
color = "#FF9696"
|
||||
metabolization_rate = 3
|
||||
harmless = FALSE
|
||||
taste_description = "wound cream"
|
||||
@@ -221,7 +221,7 @@
|
||||
M.adjustBruteLoss(-volume)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='notice'>The styptic powder stings like hell as it closes some of your wounds!</span>")
|
||||
M.emote("scream")
|
||||
M.emote("scream")
|
||||
if(method == REAGENT_INGEST)
|
||||
M.adjustToxLoss(0.5*volume)
|
||||
if(show_message)
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/has_lid = FALSE // Used for containers where we want to put lids on and off
|
||||
var/temperature_min = 0 // To limit the temperature of a reagent container can atain when exposed to heat/cold
|
||||
var/temperature_max = 10000
|
||||
|
||||
/obj/item/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
|
||||
set name = "Set transfer amount"
|
||||
@@ -30,7 +32,7 @@
|
||||
..()
|
||||
if(!possible_transfer_amounts)
|
||||
verbs -= /obj/item/reagent_containers/verb/set_APTFT
|
||||
create_reagents(volume)
|
||||
create_reagents(volume, temperature_min, temperature_max)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses" = list(F), "blood_color" = "#A10808")
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/obj/item/reagent_containers/applicator
|
||||
name = "auto-mender"
|
||||
desc = "A small electronic device designed to topically apply healing chemicals."
|
||||
icon = 'icons/goonstation/objects/objects.dmi'
|
||||
icon_state = "mender"
|
||||
item_state = "mender"
|
||||
volume = 200
|
||||
resistance_flags = ACID_PROOF
|
||||
container_type = REFILLABLE | AMOUNT_VISIBLE
|
||||
temperature_min = 270
|
||||
temperature_max = 350
|
||||
var/ignore_flags = FALSE
|
||||
var/emagged = FALSE
|
||||
var/applied_amount = 8 // How much it applies
|
||||
var/applying = FALSE // So it can't be spammed.
|
||||
var/measured_health = 0 // Used for measuring health; we don't want this to stop applying once the person's health isn't changing.
|
||||
|
||||
/obj/item/reagent_containers/applicator/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = TRUE
|
||||
ignore_flags = TRUE
|
||||
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
|
||||
|
||||
/obj/item/reagent_containers/applicator/on_reagent_change()
|
||||
if(!emagged)
|
||||
var/found_forbidden_reagent = FALSE
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(!GLOB.safe_chem_applicator_list.Find(R.id))
|
||||
reagents.del_reagent(R.id)
|
||||
found_forbidden_reagent = TRUE
|
||||
if(found_forbidden_reagent)
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[src] identifies and removes a harmful substance.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/applicator/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/goonstation/objects/objects.dmi', "mender-fluid")
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/applicator/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
if(applying)
|
||||
to_chat(user, "<span class='warning'>You're already applying [src].</span>")
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
if(ignore_flags || M.can_inject(user, TRUE))
|
||||
if(M == user)
|
||||
M.visible_message("[user] begins mending [user.p_them()]self with [src].", "<span class='notice'>You begin mending yourself with [src].</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins mending [M] with [src].</span>", "<span class='notice'>You begin mending [M] with [src].</span>")
|
||||
if(M.reagents)
|
||||
applying = TRUE
|
||||
icon_state = "mender-active"
|
||||
apply_to(M, user, 0.2) // We apply a very weak application up front, then loop.
|
||||
while(do_after(user, 10, target = M))
|
||||
measured_health = M.health
|
||||
apply_to(M, user, 1, FALSE)
|
||||
if((measured_health == M.health) || !reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[M] is finished healing and [src] powers down automatically.</span>")
|
||||
break
|
||||
applying = FALSE
|
||||
icon_state = "mender"
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/applicator/proc/apply_to(mob/living/carbon/M, mob/user, multiplier = 1, show_message = TRUE)
|
||||
var/total_applied_amount = applied_amount * multiplier
|
||||
|
||||
if(reagents && reagents.total_volume)
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
|
||||
var/contained = english_list(injected)
|
||||
|
||||
add_attack_logs(user, M, "Automends with [src] containing ([contained])", reagents.harmless_helper() ? ATKLOG_ALMOSTALL : null)
|
||||
|
||||
var/fractional_applied_amount = total_applied_amount / reagents.total_volume
|
||||
|
||||
reagents.reaction(M, REAGENT_TOUCH, fractional_applied_amount, show_message)
|
||||
reagents.trans_to(M, total_applied_amount * 0.5)
|
||||
reagents.remove_any(total_applied_amount * 0.5)
|
||||
|
||||
playsound(get_turf(src), pick('sound/goonstation/items/mender.ogg', 'sound/goonstation/items/mender2.ogg'), 50, 1)
|
||||
|
||||
/obj/item/reagent_containers/applicator/brute
|
||||
name = "brute auto-mender"
|
||||
list_reagents = list("styptic_powder" = 200)
|
||||
|
||||
/obj/item/reagent_containers/applicator/burn
|
||||
name = "burn auto-mender"
|
||||
list_reagents = list("silver_sulfadiazine" = 200)
|
||||
|
||||
/obj/item/reagent_containers/applicator/dual
|
||||
name = "dual auto-mender"
|
||||
list_reagents = list("synthflesh" = 200)
|
||||
@@ -5,10 +5,24 @@
|
||||
icon_state = "bandaid"
|
||||
item_state = "bandaid"
|
||||
possible_transfer_amounts = null
|
||||
volume = 40
|
||||
volume = 30
|
||||
apply_type = REAGENT_TOUCH
|
||||
apply_method = "apply"
|
||||
transfer_efficiency = 0.5 //patches aren't as effective at getting chemicals into the bloodstream.
|
||||
temperature_min = 270
|
||||
temperature_max = 350
|
||||
var/needs_to_apply_reagents = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/attack(mob/living/carbon/M, mob/user, def_zone)
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
bitesize = 0
|
||||
if(M.eat(src, user))
|
||||
user.drop_item()
|
||||
forceMove(M)
|
||||
M.processing_patches += src
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/afterattack(obj/target, mob/user , proximity)
|
||||
return // thanks inheritance again
|
||||
@@ -18,29 +32,37 @@
|
||||
desc = "Helps with brute injuries."
|
||||
icon_state = "bandaid_brute"
|
||||
instant_application = 1
|
||||
list_reagents = list("styptic_powder" = 40)
|
||||
list_reagents = list("styptic_powder" = 30)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/styptic/small
|
||||
name = "healing mini-patch"
|
||||
list_reagents = list("styptic_powder" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/silver_sulf
|
||||
name = "burn patch"
|
||||
desc = "Helps with burn injuries."
|
||||
icon_state = "bandaid_burn"
|
||||
instant_application = 1
|
||||
list_reagents = list("silver_sulfadiazine" = 40)
|
||||
list_reagents = list("silver_sulfadiazine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/silver_sulf/small
|
||||
name = "burn mini-patch"
|
||||
list_reagents = list("silver_sulfadiazine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/synthflesh
|
||||
name = "synthflesh patch"
|
||||
desc = "Helps with brute and burn injuries."
|
||||
icon_state = "bandaid_med"
|
||||
instant_application = 1
|
||||
list_reagents = list("synthflesh" = 20)
|
||||
list_reagents = list("synthflesh" = 10)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/nicotine
|
||||
name = "nicotine patch"
|
||||
desc = "Helps temporarily curb the cravings of nicotine dependency."
|
||||
list_reagents = list("nicotine" = 20)
|
||||
list_reagents = list("nicotine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/patch/jestosterone
|
||||
name = "jestosterone patch"
|
||||
desc = "Helps with brute injuries if the affected person is a clown, otherwise inflicts various annoying effects."
|
||||
icon_state = "bandaid_clown"
|
||||
list_reagents = list("jestosterone" = 30)
|
||||
list_reagents = list("jestosterone" = 20)
|
||||
|
||||
@@ -607,6 +607,14 @@
|
||||
build_path = /obj/item/reagent_containers/hypospray/safety
|
||||
category = list("initial", "Medical")
|
||||
|
||||
/datum/design/automender
|
||||
name = "Auto-mender"
|
||||
id = "automender"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 1000, MAT_GLASS = 1000)
|
||||
build_path = /obj/item/reagent_containers/applicator
|
||||
category = list("initial", "Medical")
|
||||
|
||||
/datum/design/prox_sensor
|
||||
name = "Proximity Sensor"
|
||||
id = "prox_sensor"
|
||||
@@ -914,4 +922,3 @@
|
||||
materials = list(MAT_METAL = 40000)
|
||||
build_path = /obj/item/golem_shell
|
||||
category = list("Imported")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user