for-God-has-redeemed-us-all

This commit is contained in:
Fox McCloud
2019-09-30 16:49:15 -04:00
parent 2224229fad
commit a469d0fcf2
53 changed files with 485 additions and 406 deletions
+10
View File
@@ -787,3 +787,13 @@ BLIND // can't see anything
/obj/item/clothing/under/AltClick()
handle_accessories_removal()
/obj/item/clothing/obj_destruction(damage_flag)
if(damage_flag == "bomb" || damage_flag == "melee")
var/turf/T = get_turf(src)
spawn(1) //so the shred survives potential turf change from the explosion.
var/obj/effect/decal/cleanable/shreds/Shreds = new(T)
Shreds.desc = "The sad remains of what used to be [name]."
deconstruct(FALSE)
else
..()
@@ -248,3 +248,8 @@
var/datum/browser/popup = new(user, "cream_master","Cream-Master Deluxe", 700, 400, src)
popup.set_content(dat)
popup.open()
/obj/machinery/icemachine/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 4)
qdel(src)
@@ -214,6 +214,12 @@ var/list/ingredients_source = list(
usr << browse(null,"window=icecreamvat")
return
/obj/machinery/icecream_vat/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 4)
qdel(src)
/obj/item/reagent_containers/food/snacks/icecream
name = "ice cream cone"
desc = "Delicious waffle cone, but no ice cream."
+5 -3
View File
@@ -145,9 +145,11 @@
log_game("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x],[user.y],[user.z]).")
prime()
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/burn()
prime()
..()
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/deconstruct(disassembled = TRUE)
if(!disassembled)
prime()
if(!QDELETED(src))
qdel(src)
/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/ex_act(severity)
qdel(src) //Ensuring that it's deleted by its own explosion. Also prevents mass chain reaction with piles of cherry bombs
+4 -33
View File
@@ -61,7 +61,7 @@
"<span class='notice'>You disassemble \the [src].</span>")
busy = 0
density = 0
qdel(src)
deconstruct(TRUE)
else
busy = 0
return 1
@@ -71,15 +71,6 @@
name = ("bookcase ([sanitize(newname)])")
return 1
else
switch(O.damtype)
if("fire")
health -= O.force * 1
if("brute")
health -= O.force * 0.75
else
if(health <= 0)
visible_message("<span class='warning'>The bookcase is smashed apart!</span>")
qdel(src)
return ..()
/obj/structure/bookcase/attack_hand(var/mob/user as mob)
@@ -94,32 +85,12 @@
choice.forceMove(get_turf(src))
update_icon()
/obj/structure/bookcase/ex_act(severity)
switch(severity)
if(1.0)
for(var/obj/item/I in contents)
qdel(I)
qdel(src)
return
if(2.0)
for(var/obj/item/I in contents)
if(prob(50))
qdel(I)
qdel(src)
return
if(3.0)
if(prob(50))
qdel(src)
return
return
/obj/structure/bookcase/Destroy()
for(var/i in 1 to 5)
new /obj/item/stack/sheet/wood(get_turf(src))
/obj/structure/bookcase/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/wood(loc, 5)
for(var/obj/item/I in contents)
if(is_type_in_list(I, allowed_books))
I.forceMove(get_turf(src))
return ..()
qdel(src)
/obj/structure/bookcase/update_icon()
if(contents.len < 5)
+8 -1
View File
@@ -202,8 +202,15 @@
return 1
return ..()
/obj/structure/closet/crate/secure/loot/emag_act(mob/user)
if(locked)
boom(user)
/obj/structure/closet/crate/secure/loot/togglelock(mob/user)
if(locked)
boom(user)
else
..()
..()
/obj/structure/closet/crate/secure/loot/deconstruct(disassembled = TRUE)
boom()
@@ -86,7 +86,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
update_icon()
/obj/structure/marker_beacon/deconstruct(disassembled = TRUE)
if(can_deconstruct)
if(!(flags & NODECONSTRUCT))
var/obj/item/stack/marker_beacon/M = new(loc)
M.picked_color = picked_color
M.update_icon()
@@ -271,8 +271,9 @@
return !arbitraryatmosblockingvar
/obj/structure/fans/deconstruct()
if(buildstacktype)
new buildstacktype(loc, buildstackamount)
if(!(flags & NODECONSTRUCT))
if(buildstacktype)
new buildstacktype(loc, buildstackamount)
qdel(src)
/obj/structure/fans/attackby(obj/item/W, mob/user, params)
+1 -5
View File
@@ -63,10 +63,6 @@
to_chat(usr, "<span class='notice'>You empty the box.</span>")
updateUsrDialog()
obj/structure/ore_box/ex_act(severity, target)
if(prob(100 / severity) && severity < 3)
qdel(src) //nothing but ores can get inside unless its a bug and ores just return nothing on ex_act, not point in calling it on them
/obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user)
var/obj/item/stack/sheet/wood/W = new (loc, 4)
if(user)
@@ -84,7 +80,7 @@ obj/structure/ore_box/ex_act(severity, target)
CHECK_TICK
/obj/structure/ore_box/onTransitZ()
return
return
/obj/structure/ore_box/verb/empty_box()
set name = "Empty Ore Box"
+6
View File
@@ -53,6 +53,12 @@
else
to_chat(user, "<span class='notice'>You can't put [P] in [src]!</span>")
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 2)
for(var/obj/item/I in src)
I.forceMove(loc)
qdel(src)
/obj/structure/filingcabinet/attack_hand(mob/user as mob)
if(contents.len <= 0)
+14
View File
@@ -660,6 +660,20 @@
return 0
. = ..()
/obj/machinery/power/apc/obj_break(damage_flag)
if(!(flags & NODECONSTRUCT))
set_broken()
/obj/machinery/power/apc/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!(stat & BROKEN))
set_broken()
if(opened != 2)
opened = 2
coverlocked = FALSE
visible_message("<span class='warning'>The APC cover is knocked down!</span>")
update_icon()
/obj/machinery/power/apc/emag_act(user as mob)
if(!(emagged || malfhack)) // trying to unlock with an emag card
if(opened)
+6 -17
View File
@@ -79,11 +79,12 @@ By design, d1 is the smallest direction and d2 is the highest
return ..() // then go ahead and delete the cable
/obj/structure/cable/deconstruct(disassembled = TRUE)
var/turf/T = get_turf(src)
if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long
new/obj/item/stack/cable_coil(T, 2, paramcolor = color)
else
new/obj/item/stack/cable_coil(T, 1, paramcolor = color)
if(!(flags & NODECONSTRUCT))
var/turf/T = get_turf(src)
if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long
new/obj/item/stack/cable_coil(T, 2, paramcolor = color)
else
new/obj/item/stack/cable_coil(T, 1, paramcolor = color)
qdel(src)
///////////////////////////////////
@@ -218,18 +219,6 @@ By design, d1 is the smallest direction and d2 is the highest
if(current_size >= STAGE_FIVE)
deconstruct()
//explosion handling
/obj/structure/cable/ex_act(severity)
switch(severity)
if(1)
qdel(src) // qdel
if(2)
if(prob(50))
deconstruct()
if(3)
if(prob(25))
deconstruct()
obj/structure/cable/proc/cable_color(var/colorC)
if(colorC)
if(colorC == "rainbow")
+57 -46
View File
@@ -114,10 +114,15 @@
else
return ..()
/obj/structure/light_construct/blob_act(obj/structure/blob/B)
/obj/machinery/light_construct/blob_act(obj/structure/blob/B)
if(B && B.loc == loc)
qdel(src)
/obj/machinery/light_construct/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, sheets_refunded)
qdel(src)
/obj/machinery/light_construct/small
name = "small light fixture frame"
desc = "A small light fixture under construction."
@@ -372,21 +377,7 @@
playsound(src.loc, W.usesound, 75, 1)
user.visible_message("[user.name] opens [src]'s casing.", \
"You open [src]'s casing.", "You hear a noise.")
var/obj/machinery/light_construct/newlight = null
switch(fitting)
if("tube")
newlight = new /obj/machinery/light_construct(src.loc)
newlight.icon_state = "tube-construct-stage2"
if("bulb")
newlight = new /obj/machinery/light_construct/small(src.loc)
newlight.icon_state = "bulb-construct-stage2"
newlight.dir = src.dir
newlight.stage = 2
newlight.fingerprints = src.fingerprints
newlight.fingerprintshidden = src.fingerprintshidden
newlight.fingerprintslast = src.fingerprintslast
qdel(src)
deconstruct()
return
to_chat(user, "You stick \the [W] into the light socket!")
@@ -397,6 +388,38 @@
else
return ..()
/obj/machinery/light/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
var/obj/machinery/light_construct/newlight = null
var/cur_stage = 2
if(!disassembled)
cur_stage = 1
switch(fitting)
if("tube")
newlight = new /obj/machinery/light_construct(src.loc)
newlight.icon_state = "tube-construct-stage2"
if("bulb")
newlight = new /obj/machinery/light_construct/small(src.loc)
newlight.icon_state = "bulb-construct-stage2"
newlight.setDir(src.dir)
newlight.stage = cur_stage
if(!disassembled)
newlight.obj_integrity = newlight.max_integrity * 0.5
if(status != LIGHT_BROKEN)
break_light_tube()
if(status != LIGHT_EMPTY)
drop_light_tube()
new /obj/item/stack/cable_coil(loc, 1, "red")
transfer_fingerprints_to(newlight)
qdel(src)
/obj/machinery/light/attacked_by(obj/item/I, mob/living/user)
..()
if(status == LIGHT_BROKEN || status == LIGHT_EMPTY)
if(on && (I.flags & CONDUCT))
if(prob(12))
electrocute_mob(user, get_area(src), src, 0.3, TRUE)
/obj/machinery/light/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
@@ -483,38 +506,12 @@
return
else
to_chat(user, "You remove the light [fitting].")
// create a light tube/bulb item and put it in the user's hand
var/obj/item/light/L = new light_type(get_turf(user))
L.status = status
L.rigged = rigged
L.brightness_range = brightness_range
L.brightness_power = brightness_power
L.brightness_color = brightness_color
L.materials = lightmaterials
// light item inherits the switchcount, then zero it
L.switchcount = switchcount
switchcount = 0
L.update()
L.add_fingerprint(user)
user.put_in_hands(L) //puts it in our active hand
status = LIGHT_EMPTY
update()
drop_light_tube(user)
// break the light and make sparks if was on
/obj/machinery/light/attack_tk(mob/user)
if(status == LIGHT_EMPTY)
to_chat(user, "There is no [fitting] in this light.")
return
to_chat(user, "You telekinetically remove the light [fitting].")
// create a light tube/bulb item and put it in the user's hand
/obj/machinery/light/proc/drop_light_tube(mob/user)
var/obj/item/light/L = new light_type()
L.status = status
L.rigged = rigged
@@ -528,11 +525,25 @@
switchcount = 0
L.update()
L.add_fingerprint(user)
L.loc = loc
L.forceMove(loc)
if(user) //puts it in our active hand
L.add_fingerprint(user)
user.put_in_active_hand(L)
status = LIGHT_EMPTY
update()
return L
/obj/machinery/light/attack_tk(mob/user)
if(status == LIGHT_EMPTY)
to_chat(user, "There is no [fitting] in this light.")
return
to_chat(user, "You telekinetically remove the light [fitting].")
// create a light tube/bulb item and put it in the user's hand
var/obj/item/light/L = drop_light_tube()
L.attack_tk(user)
/obj/machinery/light/proc/break_light_tube(skip_sound_and_sparks = 0, overloaded = 0)
if(status == LIGHT_EMPTY || status == LIGHT_BROKEN)
@@ -142,6 +142,10 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
..()
return
/obj/structure/particle_accelerator/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
/obj/structure/particle_accelerator/Move()
. = ..()
@@ -149,20 +153,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
master.toggle_power()
investigate_log("was moved whilst active; it <font color='red'>powered down</font>.","singulo")
/obj/structure/particle_accelerator/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50))
qdel(src)
return
if(3.0)
if(prob(25))
qdel(src)
/obj/machinery/particle_accelerator/control_box/blob_act(obj/structure/blob/B)
if(prob(50))
qdel(src)
+21 -22
View File
@@ -55,24 +55,15 @@
/obj/machinery/power/solar/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/crowbar))
if(iscrowbar(W))
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar panel.", "<span class='notice'>You begin to take the glass off the solar panel...</span>")
if(do_after(user, 50 * W.toolspeed, target = src))
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.loc = src.loc
S.give_glass()
playsound(src.loc, W.usesound, 50, 1)
user.visible_message("[user] takes the glass off the solar panel.", "<span class='notice'>You take the glass off the solar panel.</span>")
qdel(src)
deconstruct(TRUE)
return
else if(W)
src.add_fingerprint(user)
src.health -= W.force
src.healthcheck()
..()
return ..()
/obj/machinery/power/solar/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
@@ -84,17 +75,25 @@
if(BURN)
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
/obj/machinery/power/solar/proc/healthcheck()
if(src.health <= 0)
if(!(stat & BROKEN))
broken()
else
new /obj/item/shard(src.loc)
new /obj/item/shard(src.loc)
qdel(src)
return
return
/obj/machinery/power/solar/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
stat |= BROKEN
unset_control()
update_icon()
/obj/machinery/power/solar/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.forceMove(loc)
S.give_glass(stat & BROKEN)
else
playsound(src, "shatter", 70, TRUE)
new /obj/item/shard(src.loc)
new /obj/item/shard(src.loc)
qdel(src)
/obj/machinery/power/solar/update_icon()
..()
+22 -8
View File
@@ -58,20 +58,34 @@
control.cdir = angle
/obj/machinery/power/tracker/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/crowbar))
if(iscrowbar(W))
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] begins to take the glass off the solar tracker.</span>")
if(do_after(user, 50 * W.toolspeed, target = src))
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.loc = src.loc
S.give_glass()
playsound(src.loc, W.usesound, 50, 1)
user.visible_message("<span class='notice'>[user] takes the glass off the tracker.</span>")
qdel(src) // qdel
deconstruct(TRUE)
return
..()
return ..()
/obj/machinery/power/tracker/obj_break(damage_flag)
if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE)
stat |= BROKEN
unset_control()
/obj/machinery/power/solar/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(disassembled)
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.forceMove(loc)
S.give_glass(stat & BROKEN)
else
playsound(src, "shatter", 70, TRUE)
new /obj/item/shard(src.loc)
new /obj/item/shard(src.loc)
qdel(src)
// Tracker Electronic
+5 -9
View File
@@ -40,16 +40,12 @@
chem_splash(loc, 5, list(reagents))
qdel(src)
/obj/structure/reagent_dispensers/ex_act(severity)
switch(severity)
if(1)
/obj/structure/reagent_dispensers/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
if(!disassembled)
boom()
if(2)
if(prob(50))
boom()
if(3)
if(prob(5))
boom()
else
qdel(src)
//Dispensers
/obj/structure/reagent_dispensers/watertank