mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into depot
This commit is contained in:
@@ -33,9 +33,6 @@
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0 || wall_mounted) return 1
|
||||
return (!density)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/curtain/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth(loc, 2)
|
||||
new /obj/item/stack/sheet/plastic(loc, 2)
|
||||
new /obj/item/stack/rods(loc, 1)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
var/health = 200
|
||||
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
||||
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
||||
var/can_deconstruct = TRUE
|
||||
|
||||
/obj/structure/girder/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -42,7 +41,7 @@
|
||||
take_damage(rand(25, 75))
|
||||
return
|
||||
|
||||
/obj/structure/girder/proc/take_damage(amount)
|
||||
/obj/structure/girder/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
@@ -369,7 +368,7 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/girder/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
level = 3
|
||||
var/health = 10
|
||||
var/broken = 0
|
||||
var/can_deconstruct = TRUE
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
@@ -243,7 +242,17 @@
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, 1)
|
||||
|
||||
/obj/structure/grille/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(can_deconstruct)
|
||||
@@ -258,20 +267,10 @@
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
if(sound_effect)
|
||||
play_attack_sound(damage_amount, damage_type, damage_flag)
|
||||
health -= damage_amount
|
||||
if(health <= 0)
|
||||
if(!broken)
|
||||
obj_break()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
/obj/structure/mineral_door/attack_animal(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
@@ -68,11 +68,11 @@
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
if(isSwitchingStates)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
@@ -101,7 +101,7 @@
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
|
||||
if(close_delay != -1)
|
||||
spawn(close_delay)
|
||||
Close()
|
||||
@@ -157,7 +157,7 @@
|
||||
if(hardness <= 0)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/mineral_door/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(sheetType)
|
||||
if(disassembled)
|
||||
|
||||
@@ -92,10 +92,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/alter_health()
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
@@ -290,10 +286,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/alter_health()
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
if(cremating)
|
||||
to_chat(usr, "<span class='warning'>It's locked.</span>")
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/obj/structure/plasticflaps
|
||||
name = "plastic flaps"
|
||||
desc = "Completely impassable - or are they?"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone,
|
||||
/mob/living/simple_animal/bot/mulebot
|
||||
)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(PLASTIC_FLAPS_NORMAL)
|
||||
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 180*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
else if(iswelder(W))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(loc)
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/stool/bed/B = A
|
||||
if(istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/closet/cardboard))
|
||||
var/obj/structure/closet/cardboard/C = A
|
||||
if(C.move_delay)
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
|
||||
if(istype(caller, /mob/living))
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(caller, mob_type))
|
||||
return 1
|
||||
|
||||
var/mob/living/M = caller
|
||||
if(!M.ventcrawler && M.mob_size > MOB_SIZE_SMALL)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
new /obj/item/stack/sheet/plastic/five(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
/obj/structure/plasticflaps/mining/initialize()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/Destroy()
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/CanAtmosPass(turf/T)
|
||||
return 0
|
||||
Reference in New Issue
Block a user