diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index ef7dd044bd7..06f03537c98 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -19,7 +19,7 @@
var/hackedcheck = 0
var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine",
"sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron",
- "copper","mercury","radium","water","ethanol","sugar","sacid","tungsten")
+ "copper","mercury","radium","water","ethanol","sugar","sacid","tungsten","iodine","bromine")
var/list/hacked_reagents = list("plasma","toxin")
var/hack_message = "You disable the safety safeguards, enabling the \"Mad Scientist\" mode."
var/unhack_message = "You re-enable the safety safeguards, enabling the \"NT Standard\" mode."
@@ -364,6 +364,7 @@
var/condi = 0
var/useramount = 30 // Last used amount
var/pillamount = 10
+ var/patchamount = 10
var/bottlesprite = "1" //yes, strings
var/pillsprite = "1"
var/client/has_sprites = list()
@@ -566,6 +567,21 @@
P.name = "[name] pack"
P.desc = "A small condiment pack. The label says it contains [name]."
reagents.trans_to(P,10)
+ else if (href_list["createpatch"] || href_list["createpatch_multiple"])
+ if(!condi)
+ var/count = 1
+ if (href_list["createpatch_multiple"]) count = isgoodnumber(input("Select the number of patches to make.", 10, patchamount) as num)
+ 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 > 50) amount_per_patch = 50
+ var/name = reject_bad_text(input(usr,"Name:","Name your patch!","[reagents.get_master_reagent_name()] ([amount_per_patch] units)"))
+ while (count--)
+ var/obj/item/weapon/reagent_containers/pill/patch/P = new/obj/item/weapon/reagent_containers/pill/patch(src.loc)
+ if(!name) name = reagents.get_master_reagent_name()
+ P.name = "[name] patch"
+ P.pixel_x = rand(-7, 7) //random position
+ P.pixel_y = rand(-7, 7)
+ reagents.trans_to(P,amount_per_patch)
else if (href_list["createbottle"])
if(!condi)
var/name = reject_bad_text(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()))
@@ -663,6 +679,8 @@
if(!condi)
dat += "
Create pill (50 units max)
"
dat += "Create multiple pills
"
+ dat += "
Create patch (50 units max)
"
+ dat += "Create multiple patches
"
dat += "Create bottle (30 units max)"
else
dat += "
Create pack (10 units max)
"
diff --git a/code/modules/reagents/newchem/patch.dm b/code/modules/reagents/newchem/patch.dm
new file mode 100644
index 00000000000..cba1cf6ee6d
--- /dev/null
+++ b/code/modules/reagents/newchem/patch.dm
@@ -0,0 +1,17 @@
+/obj/item/weapon/reagent_containers/pill/patch
+ name = "chemical patch"
+ desc = "A chemical patch for touch based applications."
+ icon = 'icons/obj/chemical.dmi'
+ icon_state = "bandaid"
+ item_state = "bandaid"
+ possible_transfer_amounts = null
+ volume = 50
+ apply_type = TOUCH
+ apply_method = "apply"
+
+/obj/item/weapon/reagent_containers/pill/patch/New()
+ ..()
+ icon_state = "bandaid"
+
+/obj/item/weapon/reagent_containers/pill/patch/afterattack(obj/target, mob/user , proximity)
+ return // thanks inheritance again
\ No newline at end of file
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 53ab223809a..f554e9acc4c 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -35,9 +35,19 @@
/obj/item/weapon/reagent_containers/process()
if(reagents)
reagents.reagent_on_tick()
- ..()
return
+/obj/item/weapon/reagent_containers/ex_act()
+ if(reagents)
+ for(var/datum/reagent/R in reagents.reagent_list)
+ R.on_ex_act()
+ ..()
+
+/obj/item/weapon/reagent_containers/fire_act()
+ reagents.chem_temp += 30
+ reagents.handle_reactions()
+ ..()
+
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
return
diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm
index 5f4bdc09166..1545683f537 100644
--- a/code/modules/reagents/reagent_containers/pill.dm
+++ b/code/modules/reagents/reagent_containers/pill.dm
@@ -9,6 +9,8 @@
item_state = "pill"
possible_transfer_amounts = null
volume = 50
+ var/apply_type = INGEST
+ var/apply_method = "swallow"
New()
..()
@@ -19,39 +21,27 @@
return
attack(mob/M as mob, mob/user as mob, def_zone)
if(M == user)
-
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if(H.species.flags & IS_SYNTHETIC)
- H << "\red You have a monitor for a head, where do you think you're going to put that?"
- return
-
- M << "\blue You swallow [src]."
+ M << "\blue You [apply_type] [src]."
M.unEquip(src) //icon update
if(reagents.total_volume)
- reagents.reaction(M, INGEST)
+ reagents.reaction(M, apply_type)
spawn(5)
- reagents.trans_to_ingest(M, reagents.total_volume)
- del(src)
+ reagents.trans_to(M, reagents.total_volume)
+ qdel(src)
else
- del(src)
+ qdel(src)
return 1
else if(istype(M, /mob/living/carbon/human) )
- var/mob/living/carbon/human/H = M
- if(H.species.flags & IS_SYNTHETIC)
- H << "\red They have a monitor for a head, where do you think you're going to put that?"
- return
-
for(var/mob/O in viewers(world.view, user))
- O.show_message("\red [user] attempts to force [M] to swallow [src].", 1)
+ O.show_message("\red [user] attempts to force [M] to [apply_method] [src].", 1)
if(!do_mob(user, M)) return
user.unEquip(src) //icon update
for(var/mob/O in viewers(world.view, user))
- O.show_message("\red [user] forces [M] to swallow [src].", 1)
+ O.show_message("\red [user] forces [M] to [apply_method] [src].", 1)
M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]")
user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]")
@@ -63,12 +53,12 @@
M.LAssailant = user
if(reagents.total_volume)
- reagents.reaction(M, INGEST)
+ reagents.reaction(M, apply_type)
spawn(5)
reagents.trans_to_ingest(M, reagents.total_volume)
- del(src)
+ qdel(src)
else
- del(src)
+ qdel(src)
return 1
@@ -79,7 +69,7 @@
if(target.is_open_container() != 0 && target.reagents)
if(!target.reagents.total_volume)
- user << "\red [target] is empty. Cant dissolve pill."
+ user << "\red [target] is empty. Cant dissolve [src]."
return
// /vg/: Logging transfers of bad things
@@ -93,12 +83,12 @@
message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (JMP)")
log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
- user << "\blue You dissolve the pill in [target]"
+ user << "\blue You dissolve [src] in [target]"
reagents.trans_to(target, reagents.total_volume)
for(var/mob/O in viewers(2, user))
O.show_message("\red [user] puts something in [target].", 1)
spawn(5)
- del(src)
+ qdel(src)
return
diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi
index 584ee26023e..a639e4bf623 100644
Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ
diff --git a/paradise.dme b/paradise.dme
index 06224d8e1af..e248dd782e5 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -1467,6 +1467,7 @@
#include "code\modules\reagents\newchem\medicine.dm"
#include "code\modules\reagents\newchem\newchem_procs.dm"
#include "code\modules\reagents\newchem\other.dm"
+#include "code\modules\reagents\newchem\patch.dm"
#include "code\modules\reagents\newchem\pyro.dm"
#include "code\modules\reagents\newchem\toxins.dm"
#include "code\modules\reagents\reagent_containers\blood_pack.dm"