mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
for-God-has-redeemed-us-all
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user