/tg/ 4/14 (#367)

* outside code stuff

* defines, helpers, etc

* everything not module

* modules

* compiled fixes + missing sounds
This commit is contained in:
Poojawa
2017-04-14 23:28:04 -05:00
committed by GitHub
parent 884fb45516
commit 9e72b1b8fd
170 changed files with 4916 additions and 1221 deletions
@@ -23,7 +23,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
/datum/effect_system
var/number = 3
var/cardinals = 0
var/cardinals = FALSE
var/turf/location
var/atom/holder
var/effect_type
@@ -34,7 +34,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
location = null
return ..()
/datum/effect_system/proc/set_up(n = 3, c = 0, loca)
/datum/effect_system/proc/set_up(n = 3, c = FALSE, loca)
if(n > 10)
n = 10
number = n
@@ -5,6 +5,17 @@
// will always spawn at the items location.
/////////////////////////////////////////////
/proc/do_sparks(n, c, source)
// n - number of sparks
// c - cardinals, bool, do the sparks only move in cardinal directions?
// source - source of the sparks.
var/datum/effect_system/spark_spread/sparks = new
sparks.set_up(n, c, source)
sparks.start()
qdel(sparks)
/obj/effect/particle_effect/sparks
name = "sparks"
icon_state = "sparks"
+10
View File
@@ -210,6 +210,11 @@
icon_state = "smoke"
duration = 50
/obj/effect/overlay/temp/fire
icon = 'icons/effects/fire.dmi'
icon_state = "3"
duration = 20
/obj/effect/overlay/temp/cult
randomdir = 0
duration = 10
@@ -608,3 +613,8 @@
name = "Coconuts"
icon = 'icons/misc/beach.dmi'
icon_state = "coconuts"
/obj/effect/overlay/sparkles
name = "sparkles"
icon = 'icons/effects/effects.dmi'
icon_state = "shieldsparkles"
+11 -1
View File
@@ -1,5 +1,9 @@
GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi', "icon_state" = "fire"))
GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// if true, everyone item when created will have its name changed to be
// more... RPG-like.
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
@@ -99,14 +103,19 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
// non-clothing items
var/datum/dog_fashion/dog_fashion = null
var/datum/rpg_loot/rpg_loot = null
/obj/item/Initialize()
if (!materials)
materials = list()
..()
. = ..()
for(var/path in actions_types)
new path(src)
actions_types = null
if(GLOB.rpg_loot_items)
rpg_loot = new(src)
/obj/item/Destroy()
flags &= ~DROPDEL //prevent reqdels
if(ismob(loc))
@@ -114,6 +123,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
m.temporarilyRemoveItemFromInventory(src, TRUE)
for(var/X in actions)
qdel(X)
QDEL_NULL(rpg_loot)
return ..()
/obj/item/device
+1 -1
View File
@@ -86,7 +86,7 @@
name = "station charter for [station_name()]"
desc = "An official document entrusting the governance of \
[station_name()] and surrounding space to Captain [uname]."
feedback_set_details("station_renames","[station_name()]")
if(!unlimited_uses)
used = TRUE
+20 -1
View File
@@ -307,7 +307,7 @@
// Glowsticks, in the uncomfortable range of similar to flares,
// but not similar enough to make it worth a refactor
/obj/item/device/flashlight/glowstick
name = "green glowstick"
name = "glowstick"
desc = "A military-grade glowstick."
w_class = WEIGHT_CLASS_SMALL
brightness_on = 4
@@ -363,6 +363,11 @@
. = ..()
if(.)
user.visible_message("<span class='notice'>[user] cracks and shakes [src].</span>", "<span class='notice'>You crack and shake [src], turning it on!</span>")
activate()
/obj/item/device/flashlight/glowstick/proc/activate()
if(!on)
on = TRUE
START_PROCESSING(SSobj, src)
/obj/item/device/flashlight/glowstick/red
@@ -402,6 +407,20 @@
color = initial(glowtype.color)
. = ..()
/obj/item/device/flashlight/spotlight //invisible lighting source
name = "disco lighting"
icon_state = null
light_color = null
brightness_on = 0
light_range = 0
light_power = 10
alpha = 0
layer = 0
on = TRUE
anchored = TRUE
var/range = null
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/item/device/flashlight/flashdark
name = "flashdark"
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
+304 -99
View File
@@ -1,14 +1,14 @@
#define GLOW_MODE 3
#define LIGHT_MODE 2
#define REMOVE_MODE 1
/*
CONTAINS:
RCD
ARCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
obj/item/weapon/construction
opacity = 0
density = 0
anchored = 0
@@ -25,30 +25,114 @@ RCD
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/matter = 0
var/max_matter = 160
var/working = 0
var/max_matter = 100
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on the device blinks yellow.</span>"
/obj/item/weapon/construction/Initialize()
..()
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/construction/Destroy()
QDEL_NULL(spark_system)
. = ..()
/obj/item/weapon/construction/attackby(obj/item/weapon/W, mob/user, params)
if(iscyborg(user))
return
var/loaded = 0
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='warning'>The [src] can't hold any more matter-units!</span>")
return
qdel(W)
matter += R.ammoamt
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
loaded = 1
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
loaded = loadwithsheets(W, sheetmultiplier, user)
else if(istype(W, /obj/item/stack/sheet/plasteel))
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
if(loaded)
to_chat(user, "<span class='notice'>The [src] now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
else
return ..()
/obj/item/weapon/construction/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
if(maxsheets > 0)
var/amount_to_use = min(S.amount, maxsheets)
S.use(amount_to_use)
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
return 1
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
return 0
/obj/item/weapon/construction/proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
/obj/item/weapon/construction/attack_self(mob/user)
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(prob(20))
spark_system.start()
/obj/item/weapon/construction/proc/useResource(amount, mob/user)
if(matter < amount)
if(user)
to_chat(user, no_ammo_message)
return 0
matter -= amount
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/construction/proc/checkResource(amount, mob/user)
. = matter >= amount
if(!. && user)
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/construction/proc/range_check(atom/A, mob/user)
if(!(A in view(7, get_turf(user))))
to_chat(user, "<span class='warning'>The \'Out of Range\' light on the [src] blinks red.</span>")
return FALSE
/obj/item/weapon/construction/proc/prox_check(proximity)
if(!proximity)
return
/obj/item/weapon/construction/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
max_matter = 160
var/mode = 1
var/canRturf = 0
var/ranged = FALSE
var/airlock_type = /obj/machinery/door/airlock
var/window_type = /obj/structure/window/fulltile
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
var/list/conf_access = null
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
var/delay_mod = 1
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on \
the RCD blinks yellow.</span>"
/obj/item/weapon/rcd/suicide_act(mob/user)
/obj/item/weapon/construction/rcd/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
return (BRUTELOSS)
/obj/item/weapon/rcd/verb/toggle_window_type()
/obj/item/weapon/construction/rcd/verb/toggle_window_type()
set name = "Toggle Window Type"
set category = "Object"
set src in usr // What does this do?
@@ -64,7 +148,7 @@ RCD
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
/obj/item/weapon/rcd/verb/change_airlock_access()
/obj/item/weapon/construction/rcd/verb/change_airlock_access()
set name = "Change Airlock Access"
set category = "Object"
set src in usr
@@ -79,7 +163,6 @@ RCD
var/t1 = text("")
if(use_one_access)
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
else
@@ -114,7 +197,7 @@ RCD
popup.open()
onclose(usr, "airlock")
/obj/item/weapon/rcd/Topic(href, href_list)
/obj/item/weapon/construction/rcd/Topic(href, href_list)
..()
if (usr.stat || usr.restrained())
return
@@ -127,7 +210,7 @@ RCD
change_airlock_access()
/obj/item/weapon/rcd/proc/toggle_access(acc)
/obj/item/weapon/construction/rcd/proc/toggle_access(acc)
if (acc == "all")
conf_access = null
else if(acc == "one")
@@ -145,7 +228,7 @@ RCD
if (!conf_access.len)
conf_access = null
/obj/item/weapon/rcd/verb/change_airlock_setting()
/obj/item/weapon/construction/rcd/verb/change_airlock_setting()
set name = "Change Airlock Setting"
set category = "Object"
set src in usr
@@ -207,59 +290,16 @@ RCD
airlock_type = /obj/machinery/door/airlock
/obj/item/weapon/rcd/New()
/obj/item/weapon/construction/rcd/New()
..()
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
src.spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
GLOB.rcd_list += src
/obj/item/weapon/rcd/Destroy()
qdel(spark_system)
spark_system = null
/obj/item/weapon/construction/rcd/Destroy()
GLOB.rcd_list -= src
. = ..()
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
if(iscyborg(user)) //Make sure cyborgs can't load their RCDs
return
var/loaded = 0
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='warning'>The RCD can't hold any more matter-units!</span>")
return
qdel(W)
matter += R.ammoamt
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
loaded = 1
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
loaded = loadwithsheets(W, sheetmultiplier, user)
else if(istype(W, /obj/item/stack/sheet/plasteel))
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
if(loaded)
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
else
return ..()
/obj/item/weapon/rcd/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
if(maxsheets > 0)
var/amount_to_use = min(S.amount, maxsheets)
S.use(amount_to_use)
matter += value*amount_to_use
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>")
return 1
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!")
return 0
/obj/item/weapon/rcd/attack_self(mob/user)
//Change the mode
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
/obj/item/weapon/construction/rcd/attack_self(mob/user)
..()
switch(mode)
if(1)
mode = 2
@@ -274,16 +314,14 @@ RCD
mode = 1
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
if(prob(20))
src.spark_system.start()
/obj/item/weapon/rcd/proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
if(!proximity)
/obj/item/weapon/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
return TRUE
else
return FALSE
/obj/item/weapon/construction/rcd/afterattack(atom/A, mob/user, proximity)
prox_check()
var/list/rcd_results = A.rcd_vals(user, src)
if(!rcd_results)
return FALSE
@@ -295,40 +333,26 @@ RCD
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
return TRUE
/obj/item/weapon/rcd/proc/useResource(amount, mob/user)
if(matter < amount)
if(user)
to_chat(user, no_ammo_message)
return 0
matter -= amount
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(amount, mob/user)
. = matter >= amount
if(!. && user)
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/rcd/proc/detonate_pulse()
/obj/item/weapon/construction/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
/obj/item/weapon/construction/rcd/proc/detonate_pulse_explode()
explosion(src, 0, 0, 3, 1, flame_range = 1)
qdel(src)
/obj/item/weapon/rcd/borg/New()
/obj/item/weapon/construction/rcd/borg/New()
..()
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
desc = "A device used to rapidly build walls and floors."
canRturf = 1
/obj/item/weapon/rcd/borg/useResource(amount, mob/user)
/obj/item/weapon/construction/rcd/borg/useResource(amount, mob/user)
if(!iscyborg(user))
return 0
var/mob/living/silicon/robot/borgy = user
@@ -341,7 +365,7 @@ RCD
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
/obj/item/weapon/construction/rcd/borg/checkResource(amount, mob/user)
if(!iscyborg(user))
return 0
var/mob/living/silicon/robot/borgy = user
@@ -354,10 +378,10 @@ RCD
to_chat(user, no_ammo_message)
return .
/obj/item/weapon/rcd/loaded
/obj/item/weapon/construction/rcd/loaded
matter = 160
/obj/item/weapon/rcd/combat
/obj/item/weapon/construction/rcd/combat
name = "industrial RCD"
max_matter = 500
matter = 500
@@ -378,7 +402,188 @@ RCD
ammoamt = 160
/obj/item/weapon/rcd/admin
/obj/item/weapon/construction/rcd/admin
name = "admin RCD"
max_matter = INFINITY
matter = INFINITY
// Ranged RCD
/obj/item/weapon/construction/rcd/arcd
name = "advanced rapid-construction-device (ARCD)"
desc = "A prototype RCD with ranged capability and extended capacity"
max_matter = 300
matter = 300
delay_mod = 0.6
ranged = TRUE
icon_state = "arcd"
/obj/item/weapon/construction/rcd/arcd/afterattack(atom/A, mob/user)
range_check(A,user)
if(target_check(A,user))
user.Beam(A,icon_state="rped_upgrade",time=30)
..()
// RAPID LIGHTING DEVICE
/obj/item/weapon/construction/rld
name = "rapid-light-device (RLD)"
desc = "A device used to rapidly provide lighting sources to an area."
icon = 'icons/obj/tools.dmi'
icon_state = "rld-5"
matter = 200
max_matter = 200
var/mode = LIGHT_MODE
actions_types = list(/datum/action/item_action/pick_color)
var/wallcost = 10
var/floorcost = 15
var/launchcost = 5
var/deconcost = 10
var/walldelay = 10
var/floordelay = 10
var/decondelay = 15
var/color_choice = null
/obj/item/weapon/construction/rld/ui_action_click(mob/user, var/datum/action/A)
if(istype(A, /datum/action/item_action/pick_color))
color_choice = input(user,"Choose Color") as color
else
..()
/obj/item/weapon/construction/rld/update_icon()
icon_state = "rld-[round(matter/35)]"
..()
/obj/item/weapon/construction/rld/attack_self(mob/user)
..()
switch(mode)
if(REMOVE_MODE)
mode = LIGHT_MODE
to_chat(user, "<span class='notice'>You change RLD's mode to 'Permanent Light Construction'.</span>")
if(LIGHT_MODE)
mode = GLOW_MODE
to_chat(user, "<span class='notice'>You change RLD's mode to 'Light Launcher'.</span>")
if(GLOW_MODE)
mode = REMOVE_MODE
to_chat(user, "<span class='notice'>You change RLD's mode to 'Deconstruct'.</span>")
/obj/item/weapon/construction/rld/proc/checkdupes(var/target)
. = list()
var/turf/checking = get_turf(target)
for(var/obj/machinery/light/dupe in checking)
if(istype(dupe, /obj/machinery/light))
. |= dupe
/obj/item/weapon/construction/rld/afterattack(atom/A, mob/user)
range_check(A,user)
var/turf/start = get_turf(src)
switch(mode)
if(REMOVE_MODE)
if(istype(A, /obj/machinery/light/))
if(checkResource(deconcost, user))
to_chat(user, "<span class='notice'>You start deconstructing [A]...</span>")
user.Beam(A,icon_state="nzcrentrs_power",time=15)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, decondelay, target = A))
if(!useResource(deconcost, user))
return 0
activate()
qdel(A)
return TRUE
return FALSE
if(LIGHT_MODE)
if(iswallturf(A))
var/turf/closed/wall/W = A
if(checkResource(floorcost, user))
to_chat(user, "<span class='notice'>You start building a wall light...</span>")
user.Beam(A,icon_state="nzcrentrs_power",time=15)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 0)
if(do_after(user, floordelay, target = A))
if(!istype(W))
return FALSE
var/list/candidates = list()
var/turf/open/winner = null
var/winning_dist = null
for(var/direction in GLOB.cardinal)
var/turf/C = get_step(W, direction)
var/list/dupes = checkdupes(C)
if(start.CanAtmosPass(C) && !dupes.len)
candidates += C
if(!candidates.len)
to_chat(user, "<span class='warning'>Valid target not found...</span>")
playsound(src.loc, 'sound/misc/compiler-failure.ogg', 30, 1)
return FALSE
for(var/turf/open/O in candidates)
if(istype(O))
var/x0 = O.x
var/y0 = O.y
var/contender = cheap_hypotenuse(start.x, start.y, x0, y0)
if(!winner)
winner = O
winning_dist = contender
else
if(contender < winning_dist) // lower is better
winner = O
winning_dist = contender
activate()
if(!useResource(wallcost, user))
return FALSE
var/light = get_turf(winner)
var/align = get_dir(winner, A)
var/obj/machinery/light/L = new /obj/machinery/light(light)
L.dir = align
L.color = color_choice
L.light_color = L.color
return TRUE
return FALSE
if(isfloorturf(A))
var/turf/open/floor/F = A
if(checkResource(floorcost, user))
to_chat(user, "<span class='notice'>You start building a floor light...</span>")
user.Beam(A,icon_state="nzcrentrs_power",time=15)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 1)
if(do_after(user, floordelay, target = A))
if(!istype(F))
return 0
if(!useResource(floorcost, user))
return 0
activate()
var/destination = get_turf(A)
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
FL.color = color_choice
FL.light_color = FL.color
return TRUE
return FALSE
if(GLOW_MODE)
if(useResource(launchcost, user))
activate()
to_chat(user, "<span class='notice'>You fire a glowstick!</span>")
var/obj/item/device/flashlight/glowstick/G = new /obj/item/device/flashlight/glowstick(start)
G.color = color_choice
G.light_color = G.color
G.throw_at(A, 9, 3, user)
G.on = TRUE
G.update_brightness()
return TRUE
return FALSE
#undef GLOW_MODE
#undef LIGHT_MODE
#undef REMOVE_MODE
@@ -94,6 +94,9 @@
return 0
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
// Make it so the extinguisher doesn't spray yourself when you click your inventory items
if (target.loc == user)
return
//TODO; Add support for reagents in water.
if(refilling)
refilling = FALSE
+5 -10
View File
@@ -45,10 +45,7 @@
if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore()))
apply_cuffs(C,user)
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
if(istype(src, /obj/item/weapon/restraints/handcuffs/cable))
feedback_add_details("handcuffs","C")
else
feedback_add_details("handcuffs","H")
feedback_add_details("handcuffs","[type]")
add_logs(user, C, "handcuffed")
else
@@ -247,7 +244,7 @@
var/armed = 0
var/trap_damage = 20
/obj/item/weapon/restraints/legcuffs/beartrap/New()
/obj/item/weapon/restraints/legcuffs/beartrap/Initialize()
..()
icon_state = "[initial(icon_state)][armed]"
@@ -278,7 +275,7 @@
C.legcuffed = src
src.loc = C
C.update_inv_legcuffed()
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
feedback_add_details("handcuffs","[type]")
else if(isanimal(L))
var/mob/living/simple_animal/SA = L
if(SA.mob_size > MOB_SIZE_TINY)
@@ -307,9 +304,7 @@
/obj/item/weapon/restraints/legcuffs/beartrap/energy/proc/dissipate()
if(!istype(loc, /mob))
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
sparks.set_up(1, 1, src)
sparks.start()
do_sparks(1, TRUE, src)
qdel(src)
/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
@@ -341,7 +336,7 @@
C.legcuffed = src
src.loc = C
C.update_inv_legcuffed()
feedback_add_details("handcuffs","B")
feedback_add_details("handcuffs","[type]")
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
C.Weaken(weaken)
@@ -31,7 +31,7 @@
/obj/item/weapon/implant/explosive/activate(cause)
if(!cause || !imp_in || active)
return 0
if(cause == "action_button" || !popup)
if(cause == "action_button" && !popup)
popup = TRUE
var/response = alert(imp_in, "Are you sure you want to activate your [name]? This will cause you to explode!", "[name] Confirmation", "Yes", "No")
popup = FALSE
@@ -106,6 +106,8 @@
/obj/item/weapon/twohanded/equip_to_best_slot(mob/M)
if(..())
if(istype(src, /obj/item/weapon/twohanded/required))
return // unwield forces twohanded-required items to be dropped.
unwield(M)
return
+1 -1
View File
@@ -12,7 +12,7 @@
/obj/structure/Initialize()
if (!armor)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
..()
. = ..()
if(smooth)
queue_smooth(src)
queue_smooth_neighbors(src)
@@ -139,7 +139,7 @@
..()
for(var/i in 1 to 4)
new /obj/item/weapon/rcd_ammo(src)
new /obj/item/weapon/rcd(src)
new /obj/item/weapon/construction/rcd(src)
/obj/structure/closet/crate/science
name = "science crate"
+1 -1
View File
@@ -242,7 +242,7 @@
/obj/structure/displaycase/captain
alert = 1
start_showpiece_type = /obj/item/weapon/gun/energy/laser/captain
req_access = list(GLOB.access_captain)
req_access = list(GLOB.access_cent_specops)
/obj/structure/displaycase/labcage
name = "lab cage"
+2 -2
View File
@@ -396,7 +396,7 @@
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
qdel(src)
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_FLOORWALL)
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 8)
@@ -404,7 +404,7 @@
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 13)
return FALSE
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
var/turf/T = get_turf(src)
switch(passed_mode)
if(RCD_FLOORWALL)
+2 -2
View File
@@ -18,7 +18,7 @@
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
@@ -26,7 +26,7 @@
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 10)
return FALSE
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd, passed_mode)
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the grille.</span>")
+5 -3
View File
@@ -188,8 +188,10 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
if(locked)
return //don't let you cremate something twice or w/e
// Make sure we don't delete the actual morgue and its tray
var/list/conts = GetAllContents() - src - connected
if(contents.len <= 1)
if(conts.len <= 1)
audible_message("<span class='italics'>You hear a hollow crackle.</span>")
return
@@ -199,7 +201,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
locked = 1
update_icon()
for(var/mob/living/M in contents)
for(var/mob/living/M in conts)
if (M.stat != DEAD)
M.emote("scream")
if(user)
@@ -212,7 +214,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
M.ghostize()
qdel(M)
for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
for(var/obj/O in conts) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
if(O != connected) //Creamtorium does not burn hot enough to destroy the tray
qdel(O)
+2 -2
View File
@@ -57,13 +57,13 @@
if(rods)
debris += new /obj/item/stack/rods(src, rods)
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
return FALSE
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd)
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
to_chat(user, "<span class='notice'>You deconstruct the window.</span>")