Skip to content

Commit

Permalink
Merge pull request #253 from Poojawa/better-hyposprays
Browse files Browse the repository at this point in the history
Hypospray MK.IIs
  • Loading branch information
Very-Soft authored May 12, 2024
2 parents 61e0a6e + 50d880e commit 7cff99b
Show file tree
Hide file tree
Showing 13 changed files with 571 additions and 5 deletions.
4 changes: 4 additions & 0 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@
/obj/item/clothing/head/surgery,
/obj/item/clothing/gloves,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/weapon/hypospray_mkii,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial,
/obj/item/clothing/glasses,
/obj/item/weapon/tool/crowbar,
/obj/item/device/flashlight,
Expand Down Expand Up @@ -396,6 +398,8 @@
/obj/item/clothing/head/surgery,
/obj/item/clothing/gloves,
/obj/item/weapon/reagent_containers/hypospray,
/obj/item/weapon/hypospray_mkii,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial,
/obj/item/clothing/glasses,
/obj/item/weapon/tool/crowbar,
/obj/item/device/flashlight,
Expand Down
63 changes: 62 additions & 1 deletion code/game/objects/items/weapons/storage/firstaid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
name = "oxygen deprivation first aid kit"
desc = "A box full of oxygen goodies."
icon_state = "o2"
item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2")
item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2")
starts_with = list(
/obj/item/weapon/reagent_containers/pill/dexalin,
/obj/item/weapon/reagent_containers/pill/dexalin,
Expand Down Expand Up @@ -167,6 +167,67 @@
max_storage_space = ITEMSIZE_COST_SMALL * 7
starts_with = list(/obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed = 8)

/*
* Hypospray MK II kits
*/


/obj/item/weapon/storage/firstaid/hypokit
name = "hypospray mk.II kit"
desc = "Contains a Mk II Hypospray and its hypovials. It can only hold mk.II related items."
icon = 'icons/obj/storage.dmi'
icon_state = "firstaid-mini"
starts_with = list(/obj/item/weapon/hypospray_mkii, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/small = 3)
can_hold = list(/obj/item/weapon/hypospray_mkii, /obj/item/weapon/reagent_containers/glass/bottle/hypovial)
//can fit large and small vials, and any of the mkiis. but that's it. No free Analyzer either.

/obj/item/weapon/storage/firstaid/hypokit/tricord
desc = "Contains a Mk II Hypospray and its hypovials. It can only hold mk.II related items. This one is prefilled with Tricordazine."
starts_with = list(/obj/item/weapon/hypospray_mkii/tricord, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/small/preloaded/tricordrazine = 3)

/obj/item/weapon/storage/firstaid/hypokit/brute
icon_state = "firstaid-brute-mini"
desc = "Contains a Mk II Hypospray and its hypovials. It can only hold mk.II related items. This one is prefilled with Bicaridine."
starts_with = list(/obj/item/weapon/hypospray_mkii/brute, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/small/preloaded/bicaridine = 3)
item_state_slots = list(slot_r_hand_str = "firstaid-advanced", slot_l_hand_str = "firstaid-advanced")

/obj/item/weapon/storage/firstaid/hypokit/burn
icon_state = "firstaid-burn-mini"
desc = "Contains a Mk II Hypospray and its hypovials. It can only hold mk.II related items. This one is prefilled with Kelotane."
starts_with = list(/obj/item/weapon/hypospray_mkii/burn, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/small/preloaded/kelotane = 3)
item_state_slots = list(slot_r_hand_str = "firstaid-ointment", slot_l_hand_str = "firstaid-ointment")

/obj/item/weapon/storage/firstaid/hypokit/toxin
icon_state = "firstaid-toxin-mini"
desc = "Contains a Mk II Hypospray and its hypovials. It can only hold mk.II related items. This one is prefilled with Dylovene."
starts_with = list(/obj/item/weapon/hypospray_mkii/toxin, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/small/preloaded/antitoxin = 3)
item_state_slots = list(slot_r_hand_str = "firstaid-toxin", slot_l_hand_str = "firstaid-toxin")

/obj/item/weapon/storage/firstaid/hypokit/oxy
icon_state = "firstaid-o2-mini"
desc = "Contains a Mk II Hypospray and its hypovials. It can only hold mk.II related items. This one is prefilled with Dexalin."
starts_with = list(/obj/item/weapon/hypospray_mkii/oxygen, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/small/preloaded/dexalin = 3)
item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2")

/obj/item/weapon/storage/firstaid/hypokit/cmo
name = "CMO's mk.II Kit"
desc = "Contains a large Deluxe Mk II Hypospray and its hypovials. It can only hold mk.II related items."
icon_state = "firstaid-tactical-mini"
starts_with = list(/obj/item/weapon/hypospray_mkii/CMO,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial/large/preloaded/bicaridine,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial/large/preloaded/antitoxin,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial/large/preloaded/dermaline,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial/large/preloaded/dexalin
)

item_state_slots = list(slot_r_hand_str = "firstaid-surgery", slot_l_hand_str = "firstaid-surgery")

/obj/item/weapon/storage/firstaid/hypokit/cmo/combat
name = "Combat hypospray mk.II kit"
desc = "Contains a combat rated Deluxe Mk II Hypospray and its hypovials. It can only hold mk.II related items."
starts_with = list(/obj/item/weapon/hypospray_mkii/CMO/combat, /obj/item/weapon/reagent_containers/glass/bottle/hypovial/large/preloaded/combat = 4)
item_state_slots = list(slot_r_hand_str = "firstaid-surgery", slot_l_hand_str = "firstaid-surgery")

/*
* Pill Bottles
*/
Expand Down
9 changes: 8 additions & 1 deletion code/modules/clothing/suits/labcoat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
flags_inv = HIDEHOLSTER
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper, /obj/item/clothing/mask/gas)
allowed = list(
/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,
/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,
/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,
/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,
/obj/item/weapon/hypospray_mkii, /obj/item/weapon/reagent_containers/glass/bottle/hypovial,
/obj/item/clothing/mask/gas)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)

