mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
@@ -14,14 +14,12 @@
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
if(!isliving(AM))
|
||||
return
|
||||
if(isanimal(AM))
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
if(faction && (faction in SA.faction))
|
||||
return
|
||||
if(!SA.flying)
|
||||
triggermine(SA)
|
||||
else
|
||||
triggermine(AM)
|
||||
var/mob/living/M = AM
|
||||
if(faction && (faction in M.faction))
|
||||
return
|
||||
if(M.flying)
|
||||
return
|
||||
triggermine(M)
|
||||
|
||||
/obj/effect/mine/proc/triggermine(mob/living/victim)
|
||||
if(triggered)
|
||||
@@ -34,6 +32,11 @@
|
||||
triggered = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/ex_act(severity)
|
||||
// Necessary because, as effects, they have infinite health, and wouldn't be destroyed otherwise.
|
||||
// Also, they're pressure-sensitive mines, it makes sense that an explosion (wave of pressure) triggers/destroys them.
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/explosive
|
||||
name = "explosive mine"
|
||||
var/range_devastation = 0
|
||||
|
||||
@@ -264,6 +264,7 @@
|
||||
|
||||
/obj/effect/spawner/random_spawners/syndicate/loot/level4
|
||||
name = "armory loot"
|
||||
spawn_inside = /obj/structure/closet/secure_closet/syndicate/depot/armory
|
||||
// Loot schema: high-power weapons (m90, esword, ebow, revolver), devices that negate depot challenges (thermal glasses, chameleon device), explosives
|
||||
result = list(/obj/item/gun/projectile/automatic/c20r = 1,
|
||||
/obj/item/gun/projectile/automatic/m90 = 1,
|
||||
@@ -299,10 +300,9 @@
|
||||
/obj/structure/falsewall/reinforced = 1)
|
||||
|
||||
/obj/effect/spawner/random_spawners/syndicate/layout/door/vault
|
||||
name = "60pc vaultdoor 20pc falsewall 20pc wall"
|
||||
result = list(/obj/machinery/door/airlock/hatch/syndicate/vault = 6,
|
||||
/turf/simulated/wall/r_wall = 2,
|
||||
/obj/structure/falsewall/reinforced = 2)
|
||||
name = "80pc vaultdoor 20pc wall"
|
||||
result = list(/obj/machinery/door/airlock/hatch/syndicate/vault = 4,
|
||||
/turf/simulated/wall/r_wall = 1)
|
||||
|
||||
|
||||
/obj/effect/spawner/random_spawners/syndicate/layout/spacepod
|
||||
|
||||
@@ -192,7 +192,27 @@ var/list/pipemenu = list(
|
||||
return
|
||||
if(world.time < lastused + spawndelay)
|
||||
return
|
||||
target.rpd_act(user, src) //Handle RPD effects in separate procs
|
||||
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
if(target != T)
|
||||
// We only check the rpd_act of the target if it isn't the turf, because otherwise
|
||||
// (A) blocked turfs can be acted on, and (B) unblocked turfs get acted on twice.
|
||||
if(target.rpd_act(user, src) == TRUE)
|
||||
// If the object we are clicking on has a valid RPD interaction for just that specific object, do that and nothing else.
|
||||
// Example: clicking on a pipe with a RPD in rotate mode should rotate that pipe and ignore everything else on the tile.
|
||||
return
|
||||
|
||||
// If we get this far, we have to check every object in the tile, to make sure that none of them block RPD usage on this tile.
|
||||
// This is done by calling rpd_blocksusage on every /obj in the tile. If any block usage, fail at this point.
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.rpd_blocksusage() == TRUE)
|
||||
to_chat(user, "<span class='warning'>[O] blocks the [src]!</span>")
|
||||
return
|
||||
|
||||
// If we get here, then we're effectively acting on the turf, probably placing a pipe.
|
||||
T.rpd_act(user, src)
|
||||
|
||||
#undef RPD_COOLDOWN_TIME
|
||||
#undef RPD_WALLBUILD_TIME
|
||||
|
||||
@@ -71,10 +71,6 @@
|
||||
SSnanoui.close_uis(src)
|
||||
return ..()
|
||||
|
||||
/obj/rpd_act(mob/user, obj/item/rpd/our_rpd)
|
||||
var/turf/T = get_turf(src) //This preserves RPD behaviour on specific turfs
|
||||
T.rpd_act(user, our_rpd)
|
||||
|
||||
/obj/proc/process()
|
||||
set waitfor = 0
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
anchored = 1
|
||||
health = 200
|
||||
req_access = list()
|
||||
var/is_armory = FALSE
|
||||
var/ignore_use = FALSE
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/New()
|
||||
@@ -26,9 +28,12 @@
|
||||
. = ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/proc/loot_pickup()
|
||||
var/area/syndicate_depot/core/depotarea = areaMaster
|
||||
if(depotarea)
|
||||
depotarea.locker_looted()
|
||||
if(!ignore_use)
|
||||
var/area/syndicate_depot/core/depotarea = areaMaster
|
||||
if(istype(depotarea))
|
||||
depotarea.locker_looted()
|
||||
if(is_armory)
|
||||
depotarea.armory_locker_looted()
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/attack_animal(mob/M)
|
||||
if(isanimal(M) && "syndicate" in M.faction)
|
||||
@@ -36,10 +41,26 @@
|
||||
return
|
||||
return ..(M)
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
to_chat(user, "<span class='warning'>Bluespace interference prevents the [W] from locking onto [src]!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/togglelock(mob/user)
|
||||
. = ..()
|
||||
if(!locked)
|
||||
loot_pickup()
|
||||
loot_pickup()
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
ignore_use = TRUE
|
||||
toggle(user)
|
||||
ignore_use = FALSE
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/armory
|
||||
req_access = list(access_syndicate)
|
||||
is_armory = TRUE
|
||||
@@ -7,15 +7,24 @@
|
||||
anchored = 1
|
||||
max_integrity = 50
|
||||
var/area/syndicate_depot/core/depotarea
|
||||
var/has_overloaded = FALSE
|
||||
|
||||
/obj/structure/fusionreactor/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
depotarea = areaMaster
|
||||
if(depotarea)
|
||||
if(istype(depotarea))
|
||||
depotarea.reactor = src
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/fusionreactor/LateInitialize()
|
||||
for(var/obj/machinery/porta_turret/syndicate/T in range(50, loc))
|
||||
if(!istype(T.depotarea))
|
||||
T.depotarea = depotarea
|
||||
|
||||
/obj/structure/fusionreactor/Destroy()
|
||||
if(depotarea)
|
||||
if(istype(depotarea))
|
||||
if(!has_overloaded)
|
||||
overload(TRUE, TRUE)
|
||||
depotarea.reactor = null
|
||||
..()
|
||||
|
||||
@@ -30,7 +39,7 @@
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/fusionreactor/proc/healthcheck()
|
||||
if(obj_integrity <= 0)
|
||||
if(obj_integrity <= 0 && istype(depotarea))
|
||||
overload(TRUE)
|
||||
|
||||
/obj/structure/fusionreactor/attackby(obj/item/I, mob/user, params)
|
||||
@@ -47,13 +56,20 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/fusionreactor/proc/overload(containment_failure)
|
||||
/obj/structure/fusionreactor/proc/overload(containment_failure = FALSE, skip_qdel = FALSE)
|
||||
if(has_overloaded)
|
||||
return
|
||||
has_overloaded = TRUE
|
||||
if(istype(depotarea) && !depotarea.used_self_destruct)
|
||||
depotarea.activate_self_destruct("Fusion reactor cracked open. Core loose!", TRUE)
|
||||
var/obj/effect/overload/O = new /obj/effect/overload(get_turf(src))
|
||||
if(containment_failure)
|
||||
playsound(loc, 'sound/machines/Alarm.ogg', 100, 0, 0)
|
||||
O.deliberate = TRUE
|
||||
O.max_cycles = 6
|
||||
qdel(src)
|
||||
if(!skip_qdel)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/overload
|
||||
icon = 'icons/obj/tesla_engine/energy_ball.dmi'
|
||||
|
||||
Reference in New Issue
Block a user