Merge remote-tracking branch 'refs/remotes/origin/master' into OnceYouLeaveYouCannotComeBack

This commit is contained in:
Krausus
2016-07-29 14:51:05 -04:00
122 changed files with 2251 additions and 1430 deletions
+25 -1
View File
@@ -7,7 +7,8 @@
#define AREAEDIT_BUILDMODE 7
#define FILL_BUILDMODE 8
#define LINK_BUILDMODE 9
#define NUM_BUILDMODES 9
#define BOOM_BUILDMODE 10
#define NUM_BUILDMODES 10
/obj/screen/buildmode
icon = 'icons/misc/buildmode.dmi'
@@ -167,6 +168,12 @@
var/list/link_lines = list()
var/obj/link_obj
var/valid_links = 0
//Explosion mode
var/devastation = -1
var/heavy = -1
var/light = -1
var/flash = -1
var/flames = -1
/datum/click_intercept/buildmode/New(client/c)
..()
@@ -250,6 +257,10 @@
to_chat(user, "<span class='notice'>Left Mouse Button on obj = Select button to link</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on obj = Link/unlink to selected button")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(BOOM_BUILDMODE)
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Mouse Button on obj = Kaboom</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
/datum/click_intercept/buildmode/proc/change_settings(mob/user)
switch(mode)
@@ -322,6 +333,17 @@
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = /obj/structure/closet
deselect_region()
if(BOOM_BUILDMODE)
devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) devastation = -1
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null) heavy = -1
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
if(light == null) light = -1
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) flash = -1
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) flames = -1
/datum/click_intercept/buildmode/proc/change_dir()
switch(build_dir)
@@ -601,3 +623,5 @@
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
L2.color = L.color
link_lines += L2
if(BOOM_BUILDMODE)
explosion(object, devastation, heavy, light, flash, null, null,flames)
+1 -47
View File
@@ -1566,53 +1566,7 @@
else if(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
return
var/location_description = ""
var/special_role_description = ""
var/health_description = ""
var/gender_description = ""
var/turf/T = get_turf(M)
//Location
if(isturf(T))
if(isarea(T.loc))
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z] in area <b>[T.loc]</b>)"
else
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z])"
//Job + antagonist
if(M.mind)
special_role_description = "Role: <b>[M.mind.assigned_role]</b>; Antagonist: <font color='red'><b>[M.mind.special_role]</b></font>; Has been rev: [(M.mind.has_been_rev)?"Yes":"No"]"
else
special_role_description = "Role: <i>Mind datum missing</i> Antagonist: <i>Mind datum missing</i>; Has been rev: <i>Mind datum missing</i>;"
//Health
if(isliving(M))
var/mob/living/L = M
var/status
switch(M.stat)
if(0) status = "Alive"
if(1) status = "<font color='orange'><b>Unconscious</b></font>"
if(2) status = "<font color='red'><b>Dead</b></font>"
health_description = "Status = [status]"
health_description += "<BR>Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()]"
else
health_description = "This mob type has no health to speak of."
//Gener
switch(M.gender)
if(MALE,FEMALE) gender_description = "[M.gender]"
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
to_chat(src.owner, "<b>Info about [M.name]:</b> ")
to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]")
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
to_chat(src.owner, "Location = [location_description];")
to_chat(src.owner, "[special_role_description]")
to_chat(src.owner, "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)")
admin_mob_info(M)
else if(href_list["adminspawncookie"])
if(!check_rights(R_ADMIN|R_EVENT)) return
+193 -24
View File
@@ -593,17 +593,25 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
"tournament janitor",
"pirate",
"space pirate",
"soviet tourist",
"soviet soldier",
"soviet admiral",
"tunnel clown",
"mime assassin",
"survivor",
"greytide",
"greytide leader",
"greytide xeno",
"masked killer",
"singuloth knight",
"dark lord",
"assassin",
"spy",
"vox",
"death commando",
"syndicate agent",
"syndicate operative",
"syndicate bomber",
"syndicate strike team",
"syndicate officer",
"chrono legionnaire",
@@ -746,30 +754,29 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
equip_special_id(M,get_all_accesses(), "Pirate", /obj/item/weapon/card/id)
equip_special_id(M,list(access_maint_tunnels), "Pirate", /obj/item/weapon/card/id)
if("space pirate")
if("space pirate") // not spaceworthy, just has fancier coat.
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/pirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/pirate(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
equip_special_id(M,get_all_accesses(), "Space Pirate", /obj/item/weapon/card/id)
if("soviet soldier")
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
equip_special_id(M,get_all_accesses(), "Soviet Soldier", /obj/item/weapon/card/id)
equip_special_id(M,list(access_maint_tunnels), "Space Pirate", /obj/item/weapon/card/id)
if("tunnel clown")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
@@ -780,25 +787,106 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_r_store)
equip_special_id(M,get_all_accesses(), "Tunnel Clown", /obj/item/weapon/card/id)
equip_special_id(M,list(access_clown, access_theatre, access_maint_tunnels), "Tunnel Clown", /obj/item/weapon/card/id)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
if("mime assassin")
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/mime(M), slot_back)
if(M.gender == FEMALE)
M.equip_or_collect(new /obj/item/clothing/under/sexymime(M), slot_w_uniform)
M.equip_or_collect(new /obj/item/clothing/mask/gas/sexymime(M), slot_wear_mask)
else
M.equip_or_collect(new /obj/item/clothing/under/mime(M), slot_w_uniform)
M.equip_or_collect(new /obj/item/clothing/mask/gas/mime(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/white(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/beret(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/syndie_kit/caneshotgun, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/toy/crayon/mime, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/pistol(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/suppressor(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/pen/sleepy(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket(M), slot_in_backpack)
var/obj/item/device/pda/mime/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "Mime"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_wear_pda)
equip_special_id(M,list(access_mime, access_theatre, access_maint_tunnels), "Mime", /obj/item/weapon/card/id/syndicate)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
if("survivor")
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
equip_special_id(M,get_all_accesses(), "Survivor", /obj/item/weapon/card/id)
equip_special_id(M,list(access_maint_tunnels), "Survivor", /obj/item/weapon/card/id)
for(var/obj/item/carried_item in M.contents)
if(!istype(carried_item, /obj/item/weapon/implant))
carried_item.add_blood(M)
if("greytide")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/flag/grey(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
equip_special_id(M,list(access_maint_tunnels), "Greytide", /obj/item/weapon/card/id)
if("greytide leader")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/flag/grey(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
equip_special_id(M,list(access_maint_tunnels), "Greytide Leader", /obj/item/weapon/card/id)
if("greytide xeno")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/xenos(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/xenos(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/toy/toy_xeno(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
equip_special_id(M,list(access_maint_tunnels), "Legit Xenomorph", /obj/item/weapon/card/id)
if("masked killer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
@@ -809,7 +897,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Masked Killer", /obj/item/weapon/card/id/syndicate, "syndie")
equip_special_id(M,list(access_maint_tunnels), "Masked Killer", /obj/item/weapon/card/id/syndicate, "syndie")
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
for(var/obj/item/carried_item in M.contents)
@@ -821,6 +909,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/dualsaber/red(M), slot_l_hand)
@@ -841,6 +930,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wcoat(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M)
for(var/obj/item/briefcase_item in sec_briefcase)
@@ -880,14 +970,39 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/pen/sleepy(M), slot_r_store)
var/obj/item/weapon/implant/dust/DUST = new /obj/item/weapon/implant/dust(M)
DUST.implant(M)
var/obj/item/weapon/implant/dust/STOR = new /obj/item/weapon/implant/storage(M)
STOR.implant(M)
M.equip_to_slot_or_del(new /obj/item/weapon/implanter/storage(M), slot_in_backpack)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "Spy"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_belt)
equip_special_id(M,get_all_accesses(), "Spy", /obj/item/weapon/card/id/syndicate, "syndie")
equip_special_id(M,list(access_maint_tunnels), "Spy", /obj/item/weapon/card/id/syndicate, "syndie")
if("vox")
if(istype(M, /mob/living/carbon/human/voxarmalis)) // have to do this, they cannot wear normal vox gear!
M.equip_to_slot_or_del(new /obj/item/clothing/under/vox_grey(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/carapace(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/carapace(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/under/vox/vox_robes (M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate/vox(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate, slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow/vox, slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic, slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/vox, slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle, slot_glasses)
M.equip_to_slot_or_del(new /obj/item/device/flashlight, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs/cable/zipties, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flash, slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/noisecannon, slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Vox Armalis", /obj/item/weapon/card/id/syndicate/vox, "syndie")
else
M.equip_vox_raider()
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_l_hand)
M.regenerate_icons()
if("death commando")
M.equip_death_commando()
@@ -909,15 +1024,31 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
U.hidden_uplink.uses = 20
M.equip_to_slot_or_del(U, slot_r_store)
if("syndicate bomber")
M.equip_or_collect(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
M.equip_or_collect(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/device/flashlight(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/card/emag(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/radio/beacon/syndicate/bomb(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/radio/beacon/syndicate/bomb(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/syndicatedetonator(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
equip_special_id(M,get_syndicate_access("Syndicate Operative"), "Syndicate Bomber", /obj/item/weapon/card/id/syndicate, "syndie")
if("syndicate operative")
M.equip_or_collect(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
M.equip_or_collect(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/initropidril(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/gun/projectile/automatic/pistol(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/ammo_box/magazine/m10mm(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/crowbar/red(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/clothing/glasses/night(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/storage/belt/military(M), slot_belt)
@@ -948,8 +1079,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/initropidril(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/initropidril(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/clothing/glasses/thermal(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/storage/belt/military(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/pinpointer/advpinpointer(M), slot_l_store)
@@ -974,6 +1105,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/clothing/head/that(M), slot_head)
M.equip_or_collect(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_or_collect(new /obj/item/device/pda/(M), slot_wear_pda)
@@ -989,6 +1121,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1007,6 +1140,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1051,6 +1185,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses) // job has /obj/item/clothing/glasses/hud/security/sunglasses
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad/officer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
@@ -1078,6 +1213,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_r_store)
M.equip_or_collect(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_in_backpack)
@@ -1117,7 +1253,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Wizard", /obj/item/weapon/card/id)
if("red wizard")
@@ -1130,7 +1266,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Wizard", /obj/item/weapon/card/id)
if("marisa wizard")
@@ -1143,20 +1279,53 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Wizard", /obj/item/weapon/card/id)
if("soviet tourist")
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
equip_special_id(M,list(access_maint_tunnels), "Soviet Tourist", /obj/item/weapon/card/id)
if("soviet soldier")
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/card/emag(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/c4(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/c4(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
equip_special_id(M,list(access_maint_tunnels), "Soviet Soldier", /obj/item/weapon/card/id)
if("soviet admiral")
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
equip_special_id(M,get_all_accesses() + get_all_centcom_access(), "Admiral", /obj/item/weapon/card/id, "commander")
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
equip_special_id(M,get_all_accesses() + get_all_centcom_access(), "Soviet Admiral", /obj/item/weapon/card/id, "commander")
//W.icon_state = "commander"
if("chrono legionnaire")
@@ -29,7 +29,7 @@
/datum/gear/sechud
display_name = "a classic security HUD"
path = /obj/item/clothing/glasses/hud/security
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot", "Internal Affairs Agent")
/datum/gear/matches
display_name = "a box of matches"
@@ -38,3 +38,35 @@
/datum/gear/cards
display_name = "a deck of cards"
path = /obj/item/toy/cards/deck
/datum/gear/blackbandana
display_name = "bandana, black"
path = /obj/item/clothing/mask/bandana/black
/datum/gear/purplebandana
display_name = "bandana, purple"
path = /obj/item/clothing/mask/bandana/purple
/datum/gear/orangebandana
display_name = "bandana, orange"
path = /obj/item/clothing/mask/bandana/orange
/datum/gear/greenbandana
display_name = "bandana, green"
path = /obj/item/clothing/mask/bandana/green
/datum/gear/bluebandana
display_name = "bandana, blue"
path = /obj/item/clothing/mask/bandana/blue
/datum/gear/redbandana
display_name = "bandana, red"
path = /obj/item/clothing/mask/bandana/red
/datum/gear/goldbandana
display_name = "bandana, gold"
path = /obj/item/clothing/mask/bandana/gold
/datum/gear/skullbandana
display_name = "bandana, skull"
path = /obj/item/clothing/mask/bandana/skull
@@ -4,5 +4,15 @@
sort_category = "Shoes"
/datum/gear/shoes/sandals
display_name = "sandals"
path = /obj/item/clothing/shoes/sandal
display_name = "sandals, wooden"
path = /obj/item/clothing/shoes/sandal
/datum/gear/shoes/fancysandals
display_name = "sandals, fancy"
cost = 5
path = /obj/item/clothing/shoes/sandal/fancy
/datum/gear/shoes/dressshoes
display_name = "dress shoes"
cost = 5
path = /obj/item/clothing/shoes/centcom
@@ -59,7 +59,7 @@
/datum/gear/suit/coat/job/miner
display_name = "winter coat, miner"
path = /obj/item/clothing/suit/hooded/wintercoat/miner
allowed_roles = list("Miner")
allowed_roles = list("Shaft Miner")
//LABCOATS
/datum/gear/suit/labcoat_emt
@@ -144,3 +144,17 @@
/datum/gear/suit/blackhoodie
display_name = "hoodie, black"
path = /obj/item/clothing/suit/hooded/hoodie
//SUITS!
/datum/gear/suit/blacksuit
display_name = "suit jacket, black"
path = /obj/item/clothing/suit/storage/lawyer/blackjacket
/datum/gear/suit/bluesuit
display_name = "suit jacket, blue"
path = /obj/item/clothing/suit/storage/lawyer/bluejacket
/datum/gear/suit/purplesuit
display_name = "suit jacket, purple"
path = /obj/item/clothing/suit/storage/lawyer/purpjacket
@@ -66,7 +66,7 @@
/datum/gear/uniform/skirt/job/med
display_name = "skirt, medical"
path = /obj/item/clothing/under/rank/medical/skirt
allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic")
allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic","Brig Physician")
/datum/gear/uniform/skirt/job/sci
display_name = "skirt, scientist"
+14
View File
@@ -372,3 +372,17 @@
desc = "A horribly bloated and mismatched human head."
icon_state = "lingspacehelmet"
item_state = "lingspacehelmet"
/obj/item/clothing/head/papersack
name = "paper sack hat"
desc = "A paper sack with crude holes cut out for eyes. Useful for hiding one's identity or ugliness."
icon_state = "papersack"
flags = BLOCKHAIR
flags_inv = HIDEFACE|HIDEEARS
/obj/item/clothing/head/papersack/smiley
name = "paper sack hat"
desc = "A paper sack with crude holes cut out for eyes and a sketchy smile drawn on the front. Not creepy at all."
icon_state = "papersack_smile"
flags = BLOCKHAIR
flags_inv = HIDEFACE|HIDEEARS
+6 -6
View File
@@ -222,37 +222,37 @@
/obj/item/clothing/mask/bandana/attack_self(var/mob/user)
adjustmask(user)
obj/item/clothing/mask/bandana/red
/obj/item/clothing/mask/bandana/red
name = "red bandana"
icon_state = "bandred"
item_color = "red"
desc = "It's a red bandana."
obj/item/clothing/mask/bandana/blue
/obj/item/clothing/mask/bandana/blue
name = "blue bandana"
icon_state = "bandblue"
item_color = "blue"
desc = "It's a blue bandana."
obj/item/clothing/mask/bandana/gold
/obj/item/clothing/mask/bandana/gold
name = "gold bandana"
icon_state = "bandgold"
item_color = "yellow"
desc = "It's a gold bandana."
obj/item/clothing/mask/bandana/green
/obj/item/clothing/mask/bandana/green
name = "green bandana"
icon_state = "bandgreen"
item_color = "green"
desc = "It's a green bandana."
obj/item/clothing/mask/bandana/orange
/obj/item/clothing/mask/bandana/orange
name = "orange bandana"
icon_state = "bandorange"
item_color = "orange"
desc = "It's an orange bandana."
obj/item/clothing/mask/bandana/purple
/obj/item/clothing/mask/bandana/purple
name = "purple bandana"
icon_state = "bandpurple"
item_color = "purple"
+47 -2
View File
@@ -26,6 +26,24 @@
time = 15
category = CAT_WEAPON
/datum/crafting_recipe/lance
name = "explosive lance (grenade)"
result = /obj/item/weapon/twohanded/spear
reqs = list(/obj/item/weapon/twohanded/spear = 1,
/obj/item/weapon/grenade = 1)
parts = list(/obj/item/weapon/grenade = 1)
time = 15
category = CAT_WEAPON
/datum/crafting_recipe/molotov
name = "Molotov"
result = /obj/item/weapon/reagent_containers/food/drinks/bottle/molotov
reqs = list(/obj/item/weapon/reagent_containers/glass/rag = 1,
/obj/item/weapon/reagent_containers/food/drinks/bottle = 1)
parts = list(/obj/item/weapon/reagent_containers/food/drinks/bottle = 1)
time = 40
category = CAT_WEAPON
/datum/crafting_recipe/stunprod
name = "Stunprod"
result = /obj/item/weapon/melee/baton/cattleprod
@@ -109,7 +127,9 @@
result = /obj/item/weapon/flamethrower
reqs = list(/obj/item/weapon/weldingtool = 1,
/obj/item/device/assembly/igniter = 1,
/obj/item/stack/rods = 2)
/obj/item/stack/rods = 1)
parts = list(/obj/item/device/assembly/igniter = 1,
/obj/item/weapon/weldingtool = 1)
tools = list(/obj/item/weapon/screwdriver)
time = 10
category = CAT_WEAPON
@@ -206,6 +226,16 @@
time = 100
category = CAT_WEAPON
/datum/crafting_recipe/chainsaw
name = "Chainsaw"
result = /obj/item/weapon/twohanded/required/chainsaw
reqs = list(/obj/item/weapon/circular_saw = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/plasteel = 1)
tools = list(/obj/item/weapon/weldingtool)
time = 50
category = CAT_WEAPON
/datum/crafting_recipe/spear
name = "Spear"
result = /obj/item/weapon/twohanded/spear
@@ -223,6 +253,13 @@
/datum/reagent/holywater = 10)
parts = list(/obj/item/device/camera = 1)
/datum/crafting_recipe/papersack
name = "Paper Sack"
result = /obj/item/weapon/storage/box/papersack
time = 10
reqs = list(/obj/item/weapon/paper = 5)
category = CAT_MISC
/datum/crafting_recipe/notreallysoap
name = "Homemade Soap"
result = /obj/item/weapon/soap/ducttape
@@ -264,4 +301,12 @@
result = /obj/item/latexballon
time = 15
reqs = list(/obj/item/clothing/gloves/color/latex = 1,
/obj/item/stack/cable_coil = 5)
/obj/item/stack/cable_coil = 5)
/datum/crafting_recipe/gold_horn
name = "Golden bike horn"
result = /obj/item/weapon/bikehorn/golden
time = 20
reqs = list(/obj/item/stack/sheet/mineral/bananium = 5,
/obj/item/weapon/bikehorn)
category = CAT_MISC
+1 -1
View File
@@ -149,7 +149,7 @@ var/list/event_last_fired = list()
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)),
//new /datum/event_meta(EVENT_LEVEL_MODERATE, "Virology Breach", /datum/event/prison_break/virology, 0, list(ASSIGNMENT_MEDICAL = 100)),
//new /datum/event_meta(EVENT_LEVEL_MODERATE, "Xenobiology Breach", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENCE = 100)),
//new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
@@ -277,3 +277,70 @@
item_state = "carton"
isGlass = 0
list_reagents = list("limejuice" = 100)
////////////////////////// MOLOTOV ///////////////////////
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov
name = "molotov cocktail"
desc = "A throwing weapon used to ignite things, typically filled with an accelerant. Recommended highly by rioters and revolutionaries. Light and toss."
icon_state = "vodkabottle"
list_reagents = list()
var/list/accelerants = list(/datum/reagent/ethanol,/datum/reagent/fuel,/datum/reagent/clf3,/datum/reagent/phlogiston,
/datum/reagent/napalm,/datum/reagent/hellwater,/datum/reagent/plasma,/datum/reagent/plasma_dust)
var/active = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/CheckParts(list/parts_list)
..()
var/obj/item/weapon/reagent_containers/food/drinks/bottle/B = locate() in contents
if(B)
icon_state = B.icon_state
B.reagents.copy_to(src, 100)
if(!B.isGlass)
desc += " You're not sure if making this out of a carton was the brightest idea."
isGlass = 0
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/throw_impact(atom/target,mob/thrower)
var/firestarter = 0
for(var/datum/reagent/R in reagents.reagent_list)
for(var/A in accelerants)
if(istype(R, A))
firestarter = 1
break
SplashReagents(target)
if(firestarter && active)
target.fire_act()
new /obj/effect/hotspot(get_turf(target))
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
if(is_hot(I) && !active)
active = 1
var/turf/bombturf = get_turf(src)
var/area/bombarea = get_area(bombturf)
message_admins("[key_name(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[bombarea] (JMP)</a>.")
log_game("[key_name(user)] has primed a [name] for detonation at [bombarea] ([bombturf.x],[bombturf.y],[bombturf.z]).")
to_chat(user, "<span class='info'>You light [src] on fire.</span>")
overlays += fire_overlay
if(!isGlass)
spawn(50)
if(active)
var/counter
var/target = loc
for(counter = 0, counter < 2, counter++)
if(istype(target, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = target
target = S.loc
if(istype(target, /atom))
var/atom/A = target
SplashReagents(A)
A.fire_act()
qdel(src)
/obj/item/weapon/reagent_containers/food/drinks/bottle/molotov/attack_self(mob/user)
if(active)
if(!isGlass)
to_chat(user, "<span class='danger'>The flame's spread too far on it!</span>")
return
to_chat(user, "<span class='info'>You snuff out the flame on \the [src].</span>")
overlays -= fire_overlay
active = 0
+15 -14
View File
@@ -20,26 +20,32 @@
opacity = 1
var/health = 50
var/tmp/busy = 0
var/list/valid_types = list(/obj/item/weapon/book, \
/obj/item/weapon/tome, \
/obj/item/weapon/spellbook, \
/obj/item/weapon/storage/bible)
var/list/allowed_books = list(/obj/item/weapon/book, /obj/item/weapon/spellbook, /obj/item/weapon/storage/bible, /obj/item/weapon/tome) //Things allowed in the bookcase
/obj/structure/bookcase/initialize()
..()
for(var/obj/item/I in loc)
if(is_type_in_list(I, valid_types))
if(is_type_in_list(I, allowed_books))
I.forceMove(src)
update_icon()
/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob, params)
if(busy) //So that you can't mess with it while deconstructing
return 1
if(is_type_in_list(O, valid_types))
user.drop_item()
if(is_type_in_list(O, allowed_books))
if(!user.drop_item())
return
O.forceMove(src)
update_icon()
return 1
else if(istype(O, /obj/item/weapon/storage/bag/books))
var/obj/item/weapon/storage/bag/books/B = O
for(var/obj/item/T in B.contents)
if(istype(T, /obj/item/weapon/book) || istype(T, /obj/item/weapon/spellbook) || istype(T, /obj/item/weapon/tome) || istype(T, /obj/item/weapon/storage/bible))
B.remove_from_storage(T, src)
to_chat(user, "<span class='notice'>You empty [O] into [src].</span>")
update_icon()
return 1
else if(istype(O, /obj/item/weapon/wrench))
user.visible_message("<span class='warning'>[user] starts disassembling \the [src].</span>", \
"<span class='notice'>You start disassembling \the [src].</span>")
@@ -51,8 +57,6 @@
user.visible_message("<span class='warning'>[user] disassembles \the [src].</span>", \
"<span class='notice'>You disassemble \the [src].</span>")
busy = 0
for(var/i = 1 to 5)
new /obj/item/stack/sheet/wood(get_turf(src))
density = 0
qdel(src)
else
@@ -72,9 +76,6 @@
else
if(health <= 0)
visible_message("<span class=warning>The bookcase is smashed apart!</span>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
return ..()
@@ -110,10 +111,10 @@
return
/obj/structure/bookcase/Destroy()
for(var/i = 1 to 3)
for(var/i in 1 to 5)
new /obj/item/stack/sheet/wood(get_turf(src))
for(var/obj/item/I in contents)
if(is_type_in_list(I, valid_types))
if(is_type_in_list(I, allowed_books))
I.forceMove(get_turf(src))
return ..()
+1 -1
View File
@@ -110,7 +110,7 @@
if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for NODROP.
return 1
if((I.flags & NODROP) && !force)
if(!canUnEquip(I, force))
return 0
if(I == r_hand)
+2 -1
View File
@@ -569,6 +569,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
return
/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..()
. = ..() //Sets the default return value to what the parent returns.
if(!. || !I) //We don't want to set anything to null if the parent returned 0.
@@ -1041,4 +1042,4 @@ so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0)
if(hud_used && hud_used.internals)
hud_used.internals.icon_state = "internal[internal_state]"
hud_used.internals.icon_state = "internal[internal_state]"
@@ -107,15 +107,19 @@
if(slot_tie)
return 1
// The actual dropping happens at the mob level - checks to prevent drops should
// come here
/mob/living/carbon/human/canUnEquip(obj/item/I, force)
. = ..()
var/obj/item/organ/O = I
if(istype(O) && O.owner == src)
. = 0 // keep a good grip on your heart
/mob/living/carbon/human/unEquip(obj/item/I)
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
if(!. || !I)
return
var/obj/item/organ/internal/O = I //Organs shouldn't be removed unless you call droplimb.
if(istype(O) && O.owner == src)
return
if(I == wear_suit)
if(s_store)
unEquip(s_store, 1) //It makes no sense for your suit storage to stay on you if you drop your suit.
+1 -1
View File
@@ -8,7 +8,7 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0,var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/used_weapon = null, var/sharp = 0, var/edge = 0)
/mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/edge = 0, var/used_weapon = null)
blocked = (100-blocked)/100
if(!damage || (blocked <= 0)) return 0
switch(damagetype)
+1 -1
View File
@@ -153,7 +153,7 @@
var/see_ghosts = 0 //for the spoop of it
/obj/item/device/camera/spooky/CheckParts()
/obj/item/device/camera/spooky/CheckParts(list/parts_list)
..()
var/obj/item/device/camera/C = locate(/obj/item/device/camera) in contents
if(C)
+4 -3
View File
@@ -300,15 +300,16 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
to_chat(usr, "<span class='notice'>You cannot do this while restrained.</span>")
/obj/item/device/pda/AltClick()
/obj/item/device/pda/AltClick(mob/user)
..()
if(issilicon(usr))
return
if(can_use(usr))
if(can_use(user))
if(id)
remove_id()
else
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
to_chat(user, "<span class='warning'>This PDA does not have an ID in it!</span>")
/obj/item/device/pda/proc/remove_id()
if(id)
+7 -26
View File
@@ -457,10 +457,15 @@ obj/structure/cable/proc/cableColor(var/colorC)
#define MAXCOIL 30
var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \
new/datum/stack_recipe("cable restraints", /obj/item/weapon/restraints/handcuffs/cable, 15), \
)
/obj/item/stack/cable_coil
name = "cable coil"
icon = 'icons/obj/power.dmi'
icon_state = "coil"
item_state = "coil_red"
amount = MAXCOIL
max_amount = MAXCOIL
color = COLOR_RED
@@ -492,6 +497,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
update_icon()
recipes = cable_coil_recipes
update_wclass()
///////////////////////////////////
@@ -556,37 +562,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
else
to_chat(user, "A coil of power cable. There are [get_amount()] lengths of cable in the coil.")
/obj/item/stack/cable_coil/verb/make_restraint()
set name = "Make Cable Restraints"
set category = "Object"
var/mob/M = usr
if(ishuman(M) && !M.restrained() && !M.stat && !M.paralysis && ! M.stunned)
if(!istype(usr.loc,/turf)) return
if(src.amount <= 14)
to_chat(usr, "<span class='warning'>You need at least 15 lengths to make restraints!</span>")
return
var/obj/item/weapon/restraints/handcuffs/cable/B = new /obj/item/weapon/restraints/handcuffs/cable(usr.loc)
B.color = color
to_chat(usr, "<span class='notice'>You wind some cable together to make some restraints.</span>")
src.use(15)
else
to_chat(usr, "<span class='warning'>You cannot do that.</span>")
..()
// Items usable on a cable coil :
// - Wirecutters : cut them duh !
// - Cable coil : merge cables
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
..()
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
src.amount--
new/obj/item/stack/cable_coil(user.loc, 1,color)
to_chat(user, "You cut a piece off the cable coil.")
src.update_icon()
return
else if(istype(W, /obj/item/stack/cable_coil))
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(C.amount >= MAXCOIL)
to_chat(user, "The coil is too long, you cannot add any more cable to it.")
@@ -70,6 +70,14 @@
src.dir = turn(src.dir, 90)
return 1
/obj/machinery/power/emitter/AltClick(mob/user)
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!Adjacent(user))
return
rotate()
/obj/machinery/power/emitter/initialize()
..()
if(state == 2 && anchored)
@@ -101,6 +101,14 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
src.dir = turn(src.dir, 270)
return 1
/obj/structure/particle_accelerator/AltClick(mob/user)
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!Adjacent(user))
return
rotate()
/obj/structure/particle_accelerator/verb/rotateccw()
set name = "Rotate Counter Clockwise"
set category = "Object"
+73 -84
View File
@@ -10,6 +10,8 @@ var/const/INGEST = 2
var/total_volume = 0
var/maximum_volume = 100
var/atom/my_atom = null
var/chem_temp = 300
var/list/datum/reagent/addiction_list = new/list()
/datum/reagents/New(maximum=100)
maximum_volume = maximum
@@ -56,17 +58,19 @@ var/const/INGEST = 2
current_list_element = rand(1,reagent_list.len)
while(total_transfered != amount)
if(total_transfered >= amount) break
if(total_volume <= 0 || !reagent_list.len) break
if(total_transfered >= amount)
break
if(total_volume <= 0 || !reagent_list.len)
break
if(current_list_element > reagent_list.len) current_list_element = 1
var/datum/reagent/current_reagent = reagent_list[current_list_element]
src.remove_reagent(current_reagent.id, min(1, amount - total_transfered))
remove_reagent(current_reagent.id, min(1, amount - total_transfered))
current_list_element++
total_transfered++
src.update_total()
update_total()
handle_reactions()
return total_transfered
@@ -94,7 +98,7 @@ var/const/INGEST = 2
/datum/reagents/proc/trans_to(target, amount=1, multiplier=1, preserve_data=1)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
if(!target)
return
if(src.total_volume <= 0)
if(total_volume <= 0)
return
var/datum/reagents/R
if(istype(target, /obj))
@@ -102,7 +106,7 @@ var/const/INGEST = 2
if(!O.reagents )
return
R = O.reagents
else if(istype(target, /mob/living))
else if(isliving(target))
var/mob/living/M = target
if(!M.reagents)
return
@@ -112,10 +116,10 @@ var/const/INGEST = 2
else
return
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
var/part = amount / src.total_volume
amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume)
var/part = amount / total_volume
var/trans_data = null
for(var/datum/reagent/current_reagent in src.reagent_list)
for(var/datum/reagent/current_reagent in reagent_list)
if(!current_reagent)
continue
if(current_reagent.id == "blood" && ishuman(target))
@@ -126,59 +130,59 @@ var/const/INGEST = 2
if(preserve_data)
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, src.chem_temp)
src.remove_reagent(current_reagent.id, current_reagent_transfer)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, chem_temp)
remove_reagent(current_reagent.id, current_reagent_transfer)
src.update_total()
update_total()
R.update_total()
R.handle_reactions()
src.handle_reactions()
handle_reactions()
return amount
/datum/reagents/proc/copy_to(obj/target, amount=1, multiplier=1, preserve_data=1, safety = 0)
if(!target)
return
if(!target.reagents || src.total_volume<=0)
if(!target.reagents || total_volume<=0)
return
var/datum/reagents/R = target.reagents
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
var/part = amount / src.total_volume
amount = min(min(amount, total_volume), R.maximum_volume-R.total_volume)
var/part = amount / total_volume
var/trans_data = null
for(var/datum/reagent/current_reagent in src.reagent_list)
for(var/datum/reagent/current_reagent in reagent_list)
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
src.update_total()
update_total()
R.update_total()
R.handle_reactions()
src.handle_reactions()
handle_reactions()
return amount
/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N
if(!target)
return
if(!target.reagents || src.total_volume<=0 || !src.get_reagent_amount(reagent))
if(!target.reagents || total_volume<=0 || !get_reagent_amount(reagent))
return
var/datum/reagents/R = target.reagents
if(src.get_reagent_amount(reagent)<amount)
amount = src.get_reagent_amount(reagent)
if(get_reagent_amount(reagent)<amount)
amount = get_reagent_amount(reagent)
amount = min(amount, R.maximum_volume-R.total_volume)
var/trans_data = null
for(var/datum/reagent/current_reagent in src.reagent_list)
for(var/datum/reagent/current_reagent in reagent_list)
if(current_reagent.id == reagent)
if(preserve_data)
trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, amount, trans_data, src.chem_temp)
src.remove_reagent(current_reagent.id, amount, 1)
R.add_reagent(current_reagent.id, amount, trans_data, chem_temp)
remove_reagent(current_reagent.id, amount, 1)
break
src.update_total()
update_total()
R.update_total()
R.handle_reactions()
//src.handle_reactions() Don't need to handle reactions on the source since you're (presumably isolating and) transferring a specific reagent.
//handle_reactions() Don't need to handle reactions on the source since you're (presumably isolating and) transferring a specific reagent.
return amount
/*
@@ -201,11 +205,11 @@ var/const/INGEST = 2
if(preserve_data)
trans_data = current_reagent.data
R.add_reagent(current_reagent.id, (1 * multiplier), trans_data)
src.remove_reagent(current_reagent.id, 1)
remove_reagent(current_reagent.id, 1)
current_list_element++
total_transfered++
src.update_total()
update_total()
R.update_total()
R.handle_reactions()
handle_reactions()
@@ -225,19 +229,18 @@ var/const/INGEST = 2
update_total()
/datum/reagents/proc/handle_reactions()
if(my_atom.flags & NOREACT) return //Yup, no reactions here. No siree.
if(my_atom.flags & NOREACT)
return //Yup, no reactions here. No siree.
var/reaction_occured = 0
do
reaction_occured = 0
for(var/datum/reagent/R in reagent_list) // Usually a small list
for(var/reaction in chemical_reactions_list[R.id]) // Was a big list but now it should be smaller since we filtered it with our reagent id
if(!reaction)
continue
var/datum/chemical_reaction/C = reaction
var/total_required_reagents = C.required_reagents.len
var/total_matching_reagents = 0
var/total_required_catalysts = C.required_catalysts.len
@@ -248,11 +251,13 @@ var/const/INGEST = 2
var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this)
var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this)
for(var/B in C.required_reagents)
if(!has_reagent(B, C.required_reagents[B])) break
if(!has_reagent(B, C.required_reagents[B]))
break
total_matching_reagents++
multipliers += round(get_reagent_amount(B) / C.required_reagents[B])
for(var/B in C.required_catalysts)
if(!has_reagent(B, C.required_catalysts[B])) break
if(!has_reagent(B, C.required_catalysts[B]))
break
total_matching_catalysts++
if(!C.required_container)
@@ -265,17 +270,11 @@ var/const/INGEST = 2
if(!C.required_other)
matching_other = 1
else
/*if(istype(my_atom, /obj/item/slime_core))
var/obj/item/slime_core/M = my_atom
else if(istype(my_atom, /obj/item/slime_extract))
var/obj/item/slime_extract/M = my_atom
if(M.POWERFLAG == C.required_other && M.Uses > 0) // added a limit to slime cores -- Muskets requested this
matching_other = 1*/
if(istype(my_atom, /obj/item/slime_extract))
var/obj/item/slime_extract/M = my_atom
if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this
matching_other = 1
if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this
matching_other = 1
if(min_temp == 0)
min_temp = chem_temp
@@ -302,14 +301,14 @@ var/const/INGEST = 2
var/list/seen = viewers(4, get_turf(my_atom))
for(var/mob/M in seen)
if(!C.no_message)
to_chat(M, "\blue [bicon(my_atom)] [C.mix_message]")
to_chat(M, "<span class='notice'>[bicon(my_atom)] [C.mix_message]</span>")
if(istype(my_atom, /obj/item/slime_extract))
var/obj/item/slime_extract/ME2 = my_atom
ME2.Uses--
if(ME2.Uses <= 0) // give the notification that the slime core is dead
for(var/mob/M in seen)
to_chat(M, "\blue [bicon(my_atom)] The [my_atom]'s power is consumed in the reaction.")
to_chat(M, "<span class='notice'>[bicon(my_atom)] The [my_atom]'s power is consumed in the reaction.</span>")
ME2.name = "used slime extract"
ME2.desc = "This extract has been used up."
@@ -334,7 +333,7 @@ var/const/INGEST = 2
for(var/A in reagent_list)
var/datum/reagent/R = A
if(R.id == reagent)
if(istype(my_atom, /mob/living))
if(isliving(my_atom))
var/mob/living/M = my_atom
R.reagent_deleted(M)
reagent_list -= A
@@ -361,10 +360,8 @@ var/const/INGEST = 2
del_reagent(R.id)
return 0
/datum/reagents/proc/reaction_check(mob/M, datum/reagent/R)
/datum/reagents/proc/reaction_check(mob/living/M, datum/reagent/R)
var/can_process = 0
if(!istype(M, /mob/living)) //Non-living mobs can't metabolize reagents, so don't bother trying (runtime safety check)
return can_process
if(ishuman(M))
var/mob/living/carbon/human/H = M
//Check if this mob's species is set and can process this type of reagent
@@ -389,45 +386,28 @@ var/const/INGEST = 2
switch(method)
if(TOUCH)
for(var/datum/reagent/R in reagent_list)
if(ismob(A))
if(!R)
return
if(isliving(A))
var/check = reaction_check(A, R)
if(!check)
continue
else
R.reaction_mob(A, TOUCH, R.volume*volume_modifier)
if(isturf(A))
if(!R)
return
else
R.reaction_turf(A, R.volume*volume_modifier)
R.reaction_turf(A, R.volume*volume_modifier)
if(isobj(A))
if(!R)
return
else
R.reaction_obj(A, R.volume*volume_modifier)
R.reaction_obj(A, R.volume*volume_modifier)
if(INGEST)
for(var/datum/reagent/R in reagent_list)
if(ismob(A) && R)
if(!R)
return
if(isliving(A))
var/check = reaction_check(A, R)
if(!check)
continue
else
R.reaction_mob(A, INGEST, R.volume*volume_modifier)
if(isturf(A) && R)
if(!R)
return
else
R.reaction_turf(A, R.volume*volume_modifier)
if(isobj(A) && R)
if(!R)
return
else
R.reaction_obj(A, R.volume*volume_modifier)
return
if(isturf(A))
R.reaction_turf(A, R.volume*volume_modifier)
if(isobj(A))
R.reaction_obj(A, R.volume*volume_modifier)
/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15)
for(var/r_id in list_reagents)
@@ -435,10 +415,12 @@ var/const/INGEST = 2
add_reagent(r_id, amt, data)
/datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300)
if(!isnum(amount)) return 1
if(!isnum(amount))
return 1
update_total()
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
if(amount <= 0)
return 0
chem_temp = round(((amount * reagtemp) + (total_volume * chem_temp)) / (total_volume + amount)) //equalize with new chems
for(var/A in reagent_list)
@@ -476,7 +458,8 @@ var/const/INGEST = 2
/datum/reagents/proc/remove_reagent(reagent, amount, safety)//Added a safety check for the trans_id_to
if(!isnum(amount)) return 1
if(!isnum(amount))
return 1
for(var/A in reagent_list)
var/datum/reagent/R = A
@@ -495,10 +478,13 @@ var/const/INGEST = 2
for(var/A in reagent_list)
var/datum/reagent/R = A
if(R.id == reagent)
if(!amount) return R
if(!amount)
return R
else
if(R.volume >= amount) return R
else return 0
if(R.volume >= amount)
return R
else
return 0
return 0
@@ -522,7 +508,8 @@ var/const/INGEST = 2
. = locate(type) in reagent_list
/datum/reagents/proc/remove_all_type(reagent_type, amount, strict = 0, safety = 1) // Removes all reagent of X type. @strict set to 1 determines whether the childs of the type are included.
if(!isnum(amount)) return 1
if(!isnum(amount))
return 1
var/has_removed_reagent = 0
@@ -566,8 +553,10 @@ var/const/INGEST = 2
D.data = new_data
/datum/reagents/proc/copy_data(datum/reagent/current_reagent)
if(!current_reagent || !current_reagent.data) return null
if(!istype(current_reagent.data, /list)) return current_reagent.data
if(!current_reagent || !current_reagent.data)
return null
if(!istype(current_reagent.data, /list))
return current_reagent.data
var/list/trans_data = current_reagent.data.Copy()
+45 -46
View File
@@ -167,7 +167,7 @@
if(href_list["dispense"])
if(dispensable_reagents.Find(href_list["dispense"]) && beaker != null)
var/obj/item/weapon/reagent_containers/glass/B = src.beaker
var/obj/item/weapon/reagent_containers/glass/B = beaker
var/datum/reagents/R = B.reagents
var/space = R.maximum_volume - R.total_volume
@@ -207,21 +207,21 @@
S.use(1)
else
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [B] is stuck to you!</span>")
to_chat(user, "<span class='warning'>[B] is stuck to you!</span>")
return
qdel(B)
broken_requirements -= broken_requirements[1]
to_chat(user, "<span class='notice'>You fix [src].</span>")
return
if(src.beaker)
if(beaker)
to_chat(user, "<span class='warning'>Something is already loaded into the machine.</span>")
return
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks))
src.beaker = B
beaker = B
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [B] is stuck to you!</span>")
to_chat(user, "<span class='warning'>[B] is stuck to you!</span>")
return
B.forceMove(src)
to_chat(user, "<span class='notice'>You set [B] on the machine.</span>")
@@ -248,10 +248,10 @@
return
/obj/machinery/chem_dispenser/attack_ai(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/chem_dispenser/attack_ghost(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/chem_dispenser/attack_hand(mob/user)
if(stat & BROKEN)
@@ -362,10 +362,10 @@
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
if(anchored)
anchored = 0
to_chat(user, "<span class='caution'>\The [src] can now be moved.</span>")
to_chat(user, "<span class='caution'>[src] can now be moved.</span>")
else if(!anchored)
anchored = 1
to_chat(user, "<span class='caution'>\The [src] is now secured.</span>")
to_chat(user, "<span class='caution'>[src] is now secured.</span>")
if(panel_open)
if(istype(I, /obj/item/weapon/crowbar))
@@ -430,13 +430,13 @@
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass))
if(src.beaker)
if(beaker)
to_chat(user, "<span class='warning'>A beaker is already loaded into the machine.</span>")
return
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [B] is stuck to you!</span>")
to_chat(user, "<span class='warning'>[B] is stuck to you!</span>")
return
src.beaker = B
beaker = B
B.forceMove(src)
to_chat(user, "<span class='notice'>You add the beaker to the machine!</span>")
nanomanager.update_uis(src)
@@ -444,14 +444,14 @@
else if(istype(B, /obj/item/weapon/storage/pill_bottle))
if(src.loaded_pill_bottle)
if(loaded_pill_bottle)
to_chat(user, "<span class='warning'>A pill bottle is already loaded into the machine.</span>")
return
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [B] is stuck to you!</span>")
to_chat(user, "<span class='warning'>[B] is stuck to you!</span>")
return
src.loaded_pill_bottle = B
loaded_pill_bottle = B
B.forceMove(src)
to_chat(user, "<span class='notice'>You add the pill bottle into the dispenser slot!</span>")
nanomanager.update_uis(src)
@@ -461,13 +461,13 @@
if(..())
return 1
src.add_fingerprint(usr)
add_fingerprint(usr)
usr.set_machine(src)
if(href_list["ejectp"])
if(loaded_pill_bottle)
loaded_pill_bottle.forceMove(src.loc)
loaded_pill_bottle.forceMove(loc)
loaded_pill_bottle = null
else if(href_list["close"])
usr << browse(null, "window=chem_master")
@@ -476,12 +476,11 @@
return
if(href_list["print_p"])
if(!(src.printing))
src.printing = 1
for(var/mob/O in viewers(usr))
O.show_message("\blue \the [src] rattles and prints out a sheet of paper.", 1)
if(!(printing))
printing = 1
visible_message("<span class='notice'>[src] rattles and prints out a sheet of paper.</span>")
playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
P.info = "<CENTER><B>Chemical Analysis</B></CENTER><BR>"
P.info += "<b>Time of analysis:</b> [worldtime2text(world.time)]<br><br>"
P.info += "<b>Chemical name:</b> [href_list["name"]]<br>"
@@ -499,7 +498,7 @@
P.info += "<b>Description:</b> [href_list["desc"]]"
P.info += "<br><br><b>Notes:</b><br>"
P.name = "Chemical Analysis - [href_list["name"]]"
src.printing = null
printing = null
if(beaker)
var/datum/reagents/R = beaker.reagents
@@ -537,7 +536,7 @@
var/id = href_list["addcustom"]
useramount = input("Select the amount to transfer.", 30, useramount) as num
useramount = isgoodnumber(useramount)
src.Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
else if(href_list["remove"])
@@ -555,7 +554,7 @@
var/id = href_list["removecustom"]
useramount = input("Select the amount to transfer.", 30, useramount) as num
useramount = isgoodnumber(useramount)
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
else if(href_list["toggle"])
mode = !mode
@@ -586,23 +585,23 @@
return
name = reject_bad_text(name)
while(count--)
var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(src.loc)
var/obj/item/weapon/reagent_containers/food/pill/P = new/obj/item/weapon/reagent_containers/food/pill(loc)
if(!name) name = reagents.get_master_reagent_name()
P.name = "[name] pill"
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
P.icon_state = "pill"+pillsprite
reagents.trans_to(P,amount_per_pill)
if(src.loaded_pill_bottle)
if(loaded_pill_bottle)
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
P.forceMove(loaded_pill_bottle)
src.updateUsrDialog()
updateUsrDialog()
else
var/name = input(usr,"Name:","Name your bag!",reagents.get_master_reagent_name()) as text|null
if(!name)
return
name = reject_bad_text(name)
var/obj/item/weapon/reagent_containers/food/condiment/pack/P = new/obj/item/weapon/reagent_containers/food/condiment/pack(src.loc)
var/obj/item/weapon/reagent_containers/food/condiment/pack/P = new/obj/item/weapon/reagent_containers/food/condiment/pack(loc)
if(!name) name = reagents.get_master_reagent_name()
P.originalname = name
P.name = "[name] pack"
@@ -627,7 +626,7 @@
name = reject_bad_text(name)
var/is_medical_patch = chemical_safety_check(reagents)
while(count--)
var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(src.loc)
var/obj/item/weapon/reagent_containers/food/pill/patch/P = new/obj/item/weapon/reagent_containers/food/pill/patch(loc)
if(!name) name = reagents.get_master_reagent_name()
P.name = "[name] patch"
P.pixel_x = rand(-7, 7) //random position
@@ -642,7 +641,7 @@
if(!name)
return
name = reject_bad_text(name)
var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(loc)
if(!name) name = reagents.get_master_reagent_name()
P.name = "[name] bottle"
P.pixel_x = rand(-7, 7) //random position
@@ -650,7 +649,7 @@
P.icon_state = "bottle"+bottlesprite
reagents.trans_to(P,30)
else
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(loc)
reagents.trans_to(P,50)
else if(href_list["change_pill"])
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
@@ -693,10 +692,10 @@
return
/obj/machinery/chem_master/attack_ai(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/chem_master/attack_ghost(mob/user)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/chem_master/attack_hand(mob/user)
if(..())
@@ -733,7 +732,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "chem_master.tmpl", src.name, 575, 400)
ui = new(user, src, ui_key, "chem_master.tmpl", name, 575, 400)
ui.set_initial_data(data)
ui.open()
@@ -793,7 +792,7 @@
default_deconstruction_crowbar(B)
return 1
else
to_chat(user, "<span class='warning'>You can't use the [src.name] while it's panel is opened!</span>")
to_chat(user, "<span class='warning'>You can't use the [name] while it's panel is opened!</span>")
return 1
else
..()
@@ -884,12 +883,12 @@
return 1
else
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [O] is stuck to you!</span>")
to_chat(user, "<span class='warning'>[O] is stuck to you!</span>")
return
src.beaker = O
beaker = O
O.forceMove(src)
update_icon()
src.updateUsrDialog()
updateUsrDialog()
return 0
if(holdingitems && holdingitems.len >= limit)
@@ -910,7 +909,7 @@
if(!O.contents.len)
to_chat(user, "<span class='notice'>You empty the plant bag into the All-In-One grinder.</span>")
src.updateUsrDialog()
updateUsrDialog()
return 0
@@ -921,7 +920,7 @@
user.unEquip(O)
O.forceMove(src)
holdingitems += O
src.updateUsrDialog()
updateUsrDialog()
return 0
/obj/machinery/reagentgrinder/attack_ai(mob/user)
@@ -989,7 +988,7 @@
eject()
if("detach")
detach()
src.updateUsrDialog()
updateUsrDialog()
return
/obj/machinery/reagentgrinder/proc/detach()
@@ -998,7 +997,7 @@
return
if(!beaker)
return
beaker.forceMove(src.loc)
beaker.forceMove(loc)
beaker = null
update_icon()
@@ -1010,7 +1009,7 @@
return
for(var/obj/item/O in holdingitems)
O.forceMove(src.loc)
O.forceMove(loc)
holdingitems -= O
holdingitems = list()
@@ -1071,7 +1070,7 @@
return
if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
return
playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1)
playsound(loc, 'sound/machines/juicer.ogg', 20, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking
inuse = 1
@@ -1111,7 +1110,7 @@
return
if(!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
return
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
playsound(loc, 'sound/machines/blender.ogg', 50, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking
inuse = 1
+20 -23
View File
@@ -24,22 +24,22 @@ About the Holder:
The holder (reagents datum) is the datum that holds a list of all reagents
currently in the object.It also has all the procs needed to manipulate reagents
remove_any(var/amount)
remove_any(amount)
This proc removes reagents from the holder until the passed amount
is matched. It'll try to remove some of ALL reagents contained.
trans_to(var/obj/target, var/amount)
trans_to(obj/target, amount)
This proc equally transfers the contents of the holder to another
objects holder. You need to pass it the object (not the holder) you want
to transfer to and the amount you want to transfer. Its return value is the
actual amount transfered (if one of the objects is full/empty)
trans_id_to(var/obj/target, var/reagent, var/amount)
trans_id_to(obj/target, reagent, amount)
Same as above but only for a specific reagent in the reagent list.
If the specified amount is greater than what is available, it will use
the amount of the reagent that is available. If no reagent exists, returns null.
metabolize(var/mob/M)
metabolize(mob/living/M)
This proc is called by the mobs life proc. It simply calls on_mob_life for
all contained reagents. You shouldnt have to use this one directly.
@@ -49,16 +49,13 @@ About the Holder:
Currently, this proc is automatically called by trans_to.
- Modified from the original to preserve reagent data across reactions (originally for xenoarchaeology)
isolate_reagent(var/reagent)
isolate_reagent(reagent)
Pass it a reagent id and it will remove all reagents but that one.
It's that simple.
del_reagent(var/reagent)
del_reagent(reagent)
Completely remove the reagent with the matching id.
reaction_fire(exposed_temp)
Simply calls the reaction_fire procs of all contained reagents.
update_total()
This one simply updates the total volume of the holder.
(the volume of all reagents added together)
@@ -66,7 +63,7 @@ About the Holder:
clear_reagents()
This proc removes ALL reagents from the holder.
reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0)
reaction(atom/A, method=TOUCH, volume_modifier=0)
This proc calls the appropriate reaction procs of the reagents.
I.e. if A is an object, it will call the reagents reaction_obj
proc. The method var is used for reaction on mobs. It simply tells
@@ -79,22 +76,22 @@ About the Holder:
contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.)
More on the reaction in the reagent part of this readme.
add_reagent(var/reagent, var/amount, var/data)
add_reagent(reagent, amount, data)
Attempts to add X of the matching reagent to the holder.
You wont use this much. Mostly in new procs for pre-filled
objects.
remove_reagent(var/reagent, var/amount)
remove_reagent(reagent, amount)
The exact opposite of the add_reagent proc.
- Modified from original to return the reagent's data, in order to preserve reagent data across reactions (originally for xenoarchaeology)
has_reagent(var/reagent, var/amount)
has_reagent(reagent, amount)
Returns 1 if the holder contains this reagent.
Or 0 if not.
If you pass it an amount it will additionally check
if the amount is matched. This is optional.
get_reagent_amount(var/reagent)
get_reagent_amount(reagent)
Returns the amount of the matching reagent inside the
holder. Returns 0 if the reagent is missing.
@@ -123,26 +120,27 @@ About Reagents:
Reagents are all the things you can mix and fille in bottles etc. This can be anything from
rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below.
reaction_mob(var/mob/M, var/method=TOUCH)
reaction_mob(mob/living/M, method=TOUCH)
This is called by the holder's reation proc.
This version is only called when the reagent
reacts with a mob. The method var can be either
TOUCH or INGEST. You'll want to put stuff like
acid-facemelting in here.
acid-facemelting in here. Should only ever be
called, directly, on living mobs.
reaction_obj(var/obj/O)
reaction_obj(obj/O)
This is called by the holder's reation proc.
This version is called when the reagents reacts
with an object. You'll want to put stuff like
object melting in here ... or something. i dunno.
reaction_turf(var/turf/T)
reaction_turf(turf/T)
This is called by the holder's reation proc.
This version is called when the reagents reacts
with a turf. You'll want to put stuff like extra
slippery floors for lube or something in here.
on_mob_life(var/mob/M)
on_mob_life(mob/living/M)
This proc is called everytime the mobs life proc executes.
This is the place where you put damage for toxins ,
drowsyness for sleep toxins etc etc.
@@ -166,8 +164,7 @@ About Reagents:
The name of the reagent.
data
This var can be used for whatever the fuck you want. I used it for the sleep
toxins to make them work slowly instead of instantly. You could also use this
This var can be used for whatever the fuck you want.You could use this
for DNA in a blood reagent or ... well whatever you want.
color
@@ -185,7 +182,7 @@ About Recipes:
Recipes are simple datums that contain a list of required reagents and a result.
They also have a proc that is called when the recipe is matched.
on_reaction(var/datum/reagents/holder, var/created_volume)
on_reaction(datum/reagents/holder, created_volume)
This proc is called when the recipe is matched.
You'll want to add explosions etc here.
To find the location you'll have to do something
@@ -232,7 +229,7 @@ About the Tools:
R.my_atom = src, <<< set the holders my_atom to src so that we know where we are.
This can also be done by calling a convenience proc:
atom/proc/create_reagents(var/max_volume)
atom/proc/create_reagents(max_volume)
Other important stuff:
@@ -35,8 +35,7 @@
volume = ..()
M.apply_damage(0.6*volume, BURN)
M.IgniteMob()
if(isliving(M))
M.emote("scream")
M.emote("scream")
/datum/reagent/blob/envenomed_filaments //toxin, hallucination, and some bonus spore toxin
name = "Envenomed Filaments"
+2 -2
View File
@@ -100,8 +100,8 @@
ui_interact(user)
/obj/machinery/chem_heater/attack_ai(mob/user)
src.add_hiddenprint(user)
return src.attack_hand(user)
add_hiddenprint(user)
return attack_hand(user)
/obj/machinery/chem_heater/Topic(href, href_list)
if(..())
+19
View File
@@ -122,6 +122,25 @@
qdel(ate_heart)
..()
//virus-specific symptom reagents
/datum/reagent/synaphydramine
name = "Diphen-Synaptizine"
id = "synaphydramine"
description = "Reduces drowsiness and hallucinations while also purging histamine from the body."
color = "#EC536D" // rgb: 236, 83, 109
/datum/reagent/synaphydramine/on_mob_life(mob/living/M)
M.drowsyness = max(M.drowsyness-5, 0)
if(holder.has_reagent("lsd"))
holder.remove_reagent("lsd", 5)
if(holder.has_reagent("histamine"))
holder.remove_reagent("histamine", 5)
M.hallucination = max(0, M.hallucination - 10)
if(prob(30))
M.adjustToxLoss(1)
..()
//virus food
/datum/reagent/virus_food
name = "Virus Food"
+1 -3
View File
@@ -133,9 +133,7 @@
M.fakevomit()
..()
/datum/reagent/ethanol/synthanol/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/ethanol/synthanol/reaction_mob(mob/living/M, method=TOUCH, volume)
if(M.isSynthetic())
return
if(method == INGEST)
+1 -3
View File
@@ -522,9 +522,7 @@
result_amount = 4
mix_message = "The mixture swirls around excitedly!"
/datum/reagent/fliptonium/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/fliptonium/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST || method == TOUCH)
M.SpinAnimation(speed = 12, loops = -1)
..()
+14 -32
View File
@@ -6,9 +6,7 @@
color = "#63DE63"
metabolization_rate = 0.4
/datum/reagent/questionmark/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/questionmark/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
M.Stun(2)
M.Weaken(2)
@@ -45,9 +43,7 @@
mix_message = "The citrus juices begin to blend together."
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/reagent/triple_citrus/reaction_mob(mob/living/carbon/M, method=TOUCH, volume)
if(!istype(M, /mob/living/carbon))
return
/datum/reagent/triple_citrus/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
M.adjustToxLoss(-rand(1,2))
@@ -134,8 +130,7 @@
..()
/datum/reagent/chocolate/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/item/weapon/reagent_containers/food/snacks/choc_pile(T)
/datum/reagent/mugwort
@@ -146,7 +141,7 @@
color = "#21170E"
/datum/reagent/mugwort/on_mob_life(mob/living/M)
if(istype(M, /mob/living/carbon/human) && M.mind)
if(ishuman(M) && M.mind)
if(M.mind.special_role == "Wizard")
M.adjustToxLoss(-1*REM)
M.adjustOxyLoss(-1*REM)
@@ -177,9 +172,7 @@
reagent_state = LIQUID
color = "#C87D28"
/datum/reagent/fungus/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/fungus/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
var/ranchance = rand(1,10)
if(ranchance == 1)
@@ -211,9 +204,7 @@
color = "#F5F5F5"
metabolization_rate = 0.2
/datum/reagent/msg/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/msg/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
to_chat(M, "<span class='notice'>That tasted amazing!</span>")
@@ -242,8 +233,7 @@
..()
/datum/reagent/cheese/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/item/weapon/reagent_containers/food/snacks/cheesewedge(T)
/datum/chemical_reaction/cheese
@@ -286,8 +276,7 @@
..()
/datum/reagent/weird_cheese/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/item/weapon/reagent_containers/food/snacks/weirdcheesewedge(T)
/datum/chemical_reaction/weird_cheese
@@ -323,8 +312,7 @@
color = "#9C5013"
/datum/reagent/bread/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/item/weapon/reagent_containers/food/snacks/breadslice(T)
/datum/reagent/vomit
@@ -335,8 +323,7 @@
color = "#FFFF00"
/datum/reagent/vomit/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/vomit(T)
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
@@ -348,8 +335,7 @@
color = "#78FF74"
/datum/reagent/greenvomit/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/vomit/green(T)
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
@@ -362,9 +348,7 @@
color = "#8EAE7B"
process_flags = ORGANIC | SYNTHETIC //Because apparently ghosts in the shell
/datum/reagent/ectoplasm/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/ectoplasm/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
var/spooky_eat = pick("Ugh, why did you eat that? Your mouth feels haunted. Haunted with bad flavors.", "Ugh, why did you eat that? It has the texture of ham aspic. From the 1950s. Left out in the sun.", "Ugh, why did you eat that? It tastes like a ghost fart.", "Ugh, why did you eat that? It tastes like flavor died.")
to_chat(M, "<span class='warning'>[spooky_eat]</span>")
@@ -376,8 +360,7 @@
..()
/datum/reagent/ectoplasm/reaction_turf(turf/T, volume)
src = null
if(volume >= 10)
if(volume >= 10 && !istype(T, /turf/space))
new /obj/item/weapon/reagent_containers/food/snacks/ectoplasm(T)
/datum/reagent/soybeanoil
@@ -448,8 +431,7 @@
..()
/datum/reagent/meatslurry/reaction_turf(turf/T, volume)
src = null
if(volume >= 5 && prob(10))
if(volume >= 5 && prob(10) && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T)
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
+4 -8
View File
@@ -89,8 +89,7 @@
..()
/datum/reagent/synthflesh/reaction_turf(turf/T, volume) //let's make a mess!
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T)
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
@@ -620,7 +619,7 @@
SM.loot.Cut() //no abusing strange reagent for unlimited farming of resources
SM.visible_message("<span class='warning'>[M] seems to rise from the dead!</span>")
if(istype(M, /mob/living/carbon))
if(iscarbon(M))
if(method == INGEST)
if(M.stat == DEAD)
if(M.getBruteLoss()+M.getFireLoss() >= 150)
@@ -952,11 +951,8 @@
result_amount = 2
/datum/reagent/degreaser/reaction_turf(turf/simulated/T, volume)
if(!istype(T))
return
src = null
if(volume >= 1)
if(istype(T) && T.wet)
if(volume >= 1 && istype(T))
if(T.wet)
T.MakeDry(TURF_WET_LUBE)
/datum/reagent/degreaser/on_mob_life(mob/living/M)
@@ -8,17 +8,13 @@
var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick.
var/current_cycle = 1
/datum/reagents
var/chem_temp = 300
var/list/datum/reagent/addiction_list = new/list()
/datum/reagents/proc/metabolize(mob/living/M)
if(M)
chem_temp = M.bodytemperature
handle_reactions()
for(var/A in reagent_list)
var/datum/reagent/R = A
if(!istype(R))
if(!istype(R)) // How are non-reagents ending up in the reagents_list?
continue
if(!R.holder)
continue
+4 -4
View File
@@ -124,7 +124,7 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111
mix_message = "The substance flashes multiple colors and emits the smell of a pocket protector."
/datum/reagent/colorful_reagent/reaction_mob(mob/living/simple_animal/M, method=TOUCH, volume)
if(M && istype(M))
if(isanimal(M))
M.color = pick(random_color_list)
..()
@@ -187,7 +187,7 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111
result_amount = 2
/datum/reagent/hair_dye/reaction_mob(mob/living/M, volume)
if(M && ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
head_organ.r_facial = rand(0,255)
@@ -217,7 +217,7 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111
mix_message = "The liquid becomes slightly hairy."
/datum/reagent/hairgrownium/reaction_mob(mob/living/M, volume)
if(M && ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
head_organ.h_style = random_hair_style(H.gender, head_organ.species.name)
@@ -244,7 +244,7 @@ var/list/random_color_list = list("#00aedb","#a200ff","#f47835","#d41243","#d111
mix_message = "The liquid becomes amazingly furry and smells peculiar."
/datum/reagent/super_hairgrownium/reaction_mob(mob/living/M, volume)
if(M && ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
var/datum/sprite_accessory/tmp_hair_style = hair_styles_list["Very Long Hair"]
+15 -22
View File
@@ -65,7 +65,7 @@
new /obj/effect/hotspot(T)
/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH && isliving(M))
if(method == TOUCH)
M.adjust_fire_stacks(5)
M.IgniteMob()
M.bodytemperature += 30
@@ -177,9 +177,8 @@
mix_sound = null
/datum/reagent/blackpowder/reaction_turf(turf/T, volume) //oh shit
src = null
if(volume >= 5)
if(!locate(/obj/effect/decal/cleanable/dirt/blackpowder) in get_turf(T)) //let's not have hundreds of decals of black powder on the same turf
if(volume >= 5 && !istype(T, /turf/space))
if(!locate(/obj/effect/decal/cleanable/dirt/blackpowder) in T) //let's not have hundreds of decals of black powder on the same turf
new /obj/effect/decal/cleanable/dirt/blackpowder(T)
/datum/chemical_reaction/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume)
@@ -436,7 +435,7 @@
..()
/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == TOUCH && isliving(M))
if(method == TOUCH)
M.adjust_fire_stacks(7)
/datum/chemical_reaction/napalm
@@ -474,7 +473,7 @@
holder.handle_reactions()
..()
/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, volume)
/datum/reagent/cryostylane/reaction_turf(turf/T, volume)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(15,30))
@@ -537,9 +536,6 @@
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
// Put out fire
if(method == TOUCH)
M.adjust_fire_stacks(-(volume / 5)) // more effective than water
@@ -550,24 +546,23 @@
if(!istype(T))
return
var/CT = cooling_temperature
src = null
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly.
new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly.
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-(CT*1000),lowertemp.temperature / CT) ,0)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
lowertemp.temperature = max(min(lowertemp.temperature-(CT*1000), lowertemp.temperature / CT), 0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
/datum/reagent/firefighting_foam/reaction_obj(obj/O, volume)
src = null
var/turf/T = get_turf(O)
var/turf/simulated/T = get_turf(O)
if(!istype(T))
return
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
@@ -625,8 +620,6 @@
T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume)
/datum/reagent/plasma_dust/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma dust is stronger than fuel!
if(!istype(M, /mob/living))
return
if(method == TOUCH)
M.adjust_fire_stacks(volume / 5)
return
+31 -35
View File
@@ -289,8 +289,6 @@
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/facid/reaction_mob(mob/living/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return //wooo more runtime fixin
if(method == TOUCH || method == INGEST)
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -311,18 +309,18 @@
if(!H.wear_mask.unacidable)
qdel(H.wear_mask)
H.update_inv_wear_mask()
to_chat(H, "\red Your mask melts away but protects you from the acid!")
to_chat(H, "<span class='warning'>Your mask melts away but protects you from the acid!</span>")
else
to_chat(H, "\red Your mask protects you from the acid!")
to_chat(H, "<span class='warning'>Your mask protects you from the acid!</span>")
return
if(H.head)
if(!H.head.unacidable)
qdel(H.head)
H.update_inv_head()
to_chat(H, "\red Your helmet melts away but protects you from the acid")
to_chat(H, "<span class='warning'>Your helmet melts away but protects you from the acid</span>")
else
to_chat(H, "\red Your helmet protects you from the acid!")
to_chat(H, "<span class='warning'>Your helmet protects you from the acid!</span>")
return
if(!H.unacidable)
@@ -333,12 +331,11 @@
H.status_flags |= DISFIGURED
/datum/reagent/facid/reaction_obj(obj/O, volume)
if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)))
if((istype(O, /obj/item) || istype(O, /obj/effect/glowshroom)))
if(!O.unacidable)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
to_chat(M, "\red \the [O] melts.")
O.visible_message("<span class='warning'>[O] melts.</span>")
qdel(O)
/datum/chemical_reaction/facid
@@ -694,45 +691,41 @@
..()
// Clear off wallrot fungi
/datum/reagent/atrazine/reaction_turf(turf/T, volume)
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
if(W.rotting)
W.rotting = 0
for(var/obj/effect/E in W)
if(E.name == "Wallrot")
qdel(E)
/datum/reagent/atrazine/reaction_turf(turf/simulated/wall/W, volume)
if(istype(W) && W.rotting)
W.rotting = 0
for(var/obj/effect/overlay/O in W)
if(O.name == "Wallrot") // This is so awful
qdel(O)
for(var/mob/O in viewers(W, null))
O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1)
W.visible_message("<span class='warning'>The fungi are completely dissolved by the solution!</span>")
/datum/reagent/atrazine/reaction_obj(obj/O, volume)
if(istype(O,/obj/structure/alien/weeds/))
var/obj/structure/alien/weeds/alien_weeds = O
alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast
alien_weeds.healthcheck()
else if(istype(O,/obj/effect/glowshroom)) //even a small amount is enough to kill it
else if(istype(O, /obj/effect/glowshroom)) //even a small amount is enough to kill it
qdel(O)
else if(istype(O,/obj/effect/plant))
if(prob(50)) qdel(O) //Kills kudzu too.
if(prob(50))
qdel(O) //Kills kudzu too.
// Damage that is done to growing plants is separately at code/game/machinery/hydroponics at obj/item/hydroponics
/datum/reagent/atrazine/reaction_mob(mob/living/M, method=TOUCH, volume)
src = null
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.wear_mask) // If not wearing a mask
C.adjustToxLoss(2) // 4 toxic damage per application, doubled for some reason
C.adjustToxLoss(2) // 2 toxic damage per application
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.dna)
if(H.species.flags & IS_PLANT) //plantmen take a LOT of damage
H.adjustToxLoss(50)
..()
else if(istype(M,/mob/living/simple_animal/diona)) //plantmen monkeys (diona) take EVEN MORE damage
var/mob/living/simple_animal/diona/D = M
D.adjustHealth(100)
..()
if(H.species.flags & IS_PLANT) //plantmen take a LOT of damage
H.adjustToxLoss(50)
..()
else if(istype(M, /mob/living/simple_animal/diona)) //plantmen monkeys (diona) take EVEN MORE damage
var/mob/living/simple_animal/diona/D = M
D.adjustHealth(100)
..()
/datum/chemical_reaction/atrazine
name = "atrazine"
@@ -817,10 +810,11 @@
reagent_state = LIQUID
color = "#00FD00"
/datum/reagent/glowing_slurry/reaction_mob(mob/M, method=TOUCH, volume) //same as mutagen
if(!..()) return
if(!M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
src = null
/datum/reagent/glowing_slurry/reaction_mob(mob/living/M, method=TOUCH, volume) //same as mutagen
if(!..())
return
if(!M.dna)
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
if((method==TOUCH && prob(50)) || method==INGEST)
randmutb(M)
domutcheck(M, null)
@@ -828,6 +822,8 @@
/datum/reagent/glowing_slurry/on_mob_life(mob/living/M)
M.apply_effect(2, IRRADIATE, 0, negate_armor = 1)
if(!M.dna)
return
if(prob(15))
randmutb(M)
if(prob(3))
@@ -21,57 +21,42 @@
var/process_flags = ORGANIC
var/admin_only = 0
/datum/reagent/proc/reaction_mob(mob/M, method=TOUCH, volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
if(!istype(M, /mob/living))
return 0
var/datum/reagent/self = src
src = null
if(self.holder) //for catching rare runtimes
if(method == TOUCH && self.penetrates_skin)
if(isliving(M))
var/mob/living/L = M
var/block = L.get_permeability_protection()
var/amount = round(self.volume * (1.0 - block), 0.1)
if(L.reagents)
if(amount >= 1)
L.reagents.add_reagent(self.id,amount)
/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, volume) //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 == TOUCH && penetrates_skin)
var/block = M.get_permeability_protection()
var/amount = round(volume * (1.0 - block), 0.1)
if(M.reagents)
if(amount >= 1)
M.reagents.add_reagent(id, amount)
if(method == INGEST) //Yes, even Xenos can get addicted to drugs.
var/can_become_addicted = M.reagents.reaction_check(M, self)
var/can_become_addicted = M.reagents.reaction_check(M, src)
if(can_become_addicted)
if(prob(self.addiction_chance) && !is_type_in_list(self, M.reagents.addiction_list))
if(prob(addiction_chance) && !is_type_in_list(src, M.reagents.addiction_list))
to_chat(M, "<span class='danger'>You suddenly feel invigorated and guilty...</span>")
var/datum/reagent/new_reagent = new self.type()
var/datum/reagent/new_reagent = new type()
new_reagent.last_addiction_dose = world.timeofday
M.reagents.addiction_list.Add(new_reagent)
else if(is_type_in_list(self, M.reagents.addiction_list))
else if(is_type_in_list(src, M.reagents.addiction_list))
to_chat(M, "<span class='notice'>You feel slightly better, but for how long?</span>")
for(var/A in M.reagents.addiction_list)
var/datum/reagent/AD = A
if(AD && istype(AD, self))
if(AD && istype(AD, src))
AD.last_addiction_dose = world.timeofday
AD.addiction_stage = 1
return 1
/datum/reagent/proc/reaction_obj(obj/O, volume) //By default we transfer a small part of the reagent to the object
src = null //if it can hold reagents. nope!
//if(O.reagents)
// O.reagents.add_reagent(id,volume/3)
/datum/reagent/proc/reaction_obj(obj/O, volume)
return
/datum/reagent/proc/reaction_turf(turf/T, volume)
src = null
return
/datum/reagent/proc/on_mob_life(mob/living/M)
if(!istype(M))
return
if(holder)
holder.remove_reagent(id, metabolization_rate) //By default it slowly disappears.
current_cycle++
current_cycle++
holder.remove_reagent(id, metabolization_rate) //By default it slowly disappears.
/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect
return
@@ -29,14 +29,10 @@
to_chat(usr, "The solution melts away the ink on the book.")
else
to_chat(usr, "It wasn't enough...")
return
/datum/reagent/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel.
if(!istype(M, /mob/living))
return
if(method == TOUCH)
M.adjust_fire_stacks(volume / 15)
return
/datum/reagent/ethanol/beer
@@ -102,7 +102,7 @@
/datum/reagent/drink/banana/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
if((istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || issmall(M))
if((ishuman(M) && M.job in list("Clown") ) || issmall(M))
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
..()
@@ -114,7 +114,7 @@
/datum/reagent/drink/nothing/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
if(istype(M, /mob/living/carbon/human) && M.job in list("Mime"))
if(ishuman(M) && M.job in list("Mime"))
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
..()
@@ -265,7 +265,7 @@
/datum/reagent/drink/bananahonk/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
if((istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || issmall(M))
if((ishuman(M) && M.job in list("Clown") ) || issmall(M))
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
..()
@@ -279,7 +279,7 @@
/datum/reagent/drink/silencer/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
if(istype(M, /mob/living/carbon/human) && M.job in list("Mime"))
if(ishuman(M) && M.job in list("Mime"))
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
..()
@@ -6,8 +6,6 @@
color = "#060606"
/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite!
if(!istype(M, /mob/living))
return
if(method == TOUCH)
M.adjust_fire_stacks(volume / 10)
return
@@ -56,8 +54,6 @@
..()
/datum/reagent/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel!
if(!istype(M, /mob/living))
return
if(method == TOUCH)
M.adjust_fire_stacks(volume / 5)
..()
@@ -71,13 +67,11 @@
color = "#673910" // rgb: 103, 57, 16
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/thermite/reaction_turf(turf/T, volume)
src = null
if(volume >= 5)
if(istype(T, /turf/simulated/wall))
T:thermite = 1
T.overlays.Cut()
T.overlays = image('icons/effects/effects.dmi',icon_state = "thermite")
/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume)
if(volume >= 5 && istype(W))
W.thermite = 1
W.overlays.Cut()
W.overlays = image('icons/effects/effects.dmi',icon_state = "thermite")
/datum/reagent/glycerol
name = "Glycerol"
@@ -92,19 +92,19 @@
M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("frostoil"))
holder.remove_reagent("frostoil", 5)
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(5,20)
if(15 to 25)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(10,20)
if(25 to 35)
M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(15,20)
if(35 to INFINITY)
M.bodytemperature += 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(20,25)
..()
@@ -122,27 +122,27 @@
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(10,20)
if(25 to 35)
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1))
M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(15,20)
if(35 to INFINITY)
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1))
M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(20,25)
..()
/datum/reagent/frostoil/reaction_turf(turf/simulated/T, volume)
/datum/reagent/frostoil/reaction_turf(turf/T, volume)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(15,30))
@@ -202,7 +202,7 @@
/datum/reagent/sprinkles/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate"))
if(ishuman(M) && M.job in list("Security Officer", "Security Pod Pilot", "Detective", "Warden", "Head of Security", "Brig Physician", "Internal Affairs Agent", "Magistrate"))
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
..()
@@ -221,14 +221,14 @@
..()
/datum/reagent/cornoil/reaction_turf(turf/simulated/T, volume)
if(!istype(T)) return
src = null
if(!istype(T))
return
if(volume >= 3)
T.MakeSlippery()
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles())
lowertemp.temperature = max(min(lowertemp.temperature-2000, lowertemp.temperature / 2), 0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
@@ -297,7 +297,6 @@
..()
/datum/reagent/flour/reaction_turf(turf/T, volume)
src = null
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/flour(T)
@@ -5,9 +5,8 @@
reagent_state = LIQUID
color = "#C7FFFF" // rgb: 199, 255, 255
/datum/reagent/silicate/reaction_obj(var/obj/O, var/volume)
src = null
if(istype(O,/obj/structure/window))
/datum/reagent/silicate/reaction_obj(obj/O, volume)
if(istype(O, /obj/structure/window))
if(O:silicate <= 200)
O:silicate += volume
@@ -30,9 +29,7 @@
var/b = (volume / 50) + 1
I.SetIntensity(r,g,b)
O.icon = I
O:silicateIcon = I
return*/
O:silicateIcon = I */
/datum/reagent/oxygen
@@ -99,12 +96,9 @@
color = "#1C1300" // rgb: 30, 20, 0
/datum/reagent/carbon/reaction_turf(turf/T, volume)
src = null
// Only add one dirt per turf. Was causing people to crash.
if(!istype(T, /turf/space) && !(locate(/obj/effect/decal/cleanable/dirt) in T))
if(!istype(T, /turf/space) && !(locate(/obj/effect/decal/cleanable/dirt) in T)) // Only add one dirt per turf. Was causing people to crash.
new /obj/effect/decal/cleanable/dirt(T)
/datum/reagent/gold
name = "Gold"
id = "gold"
@@ -0,0 +1,60 @@
/datum/reagent/paint
name = "Paint"
id = "paint_"
description = "Floor paint is used to color floor tiles."
reagent_state = LIQUID
color = "#808080"
/datum/reagent/paint/reaction_turf(turf/T, volume)
if(!istype(T, /turf/space))
T.color = color
/datum/reagent/paint/reaction_obj(obj/O, volume)
if(istype(O, /obj/item/weapon/light))
O.color = color
/datum/reagent/paint/red
name = "Red Paint"
id = "paint_red"
color = "#FF0000"
/datum/reagent/paint/green
name = "Green Paint"
id = "paint_green"
color = "#00FF00"
/datum/reagent/paint/blue
name = "Blue Paint"
id = "paint_blue"
color = "#0000FF"
/datum/reagent/paint/yellow
name = "Yellow Paint"
id = "paint_yellow"
color = "#FFFF00"
/datum/reagent/paint/violet
name = "Violet Paint"
id = "paint_violet"
color = "#FF00FF"
/datum/reagent/paint/black
name = "Black Paint"
id = "paint_black"
color = "#333333"
/datum/reagent/paint/white
name = "White Paint"
id = "paint_white"
color = "#FFFFFF"
/datum/reagent/paint_remover
name = "Paint Remover"
id = "paint_remover"
description = "Paint remover is used to remove floor paint from floor tiles."
reagent_state = LIQUID
color = "#808080"
/datum/reagent/paint_remover/reaction_turf(turf/T, volume)
if(!istype(T, /turf/space))
T.color = initial(T.color)
@@ -53,7 +53,7 @@
/datum/reagent/slimejelly/on_mob_life(mob/living/M)
if(prob(10))
to_chat(M, "\red Your insides are burning!")
to_chat(M, "<span class='danger'>Your insides are burning!</span>")
M.adjustToxLoss(rand(20,60)*REM)
else if(prob(40))
M.adjustBruteLoss(-5*REM)
@@ -70,10 +70,10 @@
if(ishuman(M))
var/mob/living/carbon/human/human = M
if(human.species.name != "Shadow")
to_chat(M, "\red Your flesh rapidly mutates!")
to_chat(M, "<b>You are now a Shadow Person, a mutant race of darkness-dwelling humanoids.</b>")
to_chat(M, "\red Your body reacts violently to light. \green However, it naturally heals in darkness.")
to_chat(M, "Aside from your new traits, you are mentally unchanged and retain your prior obligations.")
to_chat(M, "<span class='danger'>Your flesh rapidly mutates!</span>")
to_chat(M, "<span class='danger'>You are now a Shadow Person, a mutant race of darkness-dwelling humanoids.</span>")
to_chat(M, "<span class='danger'>Your body reacts violently to light. \green However, it naturally heals in darkness.</span>")
to_chat(M, "<span class='danger'>Aside from your new traits, you are mentally unchanged and retain your prior obligations.</span>")
human.set_species("Shadow")
..()
@@ -84,7 +84,7 @@
reagent_state = LIQUID
color = "#13BC5E" // rgb: 19, 188, 94
/datum/reagent/aslimetoxin/reaction_mob(mob/M, method=TOUCH, volume)
/datum/reagent/aslimetoxin/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method != TOUCH)
M.ForceContractDisease(new /datum/disease/transformation/slime(0))
@@ -145,12 +145,8 @@
..()
/datum/reagent/radium/reaction_turf(turf/T, volume)
src = null
if(volume >= 3)
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/greenglow(T)
return
if(volume >= 3 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/greenglow(T)
/datum/reagent/mutagen
name = "Unstable mutagen"
@@ -160,17 +156,19 @@
color = "#04DF27"
metabolization_rate = 0.3
/datum/reagent/mutagen/reaction_mob(mob/M, method=TOUCH, volume)
if(!..()) return
if(!M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
src = null
/datum/reagent/mutagen/reaction_mob(mob/living/M, method=TOUCH, volume)
if(!..())
return
if(!M.dna)
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
if((method==TOUCH && prob(33)) || method==INGEST)
randmutb(M)
domutcheck(M, null)
M.UpdateAppearance()
/datum/reagent/mutagen/on_mob_life(mob/living/M)
if(!M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
if(!M.dna)
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
M.apply_effect(2*REM, IRRADIATE, negate_armor = 1)
if(prob(4))
randmutb(M)
@@ -189,10 +187,8 @@
..()
/datum/reagent/uranium/reaction_turf(turf/T, volume)
src = null
if(volume >= 3)
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/greenglow(T)
if(volume >= 3 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/greenglow(T)
/datum/reagent/lexorin
@@ -221,8 +217,6 @@
..()
/datum/reagent/sacid/reaction_mob(mob/living/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
if(method == TOUCH)
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -230,11 +224,11 @@
if(volume > 25)
if(H.wear_mask)
to_chat(H, "\red Your mask protects you from the acid!")
to_chat(H, "<span class='danger'>Your mask protects you from the acid!</span>")
return
if(H.head)
to_chat(H, "\red Your helmet protects you from the acid!")
to_chat(H, "<span class='danger'>Your helmet protects you from the acid!</span>")
return
if(!M.unacidable)
@@ -278,8 +272,7 @@
if(!O.unacidable)
var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc)
I.desc = "Looks like this was \an [O] some time ago."
for(var/mob/M in viewers(5, O))
to_chat(M, "\red \the [O] melts.")
O.visible_message("<span class='warning'>[O] melts.</span>")
qdel(O)
@@ -361,10 +354,8 @@
color = "#B31008" // rgb: 179, 16, 8
/datum/reagent/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
if(method == TOUCH)
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/victim = M
var/mouth_covered = 0
var/eyes_covered = 0
@@ -388,10 +379,10 @@
if( !safe_thing )
safe_thing = victim.glasses
if( eyes_covered && mouth_covered )
to_chat(victim, "\red Your [safe_thing] protects you from the pepperspray!")
to_chat(victim, "<span class='danger'>Your [safe_thing] protects you from the pepperspray!</span>")
return
else if( mouth_covered ) // Reduced effects if partially protected
to_chat(victim, "\red Your [safe_thing] protect you from most of the pepperspray!")
to_chat(victim, "<span class='danger'>Your [safe_thing] protect you from most of the pepperspray!</span>")
if(prob(5))
victim.emote("scream")
victim.eye_blurry = max(M.eye_blurry, 3)
@@ -402,14 +393,14 @@
victim.drop_item()
return
else if( eyes_covered ) // Eye cover is better than mouth cover
to_chat(victim, "\red Your [safe_thing] protects your eyes from the pepperspray!")
to_chat(victim, "<span class='danger'>Your [safe_thing] protects your eyes from the pepperspray!</span>")
victim.eye_blurry = max(M.eye_blurry, 3)
victim.damageoverlaytemp = 30
return
else // Oh dear :D
if(prob(5))
victim.emote("scream")
to_chat(victim, "\red You're sprayed directly in the eyes with pepperspray!")
to_chat(victim, "<span class='danger'>You're sprayed directly in the eyes with pepperspray!</span>")
victim.eye_blurry = max(M.eye_blurry, 5)
victim.eye_blind = max(M.eye_blind, 2)
victim.confused = max(M.confused, 6)
@@ -17,9 +17,6 @@
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
// Put out fire
if(method == TOUCH)
M.adjust_fire_stacks(-(volume / 10))
@@ -30,7 +27,6 @@
/datum/reagent/water/reaction_turf(turf/simulated/T, volume)
if(!istype(T))
return
src = null
if(volume >= 3)
T.MakeSlippery()
@@ -38,32 +34,31 @@
M.apply_water()
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles())
lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
/datum/reagent/water/reaction_obj(obj/O, volume)
src = null
var/turf/T = get_turf(O)
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/turf/simulated/T = get_turf(O)
if(istype(T))
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T.air.total_moles() )
lowertemp.temperature = max(min(lowertemp.temperature-2000,lowertemp.temperature / 2), 0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
if(!cube.wrapped)
cube.Expand()
// Dehydrated carp
if(istype(O,/obj/item/toy/carpplushie/dehy_carp))
if(istype(O, /obj/item/toy/carpplushie/dehy_carp))
var/obj/item/toy/carpplushie/dehy_carp/dehy = O
dehy.Swell() // Makes a carp
return
/datum/reagent/lube
@@ -74,9 +69,7 @@
color = "#1BB1AB"
/datum/reagent/lube/reaction_turf(turf/simulated/T, volume)
if(!istype(T)) return
src = null
if(volume >= 1)
if(volume >= 1 && istype(T))
T.MakeSlippery(TURF_WET_LUBE)
@@ -90,11 +83,10 @@
/datum/reagent/space_cleaner/reaction_obj(obj/O, volume)
if(O && !istype(O, /atom/movable/lighting_overlay))
O.color = initial(O.color)
if(istype(O,/obj/effect/decal/cleanable))
if(istype(O, /obj/effect/decal/cleanable))
qdel(O)
else
if(O)
O.clean_blood()
else if(O)
O.clean_blood()
/datum/reagent/space_cleaner/reaction_turf(turf/T, volume)
if(volume >= 1)
@@ -106,14 +98,14 @@
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
if(istype(T,/turf/simulated))
if(istype(T, /turf/simulated))
var/turf/simulated/S = T
S.dirt = 0
/datum/reagent/space_cleaner/reaction_mob(mob/M, method=TOUCH, volume)
/datum/reagent/space_cleaner/reaction_mob(mob/living/M, method=TOUCH, volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(istype(M,/mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.lip_style)
H.lip_style = null
@@ -141,7 +133,6 @@
H.update_inv_shoes(0,0)
M.clean_blood()
..()
return
/datum/reagent/blood
@@ -151,7 +142,7 @@
reagent_state = LIQUID
color = "#C80000" // rgb: 200, 0, 0
/datum/reagent/blood/reaction_mob(mob/M, method=TOUCH, volume)
/datum/reagent/blood/reaction_mob(mob/living/M, method=TOUCH, volume)
if(data && data["viruses"])
for(var/datum/disease/D in data["viruses"])
@@ -232,7 +223,7 @@
id = "vaccine"
color = "#C81040" // rgb: 200, 16, 64
/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, volume)
/datum/reagent/vaccine/reaction_mob(mob/living/M, method=TOUCH, volume)
if(islist(data) && (method == INGEST))
for(var/datum/disease/D in M.viruses)
if(D.GetDiseaseID() in data)
@@ -241,7 +232,7 @@
/datum/reagent/vaccine/on_merge(list/data)
if(istype(data))
src.data |= data.Copy()
data |= data.Copy()
/datum/reagent/fishwater
name = "Fish Water"
@@ -250,9 +241,7 @@
reagent_state = LIQUID
color = "#757547"
/datum/reagent/fishwater/reaction_mob(mob/M, method=TOUCH, volume)
if(!istype(M, /mob/living))
return
/datum/reagent/fishwater/reaction_mob(mob/living/M, method=TOUCH, volume)
if(method == INGEST)
to_chat(M, "Oh god, why did you drink that?")
@@ -271,7 +260,7 @@
reagent_state = LIQUID
color = "#757547"
/datum/reagent/fishwater/toiletwater/reaction_mob(mob/M, method=TOUCH, volume) //For shennanigans
/datum/reagent/fishwater/toiletwater/reaction_mob(mob/living/M, method=TOUCH, volume) //For shennanigans
return
/datum/reagent/holywater
@@ -293,14 +282,14 @@
M.confused += 3
if(isvampirethrall(M))
ticker.mode.remove_vampire_mind(M.mind)
holder.remove_reagent(src.id, src.volume)
holder.remove_reagent(id, volume)
M.jitteriness = 0
M.stuttering = 0
M.confused = 0
return
if(iscultist(M))
ticker.mode.remove_cultist(M.mind)
holder.remove_reagent(src.id, src.volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
holder.remove_reagent(id, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
M.jitteriness = 0
M.stuttering = 0
M.confused = 0
@@ -331,10 +320,10 @@
var/mob/living/carbon/human/H=M
if(method == TOUCH)
if(H.wear_mask)
to_chat(H, "\red Your mask protects you from the holy water!")
to_chat(H, "<span class='warning'>Your mask protects you from the holy water!</span>")
return
else if(H.head)
to_chat(H, "\red Your helmet protects you from the holy water!")
to_chat(H, "<span class='warning'>Your helmet protects you from the holy water!</span>")
return
else
to_chat(M, "<span class='warning'>Something holy interferes with your powers!</span>")
@@ -342,8 +331,8 @@
/datum/reagent/holywater/reaction_turf(turf/simulated/T, volume)
..()
if(!istype(T)) return
if(!istype(T))
return
if(volume>=10)
for(var/obj/effect/rune/R in T)
qdel(R)
@@ -358,13 +347,9 @@
reagent_state = LIQUID
/datum/reagent/liquidgibs/reaction_turf(turf/T, volume) //yes i took it from synthflesh...
src = null
if(volume >= 5)
if(volume >= 5 && !istype(T, /turf/space))
new /obj/effect/decal/cleanable/blood/gibs/cleangibs(T)
playsound(T, 'sound/effects/splat.ogg', 50, 1, -3)
return
/datum/reagent/lye
name = "Lye"
+22 -22
View File
@@ -51,9 +51,9 @@
wait = 1
update_icon()
spawn(waittime)
src.wait = null
wait = null
update_icon()
playsound(src.loc, 'sound/machines/ping.ogg', 30, 1)
playsound(loc, 'sound/machines/ping.ogg', 30, 1)
/obj/machinery/computer/pandemic/update_icon()
if(stat & BROKEN)
@@ -75,8 +75,8 @@
if(!beaker) return
if(href_list["create_vaccine"])
if(!src.wait)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
if(!wait)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(loc)
if(B)
B.pixel_x = rand(-3, 3)
B.pixel_y = rand(-3, 3)
@@ -101,8 +101,8 @@
B.reagents.add_reagent("vaccine", 15, list(vaccine_type))
replicator_cooldown(200)
else
src.temp_html = "The replicator is not ready yet."
src.updateUsrDialog()
temp_html = "The replicator is not ready yet."
updateUsrDialog()
return
else if(href_list["create_virus_culture"])
if(!wait)
@@ -121,7 +121,7 @@
var/name = stripped_input(usr,"Name:","Name the culture",D.name,MAX_NAME_LEN)
if(name == null || wait)
return
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(loc)
B.icon_state = "bottle3"
B.pixel_x = rand(-3, 3)
B.pixel_y = rand(-3, 3)
@@ -130,24 +130,24 @@
B.name = "[name] culture bottle"
B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium."
B.reagents.add_reagent("blood",20,data)
src.updateUsrDialog()
updateUsrDialog()
else
src.temp_html = "The replicator is not ready yet."
src.updateUsrDialog()
temp_html = "The replicator is not ready yet."
updateUsrDialog()
return
else if(href_list["empty_beaker"])
beaker.reagents.clear_reagents()
src.updateUsrDialog()
updateUsrDialog()
return
else if(href_list["eject"])
beaker:loc = src.loc
beaker:loc = loc
beaker = null
icon_state = "mixer0"
src.updateUsrDialog()
updateUsrDialog()
return
else if(href_list["clear"])
src.temp_html = ""
src.updateUsrDialog()
temp_html = ""
updateUsrDialog()
return
else if(href_list["name_disease"])
var/new_name = stripped_input(usr, "Name the Disease", "New Name", "", MAX_NAME_LEN)
@@ -161,15 +161,15 @@
A.AssignName(new_name)
for(var/datum/disease/advance/AD in disease_master.processing)
AD.Refresh()
src.updateUsrDialog()
updateUsrDialog()
else
usr << browse(null, "window=pandemic")
src.updateUsrDialog()
updateUsrDialog()
return
src.add_fingerprint(usr)
add_fingerprint(usr)
return
/obj/machinery/computer/pandemic/attack_hand(mob/user)
@@ -177,8 +177,8 @@
return
user.set_machine(src)
var/dat = ""
if(src.temp_html)
dat = "[src.temp_html]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
if(temp_html)
dat = "[temp_html]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
else if(!beaker)
dat += "Please insert beaker.<BR>"
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
@@ -284,11 +284,11 @@
beaker = I
beaker.loc = src
to_chat(user, "<span class='notice'>You add the beaker to the machine.</span>")
src.updateUsrDialog()
updateUsrDialog()
icon_state = "mixer1"
else if(istype(I, /obj/item/weapon/screwdriver))
if(src.beaker)
if(beaker)
beaker.loc = get_turf(src)
..()
return
+2 -2
View File
@@ -28,7 +28,7 @@
/obj/item/weapon/reagent_containers/New()
..()
if(!possible_transfer_amounts)
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
var/datum/reagents/R = new/datum/reagents(volume)
reagents = R
R.my_atom = src
@@ -80,7 +80,7 @@
/obj/item/weapon/reagent_containers/wash(mob/user, atom/source)
if(is_open_container())
if(reagents.total_volume >= volume)
to_chat(user, "<span class='warning'>\The [src] is full.</span>")
to_chat(user, "<span class='warning'>[src] is full.</span>")
return
else
reagents.add_reagent("water", min(volume - reagents.total_volume, amount_per_transfer_from_this))
@@ -49,8 +49,8 @@
if(charge_tick < recharge_time) return 0
charge_tick = 0
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
if(isrobot(loc))
var/mob/living/silicon/robot/R = loc
if(R && R.cell)
var/datum/reagents/RG = reagent_list[mode]
if(RG.total_volume < RG.maximum_volume) //Don't recharge reagents and drain power if the storage is full.
@@ -84,10 +84,10 @@
if(M.reagents)
var/datum/reagent/injected = chemical_reagents_list[reagent_ids[mode]]
var/contained = injected.name
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [key_name(M)]. Reagents: [contained]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [key_name(user)]. Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [key_name(M)]. Reagents: [contained]</font>")
if(M.ckey)
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
M.LAssailant = user
var/trans = R.trans_to(M, amount_per_transfer_from_this)
@@ -95,7 +95,7 @@
return
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
playsound(loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
mode++
if(mode > reagent_list.len)
mode = 1
@@ -18,11 +18,11 @@
if(filled)
if(target.reagents.total_volume >= target.reagents.maximum_volume)
to_chat(user, "\red [target] is full.")
to_chat(user, "<span class='warning'>[target] is full.</span>")
return
if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/cigarette)) //You can inject humans and food but you cant remove the shit.
to_chat(user, "\red You cannot directly fill this object.")
to_chat(user, "<span class='warning'>You cannot directly fill this object.</span>")
return
var/trans = 0
@@ -45,60 +45,58 @@
if(safe_thing)
if(!safe_thing.reagents)
safe_thing.create_reagents(100)
trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this)
trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red <B>[] tries to squirt something into []'s eyes, but fails!</B>", user, target), 1)
visible_message("<span class='danger'>[user] tries to squirt something into [victim]'s eyes, but fails!</span>")
spawn(5)
src.reagents.reaction(safe_thing, TOUCH)
reagents.reaction(safe_thing, TOUCH)
to_chat(user, "\blue You transfer [trans] units of the solution.")
if(src.reagents.total_volume<=0)
to_chat(user, "<span class='notice'>You transfer [trans] units of the solution.</span>")
if(reagents.total_volume<=0)
filled = 0
icon_state = "[initial(icon_state)]"
return
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red <B>[] squirts something into []'s eyes!</B>", user, target), 1)
src.reagents.reaction(target, TOUCH)
visible_message("<span class='danger'>[user] squirts something into [target]'s eyes!</span>")
reagents.reaction(target, TOUCH)
var/mob/living/M = target
var/list/injected = list()
for(var/datum/reagent/R in src.reagents.reagent_list)
for(var/datum/reagent/R in reagents.reagent_list)
injected += R.name
var/contained = english_list(injected)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [name] by [key_name(user)]. Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to squirt [key_name(M)]. Reagents: [contained]</font>")
if(M.ckey)
msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "\blue You transfer [trans] units of the solution.")
if(src.reagents.total_volume<=0)
trans = reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You transfer [trans] units of the solution.</span>")
if(reagents.total_volume<=0)
filled = 0
icon_state = "[initial(icon_state)]"
else
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
to_chat(user, "\red You cannot directly remove reagents from [target].")
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target].</span>")
return
if(!target.reagents.total_volume)
to_chat(user, "\red [target] is empty.")
to_chat(user, "<span class='warning'>[target] is empty.</span>")
return
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
to_chat(user, "\blue You fill the [src] with [trans] units of the solution.")
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution.</span>")
filled = 1
icon_state = "[initial(icon_state)][filled]"
@@ -54,10 +54,10 @@
/obj/item/weapon/reagent_containers/glass/attack_self()
..()
if(is_open_container())
to_chat(usr, "<span class='notice'>You put the lid on \the [src].</span>")
to_chat(usr, "<span class='notice'>You put the lid on [src].</span>")
flags ^= OPENCONTAINER
else
to_chat(usr, "<span class='notice'>You take the lid off \the [src].</span>")
to_chat(usr, "<span class='notice'>You take the lid off [src].</span>")
flags |= OPENCONTAINER
update_icon()
@@ -208,7 +208,7 @@
if(usr.incapacitated())
return
if(assembly)
to_chat(usr, "<span class='notice'>You detach [assembly] from \the [src]</span>")
to_chat(usr, "<span class='notice'>You detach [assembly] from [src]</span>")
usr.put_in_hands(assembly)
assembly = null
update_icon()
@@ -223,7 +223,7 @@
/obj/item/weapon/reagent_containers/glass/beaker/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/device/assembly_holder) && can_assembly)
if(assembly)
to_chat(usr, "<span class='warning'>The [src] already has an assembly.</span>")
to_chat(usr, "<span class='warning'>[src] already has an assembly.</span>")
return ..()
assembly = W
user.drop_item()
@@ -27,24 +27,24 @@
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) //this block copypasted from reagent_containers/glass, for lack of a better solution
if(!A.reagents.total_volume && A.reagents)
to_chat(user, "<span class='notice'>\The [A] is empty.</span>")
to_chat(user, "<span class='notice'>[A] is empty.</span>")
return
if(reagents.total_volume >= reagents.maximum_volume)
to_chat(user, "<span class='notice'>\The [src] is full.</span>")
to_chat(user, "<span class='notice'>[src] is full.</span>")
return
var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>")
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [A].</span>")
return
if(reagents.total_volume < amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>\The [src] is empty!</span>")
to_chat(user, "<span class='notice'>[src] is empty!</span>")
return
spray(A)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
playsound(loc, 'sound/effects/spray2.ogg', 50, 1, -6)
user.changeNext_move(CLICK_CD_RANGE*2)
user.newtonian_move(get_dir(A, user))
@@ -82,8 +82,8 @@
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
/obj/item/weapon/reagent_containers/spray/examine(mob/user)
if(..(user, 0) && user==src.loc)
to_chat(user, "[round(src.reagents.total_volume)] units left.")
if(..(user, 0) && user == loc)
to_chat(user, "[round(reagents.total_volume)] units left.")
/obj/item/weapon/reagent_containers/spray/verb/empty()
@@ -94,10 +94,10 @@
return
if(alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
return
if(isturf(usr.loc) && src.loc == usr)
to_chat(usr, "<span class='notice'>You empty \the [src] onto the floor.</span>")
if(isturf(usr.loc) && loc == usr)
to_chat(usr, "<span class='notice'>You empty [src] onto the floor.</span>")
reagents.reaction(usr.loc)
src.reagents.clear_reagents()
reagents.clear_reagents()
//space cleaner
/obj/item/weapon/reagent_containers/spray/cleaner
@@ -156,10 +156,10 @@
/obj/item/weapon/reagent_containers/spray/chemsprayer/spray(var/atom/A)
var/Sprays[3]
for(var/i=1, i<=3, i++) // intialize sprays
if(src.reagents.total_volume < 1) break
if(reagents.total_volume < 1) break
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
src.reagents.trans_to(D, amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
@@ -82,7 +82,7 @@
if(istype(target, /mob/living/carbon/slime))
to_chat(user, "\red You are unable to locate any blood.")
return
if(src.reagents.has_reagent("blood"))
if(reagents.has_reagent("blood"))
to_chat(user, "\red There is already a blood sample in this syringe")
return
if(istype(target, /mob/living/carbon))//maybe just add a blood reagent to all mobs. Then you can suck them dry...With hundreds of syringes. Jolly good idea.
@@ -109,7 +109,7 @@
if(!do_mob(user, target, time))
return
var/amount = src.reagents.maximum_volume - src.reagents.total_volume
var/amount = reagents.maximum_volume - reagents.total_volume
if(amount == 0)
to_chat(usr, "<span class='warning'>The syringe is full!</span>")
return
@@ -125,10 +125,10 @@
B = T.take_blood(src,amount)
if(B)
src.reagents.reagent_list |= B
src.reagents.update_total()
src.on_reagent_change()
src.reagents.handle_reactions()
reagents.reagent_list |= B
reagents.update_total()
on_reagent_change()
reagents.handle_reactions()
to_chat(user, "\blue You take a blood sample from [target]")
for(var/mob/O in viewers(4, user))
@@ -193,25 +193,25 @@
if(istype(target,/mob/living))
var/mob/living/M = target
var/list/injected = list()
for(var/datum/reagent/R in src.reagents.reagent_list)
for(var/datum/reagent/R in reagents.reagent_list)
injected += R.name
var/contained = english_list(injected)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [key_name(M)]. Reagents: [contained]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [key_name(user)]. Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [key_name(M)]. Reagents: [contained]</font>")
if(M.ckey)
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
src.reagents.reaction(target, INGEST)
reagents.reaction(target, INGEST)
if(ismob(target) && target == user)
src.reagents.reaction(target, INGEST)
reagents.reaction(target, INGEST)
spawn(5)
var/datum/reagent/blood/B
for(var/datum/reagent/blood/d in src.reagents.reagent_list)
for(var/datum/reagent/blood/d in reagents.reagent_list)
B = d
break
var/trans
@@ -219,8 +219,8 @@
var/mob/living/carbon/C = target
C.inject_blood(src, 5)
else
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units.")
trans = reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "\blue You inject [trans] units of the solution. The syringe now contains [reagents.total_volume] units.")
if(istype(target, /obj/item/weapon/reagent_containers/food/pill/patch))
var/obj/item/weapon/reagent_containers/food/pill/patch/P = target
if(P.instant_application)
@@ -342,12 +342,12 @@
if(!do_mob(user, target, 300)) return
for(var/mob/O in viewers(world.view, user))
O.show_message(text("\red [] injects [] with a giant syringe!", user, target), 1)
src.reagents.reaction(target, INGEST)
reagents.reaction(target, INGEST)
if(ismob(target) && target == user)
src.reagents.reaction(target, INGEST)
reagents.reaction(target, INGEST)
spawn(5)
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units.")
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "\blue You inject [trans] units of the solution. The syringe now contains [reagents.total_volume] units.")
if(reagents.total_volume >= reagents.maximum_volume && mode==SYRINGE_INJECT)
mode = SYRINGE_DRAW
update_icon()
+15 -15
View File
@@ -20,18 +20,18 @@
reagents = R
R.my_atom = src
if(!possible_transfer_amounts)
src.verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT
verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT
..()
/obj/structure/reagent_dispensers/examine(mob/user)
if(!..(user, 2))
return
to_chat(user, "\blue It contains:")
to_chat(user, "<span class='notice'>It contains:</span>")
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
to_chat(user, "\blue [R.volume] units of [R.name]")
to_chat(user, "<span class='notice'>[R.volume] units of [R.name]</span>")
else
to_chat(user, "\blue Nothing.")
to_chat(user, "<span class='notice'>Nothing.</span>")
/obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this
set name = "Set transfer amount"
@@ -50,12 +50,12 @@
return
if(2.0)
if(prob(50))
new /obj/effect/effect/water(src.loc)
new /obj/effect/effect/water(loc)
qdel(src)
return
if(3.0)
if(prob(5))
new /obj/effect/effect/water(src.loc)
new /obj/effect/effect/water(loc)
qdel(src)
return
else
@@ -63,7 +63,7 @@
/obj/structure/reagent_dispensers/blob_act()
if(prob(50))
new /obj/effect/effect/water(src.loc)
new /obj/effect/effect/water(loc)
qdel(src)
@@ -106,7 +106,7 @@
boom()
/obj/structure/reagent_dispensers/fueltank/proc/boom()
explosion(src.loc,0,1,5,7,10, flame_range = 5)
explosion(loc,0,1,5,7,10, flame_range = 5)
if(src)
qdel(src)
@@ -128,13 +128,13 @@
if(!..(user, 2))
return
if(rig)
to_chat(usr, "<span class='notice'>There is some kind of device rigged to the tank.")
to_chat(usr, "<span class='notice'>There is some kind of device rigged to the tank.</span>")
/obj/structure/reagent_dispensers/fueltank/attack_hand()
if(rig)
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
usr.visible_message("<span class='notice'>[usr] begins to detach [rig] from [src].</span>", "<span class='notice'>You begin to detach [rig] from [src].</span>")
if(do_after(usr, 20, target = src))
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]")
usr.visible_message("<span class='notice'>[usr] detaches [rig] from [src].</span>", "<span class='notice'>You detach [rig] from [src].</span>")
rig.loc = get_turf(usr)
rig = null
overlays = new/list()
@@ -142,11 +142,11 @@
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W,/obj/item/device/assembly_holder) && accepts_rig)
if(rig)
to_chat(user, "\red There is another device in the way.")
to_chat(user, "<span class='warning'>There is another device in the way.</span>")
return ..()
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
user.visible_message("[user] begins rigging [W] to [src].", "You begin rigging [W] to [src]")
if(do_after(user, 20, target = src))
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]")
user.visible_message("<span class='notice'>[user] rigs [W] to [src].</span>", "<span class='notice'>You rig [W] to [src].</span>")
var/obj/item/device/assembly_holder/H = W
if(istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
@@ -231,7 +231,7 @@
reagents.add_reagent("beer",1000)
/obj/structure/reagent_dispensers/beerkeg/blob_act()
explosion(src.loc,0,3,5,7,10)
explosion(loc,0,3,5,7,10)
qdel(src)
/obj/structure/reagent_dispensers/virusfood
@@ -96,6 +96,14 @@
dir = turn(dir, -90)
update()
/obj/structure/disposalconstruct/AltClick(mob/user)
if(user.incapacitated())
to_chat(user << "<span class='warning'>You can't do that right now!</span>")
return
if(!Adjacent(user))
return
rotate()
/obj/structure/disposalconstruct/verb/flip()
set name = "Flip Pipe"
set src in view(1)
+2 -2
View File
@@ -260,7 +260,7 @@
if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='danger'>[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!</span>")
for(var/mob/living/m in oview(1, src))
m.apply_damage(15,"brute",pick("head","chest","groin"))
m.apply_damage(15,BRUTE,pick("head","chest","groin"))
investigate_log("Experimentor dealt minor brute to [m].", "experimentor")
ejectItem(TRUE)
if(prob(EFFECT_PROB_LOW-badThingCoeff))
@@ -398,7 +398,7 @@
visible_message("<span class='warning'>[src] malfunctions, activating its emergency coolant systems!</span>")
throwSmoke(src.loc)
for(var/mob/living/m in oview(1, src))
m.apply_damage(5,"burn",pick("head","chest","groin"))
m.apply_damage(5,BURN,pick("head","chest","groin"))
investigate_log("Experimentor has dealt minor burn damage to [m]", "experimentor")
ejectItem()
////////////////////////////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -128,7 +128,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'> [user]'s hand slips, tearing skin on [target]'s face with \the [tool]!</span>", \
"<span class='warning'> Your hand slips, tearing skin on [target]'s face with \the [tool]!</span>")
target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1)
target.apply_damage(10, BRUTE, affected, sharp=1, edge=1)
return 0
/datum/surgery_step/face/cauterize
+2 -2
View File
@@ -256,11 +256,11 @@
if(iscarbon(user))
var/mob/living/carbon/C = user
C.Weaken(6)
C.apply_damage(20, "brute", "chest")
C.apply_damage(20, BRUTE, "chest")
else if(issilicon(user))
var/mob/living/silicon/S = user
S.Weaken(8)
S.apply_damage(20, "brute")
S.apply_damage(20, BRUTE)
playsound(S, 'sound/effects/bang.ogg', 50, 1)
return 0
user.visible_message("[user] shines light onto the tumor in [target]'s head!", "<span class='notice'>You cleanse the contamination from [target]'s brain!</span>")