/obj/item/clothing/suit/storage/toggle/labcoat/red
Expand Down
6 changes: 6 additions & 0 deletions code/modules/economy/vending_machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,12 @@
/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,
/obj/item/weapon/reagent_containers/syringe/antiviral = 4,
/obj/item/weapon/reagent_containers/syringe = 12,
/obj/item/weapon/reagent_containers/glass/bottle/hypovial/small = 12,
/obj/item/weapon/hypospray_mkii = 4,
/obj/item/weapon/storage/firstaid/hypokit/brute = 2,
/obj/item/weapon/storage/firstaid/hypokit/burn = 2,
/obj/item/weapon/storage/firstaid/hypokit/toxin = 2,
/obj/item/weapon/storage/firstaid/hypokit/oxy = 2,
/obj/item/device/healthanalyzer = 5,
/obj/item/weapon/reagent_containers/glass/beaker = 4,
/obj/item/weapon/reagent_containers/dropper = 2,
Expand Down
11 changes: 8 additions & 3 deletions code/modules/reagents/reagent_containers/_reagent_containers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
if(!possible_transfer_amounts)
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
create_reagents(volume)

if(starts_with)
var/total_so_far = 0
for(var/string in starts_with)
Expand All @@ -39,6 +39,11 @@
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user, flag)
return

/obj/item/weapon/reagent_containers/AltClick(mob/user)
. = ..()
if(possible_transfer_amounts && user.Adjacent(src))
set_APTFT()

/obj/item/weapon/reagent_containers/proc/reagentlist() // For attack logs
if(reagents)
return reagents.get_reagents()
Expand Down Expand Up @@ -109,12 +114,12 @@
return FALSE

user.setClickCooldown(user.get_attack_speed(src)) //puts a limit on how fast people can eat/drink things
if(user == target)
if(user == target)
self_feed_message(user)
reagents.trans_to_mob(user, issmall(user) ? CEILING(amount_per_transfer_from_this/2, 1) : amount_per_transfer_from_this, CHEM_INGEST)
feed_sound(user)
return TRUE

else
other_feed_message_start(user, target)
if(!do_mob(user, target))
Expand Down
Loading

0 comments on commit 7cff99b

Please sign in to comment.