Merge remote-tracking branch 'upstream/master' into bnuuy

This commit is contained in:
hal9000PR
2021-10-26 19:53:15 +01:00
798 changed files with 24230 additions and 25764 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
max_integrity = 100
/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
if(damage_flag == MELEE)
switch(damage_type)
if(BRUTE)
damage_amount *= 0.25
+1 -1
View File
@@ -6,7 +6,7 @@
req_access = list(ACCESS_BAR)
max_integrity = 500
integrity_failure = 250
armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
armor = list(MELEE = 20, BULLET = 20, LASER = 20, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
var/list/barsigns=list()
var/list/hiddensigns
var/state = 0
@@ -6,7 +6,7 @@
density = 1
max_integrity = 200
integrity_failure = 50
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
armor = list(MELEE = 20, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 70, ACID = 60)
var/icon_closed = "closed"
var/icon_opened = "open"
var/opened = FALSE
@@ -75,7 +75,7 @@
if(istype(W, /obj/item/pen))
var/decalselection = input("Please select a decal") as null|anything in list("Atmospherics", "Bartender", "Barber", "Blueshield", "Brig Physician", "Captain",
"Cargo", "Chief Engineer", "Chaplain", "Chef", "Chemist", "Civilian", "Clown", "CMO", "Coroner", "Detective", "Engineering", "Genetics", "HOP",
"HOS", "Hydroponics", "Internal Affairs Agent", "Janitor", "Magistrate", "Mechanic", "Medical", "Mime", "Mining", "NT Representative", "Paramedic", "Pod Pilot",
"HOS", "Hydroponics", "Internal Affairs Agent", "Janitor", "Magistrate", "Medical", "Mime", "Mining", "NT Representative", "Paramedic",
"Prisoner", "Research Director", "Security", "Syndicate", "Therapist", "Virology", "Warden", "Xenobiology")
if(!decalselection)
return
@@ -2,19 +2,23 @@
/obj/structure/closet/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
var/obj/item/twohanded/fireaxe/fireaxe = new/obj/item/twohanded/fireaxe
var/obj/item/twohanded/fireaxe/fireaxe
icon_state = "fireaxe1000"
icon_closed = "fireaxe1000"
icon_opened = "fireaxe1100"
anchored = TRUE
density = FALSE
armor = list("melee" = 50, "bullet" = 20, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50)
armor = list(MELEE = 50, BULLET = 20, LASER = 0, ENERGY = 100, BOMB = 10, BIO = 100, RAD = 100, FIRE = 90, ACID = 50)
var/localopened = FALSE //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
opened = TRUE
var/hitstaken = FALSE
locked = TRUE
var/smashed = FALSE
/obj/structure/closet/fireaxecabinet/populate_contents()
fireaxe = new/obj/item/twohanded/fireaxe(src)
update_icon() // So its initial icon doesn't show it without the fireaxe
/obj/structure/closet/fireaxecabinet/examine(mob/user)
. = ..()
. += "<span class='notice'>Use a multitool to lock/unlock it.</span>"
@@ -182,7 +182,7 @@
new /obj/item/clothing/shoes/brown (src)
new /obj/item/radio/headset/heads/cmo(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/defibrillator/compact/loaded(src)
new /obj/item/defibrillator/compact/advanced/loaded(src)
new /obj/item/handheld_defibrillator(src)
new /obj/item/storage/belt/medical(src)
new /obj/item/flash(src)
@@ -9,7 +9,7 @@
broken = 0
can_be_emaged = TRUE
max_integrity = 250
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
armor = list(MELEE = 30, BULLET = 50, LASER = 50, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 80)
damage_deflection = 20
icon_closed = "secure"
var/icon_locked = "secure1"
@@ -51,10 +51,6 @@
if("delete")
qdel(src)
//If you want to re-add fire, just add "fire" = 15 to the pick list.
/*if("fire")
new /obj/structure/closet/firecloset(src.loc)
qdel(src)*/
/obj/structure/closet/emcloset/legacy/populate_contents()
new /obj/item/tank/internals/oxygen(src)
@@ -169,7 +169,7 @@
var/sparks = "securecratesparks"
var/emag = "securecrateemag"
max_integrity = 500
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
armor = list(MELEE = 30, BULLET = 50, LASER = 50, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 80)
damage_deflection = 25
var/tamperproof = FALSE
broken = FALSE
+1 -1
View File
@@ -6,7 +6,7 @@
density = TRUE
anchored = TRUE
resistance_flags = ACID_PROOF
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
armor = list(MELEE = 30, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 0, RAD = 0, FIRE = 70, ACID = 100)
max_integrity = 200
integrity_failure = 50
var/obj/item/showpiece = null
+2 -2
View File
@@ -26,9 +26,9 @@
if(NO_EXTINGUISHER)
return
if(MINI_EXTINGUISHER)
has_extinguisher = new/obj/item/extinguisher/mini
has_extinguisher = new /obj/item/extinguisher/mini(src)
else
has_extinguisher = new/obj/item/extinguisher
has_extinguisher = new /obj/item/extinguisher(src)
/obj/structure/extinguisher_cabinet/examine(mob/user)
. = ..()
+3 -2
View File
@@ -94,9 +94,9 @@
if(density)
smooth = SMOOTH_FALSE
clear_smooth_overlays()
icon_state = "fwall_opening"
flick("fwall_opening", src)
else
icon_state = "fwall_closing"
flick("fwall_closing", src)
/obj/structure/falsewall/update_icon()
if(density)
@@ -297,6 +297,7 @@
/obj/structure/falsewall/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon = 'icons/turf/walls/sandstone_wall.dmi'
icon_state = "sandstone"
mineral = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/simulated/wall/mineral/sandstone
+223
View File
@@ -0,0 +1,223 @@
//Chain link fences
//Sprites ported from /VG/
#define CUT_TIME 100
#define CLIMB_TIME 150
#define FULL_CUT_TIME 300
#define NO_HOLE 0 //section is intact
#define MEDIUM_HOLE 1 //medium hole in the section - can climb through
#define LARGE_HOLE 2 //large hole in the section - can walk through
#define MAX_HOLE_SIZE LARGE_HOLE
#define HOLE_REPAIR (hole_size * 2) //How many rods to fix these sections
/obj/structure/fence
name = "fence"
desc = "A chain link fence. Not as effective as a wall, but generally it keeps people out."
density = TRUE
anchored = TRUE
icon = 'icons/obj/fence.dmi'
icon_state = "straight"
var/cuttable = TRUE
var/hole_size = NO_HOLE
var/invulnerable = FALSE
var/shock_cooldown = FALSE
/obj/structure/fence/Initialize()
. = ..()
update_cut_status()
/obj/structure/fence/examine(mob/user)
. = ..()
switch(hole_size)
if(MEDIUM_HOLE)
. += "There is a large hole in \the [src]."
if(LARGE_HOLE)
. += "\The [src] has been completely cut through."
/obj/structure/fence/end
icon_state = "end"
cuttable = FALSE
/obj/structure/fence/corner
icon_state = "corner"
cuttable = FALSE
/obj/structure/fence/post
icon_state = "post"
cuttable = FALSE
/obj/structure/fence/cut/medium
icon_state = "straight_cut2"
hole_size = MEDIUM_HOLE
climbable = TRUE
/obj/structure/fence/cut/large
icon_state = "straight_cut3"
hole_size = LARGE_HOLE
/obj/structure/fence/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSFENCE))
return TRUE
if(istype(mover, /obj/item/projectile))
return TRUE
if(!density)
return TRUE
return FALSE
/*
Shock user with probability prb (if all connections & power are working)
Returns TRUE if shocked, FALSE otherwise
Totally not stolen from code\game\objects\structures\grille.dm
*/
/obj/structure/fence/proc/shock(mob/user, prb)
if(!prob(prb))
return FALSE
if(!in_range(src, user)) //To prevent TK and mech users from getting shocked
return FALSE
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
if(electrocute_mob(user, C, src, 1, TRUE))
do_sparks(3, 1, src)
return TRUE
return FALSE
/obj/structure/fence/wirecutter_act(mob/living/user, obj/item/W)
. = TRUE
if(shock(user, 100))
return
if(invulnerable)
to_chat(user, "<span class='warning'>This fence is too strong to cut through!</span>")
return
if(!cuttable)
user.visible_message("<span class='warning'>[user] starts dismantling [src] with [W].</span>",\
"<span class='warning'>You start dismantling [src] with [W].</span>")
if(W.use_tool(src, user, FULL_CUT_TIME, volume = W.tool_volume))
user.visible_message("<span class='notice'>[user] completely dismantles [src].</span>",\
"<span class='info'>You completely dismantle [src].</span>")
qdel(src)
return
var/current_stage = hole_size
user.visible_message("<span class='warning'>[user] starts cutting through [src] with [W].</span>",\
"<span class='warning'>You start cutting through [src] with [W].</span>")
if(W.use_tool(src, user, CUT_TIME * W.toolspeed, volume = W.tool_volume))
if(current_stage == hole_size)
switch(hole_size)
if(NO_HOLE)
user.visible_message("<span class='notice'>[user] cuts into [src] some more.</span>",\
"<span class='info'>You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger.</span>")
hole_size = MEDIUM_HOLE
if(MEDIUM_HOLE)
user.visible_message("<span class='notice'>[user] completely cuts through [src].</span>",\
"<span class='info'>The hole in [src] is now big enough to walk through.</span>")
hole_size = LARGE_HOLE
if(LARGE_HOLE)
user.visible_message("<span class='notice'>[user] completely dismantles [src].</span>",\
"<span class='info'>You completely take apart [src].</span>")
qdel(src)
return
update_cut_status()
/obj/structure/fence/attackby(obj/item/C, mob/user)
if(shock(user, 90))
return
if(istype(C, /obj/item/stack/rods))
if(hole_size == NO_HOLE)
return
var/obj/item/stack/rods/R = C
if(R.get_amount() < HOLE_REPAIR)
to_chat(user, "<span class='warning'>You need [HOLE_REPAIR] rods to fix this fence!</span>")
return
to_chat(user, "<span class='notice'>You begin repairing the fence...</span>")
if(do_after(user, 3 SECONDS * C.toolspeed, target = src) && hole_size != NO_HOLE && R.use(HOLE_REPAIR))
playsound(src, C.usesound, 80, 1)
hole_size = NO_HOLE
obj_integrity = max_integrity
to_chat(user, "<span class='notice'>You repair the fence.</span>")
update_cut_status()
return
. = ..()
/obj/structure/fence/Bumped(atom/user)
if(!ismob(user))
return
if(shock_cooldown)
return
shock(user, 70)
shock_cooldown = TRUE // We do not want bump shock spam!
addtimer(CALLBACK(src, .proc/shock_cooldown), 1 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
/obj/structure/fence/proc/shock_cooldown()
shock_cooldown = FALSE
/obj/structure/fence/attack_animal(mob/user)
. = ..()
if(. && !QDELETED(src) && !shock(user, 70))
take_damage(rand(5,10), BRUTE, "melee", 1)
/obj/structure/fence/proc/update_cut_status()
if(!cuttable)
return
var/new_density = TRUE
switch(hole_size)
if(NO_HOLE)
icon_state = initial(icon_state)
climbable = FALSE
if(MEDIUM_HOLE)
icon_state = "straight_cut2"
climbable = TRUE
if(LARGE_HOLE)
icon_state = "straight_cut3"
new_density = FALSE
climbable = FALSE
set_density(new_density)
//FENCE DOORS
/obj/structure/fence/door
name = "fence door"
desc = "Not very useful without a real lock."
icon_state = "door_closed"
cuttable = FALSE
var/open = FALSE
/obj/structure/fence/door/Initialize()
. = ..()
update_door_status()
/obj/structure/fence/door/opened
icon_state = "door_opened"
open = TRUE
density = TRUE
/obj/structure/fence/door/attack_hand(mob/user, list/modifiers)
shock(user, 70)
if(can_open(user))
toggle(user)
return TRUE
/obj/structure/fence/door/proc/toggle(mob/user)
open = !open
visible_message("<span class='notice'>\The [user] [open ? "opens" : "closes"] \the [src].</span>")
update_door_status()
playsound(src, 'sound/machines/door_open.ogg', 100, TRUE)
/obj/structure/fence/door/proc/update_door_status()
set_density(!open)
icon_state = open ? "door_opened" : "door_closed"
/obj/structure/fence/door/proc/can_open(mob/user)
return TRUE
#undef CUT_TIME
#undef CLIMB_TIME
#undef FULL_CUT_TIME
#undef NO_HOLE
#undef MEDIUM_HOLE
#undef LARGE_HOLE
#undef MAX_HOLE_SIZE
#undef HOLE_REPAIR
+4 -4
View File
@@ -10,7 +10,7 @@
pressure_resistance = 5*ONE_ATMOSPHERE
layer = BELOW_OBJ_LAYER
level = 3
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
armor = list(MELEE = 50, BULLET = 70, LASER = 70, ENERGY = 100, BOMB = 10, BIO = 100, RAD = 100, FIRE = 0, ACID = 0)
max_integrity = 50
integrity_failure = 20
var/rods_type = /obj/item/stack/rods
@@ -69,7 +69,7 @@
/obj/structure/grille/attack_animal(mob/user)
. = ..()
if(. && !QDELETED(src) && !shock(user, 70))
take_damage(rand(5,10), BRUTE, "melee", 1)
take_damage(rand(5,10), BRUTE, MELEE, 1)
/obj/structure/grille/hulk_damage()
return 60
@@ -88,14 +88,14 @@
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='warning'>[user] hits [src].</span>")
if(!shock(user, 70))
take_damage(rand(5,10), BRUTE, "melee", 1)
take_damage(rand(5,10), BRUTE, MELEE, 1)
/obj/structure/grille/attack_alien(mob/living/user)
user.do_attack_animation(src)
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='warning'>[user] mangles [src].</span>")
if(!shock(user, 70))
take_damage(20, BRUTE, "melee", 1)
take_damage(20, BRUTE, MELEE, 1)
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
+6 -6
View File
@@ -6,7 +6,7 @@
icon = 'icons/effects/effects.dmi'
anchored = TRUE
max_integrity = 1
armor = list("melee" = 0, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 20)
armor = list(MELEE = 0, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 0, BIO = 0, RAD = 0, FIRE = 20, ACID = 20)
var/obj/item/holosign_creator/projector
/obj/structure/holosign/Initialize(mapload, source_projector)
@@ -27,7 +27,7 @@
return
user.do_attack_animation(src)
user.changeNext_move(CLICK_CD_MELEE)
take_damage(5 , BRUTE, "melee", 1)
take_damage(5 , BRUTE, MELEE, 1)
/obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
@@ -97,11 +97,11 @@
allow_walk = FALSE
/obj/structure/holosign/barrier/cyborg/bullet_act(obj/item/projectile/P)
take_damage((P.damage / 5) , BRUTE, "melee", 1) //Doesn't really matter what damage flag it is.
take_damage((P.damage / 5) , BRUTE, MELEE, 1) //Doesn't really matter what damage flag it is.
if(istype(P, /obj/item/projectile/energy/electrode))
take_damage(10, BRUTE, "melee", 1) //Tasers aren't harmful.
take_damage(10, BRUTE, MELEE, 1) //Tasers aren't harmful.
if(istype(P, /obj/item/projectile/beam/disabler))
take_damage(5, BRUTE, "melee", 1) //Disablers aren't harmful.
take_damage(5, BRUTE, MELEE, 1) //Disablers aren't harmful.
/obj/structure/holosign/barrier/cyborg/hacked
name = "Charged Energy Field"
@@ -110,7 +110,7 @@
var/shockcd = 0
/obj/structure/holosign/barrier/cyborg/hacked/bullet_act(obj/item/projectile/P)
take_damage(P.damage, BRUTE, "melee", 1) //Yeah no this doesn't get projectile resistance.
take_damage(P.damage, BRUTE, MELEE, 1) //Yeah no this doesn't get projectile resistance.
/obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown()
shockcd = FALSE
+1 -1
View File
@@ -5,7 +5,7 @@
icon_state = "lattice"
density = FALSE
anchored = TRUE
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 50)
max_integrity = 50
layer = LATTICE_LAYER //under pipes
plane = FLOOR_PLANE
@@ -8,7 +8,7 @@
icon = 'icons/obj/doors/mineral_doors.dmi'
icon_state = "metal"
max_integrity = 200
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 50, "acid" = 50)
armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 10, BIO = 100, RAD = 100, FIRE = 50, ACID = 50)
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
rad_insulation = RAD_MEDIUM_INSULATION
var/initial_state
+161
View File
@@ -0,0 +1,161 @@
/obj/structure/railing
name = "railing"
desc = "Basic railing meant to protect idiots like you from falling."
icon = 'icons/obj/fence.dmi'
icon_state = "railing"
density = TRUE
anchored = TRUE
pass_flags = LETPASSTHROW
climbable = TRUE
layer = ABOVE_MOB_LAYER
var/currently_climbed = FALSE
var/mover_dir = null
/obj/structure/railing/corner //aesthetic corner sharp edges hurt oof ouch
icon_state = "railing_corner"
density = FALSE
climbable = FALSE
/obj/structure/railing/attackby(obj/item/I, mob/living/user, params)
..()
add_fingerprint(user)
/obj/structure/railing/welder_act(mob/living/user, obj/item/I)
if(user.intent != INTENT_HELP)
return
if(obj_integrity >= max_integrity)
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
if(!I.tool_start_check(user, amount = 0))
return
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
if(I.use_tool(src, user, 40, volume = 50))
obj_integrity = max_integrity
to_chat(user, "<span class='notice'>You repair [src].</span>")
/obj/structure/railing/wirecutter_act(mob/living/user, obj/item/I)
if(anchored)
return
to_chat(user, "<span class='warning'>You cut apart the railing.</span>")
I.play_tool_sound(src, 100)
deconstruct()
return TRUE
/obj/structure/railing/deconstruct(disassembled)
if(!(flags & NODECONSTRUCT))
var/obj/item/stack/rods/rod = new /obj/item/stack/rods(drop_location(), 3)
transfer_fingerprints_to(rod)
return ..()
///Implements behaviour that makes it possible to unanchor the railing.
/obj/structure/railing/wrench_act(mob/living/user, obj/item/I)
if(flags & NODECONSTRUCT)
return
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the railing from":"fasten the railing to"] the floor...</span>")
if(I.use_tool(src, user, volume = 75, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
anchored = !anchored
to_chat(user, "<span class='notice'>You [anchored ? "fasten the railing to":"unfasten the railing from"] the floor.</span>")
return TRUE
/obj/structure/railing/corner/CanPass()
return TRUE
/obj/structure/railing/corner/CheckExit()
return TRUE
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSFENCE))
return TRUE
if(istype(mover, /obj/item/projectile))
return TRUE
if(ismob(mover))
var/mob/M = mover
if(M.flying)
return TRUE
if(mover.throwing)
return TRUE
mover_dir = get_dir(loc, target)
//Due to how the other check is done, it would always return density for ordinal directions no matter what
if(ordinal_direction_check())
return FALSE
if(mover_dir != dir)
return density
return FALSE
/obj/structure/railing/CheckExit(atom/movable/O, target)
var/mob/living/M = O
if(istype(O) && O.checkpass(PASSFENCE))
return TRUE
if(istype(O, /obj/item/projectile))
return TRUE
if(ismob(O))
if(M.flying || M.floating)
return TRUE
if(O.throwing)
return TRUE
if(O.move_force >= MOVE_FORCE_EXTREMELY_STRONG)
return TRUE
if(currently_climbed)
return TRUE
mover_dir = get_dir(O.loc, target)
if(mover_dir == dir)
return FALSE
if(ordinal_direction_check())
return FALSE
return TRUE
// Checks if the direction the mob is trying to move towards would be blocked by a corner railing
/obj/structure/railing/proc/ordinal_direction_check()
switch(dir)
if(5)
if(mover_dir == 1 || mover_dir == 4)
return TRUE
if(6)
if(mover_dir == 2 || mover_dir == 4)
return TRUE
if(9)
if(mover_dir == 1 || mover_dir == 8)
return TRUE
if(10)
if(mover_dir == 2 || mover_dir == 8)
return TRUE
return FALSE
/obj/structure/railing/do_climb(mob/living/user)
var/initial_mob_loc = get_turf(user)
. = ..()
if(.)
currently_climbed = TRUE
if(initial_mob_loc != get_turf(src)) // If we are on the railing, we want to move in the same dir as the railing. Otherwise we get put on the railing
currently_climbed = FALSE
return
user.Move(get_step(user, dir), TRUE)
currently_climbed = FALSE
/obj/structure/railing/proc/can_be_rotated(mob/user)
if(anchored)
to_chat(user, "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>")
return FALSE
var/target_dir = turn(dir, -45)
if(!valid_window_location(loc, target_dir)) //Expanded to include rails, as well!
to_chat(user, "<span class='warning'>[src] cannot be rotated in that direction!</span>")
return FALSE
return TRUE
/obj/structure/railing/proc/check_anchored(checked_anchored)
if(anchored == checked_anchored)
return TRUE
/obj/structure/railing/proc/after_rotation(mob/user)
add_fingerprint(user)
/obj/structure/railing/AltClick(mob/user)
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!Adjacent(user))
return
if(can_be_rotated(user))
setDir(turn(dir, 45))
+4 -1
View File
@@ -175,6 +175,8 @@ GLOBAL_LIST_EMPTY(safes)
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
if(open)
if(I.flags && ABSTRACT)
return
if(broken && istype(I, /obj/item/safe_internals) && do_after(user, 2 SECONDS, target = src))
to_chat(user, "<span class='notice'>You replace the broken mechanism.</span>")
qdel(I)
@@ -368,7 +370,8 @@ GLOBAL_LIST_EMPTY(safes)
/obj/structure/safe/floor/Initialize()
. = ..()
var/turf/T = loc
hide(T.intact)
if(!T.transparent_floor)
hide(T.intact)
/obj/structure/safe/floor/hide(intact)
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
+1 -1
View File
@@ -5,7 +5,7 @@
density = 0
layer = 3.5
max_integrity = 100
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
@@ -4,6 +4,7 @@
item_chair = null
anchored = FALSE
movable = TRUE
buildstackamount = 15
var/move_delay = null
@@ -75,7 +76,7 @@
if(!has_buckled_mobs())
return
var/mob/living/buckled_mob = buckled_mobs[1]
if(istype(A, /obj/machinery/door))
if(istype(A, /obj/machinery/door) || istype(A, /obj/machinery/gateway))
A.Bumped(buckled_mob)
if(propelled)
+3 -3
View File
@@ -389,7 +389,7 @@
canSmoothWith = null
max_integrity = 70
resistance_flags = ACID_PROOF
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
var/list/debris = list()
/obj/structure/table/glass/Initialize(mapload)
@@ -530,7 +530,7 @@
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
max_integrity = 200
integrity_failure = 50
armor = list("melee" = 10, "bullet" = 30, "laser" = 30, "energy" = 100, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
armor = list(MELEE = 10, BULLET = 30, LASER = 30, ENERGY = 100, BOMB = 20, BIO = 0, RAD = 0, FIRE = 80, ACID = 70)
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
if(deconstruction_ready)
@@ -708,7 +708,7 @@
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='danger'>You kick [src].</span>")
take_damage(rand(4,8), BRUTE, "melee", 1)
take_damage(rand(4,8), BRUTE, MELEE, 1)
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
+63 -26
View File
@@ -11,7 +11,7 @@
can_be_unanchored = TRUE
max_integrity = 25
resistance_flags = ACID_PROOF
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 100)
rad_insulation = RAD_VERY_LIGHT_INSULATION
var/ini_dir = null
var/state = WINDOW_OUT_OF_FRAME
@@ -27,6 +27,8 @@
var/real_explosion_block //ignore this, just use explosion_block
var/breaksound = "shatter"
var/hitsound = 'sound/effects/Glasshit.ogg'
/// Used to restore colours from polarised glass
var/old_color
/obj/structure/window/examine(mob/user)
. = ..()
@@ -69,6 +71,17 @@
air_update_turf(TRUE)
/obj/structure/window/proc/toggle_polarization()
if(opacity)
if(!old_color)
old_color = "#FFFFFF"
animate(src, color = old_color, time = 0.5 SECONDS)
set_opacity(FALSE)
else
old_color = color
animate(src, color = "#222222", time = 0.5 SECONDS)
set_opacity(TRUE)
/obj/structure/window/narsie_act()
color = NARSIE_WINDOW_COLOUR
@@ -474,7 +487,7 @@
icon_state = "rwindow"
reinf = TRUE
heat_resistance = 1600
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
rad_insulation = RAD_HEAVY_INSULATION
max_integrity = 50
explosion_block = 1
@@ -495,16 +508,9 @@
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
glass_amount = 2
var/id
/obj/structure/window/reinforced/polarized/proc/toggle()
if(opacity)
animate(src, color="#FFFFFF", time=5)
set_opacity(0)
else
animate(src, color="#222222", time=5)
set_opacity(1)
/obj/machinery/button/windowtint
name = "window tint control"
icon = 'icons/obj/power.dmi'
@@ -514,12 +520,35 @@
var/id = 0
var/active = 0
/obj/machinery/button/windowtint/Initialize(mapload, w_dir = null)
. = ..()
switch(w_dir)
if(NORTH)
pixel_y = 25
if(SOUTH)
pixel_y = -25
if(EAST)
pixel_x = 25
if(WEST)
pixel_x = -25
/obj/machinery/button/windowtint/attack_hand(mob/user)
if(..())
return 1
return TRUE
toggle_tint()
/obj/machinery/button/windowtint/wrench_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_use_check(user, 0))
return
user.visible_message("<span class='notice'>[user] starts unwrenching [src] from the wall...</span>", "<span class='notice'>You are unwrenching [src] from the wall...</span>", "<span class='warning'>You hear ratcheting.</span>")
if(!I.use_tool(src, user, 50, volume = I.tool_volume))
return
WRENCH_UNANCHOR_WALL_MESSAGE
new /obj/item/mounted/frame/light_switch/windowtint(get_turf(src))
qdel(src)
/obj/machinery/button/windowtint/proc/toggle_tint()
use_power(5)
@@ -528,9 +557,11 @@
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
if(W.id == src.id || !W.id)
spawn(0)
W.toggle()
return
W.toggle_polarization()
for(var/obj/structure/window/full/reinforced/polarized/W in range(src, range))
if(W.id == id || !W.id)
W.toggle_polarization()
/obj/machinery/button/windowtint/power_change()
..()
@@ -550,7 +581,7 @@
heat_resistance = 32000
max_integrity = 150
explosion_block = 1
armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
armor = list(MELEE = 75, BULLET = 5, LASER = 0, ENERGY = 0, BOMB = 45, BIO = 100, RAD = 100, FIRE = 99, ACID = 100)
rad_insulation = RAD_NO_INSULATION
/obj/structure/window/plasmabasic/BlockSuperconductivity()
@@ -566,7 +597,7 @@
reinf = TRUE
max_integrity = 500
explosion_block = 2
armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
armor = list(MELEE = 85, BULLET = 20, LASER = 0, ENERGY = 0, BOMB = 60, BIO = 100, RAD = 100, FIRE = 99, ACID = 100)
rad_insulation = RAD_NO_INSULATION
damage_deflection = 21
@@ -589,7 +620,7 @@
icon_state = "window"
max_integrity = 50
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
/obj/structure/window/full/plasmabasic
name = "plasma window"
@@ -602,9 +633,9 @@
heat_resistance = 32000
max_integrity = 300
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
explosion_block = 1
armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
armor = list(MELEE = 75, BULLET = 5, LASER = 0, ENERGY = 0, BOMB = 45, BIO = 100, RAD = 100, FIRE = 99, ACID = 100)
rad_insulation = RAD_NO_INSULATION
/obj/structure/window/full/plasmareinforced
@@ -616,11 +647,11 @@
shardtype = /obj/item/shard/plasma
glass_type = /obj/item/stack/sheet/plasmarglass
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
reinf = TRUE
max_integrity = 1000
explosion_block = 2
armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
armor = list(MELEE = 85, BULLET = 20, LASER = 0, ENERGY = 0, BOMB = 60, BIO = 100, RAD = 100, FIRE = 99, ACID = 100)
rad_insulation = RAD_NO_INSULATION
/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -632,15 +663,21 @@
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
icon_state = "r_window"
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
max_integrity = 100
reinf = TRUE
heat_resistance = 1600
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
rad_insulation = RAD_HEAVY_INSULATION
explosion_block = 1
glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/full/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
glass_amount = 4
var/id
/obj/structure/window/full/reinforced/tinted
name = "tinted window"
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
@@ -662,7 +699,7 @@
reinf = TRUE
heat_resistance = 1600
explosion_block = 3
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
smooth = SMOOTH_TRUE
canSmoothWith = null
glass_type = /obj/item/stack/sheet/titaniumglass
@@ -681,7 +718,7 @@
max_integrity = 100
reinf = TRUE
heat_resistance = 1600
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
rad_insulation = RAD_HEAVY_INSULATION
smooth = SMOOTH_TRUE
canSmoothWith = null
@@ -696,7 +733,7 @@
icon_state = "clockwork_window_single"
resistance_flags = FIRE_PROOF | ACID_PROOF
max_integrity = 80
armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
armor = list(MELEE = 60, BULLET = 25, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
glass_type = /obj/item/stack/tile/brass
reinf = FALSE