This commit is contained in:
kevinz000
2018-10-12 17:21:02 -07:00
parent c08fa05fdc
commit 9154ed4e55
53 changed files with 597 additions and 306 deletions
@@ -58,7 +58,7 @@
data["electronic_warfare"] = electronic_warfare
data["entries"] = entries
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "agent_id_card.tmpl", "Fake ID", 600, 400)
ui.set_initial_data(data)
@@ -185,7 +185,7 @@
. = 1
// Always update the UI, or buttons will spin indefinitely
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
/var/global/list/id_card_states
/proc/id_card_states()
@@ -1,7 +1,7 @@
/obj/item/weapon/implant/integrated_circuit
name = "electronic implant"
desc = "It's a case, for building very tiny electronics with."
icon = 'icons/obj/electronic_assemblies.dmi'
icon = 'icons/obj/integrated_electronics/electronic_setups.dmi'
icon_state = "setup_implant"
var/obj/item/device/electronic_assembly/implant/IC = null
@@ -39,7 +39,7 @@
IC.examine(user)
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/weapon/crowbar) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || istype(O, /obj/item/weapon/screwdriver) || istype(O, /obj/item/weapon/cell/device) )
if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) )
IC.attackby(O, user)
else
..()
@@ -23,7 +23,7 @@
V.mechassist()
for(var/L in need_amend)
V.add_assistable_langs(L)
qdel_null(src)
QDEL_NULL(src)
/obj/item/weapon/implant/language/get_data()
var/dat = {"
@@ -0,0 +1,106 @@
/obj/item/weapon/implant/neural
name = "neural framework implant"
desc = "A small metal casing with numerous wires stemming off of it."
var/obj/item/organ/internal/brain/my_brain = null
var/target_state = null
var/robotic_brain = FALSE
/obj/item/weapon/implant/neural/post_implant(var/mob/source)
if(ishuman(source))
var/mob/living/carbon/human/H = source
if(H.species.has_organ[O_BRAIN])
var/obj/item/organ/internal/brain/possible_brain = H.internal_organs_by_name[O_BRAIN]
my_brain = possible_brain //Organs will take damage all the same.
if(istype(possible_brain) && my_brain.can_assist()) //If the brain is infact a brain, and not something special like an MMI.
my_brain.implant_assist(target_state)
if(H.isSynthetic() && H.get_FBP_type() != FBP_CYBORG) //If this on an FBP, it's just an extra inefficient attachment to whatever their brain is.
robotic_brain = TRUE
if(my_brain && my_brain.can_assist())
processing_objects.Add(src)
/obj/item/weapon/implant/neural/Destroy()
if(my_brain)
if(my_brain.owner)
to_chat(my_brain.owner, "<span class='critical'>You feel a pressure in your mind as something is ripped away.</span>")
processing_objects.Remove(src)
my_brain = null
return ..()
/obj/item/weapon/implant/neural/process()
if(my_brain && part)
if(my_brain.loc != part.loc)
to_chat(my_brain.owner, "<span class='critical'>You feel a pressure in your mind as something is ripped away.</span>")
meltdown()
return 1
/obj/item/weapon/implant/neural/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Neural Framework Implant<BR>
<b>Life:</b> Duration of Brain Function<BR>
<b>Important Notes:</b> None<BR>
<HR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Maintains some function or structure of the target's brain.<BR>
<b>Special Features:</b><BR>
<i>Neuro-Safe</i>- Specialized shell absorbs excess voltages self-destructing the chip if
a malfunction occurs thereby attempting to secure the safety of subject.<BR>
<b>Integrity:</b> Gradient creates slight risk of being overcharged and frying the
circuitry. Resulting faults can cause damage to the host's brain.<HR>
Implant Specifics:<BR>"}
return dat
/obj/item/weapon/implant/neural/emp_act(severity)
if(!my_brain)
return
if(malfunction) //Don't malfunction while malfunctioning.
return
malfunction = MALFUNCTION_TEMPORARY
var/delay = 10 //Don't let it just get emped twice in a second to kill someone.
var/brain_location = my_brain.owner.organs_by_name[my_brain.parent_organ]
var/mob/living/L = my_brain.owner
switch(severity)
if(1)
if(prob(10))
meltdown()
else if(prob(80))
my_brain.take_damage(5)
if(!robotic_brain)
to_chat(L, "<span class='critical'>Something in your [brain_location] burns!</span>")
else
to_chat(L, "<span class='warning'>Severe fault detected in [brain_location].</span>")
if(2)
if(prob(80))
my_brain.take_damage(3)
if(!robotic_brain)
to_chat(L, "<span class='danger'>It feels like something is digging into your [brain_location]!</span>")
else
to_chat(L, "<span class='warning'>Fault detected in [brain_location].</span>")
if(3)
if(prob(60))
my_brain.take_damage(2)
if(!robotic_brain)
to_chat(L, "<span class='warning'>There is a stabbing pain in your [brain_location]!</span>")
if(4)
if(prob(40))
my_brain.take_damage(1)
if(!robotic_brain)
to_chat(L, "<span class='warning'>Your [brain_location] aches.</span>")
spawn(delay)
malfunction--
/obj/item/weapon/implant/neural/meltdown()
..()
processing_objects.Remove(src)
var/mob/living/carbon/human/H = null
if(my_brain && my_brain.owner)
if(ishuman(my_brain.owner))
H = my_brain.owner
if(robotic_brain)
to_chat(H, "<span class='critical'>WARNING. Fault dete-ct-- in the \the [src].</span>")
H.Confuse(30)
H.AdjustBlinded(5)
my_brain.take_damage(15)
my_brain = null
return
@@ -7,8 +7,8 @@
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
if(W.is_screwdriver())
to_chat(user, "You finish the concealed blade weapon.")
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/material/butterfly(user.loc, material.name)
qdel(src)
@@ -33,7 +33,7 @@
/obj/item/weapon/material/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/material/butterflyblade))
var/obj/item/weapon/material/butterflyblade/B = W
user << "You attach the two concealed blade parts."
to_chat(user, "You attach the two concealed blade parts.")
new /obj/item/weapon/material/butterflyconstruction(user.loc, B.material.name)
qdel(W)
qdel(src)
@@ -58,10 +58,10 @@
if(istype(I, /obj/item/weapon/material/shard) || istype(I, /obj/item/weapon/material/butterflyblade))
var/obj/item/weapon/material/tmp_shard = I
finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name)
user << "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>"
else if(istype(I, /obj/item/weapon/wirecutters))
to_chat(user, "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>")
else if(I.is_wirecutter())
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
to_chat(user, "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>")
if(finished)
user.drop_from_inventory(src)
user.drop_from_inventory(I)
@@ -12,7 +12,7 @@
var/epitaph = "" //A quick little blurb
/obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
@@ -27,7 +27,7 @@
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(istype(W, /obj/item/weapon/wrench))
if(W.is_wrench())
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
material.place_dismantled_product(get_turf(src))
@@ -76,5 +76,5 @@
G.epitaph = epitaph
G.add_fingerprint(usr)
G.dir = user.dir
qdel_null(src)
QDEL_NULL(src)
return
@@ -79,16 +79,6 @@
* Knives
*/
// Identical to the tactical knife but nowhere near as stabby.
// Kind of like the toy esword compared to the real thing.
/obj/item/weapon/material/knife/boot
name = "boot knife"
desc = "A small fixed-blade knife for putting inside a boot."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
applies_material_colour = 0
/* From the time of Clowns. Commented out for posterity, and sanity.
/obj/item/weapon/material/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
@@ -74,6 +74,39 @@
"<span class='danger'>\The [user] is slitting [TU.his] stomach open with \the [src]! It looks like [TU.hes] trying to commit seppuku.</span>")
return (BRUTELOSS)
// These no longer inherit from hatchets.
/obj/item/weapon/material/knife/tacknife
name = "tactical knife"
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Space."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
force_divisor = 0.25 //15 when hardness 60 (steel)
attack_verb = list("stabbed", "chopped", "cut")
applies_material_colour = 1
/obj/item/weapon/material/knife/tacknife/combatknife
name = "combat knife"
desc = "If only you had a boot to put it in."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
force_divisor = 0.34 // 20 with hardness 60 (steel)
thrown_force_divisor = 1.75 // 20 with weight 20 (steel)
attack_verb = list("sliced", "stabbed", "chopped", "cut")
applies_material_colour = 1
// Identical to the tactical knife but nowhere near as stabby.
// Kind of like the toy esword compared to the real thing.
/obj/item/weapon/material/knife/tacknife/boot
name = "boot knife"
desc = "A small fixed-blade knife for putting inside a boot."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
force_divisor = 0.15
applies_material_colour = 0
/obj/item/weapon/material/knife/hook
name = "meat hook"
desc = "A sharp, metal hook what sticks into things."
@@ -46,28 +46,6 @@
hits = initial(hits)
..()
// These no longer inherit from hatchets.
/obj/item/weapon/material/knife/tacknife
name = "tactical knife"
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Space."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
force_divisor = 0.25 //15 when hardness 60 (steel)
attack_verb = list("stabbed", "chopped", "cut")
applies_material_colour = 1
/obj/item/weapon/material/knife/tacknife/combatknife
name = "combat knife"
desc = "If only you had a boot to put it in."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
force_divisor = 0.34 // 20 with hardness 60 (steel)
thrown_force_divisor = 1.75 // 20 with weight 20 (steel)
attack_verb = list("sliced", "stabbed", "chopped", "cut")
applies_material_colour = 1
/obj/item/weapon/material/minihoe // -- Numbers
name = "mini hoe"
desc = "It's used for removing weeds or scratching your back."
+3 -3
View File
@@ -91,7 +91,7 @@
else if(lit && detonator_mode)
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
if("Press the button.")
user << "<span class='warning'>You press the button.</span>"
to_chat(user, "<span class='warning'>You press the button.</span>")
icon_state = "[base_state]click"
if(src.bomb)
src.bomb.detonate()
@@ -106,7 +106,7 @@
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
detonator_mode = !detonator_mode
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>"
to_chat(user, "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>")
@@ -24,7 +24,7 @@
ion_trail.set_up(src)
/obj/item/weapon/tank/jetpack/Destroy()
qdel_null(ion_trail)
QDEL_NULL(ion_trail)
return ..()
/obj/item/weapon/tank/jetpack/examine(mob/user)
+4 -33
View File
@@ -70,10 +70,10 @@ var/list/global/tank_gauge_cache = list()
return
/obj/item/weapon/tank/Destroy()
qdel_null(air_contents)
QDEL_NULL(air_contents)
processing_objects.Remove(src)
qdel_null(src.proxyassembly)
QDEL_NULL(src.proxyassembly)
if(istype(loc, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/TTV = loc
@@ -130,7 +130,7 @@ var/list/global/tank_gauge_cache = list()
to_chat(user, "<span class='notice'>You attach the wires to the tank.</span>")
src.add_bomb_overlay()
if(istype(W, /obj/item/weapon/wirecutters))
if(W.is_wirecutter())
if(wired && src.proxyassembly.assembly)
to_chat(user, "<span class='notice'>You carefully begin clipping the wires that attach to the tank.</span>")
@@ -264,7 +264,7 @@ var/list/global/tank_gauge_cache = list()
data["maskConnected"] = 1
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
@@ -674,32 +674,3 @@ var/list/global/tank_gauge_cache = list()
/obj/item/device/tankassemblyproxy/HasProximity(atom/movable/AM as mob|obj)
if(src.assembly)
src.assembly.HasProximity(AM)
/obj/item/projectile/bullet/pellet/fragment/tank
name = "metal fragment"
damage = 9 //Big chunks flying off.
range_step = 2 //controls damage falloff with distance. projectiles lose a "pellet" each time they travel this distance. Can be a non-integer.
base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone
spread_step = 20
armor_penetration = 20
silenced = 1
no_attack_log = 1
muzzle_type = null
pellets = 3
/obj/item/projectile/bullet/pellet/fragment/tank/small
name = "small metal fragment"
damage = 6
armor_penetration = 5
pellets = 5
/obj/item/projectile/bullet/pellet/fragment/tank/big
name = "large metal fragment"
damage = 17
armor_penetration = 10
range_step = 5 //controls damage falloff with distance. projectiles lose a "pellet" each time they travel this distance. Can be a non-integer.
pellets = 1
+13
View File
@@ -186,3 +186,16 @@
prob(5);/mob/living/simple_animal/hostile/hivebot/range/laser,
prob(5);/mob/living/simple_animal/hostile/hivebot/range/strong,
prob(5);/mob/living/simple_animal/hostile/hivebot/range/guard)
//Mice
/obj/random/mob/mouse
name = "Random Mouse"
desc = "This is a random boring maus."
icon_state = "mouse_gray"
/obj/random/mob/mouse/item_to_spawn()
return pick(prob(15);/mob/living/simple_animal/mouse/white,
prob(30);/mob/living/simple_animal/mouse/brown,
prob(30);/mob/living/simple_animal/mouse/gray,
prob(25);/obj/random/mouseremains) //because figuring out how to come up with it picking nothing is beyond my coding ability.
+10 -10
View File
@@ -50,12 +50,12 @@
icon_state = "welder"
/obj/random/tool/item_to_spawn()
return pick(/obj/item/weapon/screwdriver,
/obj/item/weapon/wirecutters,
return pick(/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wirecutters,
/obj/item/weapon/weldingtool,
/obj/item/weapon/weldingtool/largetank,
/obj/item/weapon/crowbar,
/obj/item/weapon/wrench,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/wrench,
/obj/item/device/flashlight,
/obj/item/device/multitool)
@@ -65,8 +65,8 @@
icon_state = "jaws_pry"
/obj/random/tool/power/item_to_spawn()
return pick(/obj/item/weapon/screwdriver/power,
/obj/item/weapon/wirecutters/power,
return pick(/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/wirecutters/power,
/obj/item/weapon/weldingtool/electric,
/obj/item/weapon/weldingtool/experimental)
@@ -77,11 +77,11 @@
icon_state = "welder"
/obj/random/tool/alien/item_to_spawn()
return pick(/obj/item/weapon/screwdriver/alien,
/obj/item/weapon/wirecutters/alien,
return pick(/obj/item/weapon/tool/screwdriver/alien,
/obj/item/weapon/tool/wirecutters/alien,
/obj/item/weapon/weldingtool/alien,
/obj/item/weapon/crowbar/alien,
/obj/item/weapon/wrench/alien,
/obj/item/weapon/tool/crowbar/alien,
/obj/item/weapon/tool/wrench/alien,
/obj/item/stack/cable_coil/alien,
/obj/item/device/multitool/alien)
@@ -16,7 +16,7 @@
starts_with = list(/obj/item/weapon/material/twohanded/fireaxe)
/obj/structure/closet/fireaxecabinet/New()
/obj/structure/closet/fireaxecabinet/initialize()
..()
fireaxe = locate() in contents
@@ -9,6 +9,6 @@
/obj/item/clothing/mask/breath,
/obj/item/clothing/head/helmet/space/void,
/obj/item/clothing/suit/space/void,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/cell,
/obj/item/device/multitool)
@@ -16,7 +16,7 @@
/obj/item/clothing/head/greenbandana,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/material/knife/machete/hatchet,
/obj/item/weapon/wirecutters/clippers,
/obj/item/weapon/tool/wirecutters/clippers,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/clothing/suit/storage/hooded/wintercoat/hydro,
/obj/item/clothing/shoes/boots/winter/hydro)
@@ -132,7 +132,7 @@
/obj/item/device/healthanalyzer,
/obj/item/device/radio/off,
/obj/random/medical,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/extinguisher/mini,
/obj/item/weapon/storage/box/freezer,
/obj/item/clothing/accessory/storage/white_vest,
+3 -3
View File
@@ -412,7 +412,7 @@ nanoui is used to open and update nano browser uis
winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map
on_close_winset()
//onclose(user, window_id)
nanomanager.ui_opened(src)
GLOB.nanomanager.ui_opened(src)
/**
* Reinitialise this UI, potentially with a different template and/or initial data
@@ -433,7 +433,7 @@ nanoui is used to open and update nano browser uis
*/
/datum/nanoui/proc/close()
is_auto_updating = 0
nanomanager.ui_closed(src)
GLOB.nanomanager.ui_closed(src)
user << browse(null, "window=[window_id]")
for(var/datum/nanoui/child in children)
child.close()
@@ -492,7 +492,7 @@ nanoui is used to open and update nano browser uis
map_update = 1
if ((src_object && src_object.Topic(href, href_list, state)) || map_update)
nanomanager.update_uis(src_object) // update all UIs attached to src_object
GLOB.nanomanager.update_uis(src_object) // update all UIs attached to src_object
/**
* Process this UI, updating the entire UI or just the status (aka visibility)
+16 -14
View File
@@ -33,7 +33,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
var/tmp/list/nifsofts_life = list() // Ones that want to be talked to on life()
var/owner // Owner character name
var/examine_msg //Message shown on examine.
var/tmp/vision_flags = 0 // Flags implants set for faster lookups
var/tmp/health_flags = 0
var/tmp/combat_flags = 0
@@ -72,9 +72,9 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
//Put loaded data here if we loaded any
save_data = islist(load_data) ? load_data.Copy() : list()
var/saved_examine_msg = save_data["examine_msg"]
//If it's an empty string, they want it blank. If null, it's never been saved, give default.
if(isnull(saved_examine_msg))
if(isnull(saved_examine_msg))
saved_examine_msg = "There's a certain spark to their eyes."
examine_msg = saved_examine_msg
@@ -104,8 +104,8 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
//Destructor cleans up references
/obj/item/device/nif/Destroy()
human = null
qdel_null_list(nifsofts)
qdel_null(comm)
QDEL_NULL_LIST(nifsofts)
QDEL_NULL(comm)
nifsofts_life.Cut()
return ..()
@@ -114,7 +114,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
var/obj/item/organ/brain = H.internal_organs_by_name[O_BRAIN]
if(istype(brain))
should_be_in = brain.parent_organ
if(istype(H) && !H.nif && H.species && (loc == H.get_organ(should_be_in)))
if(!bioadap && (H.species.flags & NO_SCAN)) //NO_SCAN is the default 'too complicated' flag
return FALSE
@@ -135,7 +135,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
var/obj/item/organ/brain = H.internal_organs_by_name[O_BRAIN]
if(istype(brain))
should_be_in = brain.parent_organ
parent = H.get_organ(should_be_in)
//Ok, nevermind then!
if(!istype(parent))
@@ -154,11 +154,11 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
/obj/item/device/nif/proc/unimplant(var/mob/living/carbon/human/H)
var/datum/nifsoft/soulcatcher/SC = imp_check(NIF_SOULCATCHER)
if(SC) //Clean up stored people, this is dirty but the easiest way.
qdel_null_list(SC.brainmobs)
QDEL_NULL_LIST(SC.brainmobs)
SC.brainmobs = list()
stat = NIF_PREINSTALL
vis_update()
H.verbs |= /mob/living/carbon/human/proc/set_nif_examine
H.verbs -= /mob/living/carbon/human/proc/set_nif_examine
H.nif = null
human = null
install_done = null
@@ -188,14 +188,16 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
durability -= wear
if(durability <= 0)
notify("Danger! General system insta#^!($",TRUE)
to_chat(human,"<span class='danger'>Your NIF vision overlays disappear and your head suddenly seems very quiet...</span>")
stat = NIF_TEMPFAIL
update_icon()
if(human)
notify("Danger! General system insta#^!($",TRUE)
to_chat(human,"<span class='danger'>Your NIF vision overlays disappear and your head suddenly seems very quiet...</span>")
//Attackby proc, for maintenance
/obj/item/device/nif/attackby(obj/item/weapon/W, mob/user as mob)
if(open == 0 && istype(W,/obj/item/weapon/screwdriver))
if(open == 0 && W.is_screwdriver())
if(do_after(user, 4 SECONDS, src) && open == 0)
user.visible_message("[user] unscrews and pries open \the [src].","<span class='notice'>You unscrew and pry open \the [src].</span>")
playsound(user, 'sound/items/Screwdriver.ogg', 50, 1)
@@ -216,7 +218,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
user.visible_message("[user] resets several circuits in \the [src].","<span class='notice'>You find and repair any faulty circuits in \the [src].</span>")
open = 3
update_icon()
else if(open == 3 && istype(W,/obj/item/weapon/screwdriver))
else if(open == 3 && W.is_screwdriver())
if(do_after(user, 3 SECONDS, src) && open == 3)
user.visible_message("[user] closes up \the [src].","<span class='notice'>You re-seal \the [src] for use once more.</span>")
playsound(user, 'sound/items/Screwdriver.ogg', 50, 1)
+4 -4
View File
@@ -24,7 +24,7 @@
entopic = new(aholder = src, aicon = icon, aicon_state = "beacon")
/obj/machinery/vending/nifsoft_shop/Destroy()
qdel_null(entopic)
QDEL_NULL(entopic)
return ..()
/obj/machinery/vending/nifsoft_shop/power_change()
@@ -167,7 +167,7 @@
shut_up = !shut_up
add_fingerprint(usr)
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
// Also special treatment!
/obj/machinery/vending/nifsoft_shop/vend(datum/stored_item/vending_product/R, mob/user)
@@ -179,7 +179,7 @@
vend_ready = 0 //One thing at a time!!
status_message = "Installing..."
status_error = 0
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
if(R.category & CAT_COIN)
if(!coin)
@@ -215,5 +215,5 @@
status_error = 0
vend_ready = 1
currently_vending = null
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
return 1
+1 -1
View File
@@ -56,7 +56,7 @@
if(nif)
uninstall()
nif = null
qdel_null(stat_line)
QDEL_NULL(stat_line)
return ..()
//Called when the software is installed in the NIF
+1 -1
View File
@@ -12,7 +12,7 @@
arscreen = new(nif)
Destroy()
qdel_null(arscreen)
QDEL_NULL(arscreen)
return ..()
activate()
@@ -26,7 +26,7 @@
load_settings()
Destroy()
qdel_null_list(brainmobs)
QDEL_NULL_LIST(brainmobs)
return ..()
activate()
@@ -49,7 +49,7 @@
nif.human.verbs |= /mob/living/carbon/human/proc/nme
uninstall()
qdel_null_list(brainmobs)
QDEL_NULL_LIST(brainmobs)
if((. = ..()) && nif && nif.human) //Sometimes NIFs are deleted outside of a human
nif.human.verbs -= /mob/living/carbon/human/proc/nsay
nif.human.verbs -= /mob/living/carbon/human/proc/nme
@@ -407,7 +407,7 @@
real_name = brainmob.real_name //And the OTHER name
forceMove(get_turf(parent_human))
moved_event.register(parent_human, src, /mob/observer/eye/ar_soul/proc/human_moved)
GLOB.moved_event.register(parent_human, src, /mob/observer/eye/ar_soul/proc/human_moved)
//Time to play dressup
if(brainmob.client.prefs)
@@ -422,7 +422,7 @@
/mob/observer/eye/ar_soul/Destroy()
if(parent_human) //It's POSSIBLE they've been deleted before the NIF somehow
moved_event.unregister(parent_human, src)
GLOB.moved_event.unregister(parent_human, src)
parent_human = null
return ..()
@@ -554,7 +554,7 @@
to_chat(src,"<span class='warning'>You're not projecting into AR!</span>")
return
qdel_null(eyeobj)
QDEL_NULL(eyeobj)
soulcatcher.notify_into("[src] ended AR projection.")
/mob/living/carbon/brain/caught_soul/verb/nsay(message as text|null)
+2 -2
View File
@@ -16,7 +16,7 @@
uninstall()
var/obj/item/device/nif/lnif = nif //Awkward. Parent clears it in an attempt to clean up.
if((. = ..()) && lnif)
qdel_null(lnif.comm)
QDEL_NULL(lnif.comm)
activate()
if((. = ..()))
@@ -43,7 +43,7 @@
..()
nif = newloc
nifsoft = soft
qdel_null(camera) //Not supported on internal one.
QDEL_NULL(camera) //Not supported on internal one.
Destroy()
if(nif)
+10 -6
View File
@@ -160,17 +160,17 @@ var/const/CE_STABLE_THRESHOLD = 0.5
for(var/datum/wound/W in temp.wounds)
if(W.bleeding())
if(W.damage_type == PIERCE) //gunshots and spear stabs bleed more
blood_loss_divisor -= 5
blood_loss_divisor = max(blood_loss_divisor - 5, 1)
else if(W.damage_type == BRUISE) //bruises bleed less
blood_loss_divisor += 5
blood_loss_divisor = max(blood_loss_divisor + 5, 1)
//the farther you get from those vital regions, the less you bleed
//depending on how dangerous bleeding turns out to be, it might be better to only apply the reduction to hands and feet
if((temp.organ_tag == BP_L_ARM) || (temp.organ_tag == BP_R_ARM) || (temp.organ_tag == BP_L_LEG) || (temp.organ_tag == BP_R_LEG))
blood_loss_divisor += 5
blood_loss_divisor = max(blood_loss_divisor + 5, 1)
else if((temp.organ_tag == BP_L_HAND) || (temp.organ_tag == BP_R_HAND) || (temp.organ_tag == BP_L_FOOT) || (temp.organ_tag == BP_R_FOOT))
blood_loss_divisor += 10
blood_loss_divisor = max(blood_loss_divisor + 10, 1)
if(CE_STABLE in chem_effects) //Inaprov slows bloodloss
blood_loss_divisor += 10
blood_loss_divisor = max(blood_loss_divisor + 10, 1)
if(temp.applied_pressure)
if(ishuman(temp.applied_pressure))
var/mob/living/carbon/human/H = temp.applied_pressure
@@ -198,6 +198,9 @@ var/const/CE_STABLE_THRESHOLD = 0.5
if(!amt)
return 0
if(amt > vessel.get_reagent_amount("blood"))
amt = vessel.get_reagent_amount("blood") - 1 // Bit of a safety net; it's impossible to add blood if there's not blood already in the vessel.
return vessel.remove_reagent("blood",amt * (src.mob_size/MOB_MEDIUM))
/****************************************************
@@ -208,7 +211,8 @@ var/const/CE_STABLE_THRESHOLD = 0.5
/mob/living/carbon/proc/take_blood(obj/item/weapon/reagent_containers/container, var/amount)
var/datum/reagent/B = get_blood(container.reagents)
if(!B) B = new /datum/reagent/blood
if(!B)
B = new /datum/reagent/blood
B.holder = container
B.volume += amount
+26 -4
View File
@@ -17,6 +17,21 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
attack_verb = list("attacked", "slapped", "whacked")
var/clone_source = FALSE
var/mob/living/carbon/brain/brainmob = null
var/can_assist = TRUE
/obj/item/organ/internal/brain/proc/can_assist()
return can_assist
/obj/item/organ/internal/brain/proc/implant_assist(var/targ_icon_state = null)
name = "[owner.real_name]'s assisted [initial(name)]"
if(targ_icon_state)
icon_state = targ_icon_state
if(dead_icon)
dead_icon = "[targ_icon_state]_dead"
else
icon_state = "[initial(icon_state)]_assisted"
if(dead_icon)
dead_icon = "[initial(dead_icon)]_assisted"
/obj/item/organ/internal/brain/robotize()
replace_self_with(/obj/item/organ/internal/mmi_holder/posibrain)
@@ -55,7 +70,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
brainmob.client.screen.len = null //clear the hud
/obj/item/organ/internal/brain/Destroy()
qdel_null(brainmob)
QDEL_NULL(brainmob)
. = ..()
/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H)
@@ -115,7 +130,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
target.key = brainmob.key
..()
/obj/item/organ/internal/pariah_brain
/obj/item/organ/internal/brain/pariah_brain
name = "brain remnants"
desc = "Did someone tread on this? It looks useless for cloning or cyborgification."
organ_tag = "brain"
@@ -123,18 +138,19 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
icon = 'icons/mob/alien.dmi'
icon_state = "chitin"
vital = 1
can_assist = FALSE
/obj/item/organ/internal/brain/xeno
name = "thinkpan"
desc = "It looks kind of like an enormous wad of purple bubblegum."
icon = 'icons/mob/alien.dmi'
icon_state = "chitin"
can_assist = FALSE
/obj/item/organ/internal/brain/slime
name = "slime core"
desc = "A complex, organic knot of jelly and crystalline particles."
icon = 'icons/mob/slimes.dmi'
icon_state = "green slime extract"
icon_state = "core"
parent_organ = BP_TORSO
clone_source = TRUE
flags = OPENCONTAINER
@@ -145,6 +161,11 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
/obj/item/organ/internal/brain/slime/New()
..()
create_reagents(50)
var/mob/living/carbon/human/H = null
spawn(15) //Match the core to the Promethean's starting color.
if(ishuman(owner))
H = owner
color = rgb(min(H.r_skin + 40, 255), min(H.g_skin + 40, 255), min(H.b_skin + 40, 255))
/obj/item/organ/internal/brain/slime/proc/reviveBody()
var/datum/dna2/record/R = new /datum/dna2/record()
@@ -239,6 +260,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
desc = "A tightly furled roll of paper, covered with indecipherable runes."
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
can_assist = FALSE
/obj/item/organ/internal/brain/grey
desc = "A piece of juicy meat found in a person's head. This one is strange."
+10 -10
View File
@@ -33,34 +33,34 @@
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/weapon/paper_bundle))
user << "<span class='notice'>You put [P] in [src].</span>"
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
user.drop_item()
P.loc = src
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
else if(P.is_wrench())
playsound(loc, P.usesound, 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
else if(istype(P, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You begin taking the [name] apart.</span>"
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
else if(P.is_screwdriver())
to_chat(user, "<span class='notice'>You begin taking the [name] apart.</span>")
playsound(src, P.usesound, 50, 1)
if(do_after(user, 10 * P.toolspeed))
playsound(loc, P.usesound, 50, 1)
user << "<span class='notice'>You take the [name] apart.</span>"
to_chat(user, "<span class='notice'>You take the [name] apart.</span>")
new /obj/item/stack/material/steel( src.loc, 4 )
for(var/obj/item/I in contents)
I.forceMove(loc)
qdel(src)
return
else
user << "<span class='notice'>You can't put [P] in [src]!</span>"
to_chat(user, "<span class='notice'>You can't put [P] in [src]!</span>")
/obj/structure/filingcabinet/attack_hand(mob/user as mob)
if(contents.len <= 0)
user << "<span class='notice'>\The [src] is empty.</span>"
to_chat(user, "<span class='notice'>\The [src] is empty.</span>")
return
user.set_machine(src)
@@ -85,9 +85,9 @@
I.loc = loc
if(prob(25))
step_rand(I)
user << "<span class='notice'>You pull \a [I] out of [src] at random.</span>"
to_chat(user, "<span class='notice'>You pull \a [I] out of [src] at random.</span>")
return
user << "<span class='notice'>You find nothing in [src].</span>"
to_chat(user, "<span class='notice'>You find nothing in [src].</span>")
/obj/structure/filingcabinet/Topic(href, href_list)
if(href_list["retrieve"])
+4
View File
@@ -632,3 +632,7 @@
/obj/item/weapon/paper/crumpled/bloody/CrashedMedShuttle
name = "Blackbox Transcript - VMV Aurora's Light"
info = "<I>\[The paper is torn at the top, presumably from the impact. It's oil-stained, but you can just about read it.]</I><BR> <B>mmons 19:52:01:</B> Come on... it's right there in the distance, we're almost there!<BR> <B>Doctor Nazarril 19:52:26:</B> Odysseus online. Orrderrs, sirr?<BR> <B>Captain Simmons 19:52:29:</B> Brace for impact. We're going in full-speed.<BR> <B>Technician Dynasty 19:52:44:</B> Chief, fire's spread to the secondary propulsion systems.<BR> <B>Captain Simmons 19:52:51:</B> Copy. Any word from TraCon? Transponder's down still?<BR> <B>Technician Dynasty 19:53:02:</B> Can't get in touch, sir. Emergency beacon's active, but we're not going t-<BR> <B>Doctor Nazarril 19:53:08:</B> Don't say it. As long as we believe, we'll get through this.<BR> <B>Captain Simmons 19:53:11:</B> Damn right. We're a few klicks out from the port. Rough landing, but we can do it.<BR> <B>V.I.T.A 19:53:26:</B> Vessel diagnostics complete. Engines one, two, three offline. Engine four status: critical. Transponder offline. Fire alarm in the patient bay.<BR> <B>A loud explosion is heard.</B><BR> <B>V.I.T.A 19:53:29:</B> Alert: fuel intake valve open.<BR> <B>Technician Dynasty 19:53:31:</B> ... ah.<BR> <B>Doctor Nazarril 19:53:34:</B> Trrranslate?<BR> <B>V.I.T.A 19:53:37:</B> There is a 16.92% chance of this vessel safely landing at the emergency destination. Note that there is an 83.08% chance of detonation of fuel supplies upon landing.<BR> <B>Technician Dynasty 19:53:48:</B> We'll make it, sure, but we'll explode and take out half the LZ with us. Propulsion's down, we can't slow down. If we land there, everyone in that port dies, no question.<BR> <B>V.I.T.A 19:53:53:</B> The Technician is correct.<BR> <B>Doctor Nazarril 19:54:02:</B> Then... we can't land therrre.<BR> <B>V.I.T.A 19:54:11:</B> Analysing... recommended course of action: attempt emergency landing in isolated area. Chances of survival: negligible. <BR> <B>Captain Simmons 19:54:27:</B> I- alright. I'm bringing us down. You all know what this means.<BR> <B>Doctor Nazarril 19:54:33:</B> Sh... I- I understand. It's been- it's been an honorr, Captain, Dynasty, VITA.<BR> <B>Technician Dynasty 19:54:39:</B> We had a good run. I'm going to miss this.<BR> <B>Captain Simmons 19:54:47:</B> VITA. Tell them we died heroes. Tell them... we did all we could.<BR> <B>V.I.T.A 19:54:48:</B> I will. Impact in five. Four. Three.<BR> <B>Doctor Nazarril 19:54:49:</B> Oh, starrs... I- you werrre all the... best frriends she everr had. Thank you.<BR> <B>Technician Dynasty 19:54:50:</B> Any time, kid. Any time.<BR> <B>V.I.T.A 19:54:41:</B> Two.<BR><B>V.I.T.A 19:54:42:</B> One.<BR> **8/DEC/2561**<BR> <B>V.I.T.A 06:22:16:</B> Backup power restored. Attempting to establish connection with emergency rescue personnel.<BR> <B>V.I.T.A 06:22:17:</B> Unable to establish connection. Transponder destroyed on impact.<BR> <B>V.I.T.A 06:22:18:</B> No lifesigns detected on board.<BR> **1/JAN/2562**<BR> <B>V.I.T.A 00:00:00:</B> Happy New Year, crew.<BR> <B>V.I.T.A 00:00:01:</B> Power reserves: 41%. Diagnostics offline. Cameras offline. Communications offline.<BR> <B>V.I.T.A 00:00:02:</B> Nobody's coming.<BR> **14/FEB/2562**<BR> <B>V.I.T.A 00:00:00:</B> Roses are red.<BR> <B>V.I.T.A 00:00:01:</B> Violets are blue.<BR> <B>V.I.T.A 00:00:02:</B> Won't you come back?<BR> <B>V.I.T.A 00:00:03:</B> I miss you.<BR> **15/FEB/2562**<BR><B>V.I.T.A 22:19:06:</B> Power reserves critical. Transferring remaining power to emergency broadcasting beacon.<BR> <B>V.I.T.A 22:19:07:</B> Should anyone find this, lay them to rest. They deserve a proper burial.<BR> <B>V.I.T.A 22:19:08:</B> Erasing files... shutting down.<BR> <B>A low, monotone beep.</B><BR> **16/FEB/2562**<BR> <B>Something chitters.</B><BR> <B>End of transcript.</B>"
/obj/item/weapon/paper/manifest
name = "supply manifest"
var/is_copy = 1
+11 -11
View File
@@ -40,10 +40,10 @@
if(istype(W, /obj/item/weapon/storage))
empty_bin(user, W)
return
else if(istype(W, /obj/item/weapon/wrench))
else if(W.is_wrench())
playsound(src, W.usesound, 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
return
else if(default_part_replacement(user, W))
return
@@ -60,7 +60,7 @@
if(inoperable())
return // Need powah!
if(paperamount == max_paper)
user << "<span class='warning'>\The [src] is full; please empty it before you continue.</span>"
to_chat(user, "<span class='warning'>\The [src] is full; please empty it before you continue.</span>")
return
paperamount += paper_result
user.drop_from_inventory(W)
@@ -68,7 +68,7 @@
playsound(src.loc, 'sound/items/pshred.ogg', 75, 1)
flick(shred_anim, src)
if(paperamount > max_paper)
user <<"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>"
to_chat(user,"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>")
for(var/i=(paperamount-max_paper);i>0;i--)
var/obj/item/weapon/shreddedp/SP = get_shredded_paper()
SP.loc = get_turf(src)
@@ -87,7 +87,7 @@
return
if(!paperamount)
usr << "<span class='notice'>\The [src] is empty.</span>"
to_chat(usr, "<span class='notice'>\The [src] is empty.</span>")
return
empty_bin(usr)
@@ -99,7 +99,7 @@
empty_into = null
if(empty_into && empty_into.contents.len >= empty_into.storage_slots)
user << "<span class='notice'>\The [empty_into] is full.</span>"
to_chat(user, "<span class='notice'>\The [empty_into] is full.</span>")
return
while(paperamount)
@@ -111,12 +111,12 @@
break
if(empty_into)
if(paperamount)
user << "<span class='notice'>You fill \the [empty_into] with as much shredded paper as it will carry.</span>"
to_chat(user, "<span class='notice'>You fill \the [empty_into] with as much shredded paper as it will carry.</span>")
else
user << "<span class='notice'>You empty \the [src] into \the [empty_into].</span>"
to_chat(user, "<span class='notice'>You empty \the [src] into \the [empty_into].</span>")
else
user << "<span class='notice'>You empty \the [src].</span>"
to_chat(user, "<span class='notice'>You empty \the [src].</span>")
update_icon()
/obj/machinery/papershredder/proc/get_shredded_paper()
@@ -171,12 +171,12 @@
if(user.restrained())
return
if(!P.lit)
user << "<span class='warning'>\The [P] is not lit.</span>"
to_chat(user, "<span class='warning'>\The [P] is not lit.</span>")
return
user.visible_message("<span class='warning'>\The [user] holds \the [P] up to \the [src]. It looks like [TU.he] [TU.is] trying to burn it!</span>", \
"<span class='warning'>You hold \the [P] up to \the [src], burning it slowly.</span>")
if(!do_after(user,20))
user << "<span class='warning'>You must hold \the [P] steady to burn \the [src].</span>"
to_chat(user, "<span class='warning'>You must hold \the [P] steady to burn \the [src].</span>")
return
user.visible_message("<span class='danger'>\The [user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
"<span class='danger'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
@@ -11,7 +11,7 @@
/obj/machinery/computer/fusion_core_control/attackby(var/obj/item/thing, var/mob/user)
..()
if(ismultitool(thing))
if(thing.is_multitool()) //VOREStation Edit
var/new_ident = input("Enter a new ident tag.", "Core Control", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
@@ -96,7 +96,7 @@
/obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user)
..()
if(ismultitool(W))
if(W.is_multitool()) //VOREStation Edit
var/new_ident = input("Enter a new ident tag.", "Fuel Control", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
@@ -42,7 +42,7 @@ var/list/fuel_injectors = list()
/obj/machinery/fusion_fuel_injector/attackby(obj/item/W, mob/user)
if(ismultitool(W))
if(istype(W, /obj/item/device/multitool))
var/new_ident = input("Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
@@ -68,7 +68,7 @@ var/list/fuel_injectors = list()
cur_assembly = W
return
if(iswrench(W) || isscrewdriver(W) || iscrowbar(W) || istype(W, /obj/item/weapon/storage/part_replacer))
if(W.is_wrench() || W.is_screwdriver() || W.is_crowbar() || istype(W, /obj/item/weapon/storage/part_replacer))
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
return
@@ -52,7 +52,7 @@ var/list/gyrotrons = list()
icon_state = "emitter-off"
/obj/machinery/power/emitter/gyrotron/attackby(var/obj/item/W, var/mob/user)
if(ismultitool(W))
if(istype(W, /obj/item/device/multitool))
var/new_ident = input("Enter a new ident tag.", "Gyrotron", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
@@ -96,7 +96,7 @@
/obj/machinery/computer/gyrotron_control/attackby(var/obj/item/W, var/mob/user)
..()
if(ismultitool(W))
if(W.is_multitool()) //VOREStation Edit
var/new_ident = input("Enter a new ident tag.", "Gyrotron Control", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
+2 -2
View File
@@ -137,7 +137,7 @@
attack_hand(user)
/obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
if(W.is_wrench())
playsound(src, W.usesound, 75, 1)
anchored = !anchored
user.visible_message("[user.name] [anchored ? "secures" : "unsecures"] the bolts holding [src.name] to the floor.", \
@@ -198,7 +198,7 @@
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
+3 -3
View File
@@ -43,12 +43,12 @@
/obj/machinery/power/grid_checker/attackby(obj/item/W, mob/user)
if(!user)
return
if(istype(W, /obj/item/weapon/screwdriver))
if(W.is_screwdriver())
default_deconstruction_screwdriver(user, W)
opened = !opened
else if(istype(W, /obj/item/weapon/crowbar))
else if(W.is_crowbar())
default_deconstruction_crowbar(user, W)
else if(istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters) )
else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter())
attack_hand(user)
/obj/machinery/power/grid_checker/attack_hand(mob/user)
+17 -25
View File
@@ -181,11 +181,11 @@
if(dna_lock && attached_lock.stored_dna)
if(!authorized_user(user))
if(attached_lock.safety_level == 0)
M << "<span class='danger'>\The [src] buzzes in dissapoint and displays an invalid DNA symbol.</span>"
to_chat(M, "<span class='danger'>\The [src] buzzes in dissapoint and displays an invalid DNA symbol.</span>")
return 0
if(!attached_lock.exploding)
if(attached_lock.safety_level == 1)
M << "<span class='danger'>\The [src] hisses in dissapointment.</span>"
to_chat(M, "<span class='danger'>\The [src] hisses in dissapointment.</span>")
visible_message("<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>", "<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>")
spawn(100)
explosion(src, 0, 0, 3, 4)
@@ -194,7 +194,7 @@
qdel(src)
return 0
if(HULK in M.mutations)
M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>"
to_chat(M, "<span class='danger'>Your fingers are much too large for the trigger guard!</span>")
return 0
if((CLUMSY in M.mutations) && prob(40)) //Clumsy handling
var/obj/P = consume_next_projectile()
@@ -227,7 +227,7 @@
return
if(user && user.a_intent == I_HELP && user.is_preference_enabled(/datum/client_preference/safefiring)) //regardless of what happens, refuse to shoot if help intent is on
user << "<span class='warning'>You refrain from firing your [src] as your intent is set to help.</span>"
to_chat(user, "<span class='warning'>You refrain from firing your [src] as your intent is set to help.</span>")
return
else
@@ -267,9 +267,9 @@
/obj/item/weapon/gun/attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/dnalockingchip))
if(dna_lock)
user << "<span class='notice'>\The [src] already has a [attached_lock].</span>"
to_chat(user, "<span class='notice'>\The [src] already has a [attached_lock].</span>")
return
user << "<span class='notice'>You insert \the [A] into \the [src].</span>"
to_chat(user, "<span class='notice'>You insert \the [A] into \the [src].</span>")
user.drop_item()
A.loc = src
attached_lock = A
@@ -279,12 +279,12 @@
verbs += /obj/item/weapon/gun/verb/allow_dna
return
if(istype(A, /obj/item/weapon/screwdriver))
if(A.is_screwdriver())
if(dna_lock && attached_lock && !attached_lock.controller_lock)
user << "<span class='notice'>You begin removing \the [attached_lock] from \the [src].</span>"
to_chat(user, "<span class='notice'>You begin removing \the [attached_lock] from \the [src].</span>")
playsound(src, A.usesound, 50, 1)
if(do_after(user, 25 * A.toolspeed))
user << "<span class='notice'>You remove \the [attached_lock] from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove \the [attached_lock] from \the [src].</span>")
user.put_in_hands(attached_lock)
dna_lock = 0
attached_lock = null
@@ -292,12 +292,12 @@
verbs -= /obj/item/weapon/gun/verb/give_dna
verbs -= /obj/item/weapon/gun/verb/allow_dna
else
user << "<span class='warning'>\The [src] is not accepting modifications at this time.</span>"
to_chat(user, "<span class='warning'>\The [src] is not accepting modifications at this time.</span>")
..()
/obj/item/weapon/gun/emag_act(var/remaining_charges, var/mob/user)
if(dna_lock && attached_lock.controller_lock)
user << "<span class='notice'>You short circuit the internal locking mechanisms of \the [src]!</span>"
to_chat(user, "<span class='notice'>You short circuit the internal locking mechanisms of \the [src]!</span>")
attached_lock.controller_dna = null
attached_lock.controller_lock = 0
attached_lock.stored_dna = list()
@@ -348,7 +348,7 @@
if(world.time < next_fire_time)
if (world.time % 3) //to prevent spam
user << "<span class='warning'>[src] is not ready to fire again!</span>"
to_chat(user, "<span class='warning'>[src] is not ready to fire again!</span>")
return
var/shoot_time = (burst - 1)* burst_delay
@@ -407,9 +407,11 @@
last_shot = world.time
/* // Commented out for quality control and testing.
/*
// Commented out for quality control and testing.
shooting = 0
*/
// We do this down here, so we don't get the message if we fire an empty gun.
if(user.item_is_in_hands(src) && user.hands_are_full())
if(one_handed_penalty >= 20)
@@ -514,8 +516,6 @@
if(muzzle_flash)
set_light(0)
//obtains the next projectile to fire
/obj/item/weapon/gun/proc/consume_next_projectile()
return null
@@ -587,7 +587,6 @@
shake_camera(user, recoil+1, recoil)
update_icon()
/obj/item/weapon/gun/proc/process_point_blank(obj/projectile, mob/user, atom/target)
var/obj/item/projectile/P = projectile
if(!istype(P))
@@ -626,13 +625,7 @@
P.accuracy = accuracy + acc_mod
P.dispersion = disp_mod
// Certain statuses make it harder to aim, blindness especially. Same chances as melee, however guns accuracy uses multiples of 15.
if(user.eye_blind)
P.accuracy -= 75
if(user.eye_blurry)
P.accuracy -= 30
if(user.confused)
P.accuracy -= 45
P.accuracy -= user.get_accuracy_penalty()
//accuracy bonus from aiming
if (aim_targets && (target in aim_targets))
@@ -676,7 +669,6 @@
return launched
/obj/item/weapon/gun/proc/play_fire_sound(var/mob/user, var/obj/item/projectile/P)
var/shot_sound = (istype(P) && P.fire_sound)? P.fire_sound : fire_sound
if(silenced)
@@ -717,7 +709,7 @@
user.apply_damage(in_chamber.damage*2.5, in_chamber.damage_type, "head", used_weapon = "Point blank shot in the mouth with \a [in_chamber]", sharp=1)
user.death()
else
user << "<span class = 'notice'>Ow...</span>"
to_chat(user, "<span class = 'notice'>Ow...</span>")
user.apply_effect(110,AGONY,0)
qdel(in_chamber)
mouthshoot = 0
@@ -30,7 +30,7 @@
to_chat(user, "<span class='notice'>There is a [M.name] mod installed, using <b>[M.cost]%</b> capacity.</span>")
/obj/item/weapon/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
if(istype(A, /obj/item/weapon/crowbar))
if(istype(A, /obj/item/weapon/tool/crowbar))
if(modkits.len)
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
playsound(loc, A.usesound, 100, 1)
@@ -109,11 +109,11 @@
// /obj/item/projectile/kinetic/pod
// kill_count = 4
//
//
// /obj/item/projectile/kinetic/pod/regular
// damage = 50
// pressure_decrease = 0.5
//
//
// /obj/item/projectile/kinetic/pod/enhanced
// turf_aoe = TRUE
// mob_aoe = TRUE
@@ -143,7 +143,7 @@
safetycatch = 1
return
if(istype(A, /obj/item/weapon/screwdriver))
if(istype(A, /obj/item/weapon/tool/screwdriver))
if(safetycatch && attached_safety)
user << "<span class='notice'>You begin removing \the [attached_safety] from \the [src].</span>"
if(do_after(user, 25))
@@ -37,6 +37,7 @@ obj/item/weapon/gun/energy/phasegun/rifle
icon_state = "phaserifle"
item_state = "phaserifle"
wielded_item_state = "phaserifle-wielded"
w_class = ITEMSIZE_LARGE
slot_flags = SLOT_BACK
charge_cost = 150
projectile_type = /obj/item/projectile/energy/phase/heavy
@@ -162,7 +162,7 @@
else
user << "<span class='notice'>[src] already has a cell installed.</span>"
else if(istype(W, /obj/item/weapon/screwdriver))
else if(W.is_screwdriver())
if(cell)
var/obj/item/C = cell
C.loc = get_turf(user)
@@ -227,7 +227,7 @@
else
user << "<span class='notice'>You need at least three rods to complete this task.</span>"
return
else if(istype(W,/obj/item/weapon/weldingtool))
else if(istype(W, /obj/item/weapon/weldingtool))
if(buildstate == 1)
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
@@ -237,7 +237,7 @@
buildstate++
update_icon()
return
else if(istype(W,/obj/item/stack/cable_coil))
else if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(buildstate == 2)
if(C.use(5))
@@ -265,7 +265,7 @@
else
user << "<span class='notice'>You need at least three plastic sheets to complete this task.</span>"
return
else if(istype(W,/obj/item/weapon/screwdriver))
else if(W.is_screwdriver())
if(buildstate == 5)
user << "<span class='notice'>You secure the crossbow's various parts.</span>"
playsound(src, W.usesound, 50, 1)
+5 -60
View File
@@ -62,66 +62,6 @@
return 0
//For projectiles that actually represent clouds of projectiles
/obj/item/projectile/bullet/pellet
name = "shrapnel" //'shrapnel' sounds more dangerous (i.e. cooler) than 'pellet'
damage = 20
//icon_state = "bullet" //TODO: would be nice to have it's own icon state
var/pellets = 4 //number of pellets
var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer.
var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone
var/spread_step = 10 //higher means the pellets spread more across body parts with distance
/obj/item/projectile/bullet/pellet/Bumped()
. = ..()
bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine.
/obj/item/projectile/bullet/pellet/proc/get_pellets(var/distance)
var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance
return max(pellets - pellet_loss, 1)
/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
if (pellets < 0) return 1
var/total_pellets = get_pellets(distance)
var/spread = max(base_spread - (spread_step*distance), 0)
//shrapnel explosions miss prone mobs with a chance that increases with distance
var/prone_chance = 0
if(!base_spread)
prone_chance = max(spread_step*(distance - 2), 0)
var/hits = 0
for (var/i in 1 to total_pellets)
if(target_mob.lying && target_mob != original && prob(prone_chance))
continue
//pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
//whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
var/old_zone = def_zone
def_zone = ran_zone(def_zone, spread)
if (..()) hits++
def_zone = old_zone //restore the original zone the projectile was aimed at
pellets -= hits //each hit reduces the number of pellets left
if (hits >= total_pellets || pellets <= 0)
return 1
return 0
/obj/item/projectile/bullet/pellet/get_structure_damage()
var/distance = get_dist(loc, starting)
return ..() * get_pellets(distance)
/obj/item/projectile/bullet/pellet/Move()
. = ..()
//If this is a shrapnel explosion, allow mobs that are prone to get hit, too
if(. && !base_spread && isturf(loc))
for(var/mob/living/M in loc)
if(M.lying || !M.CanPass(src, loc)) //Bump if lying or if we would normally Bump.
if(Bump(M)) //Bump will make sure we don't hit a mob multiple times
return
/* short-casing projectiles, like the kind used in pistols or SMGs */
/obj/item/projectile/bullet/pistol
@@ -189,6 +129,11 @@
range_step = 1
spread_step = 10
/obj/item/projectile/bullet/pellet/shotgun/flak
damage = 2 //The main weapon using these fires four at a time, usually with different destinations. Usually.
range_step = 2
spread_step = 30
armor_penetration = 10
//EMP shotgun 'slug', it's basically a beanbag that pops a tiny emp when it hits. //Not currently used
/obj/item/projectile/bullet/shotgun/ion
@@ -0,0 +1,110 @@
//For projectiles that actually represent clouds of projectiles
/obj/item/projectile/bullet/pellet
name = "shrapnel" //'shrapnel' sounds more dangerous (i.e. cooler) than 'pellet'
damage = 20
//icon_state = "bullet" //TODO: would be nice to have it's own icon state
var/pellets = 4 //number of pellets
var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer.
var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone
var/spread_step = 10 //higher means the pellets spread more across body parts with distance
/obj/item/projectile/bullet/pellet/Bumped()
. = ..()
bumped = 0 //can hit all mobs in a tile. pellets is decremented inside attack_mob so this should be fine.
/obj/item/projectile/bullet/pellet/proc/get_pellets(var/distance)
var/pellet_loss = round((distance - 1)/range_step) //pellets lost due to distance
return max(pellets - pellet_loss, 1)
/obj/item/projectile/bullet/pellet/attack_mob(var/mob/living/target_mob, var/distance, var/miss_modifier)
if (pellets < 0) return 1
var/total_pellets = get_pellets(distance)
var/spread = max(base_spread - (spread_step*distance), 0)
//shrapnel explosions miss prone mobs with a chance that increases with distance
var/prone_chance = 0
if(!base_spread)
prone_chance = max(spread_step*(distance - 2), 0)
var/hits = 0
for (var/i in 1 to total_pellets)
if(target_mob.lying && target_mob != original && prob(prone_chance))
continue
//pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
//whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
var/old_zone = def_zone
def_zone = ran_zone(def_zone, spread)
if (..()) hits++
def_zone = old_zone //restore the original zone the projectile was aimed at
pellets -= hits //each hit reduces the number of pellets left
if (hits >= total_pellets || pellets <= 0)
return 1
return 0
/obj/item/projectile/bullet/pellet/get_structure_damage()
var/distance = get_dist(loc, starting)
return ..() * get_pellets(distance)
/obj/item/projectile/bullet/pellet/Move()
. = ..()
//If this is a shrapnel explosion, allow mobs that are prone to get hit, too
if(. && !base_spread && isturf(loc))
for(var/mob/living/M in loc)
if(M.lying || !M.CanPass(src, loc)) //Bump if lying or if we would normally Bump.
if(Bump(M)) //Bump will make sure we don't hit a mob multiple times
return
//Explosive grenade projectile, borrowed from fragmentation grenade code.
/obj/item/projectile/bullet/pellet/fragment
damage = 10
armor_penetration = 30
range_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer.
base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone
spread_step = 20
silenced = 1 //embedding messages are still produced so it's kind of weird when enabled.
no_attack_log = 1
muzzle_type = null
/obj/item/projectile/bullet/pellet/fragment/strong
damage = 15
armor_penetration = 20
/obj/item/projectile/bullet/pellet/fragment/weak
damage = 4
armor_penetration = 40
// Tank rupture fragments
/obj/item/projectile/bullet/pellet/fragment/tank
name = "metal fragment"
damage = 9 //Big chunks flying off.
range_step = 2 //controls damage falloff with distance. projectiles lose a "pellet" each time they travel this distance. Can be a non-integer.
base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone
spread_step = 20
armor_penetration = 20
silenced = 1
no_attack_log = 1
muzzle_type = null
pellets = 3
/obj/item/projectile/bullet/pellet/fragment/tank/small
name = "small metal fragment"
damage = 6
armor_penetration = 5
pellets = 5
/obj/item/projectile/bullet/pellet/fragment/tank/big
name = "large metal fragment"
damage = 17
armor_penetration = 10
range_step = 5 //controls damage falloff with distance. projectiles lose a "pellet" each time they travel this distance. Can be a non-integer.
pellets = 1
+2 -2
View File
@@ -193,8 +193,8 @@ datum/supply_drop_loot/riot
/obj/item/weapon/reagent_containers/food/snacks/tastybread,
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake,
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake,
/obj/item/weapon/crowbar,
/obj/item/weapon/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/crowbar,
/obj/item/device/flashlight,
/obj/item/device/flashlight,
/obj/item/clothing/suit/storage/hazardvest,
+15 -15
View File
@@ -31,8 +31,8 @@
/obj/machinery/chem_master/New()
..()
var/datum/reagents/R = new/datum/reagents(120)
reagents = R
var/datum/reagents/R = new/datum/reagents(900) //Just a huge random number so the buffer should (probably) never dump your reagents.
reagents = R //There should be a nano ui thingy to warn of this.
R.my_atom = src
/obj/machinery/chem_master/ex_act(severity)
@@ -50,24 +50,24 @@
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food))
if(src.beaker)
user << "\A [beaker] is already loaded into the machine."
to_chat(user, "\A [beaker] is already loaded into the machine.")
return
src.beaker = B
user.drop_item()
B.loc = src
user << "You add \the [B] to the machine!"
to_chat(user, "You add \the [B] to the machine.")
icon_state = "mixer1"
else if(istype(B, /obj/item/weapon/storage/pill_bottle))
if(src.loaded_pill_bottle)
user << "A \the [loaded_pill_bottle] s already loaded into the machine."
to_chat(user, "A \the [loaded_pill_bottle] s already loaded into the machine.")
return
src.loaded_pill_bottle = B
user.drop_item()
B.loc = src
user << "You add \the [loaded_pill_bottle] into the dispenser slot!"
to_chat(user, "You add \the [loaded_pill_bottle] into the dispenser slot.")
else if(default_unfasten_wrench(user, B, 20))
return
@@ -133,7 +133,7 @@
data["bottleSpritesAmount"] = list(1, 2, 3, 4) //how many bottle sprites there are. Sprites are taken from chemical.dmi and can be found in nano/images/pill.png
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = GLOB.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.set_initial_data(data)
@@ -269,7 +269,7 @@
else if(href_list["bottle_sprite"])
bottlesprite = href_list["bottle_sprite"]
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
/obj/machinery/chem_master/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -352,7 +352,7 @@
return 0
if(holdingitems && holdingitems.len >= limit)
usr << "The machine cannot hold anymore items."
to_chat(user, "The machine cannot hold anymore items.")
return 1
if(!istype(O))
@@ -371,13 +371,13 @@
break
if(failed)
user << "Nothing in the plant bag is usable."
to_chat(user, "Nothing in the plant bag is usable.")
return 1
if(!O.contents.len)
user << "You empty \the [O] into \the [src]."
to_chat(user, "You empty \the [O] into \the [src].")
else
user << "You fill \the [src] from \the [O]."
to_chat(user, "You fill \the [src] from \the [O].")
src.updateUsrDialog()
return 0
@@ -385,16 +385,16 @@
if(istype(O,/obj/item/weapon/gripper))
var/obj/item/weapon/gripper/B = O //B, for Borg.
if(!B.wrapped)
user << "\The [B] is not holding anything."
to_chat(user, "\The [B] is not holding anything.")
return 0
else
var/B_held = B.wrapped
user << "You use \the [B] to load \the [src] with \the [B_held]."
to_chat(user, "You use \the [B] to load \the [src] with \the [B_held].")
return 0
if(!sheet_reagents[O.type] && (!O.reagents || !O.reagents.total_volume))
user << "\The [O] is not suitable for blending."
to_chat(user, "\The [O] is not suitable for blending.")
return 1
user.remove_from_mob(O)
@@ -2210,6 +2210,84 @@
required_reagents = list("icecoffee" = 1, "whiskey" = 1, "mint" = 1)
result_amount = 3
/datum/chemical_reaction/drinks/godsake
name = "Gods Sake"
id = "godsake"
result = "godsake"
required_reagents = list("sake" = 2, "holywater" = 1)
result_amount = 3
/datum/chemical_reaction/drinks/godka //Why you would put this in your body, I don't know.
name = "Godka"
id = "godka"
result = "godka"
required_reagents = list("vodka" = 1, "holywater" = 1, "ethanol" = 1, "carthatoline" = 1)
catalysts = list("enzyme" = 5, "holywater" = 5)
result_amount = 1
/datum/chemical_reaction/drinks/holywine
name = "Angel Ichor"
id = "holywine"
result = "holywine"
required_reagents = list("grapejuice" = 5, "gold" = 5)
catalysts = list("holywater" = 5)
result_amount = 10
/datum/chemical_reaction/drinks/holy_mary
name = "Holy Mary"
id = "holymary"
result = "holymary"
required_reagents = list("vodka" = 2, "holywine" = 3, "limejuice" = 1)
result_amount = 6
/datum/chemical_reaction/drinks/angelskiss
name = "Angels Kiss"
id = "angelskiss"
result = "angelskiss"
required_reagents = list("holywine" = 1, "kahlua" = 1, "rum" = 1)
result_amount = 3
/datum/chemical_reaction/drinks/angelswrath
name = "Angels Wrath"
id = "angelswrath"
result = "angelswrath"
required_reagents = list("rum" = 3, "spacemountainwind" = 1, "holywine" = 1, "dr_gibb" = 1)
result_amount = 6
/datum/chemical_reaction/drinks/ichor_mead
name = "Ichor Mead"
id = "ichor_mead"
result = "ichor_mead"
required_reagents = list("holywine" = 1, "mead" = 1)
result_amount = 2
/datum/chemical_reaction/drinks/oilslick
name = "Oil Slick"
id = "oilslick"
result = "oilslick"
required_reagents = list("cornoil" = 2, "honey" = 1)
result_amount = 3
/datum/chemical_reaction/drinks/nuclearwaste_radium
name = "Nuclear Waste"
id = "nuclearwasterad"
result = "nuclearwaste"
required_reagents = list("oilslick" = 1, "radium" = 1, "limejuice" = 1)
result_amount = 2
/datum/chemical_reaction/drinks/nuclearwaste_uranium
name = "Nuclear Waste"
id = "nuclearwasteuran"
result = "nuclearwaste"
required_reagents = list("oilslick" = 2, "uranium" = 1)
result_amount = 3
/datum/chemical_reaction/drinks/sodaoil
name = "Soda Oil"
id = "sodaoil"
result = "sodaoil"
required_reagents = list("cornoil" = 4, "sodawater" = 1, "carbon" = 1, "tricordrazine" = 1)
result_amount = 6
//R-UST Port
/datum/chemical_reaction/hyrdophoron
+19 -19
View File
@@ -26,47 +26,47 @@
/obj/machinery/chemical_dispenser/examine(mob/user)
..()
user << "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more."
to_chat(user, "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more.")
/obj/machinery/chemical_dispenser/proc/add_cartridge(obj/item/weapon/reagent_containers/chem_disp_cartridge/C, mob/user)
if(!istype(C))
if(user)
user << "<span class='warning'>\The [C] will not fit in \the [src]!</span>"
to_chat(user, "<span class='warning'>\The [C] will not fit in \the [src]!</span>")
return
if(cartridges.len >= DISPENSER_MAX_CARTRIDGES)
if(user)
user << "<span class='warning'>\The [src] does not have any slots open for \the [C] to fit into!</span>"
to_chat(user, "<span class='warning'>\The [src] does not have any slots open for \the [C] to fit into!</span>")
return
if(!C.label)
if(user)
user << "<span class='warning'>\The [C] does not have a label!</span>"
to_chat(user, "<span class='warning'>\The [C] does not have a label!</span>")
return
if(cartridges[C.label])
if(user)
user << "<span class='warning'>\The [src] already contains a cartridge with that label!</span>"
to_chat(user, "<span class='warning'>\The [src] already contains a cartridge with that label!</span>")
return
if(user)
user.drop_from_inventory(C)
user << "<span class='notice'>You add \the [C] to \the [src].</span>"
to_chat(user, "<span class='notice'>You add \the [C] to \the [src].</span>")
C.loc = src
cartridges[C.label] = C
cartridges = sortAssoc(cartridges)
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
/obj/machinery/chemical_dispenser/proc/remove_cartridge(label)
. = cartridges[label]
cartridges -= label
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
/obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
if(W.is_wrench())
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You begin to [anchored ? "un" : ""]fasten \the [src].</span>"
to_chat(user, "<span class='notice'>You begin to [anchored ? "un" : ""]fasten \the [src].</span>")
if (do_after(user, 20 * W.toolspeed))
user.visible_message(
"<span class='notice'>\The [user] [anchored ? "un" : ""]fastens \the [src].</span>",
@@ -74,40 +74,40 @@
"You hear a ratchet.")
anchored = !anchored
else
user << "<span class='notice'>You decide not to [anchored ? "un" : ""]fasten \the [src].</span>"
to_chat(user, "<span class='notice'>You decide not to [anchored ? "un" : ""]fasten \the [src].</span>")
else if(istype(W, /obj/item/weapon/reagent_containers/chem_disp_cartridge))
add_cartridge(W, user)
else if(istype(W, /obj/item/weapon/screwdriver))
else if(W.is_screwdriver())
var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges
if(!label) return
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label)
if(C)
user << "<span class='notice'>You remove \the [C] from \the [src].</span>"
to_chat(user, "<span class='notice'>You remove \the [C] from \the [src].</span>")
C.loc = loc
playsound(src, W.usesound, 50, 1)
else if(istype(W, /obj/item/weapon/reagent_containers/glass) || istype(W, /obj/item/weapon/reagent_containers/food))
if(container)
user << "<span class='warning'>There is already \a [container] on \the [src]!</span>"
to_chat(user, "<span class='warning'>There is already \a [container] on \the [src]!</span>")
return
var/obj/item/weapon/reagent_containers/RC = W
if(!accept_drinking && istype(RC,/obj/item/weapon/reagent_containers/food))
user << "<span class='warning'>This machine only accepts beakers!</span>"
to_chat(user, "<span class='warning'>This machine only accepts beakers!</span>")
return
if(!RC.is_open_container())
user << "<span class='warning'>You don't see how \the [src] could dispense reagents into \the [RC].</span>"
to_chat(user, "<span class='warning'>You don't see how \the [src] could dispense reagents into \the [RC].</span>")
return
container = RC
user.drop_from_inventory(RC)
RC.loc = src
user << "<span class='notice'>You set \the [RC] on \the [src].</span>"
nanomanager.update_uis(src) // update all UIs attached to src
to_chat(user, "<span class='notice'>You set \the [RC] on \the [src].</span>")
GLOB.nanomanager.update_uis(src) // update all UIs attached to src
else
return ..()
@@ -141,7 +141,7 @@
data["chemicals"] = chemicals
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "chem_disp.tmpl", ui_title, 390, 680)
ui.set_initial_data(data)
@@ -25,7 +25,7 @@
C.reagents.add_reagent(id, to_restore)
. = 1
if(.)
nanomanager.update_uis(src)
GLOB.nanomanager.update_uis(src)
/obj/machinery/chemical_dispenser
dispense_reagents = list(
@@ -201,6 +201,18 @@ Drinks Data
/datum/reagent/drink/nothing
glass_icon_state = "nothing"
/datum/reagent/drink/oilslick
glass_icon_state = "jar_oil"
glass_center_of_mass = list("x"=15, "y"=12)
/datum/reagent/drink/nuclearwaste
glass_icon_state = "jar_rad"
glass_center_of_mass = list("x"=15, "y"=12)
/datum/reagent/drink/sodaoil
glass_icon_state = "jar_water"
glass_center_of_mass = list("x"=15, "y"=12)
/datum/reagent/ethanol/absinthe
glass_icon_state = "absintheglass"
glass_center_of_mass = list("x"=16, "y"=5)
@@ -242,7 +254,11 @@ Drinks Data
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/sake
glass_icon_state = "ginvodkaglass"
glass_icon_state = "sakecup"
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/godsake
glass_icon_state = "sakeporcelain"
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/tequila
@@ -502,4 +518,27 @@ Drinks Data
/datum/reagent/ethanol/specialwhiskey
glass_icon_state = "whiskeyglass"
glass_center_of_mass = list("x"=16, "y"=12)
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/godka
glass_icon_state = "godkabottle"
glass_center_of_mass = list("x"=17, "y"=15)
/datum/reagent/ethanol/holywine
glass_icon_state = "holywineglass"
glass_center_of_mass = list("x"=15, "y"=7)
/datum/reagent/ethanol/holy_mary
glass_icon_state = "holymaryglass"
/datum/reagent/ethanol/angelswrath
glass_icon_state = "angelswrath"
glass_center_of_mass = list("x"=16, "y"=2)
/datum/reagent/ethanol/angelskiss
glass_icon_state = "angelskiss"
glass_center_of_mass = list("x"=16, "y"=8)
/datum/reagent/ethanol/ichor_mead
glass_icon_state = "ichor_meadglass"
glass_center_of_mass = list("x"=17, "y"=10)
@@ -123,7 +123,7 @@ var/global/ingredientLimit = 20
return new_name
/obj/item/weapon/reagent_containers/food/snacks/customizable/Destroy()
qdel_null_list(ingredients)
QDEL_NULL_LIST(ingredients)
return ..()
/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/drawTopping()
@@ -252,7 +252,7 @@
flags = OPENCONTAINER
unacidable = 0
/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob)
/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/item/D, mob/user as mob)
if(isprox(D))
user << "You add [D] to [src]."
qdel(D)
@@ -260,7 +260,7 @@
user.drop_from_inventory(src)
qdel(src)
return
else if(istype(D, /obj/item/weapon/wirecutters))
else if(D.is_wirecutter())
to_chat(user, "<span class='notice'>You cut a big hole in \the [src] with \the [D]. It's kinda useless as a bucket now.</span>")
user.put_in_hands(new /obj/item/clothing/head/helmet/bucket)
user.drop_from_inventory(src)
@@ -17,6 +17,7 @@
preserve_item = 1
var/filled = 0
var/list/filled_reagents = list()
var/hyposound // What sound do we play on use?
/obj/item/weapon/reagent_containers/hypospray/New()
..()
@@ -55,8 +56,9 @@
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
to_chat(user, "<span class='notice'>You inject [M] with \the [src].</span>")
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
playsound(src, 'sound/effects/hypospray.ogg',25)
if(hyposound)
playsound(src, hyposound,25)
if(M.reagents)
var/contained = reagentlist()
@@ -126,6 +128,7 @@
filled = 1
filled_reagents = list("inaprovaline" = 5)
preserve_item = 0
hyposound = 'sound/effects/hypospray.ogg'
/obj/item/weapon/reagent_containers/hypospray/autoinjector/on_reagent_change()
..()