mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into HereWeGoAgain
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0)
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = 0
|
||||
var/welded = 0
|
||||
var/locked = 0
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/lastbang
|
||||
@@ -34,19 +34,20 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0 || wall_mounted) return 1
|
||||
if(height==0 || wall_mounted)
|
||||
return TRUE
|
||||
return (!density)
|
||||
|
||||
/obj/structure/closet/proc/can_open()
|
||||
if(welded)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/can_close()
|
||||
for(var/obj/structure/closet/closet in get_turf(src))
|
||||
if(closet != src && closet.anchored != 1)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -59,27 +60,27 @@
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(opened)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!can_open())
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
dump_contents()
|
||||
|
||||
icon_state = icon_opened
|
||||
opened = 1
|
||||
opened = TRUE
|
||||
if(sound)
|
||||
playsound(loc, sound, 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 0
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/close()
|
||||
if(!opened)
|
||||
return 0
|
||||
return FALSE
|
||||
if(!can_close())
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/itemcount = 0
|
||||
|
||||
@@ -109,13 +110,13 @@
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
opened = 0
|
||||
opened = FALSE
|
||||
if(sound)
|
||||
playsound(loc, sound, 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 1
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user)
|
||||
if(!(opened ? close() : open()))
|
||||
@@ -246,7 +247,7 @@
|
||||
if(istype(W, /obj/item/grab))
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return 0
|
||||
return FALSE
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
@@ -264,7 +265,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
new material_drop(T, material_drop_amount)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
@@ -371,8 +372,9 @@
|
||||
// should be independently resolved, but this is also an interesting twist.
|
||||
/obj/structure/closet/Exit(atom/movable/AM)
|
||||
open()
|
||||
if(AM.loc == src) return 0
|
||||
return 1
|
||||
if(AM.loc == src)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/container_resist(var/mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
@@ -404,7 +406,7 @@
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
welded = 0
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='warning'>You successfully break out!</span>")
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
var/temp_check = exposed_temperature
|
||||
if(temp_check >= GIRDER_MELTING_TEMP)
|
||||
take_damage(10)
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(isscrewdriver(I))
|
||||
user.visible_message("<span class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
@@ -80,6 +81,7 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(islarva(user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
@@ -91,6 +93,7 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!isanimal(user))
|
||||
return
|
||||
var/mob/living/simple_animal/M = user
|
||||
@@ -105,6 +108,7 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_slime(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/mob/living/carbon/slime/S = user
|
||||
if(!S.is_adult)
|
||||
return
|
||||
@@ -125,4 +129,4 @@
|
||||
/obj/item/mounted/mirror/do_build(turf/on_wall, mob/user)
|
||||
var/obj/structure/mirror/M = new /obj/structure/mirror(get_turf(user), get_dir(on_wall, user), 1)
|
||||
transfer_prints_to(M, TRUE)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user