mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
help this guy died of styptic pills worst coder 2015
This commit is contained in:
@@ -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 += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"
|
||||
dat += "<A href='?src=\ref[src];createpill_multiple=1'>Create multiple pills</A><BR>"
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpatch=1'>Create patch (50 units max)</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createpatch_multiple=1'>Create multiple patches</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A>"
|
||||
else
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pack (10 units max)</A><BR>"
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
@@ -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] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user