mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
214 lines
7.4 KiB
Plaintext
214 lines
7.4 KiB
Plaintext
/obj/item/weapon/reagent_containers/borghypo
|
|
name = "cyborg hypospray"
|
|
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
|
icon = 'icons/obj/syringe.dmi'
|
|
item_state = "hypo"
|
|
icon_state = "borghypo"
|
|
amount_per_transfer_from_this = 5
|
|
volume = 30
|
|
possible_transfer_amounts = null
|
|
|
|
var/mode = 1
|
|
var/charge_cost = 325
|
|
var/charge_tick = 0
|
|
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
|
|
var/bypass_protection = FALSE // If true, can inject through things like spacesuits and armor.
|
|
|
|
var/list/reagent_ids = list("tricordrazine", "inaprovaline", "bicaridine", "anti_toxin", "kelotane", "tramadol", "dexalin" ,"spaceacillin")
|
|
var/list/reagent_volumes = list()
|
|
var/list/reagent_names = list()
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/surgeon
|
|
reagent_ids = list("inaprovaline", "dexalin", "tricordrazine", "spaceacillin", "oxycodone")
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/crisis
|
|
reagent_ids = list("inaprovaline", "tricordrazine", "dexalin", "bicaridine", "kelotane", "anti_toxin", "spaceacillin", "tramadol", "adranol") // CHOMPedit: Unifying chems with dogborg equivalent.
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/lost
|
|
reagent_ids = list("tricordrazine", "bicaridine", "dexalin", "anti_toxin", "tramadol", "spaceacillin")
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/merc
|
|
name = "advanced cyborg hypospray"
|
|
desc = "An advanced nanite and chemical synthesizer and injection system, designed for heavy-duty medical equipment. This type is capable of safely bypassing \
|
|
thick materials that other hyposprays would struggle with."
|
|
bypass_protection = TRUE // Because mercs tend to be in spacesuits.
|
|
reagent_ids = list("healing_nanites", "hyperzine", "tramadol", "oxycodone", "spaceacillin", "peridaxon", "osteodaxon", "myelamine", "synthblood")
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/Initialize()
|
|
. = ..()
|
|
|
|
for(var/T in reagent_ids)
|
|
reagent_volumes[T] = volume
|
|
var/datum/reagent/R = SSchemistry.chemical_reagents[T]
|
|
reagent_names += R.name
|
|
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/Destroy()
|
|
STOP_PROCESSING(SSobj, src)
|
|
return ..()
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg+
|
|
if(++charge_tick < recharge_time)
|
|
return 0
|
|
charge_tick = 0
|
|
|
|
if(isrobot(loc))
|
|
var/mob/living/silicon/robot/R = loc
|
|
if(R && R.cell)
|
|
for(var/T in reagent_ids)
|
|
if(reagent_volumes[T] < volume)
|
|
if(R.cell.charge - charge_cost < 800) //This is so borgs don't kill themselves with it.
|
|
return 0
|
|
else
|
|
R.cell.use(charge_cost)
|
|
reagent_volumes[T] = min(reagent_volumes[T] + 5, volume)
|
|
return 1
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/attack(var/mob/living/M, var/mob/user)
|
|
if(!istype(M))
|
|
return
|
|
|
|
if(!reagent_volumes[reagent_ids[mode]])
|
|
// to_chat(user, "<span class='warning'>The injector is empty.</span>")
|
|
balloon_alert(user, "The injector is empty.") // CHOMPEdit - Changed to balloon alert
|
|
return
|
|
|
|
var/mob/living/carbon/human/H = M
|
|
if(istype(H))
|
|
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
|
|
if(!affected)
|
|
// to_chat(user, "<span class='danger'>\The [H] is missing that limb!</span>")
|
|
balloon_alert("\The [H] is missing that limb.") // CHOMPEdit - Changed to balloon alert
|
|
return
|
|
/* since synths have oil/coolant streams now, it only makes sense that you should be able to inject stuff. preserved for posterity.
|
|
else if(affected.robotic >= ORGAN_ROBOT)
|
|
to_chat(user, "<span class='danger'>You cannot inject a robotic limb.</span>")
|
|
return
|
|
*/
|
|
|
|
if(M.can_inject(user, 1, ignore_thickness = bypass_protection))
|
|
// CHOMPEdit - Changed to balloon alert
|
|
// to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
|
// to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
|
|
balloon_alert(user, "You inject [M] with the injector.")
|
|
balloon_alert(user, "You feel a tiny prick!")
|
|
|
|
if(M.reagents)
|
|
var/t = min(amount_per_transfer_from_this, reagent_volumes[reagent_ids[mode]])
|
|
M.reagents.add_reagent(reagent_ids[mode], t)
|
|
reagent_volumes[reagent_ids[mode]] -= t
|
|
add_attack_logs(user, M, "Borg injected with [reagent_ids[mode]]")
|
|
to_chat(user, "<span class='notice'>[t] units injected. [reagent_volumes[reagent_ids[mode]]] units remaining.</span>")
|
|
return
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user as mob) //Change the mode
|
|
var/t = "<span class='infoplain'>"
|
|
for(var/i = 1 to reagent_ids.len)
|
|
if(t)
|
|
t += ", "
|
|
if(mode == i)
|
|
t += "<b>[reagent_names[i]]</b>"
|
|
else
|
|
t += "<a href='?src=\ref[src];reagent=[reagent_ids[i]]'>[reagent_names[i]]</a>"
|
|
t = "Available reagents: [t].</span>"
|
|
to_chat(user,t)
|
|
|
|
return
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/Topic(var/href, var/list/href_list)
|
|
if(href_list["reagent"])
|
|
var/t = reagent_ids.Find(href_list["reagent"])
|
|
if(t)
|
|
playsound(src, 'sound/effects/pop.ogg', 50, 0)
|
|
mode = t
|
|
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
|
|
// to_chat(usr, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
|
|
balloon_alert(usr, "Synthesizer producing is now producing '[R.name]'")
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/examine(mob/user)
|
|
. = ..()
|
|
if(get_dist(user, src) <= 2)
|
|
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
|
|
. += "<span class='notice'>It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.</span>"
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/service
|
|
name = "cyborg drink synthesizer"
|
|
desc = "A portable drink dispencer."
|
|
icon = 'icons/obj/drinks.dmi'
|
|
icon_state = "shaker"
|
|
charge_cost = 20
|
|
recharge_time = 3
|
|
volume = 60
|
|
possible_transfer_amounts = list(5, 10, 20, 30)
|
|
reagent_ids = list("ale",
|
|
"applejuice", //CHOMPADD it has literally every other type of juice..
|
|
"beer",
|
|
"berryjuice",
|
|
"bitters",
|
|
"cider",
|
|
"coffee",
|
|
"cognac",
|
|
"cola",
|
|
"cream",
|
|
"dr_gibb",
|
|
"egg",
|
|
"gin",
|
|
"gingerale",
|
|
"hot_coco",
|
|
"ice",
|
|
"icetea",
|
|
"kahlua",
|
|
"lemonjuice",
|
|
"lemon_lime",
|
|
"limejuice",
|
|
"mead",
|
|
"milk",
|
|
"mint",
|
|
"orangejuice",
|
|
"redwine",
|
|
"rum",
|
|
"sake",
|
|
"sodawater",
|
|
"soymilk",
|
|
"space_up",
|
|
"spacemountainwind",
|
|
"spacespice",
|
|
"specialwhiskey",
|
|
"sugar",
|
|
"tea",
|
|
"tequilla",
|
|
"tomatojuice",
|
|
"tonic",
|
|
"vermouth",
|
|
"vodka",
|
|
"water",
|
|
"watermelonjuice",
|
|
"whiskey")
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/service/attack(var/mob/M, var/mob/user)
|
|
return
|
|
|
|
/obj/item/weapon/reagent_containers/borghypo/service/afterattack(var/obj/target, var/mob/user, var/proximity)
|
|
if(!proximity)
|
|
return
|
|
|
|
if(!target.is_open_container() || !target.reagents)
|
|
return
|
|
|
|
if(!reagent_volumes[reagent_ids[mode]])
|
|
to_chat(user, "<span class='notice'>[src] is out of this reagent, give it some time to refill.</span>")
|
|
return
|
|
|
|
if(!target.reagents.get_free_space())
|
|
// to_chat(user, "<span class='notice'>[target] is full.</span>")
|
|
balloon_alert(user, "[target] is full.") // CHOMPEdit - Changed to balloon alert
|
|
return
|
|
|
|
var/t = min(amount_per_transfer_from_this, reagent_volumes[reagent_ids[mode]])
|
|
target.reagents.add_reagent(reagent_ids[mode], t)
|
|
reagent_volumes[reagent_ids[mode]] -= t
|
|
// to_chat(user, "<span class='notice'>You transfer [t] units of the solution to [target].</span>")
|
|
balloon_alert(user, "Transfered [t] units to [target].") // CHOMPEdit - Changed to balloon alert
|
|
return
|