Merge remote-tracking branch 'ParadiseSS13/master' into brutal-part1

This commit is contained in:
AffectedArc07
2021-03-11 18:41:17 +00:00
1118 changed files with 25570 additions and 65816 deletions
@@ -16,7 +16,10 @@
var/can_be_emaged = FALSE
var/wall_mounted = 0 //never solid (You can always pass over it)
var/lastbang
var/sound = 'sound/machines/click.ogg'
var/open_sound = 'sound/machines/closet_open.ogg'
var/close_sound = 'sound/machines/closet_close.ogg'
var/open_sound_volume = 35
var/close_sound_volume = 50
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
var/material_drop = /obj/item/stack/sheet/metal
var/material_drop_amount = 2
@@ -90,10 +93,7 @@
icon_state = icon_opened
opened = TRUE
if(sound)
playsound(loc, sound, 15, 1, -3)
else
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(loc, open_sound, open_sound_volume, TRUE, -3)
density = 0
return TRUE
@@ -136,10 +136,7 @@
icon_state = icon_closed
opened = FALSE
if(sound)
playsound(loc, sound, 15, 1, -3)
else
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(loc, close_sound, close_sound_volume, TRUE, -3)
density = 1
return TRUE
@@ -349,11 +346,6 @@
BD.attack_hand(usr)
open()
/obj/structure/closet/tesla_act(power)
..()
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
qdel(src)
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
@@ -8,7 +8,10 @@
resistance_flags = FLAMMABLE
max_integrity = 70
integrity_failure = 0
sound = 'sound/effects/rustle2.ogg'
open_sound = 'sound/machines/cardboard_box.ogg'
close_sound = 'sound/machines/cardboard_box.ogg'
open_sound_volume = 35
close_sound_volume = 35
material_drop = /obj/item/stack/sheet/cardboard
var/amt = 4
var/move_delay = 0
@@ -7,6 +7,10 @@
resistance_flags = FLAMMABLE
max_integrity = 70
material_drop = /obj/item/stack/sheet/wood
open_sound = 'sound/machines/wooden_closet_open.ogg'
close_sound = 'sound/machines/wooden_closet_close.ogg'
open_sound_volume = 25
close_sound_volume = 50
/obj/structure/closet/coffin/update_icon()
if(!opened)
@@ -19,5 +23,6 @@
icon_state = "sarc"
icon_closed = "sarc"
icon_opened = "sarc_open"
sound = 'sound/effects/stonedoor_openclose.ogg'
open_sound = 'sound/effects/stonedoor_openclose.ogg'
close_sound = 'sound/effects/stonedoor_openclose.ogg'
material_drop = /obj/item/stack/sheet/mineral/sandstone
@@ -5,6 +5,10 @@
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
resistance_flags = FLAMMABLE
open_sound = 'sound/machines/wooden_closet_open.ogg'
close_sound = 'sound/machines/wooden_closet_close.ogg'
open_sound_volume = 25
close_sound_volume = 50
max_integrity = 70
/obj/structure/closet/cabinet/update_icon()
@@ -9,6 +9,10 @@
icon_off = "cabinetdetective_broken"
resistance_flags = FLAMMABLE
max_integrity = 70
open_sound = 'sound/machines/wooden_closet_open.ogg'
close_sound = 'sound/machines/wooden_closet_close.ogg'
open_sound_volume = 25
close_sound_volume = 50
/obj/structure/closet/secure_closet/bar/populate_contents()
new /obj/item/reagent_containers/food/drinks/cans/beer(src)
@@ -40,4 +40,4 @@
new /obj/item/clothing/glasses/meson(src)
new /obj/item/clothing/head/soft(src)
new /obj/item/door_remote/quartermaster(src)
new /obj/item/organ/internal/cyberimp/eyes/meson(src)
new /obj/item/organ/internal/eyes/cybernetic/meson(src)
@@ -38,7 +38,7 @@
new /obj/item/door_remote/chief_engineer(src)
new /obj/item/rpd(src)
new /obj/item/reagent_containers/food/drinks/mug/ce(src)
new /obj/item/organ/internal/cyberimp/eyes/meson(src)
new /obj/item/organ/internal/eyes/cybernetic/meson(src)
new /obj/item/clothing/accessory/medal/engineering(src)
new /obj/item/holosign_creator/atmos(src)
@@ -32,6 +32,10 @@
icon_off = "cabinetdetective_broken"
resistance_flags = FLAMMABLE
max_integrity = 70
open_sound = 'sound/machines/wooden_closet_open.ogg'
close_sound = 'sound/machines/wooden_closet_close.ogg'
open_sound_volume = 25
close_sound_volume = 50
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
if(broken)
@@ -60,7 +60,6 @@
return
if(allowed(user))
locked = !locked
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
visible_message("<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
update_icon()
else
@@ -218,7 +218,7 @@
new /obj/item/clothing/suit/storage/brigdoc(src)
new /obj/item/clothing/under/rank/security/brigphys(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/radio/headset/headset_sec/alt(src)
new /obj/item/radio/headset/headset_sec/alt/brig_phys(src)
new /obj/item/clothing/shoes/sandal/white(src)
@@ -323,6 +323,8 @@
icon_off = "cabinetdetective_broken"
resistance_flags = FLAMMABLE
max_integrity = 70
open_sound = 'sound/machines/wooden_closet_open.ogg'
close_sound = 'sound/machines/wooden_closet_close.ogg'
/obj/structure/closet/secure_closet/detective/populate_contents()
new /obj/item/clothing/under/det(src)
@@ -19,7 +19,7 @@
L.buckled = 0
L.anchored = 0
L.forceMove(src)
L.mutations |= MUTE
ADD_TRAIT(L, TRAIT_MUTE, STATUE_MUTE)
max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
@@ -68,7 +68,7 @@
for(var/mob/living/M in src)
M.forceMove(loc)
M.mutations -= MUTE
REMOVE_TRAIT(M, TRAIT_MUTE, STATUE_MUTE)
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
..()
@@ -6,8 +6,11 @@
icon_opened = "crateopen"
icon_closed = "crate"
climbable = TRUE
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = FALSE
open_sound = 'sound/machines/crate_open.ogg'
close_sound = 'sound/machines/crate_close.ogg'
open_sound_volume = 35
close_sound_volume = 50
var/obj/item/paper/manifest/manifest
// A list of beacon names that the crate will announce the arrival of, when delivered.
var/list/announce_beacons = list()
@@ -45,7 +48,7 @@
do_sparks(5, 1, src)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(loc, open_sound, open_sound_volume, TRUE, -3)
for(var/obj/O in src) //Objects
O.forceMove(loc)
for(var/mob/M in src) //Mobs
@@ -64,7 +67,7 @@
if(!src.can_close())
return FALSE
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
playsound(loc, close_sound, close_sound_volume, TRUE, -3)
var/itemcount = 0
for(var/obj/O in get_turf(src))
if(itemcount >= storage_capacity)
@@ -149,7 +152,7 @@
// Called when a crate is delivered by MULE at a location, for notifying purposes
/obj/structure/closet/crate/proc/notifyRecipient(destination)
var/msg = "[capitalize(name)] has arrived at [destination]."
var/list/msg = list("[capitalize(name)] has arrived at [destination].")
if(destination in announce_beacons)
for(var/obj/machinery/requests_console/D in GLOB.allRequestConsoles)
if(D.department in src.announce_beacons[destination])
@@ -254,7 +257,7 @@
if(locked)
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, "sparks", 60, 1)
playsound(src.loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
src.locked = 0
src.broken = 1
update_icon()
@@ -269,7 +272,7 @@
else
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
src.locked = 0
update_icon()
if(!opened && prob(20/severity))
@@ -371,6 +374,8 @@
icon_opened = "largebinopen"
icon_closed = "largebin"
anchored = TRUE
open_sound = 'sound/effects/bin_open.ogg'
close_sound = 'sound/effects/bin_close.ogg'
/obj/structure/closet/crate/can/wrench_act(mob/user, obj/item/I)
. = TRUE
@@ -423,6 +428,8 @@
greenlight = "largebing"
sparks = "largebinsparks"
emag = "largebinemag"
open_sound = 'sound/effects/bin_open.ogg'
close_sound = 'sound/effects/bin_close.ogg'
/obj/structure/closet/crate/large
name = "large crate"
@@ -7,6 +7,10 @@
var/already_opened = 0
var/content_mob = null
var/amount = 1
open_sound = 'sound/machines/wooden_closet_open.ogg'
close_sound = 'sound/machines/wooden_closet_close.ogg'
open_sound_volume = 25
close_sound_volume = 50
/obj/structure/closet/critter/can_open()
if(welded)
@@ -0,0 +1,100 @@
/**
* # Disaster counter.
*
* Tracks how many shifts it has been since the counter with that ID was exploded.
*/
/obj/structure/disaster_counter
name = "disaster counter"
desc = "This device will count how many shifts it has been since a major disaster in this area. A safe workplace is a productive workplace."
icon = 'icons/obj/status_display.dmi'
icon_state = "frame"
anchored = TRUE
maptext_y = 10 // Offset by 10 so it renders properly
/// ID of the counter. Must be overriden. Use alphanumerics with no spaces only, as this is used in the filesystem.
var/counter_id
/// Current count number
var/current_count = 0
/// Record count
var/record_count = 0
/obj/structure/disaster_counter/examine(mob/user)
. = ..()
. += "The display reads 'Currently [max(current_count, 0)] shifts without an accident, with a record of [record_count] shifts!'"
/obj/structure/disaster_counter/Initialize(mapload)
. = ..()
if(!counter_id)
stack_trace("Disaster counter at [x],[y],[z] does not have a counter_id set. Deleting...")
return INITIALIZE_HINT_QDEL
// If we still exist, put ourselves in
SSpersistent_data.register(src)
/obj/structure/disaster_counter/ex_act(severity)
current_count = -1
persistent_save()
update_maptext()
. = ..()
/obj/structure/disaster_counter/Destroy()
if(counter_id)
SSpersistent_data.registered_atoms -= src // Take us out the list
return ..()
/obj/structure/disaster_counter/proc/update_maptext()
maptext = "<span class='maptext' style='text-align: center'>[max(current_count, 0)]/[record_count]</span>"
/obj/structure/disaster_counter/persistent_load()
// Just incase some bad actor sets the counter ID to "../../../../Windows/System32"
// Yes I am that paranoid
if(counter_id != paranoid_sanitize(counter_id))
stack_trace("Counter ID did not pass sanitization for disaster counter at [x],[y],[z]. Potential attempt at filesystem manipulation.")
qdel(src)
return
var/savefile/S = new /savefile("data/disaster_counters/[counter_id].sav")
S["count"] >> current_count
S["record"] >> record_count
if(isnull(current_count))
current_count = 0
else
current_count++ // Increase by 1 since this is the next shift without a disaster (yet)
if(isnull(record_count))
record_count = current_count
else
// NEW RECORD
if(current_count > record_count)
record_count = current_count
log_debug("Persistent data for [src] loaded (current_count: [current_count] | record_count: [record_count])")
update_maptext()
/obj/structure/disaster_counter/persistent_save()
if(counter_id != paranoid_sanitize(counter_id))
stack_trace("Counter ID did not pass sanitization for disaster counter at [x],[y],[z]. Potential attempt at filesystem manipulation.")
qdel(src)
return
var/savefile/S = new /savefile("data/disaster_counters/[counter_id].sav")
S["count"] << current_count
S["record"] << record_count
log_debug("Persistent data for [src] saved (current_count: [current_count] | record_count: [record_count])")
// Prefab definitions to make mapping easier
/obj/structure/disaster_counter/supermatter
name = "supermatter disaster counter"
counter_id = "supermatter"
/obj/structure/disaster_counter/chemistry
name = "chemistry disaster counter"
counter_id = "chemistry"
/obj/structure/disaster_counter/scichem
name = "science chemistry disaster counter"
counter_id = "scichem"
/obj/structure/disaster_counter/toxins
name = "toxins launch room disaster counter"
counter_id = "toxinslaunch"
@@ -124,14 +124,6 @@
noglass = TRUE
material_type = /obj/item/stack/sheet/plasteel
/obj/structure/door_assembly/door_assembly_shuttle
name = "shuttle airlock assembly"
icon = 'icons/obj/doors/airlocks/shuttle/shuttle.dmi'
base_name = "shuttle airlock"
overlays_file = 'icons/obj/doors/airlocks/shuttle/overlays.dmi'
airlock_type = /obj/machinery/door/airlock/shuttle
glass_type = /obj/machinery/door/airlock/shuttle/glass
/obj/structure/door_assembly/multi_tile
name = "large airlock assembly"
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
+21 -5
View File
@@ -39,6 +39,18 @@
. = ..()
air_update_turf(1)
/obj/structure/falsewall/examine_status(mob/user)
var/healthpercent = (obj_integrity/max_integrity) * 100
switch(healthpercent)
if(100)
return "<span class='notice'>It looks fully intact.</span>"
if(70 to 99)
return "<span class='warning'>It looks slightly damaged.</span>"
if(40 to 70)
return "<span class='warning'>It looks moderately damaged.</span>"
if(0 to 40)
return "<span class='danger'>It looks heavily damaged.</span>"
/obj/structure/falsewall/ratvar_act()
new /obj/structure/falsewall/brass(loc)
qdel(src)
@@ -161,6 +173,10 @@
walltype = /turf/simulated/wall/r_wall
mineral = /obj/item/stack/sheet/plasteel
/obj/structure/falsewall/reinforced/examine_status(mob/user)
. = ..()
. += "<br><span class='notice'>The outer <b>grille</b> is fully intact.</span>" //not going to fake other states of disassembly
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
T.ChangeTurf(/turf/simulated/wall/r_wall)
@@ -181,7 +197,7 @@
walltype = /turf/simulated/wall/mineral/uranium
var/active = null
var/last_event = 0
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/simulated/wall/mineral/uranium)
canSmoothWith = list(/turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium, /turf/simulated/wall/indestructible/uranium)
/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params)
radiate()
@@ -270,7 +286,7 @@
icon_state = "plasma"
mineral = /obj/item/stack/sheet/mineral/abductor
walltype = /turf/simulated/wall/mineral/abductor
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
canSmoothWith = list(/turf/simulated/wall/mineral/abductor, /obj/structure/falsewall/abductor, /turf/simulated/wall/indestructible/alien)
/obj/structure/falsewall/bananium
@@ -288,7 +304,7 @@
icon_state = "sandstone"
mineral = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/simulated/wall/mineral/sandstone
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
canSmoothWith = list(/turf/simulated/wall/mineral/sandstone, /turf/simulated/wall/indestructible/sandstone, /obj/structure/falsewall/sandstone)
/obj/structure/falsewall/wood
name = "wooden wall"
@@ -325,7 +341,7 @@
mineral = /obj/item/stack/sheet/mineral/titanium
walltype = /turf/simulated/wall/mineral/titanium
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/simulated/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
canSmoothWith = list(/turf/simulated/wall/mineral/titanium, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
/obj/structure/falsewall/plastitanium
desc = "An evil wall of plasma and titanium."
@@ -334,7 +350,7 @@
mineral = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/simulated/wall/mineral/plastitanium
smooth = SMOOTH_MORE
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/mineral/plastitanium/nodiagonal, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/indestructible/syndicate, /turf/simulated/wall/mineral/plastitanium/nodiagonal, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater, /turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium)
/obj/structure/falsewall/brass
name = "clockwork wall"
+27 -44
View File
@@ -117,28 +117,28 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
/obj/structure/grille/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
if(istype(W, /obj/item/stack/rods) && broken)
var/obj/item/stack/rods/R = W
if(!shock(user, 90))
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
"<span class='notice'>You rebuild the broken grille.</span>")
new grille_type(loc)
R.use(1)
qdel(src)
return
if(istype(I, /obj/item/stack/rods) && broken)
repair(user, I)
//window placing begin
else if(is_glass_sheet(W))
build_window(W, user)
else if(is_glass_sheet(I))
build_window(I, user)
return
//window placing end
else if(istype(W, /obj/item/shard) || !shock(user, 70))
else if(istype(I, /obj/item/shard) || !shock(user, 70))
return ..()
/obj/structure/grille/proc/repair(mob/user, obj/item/stack/rods/R)
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>",
"<span class='notice'>You rebuild the broken grille.</span>")
new grille_type(loc)
R.use(1)
qdel(src)
/obj/structure/grille/wirecutter_act(mob/user, obj/item/I)
. = TRUE
if(shock(user, 100))
@@ -160,54 +160,37 @@
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
var/dir_to_set = NORTH
var/dir_to_set = SOUTHWEST
if(!istype(S) || !user)
return
if(broken)
to_chat(user, "<span class='warning'>You must repair or replace [src] first!</span>")
return
if(S.get_amount() < 1)
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two sheets of glass for that!</span>")
return
if(!anchored)
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
return
if(!getRelativeDirection(src, user) && (user.loc != loc)) //essentially a cardinal direction adjacent or sharing same loc check
to_chat(user, "<span class='warning'>You can't reach.</span>")
return
if(loc == user.loc)
dir_to_set = user.dir
else
if(x == user.x)
if(y > user.y)
dir_to_set = SOUTH
else
dir_to_set = NORTH
else if(y == user.y)
if(x > user.x)
dir_to_set = WEST
else
dir_to_set = EAST
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
return
to_chat(user, "<span class='warning'>There is already a window there!</span>")
return
to_chat(user, "<span class='notice'>You start placing the window...</span>")
if(do_after(user, 20, target = src))
if(!loc || !anchored) //Grille destroyed or unanchored while waiting
return
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
return
var/obj/structure/window/W = new S.created_window(get_turf(src))
S.use(1)
for(var/obj/structure/window/WINDOW in loc) //checking this for a 2nd time to check if a window was made while we were waiting.
to_chat(user, "<span class='warning'>There is already a window there!</span>")
return
var/obj/structure/window/W = new S.full_window(drop_location())
W.setDir(dir_to_set)
W.ini_dir = dir_to_set
W.anchored = FALSE
W.state = WINDOW_OUT_OF_FRAME
to_chat(user, "<span class='notice'>You place the [W] on [src].</span>")
air_update_turf(TRUE)
W.update_nearby_icons()
W.state = WINDOW_OUT_OF_FRAME
S.use(2)
to_chat(user, "<span class='notice'>You place the [W] on [src].</span>")
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
@@ -271,7 +254,7 @@
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
+2 -2
View File
@@ -122,7 +122,7 @@
if(!shockcd)
if(isliving(user))
var/mob/living/M = user
M.electrocute_act(15, "Energy Barrier", safety = TRUE)
M.electrocute_act(15, "Energy Barrier")
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
@@ -134,6 +134,6 @@
return
var/mob/living/M = AM
M.electrocute_act(15, "Energy Barrier", safety = TRUE)
M.electrocute_act(15, "Energy Barrier")
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
+6 -4
View File
@@ -59,10 +59,12 @@
qdel(src)
else
visible_message("[src] slowly deflates.")
spawn(50)
var/obj/item/inflatable/R = new intact(loc)
transfer_fingerprints_to(R)
qdel(src)
addtimer(CALLBACK(src, .proc/deflate), 5 SECONDS)
/obj/structure/inflatable/proc/deflate()
var/obj/item/inflatable/R = new intact(loc)
transfer_fingerprints_to(R)
qdel(src)
/obj/structure/inflatable/verb/hand_deflate()
set name = "Deflate"
+2 -2
View File
@@ -147,10 +147,10 @@
if(voice_mutation)
if(H.dna.GetSEState(voice_mutation))
H.dna.SetSEState(voice_mutation, FALSE)
genemutcheck(H, voice_mutation, null, MUTCHK_FORCED)
singlemutcheck(H, voice_mutation, MUTCHK_FORCED)
else
H.dna.SetSEState(voice_mutation, TRUE)
genemutcheck(H, voice_mutation, null, MUTCHK_FORCED)
singlemutcheck(H, voice_mutation, MUTCHK_FORCED)
if(voice_choice)
curse(user)
+16 -8
View File
@@ -49,7 +49,7 @@
if(M)
var/mob/dead/observer/G = M.get_ghost()
if(M.mind && M.mind.is_revivable() && !M.mind.suicided)
if(M.mind && !M.mind.suicided)
if(M.client)
icon_state = "morgue3"
desc = initial(desc) + "\n[status_descriptors[4]]"
@@ -457,6 +457,10 @@
name = "crematorium igniter"
icon = 'icons/obj/power.dmi'
icon_state = "crema_switch"
power_channel = EQUIP
use_power = IDLE_POWER_USE
idle_power_usage = 100
active_power_usage = 5000
anchored = 1.0
req_access = list(ACCESS_CREMATORIUM)
var/on = 0
@@ -469,13 +473,17 @@
return attack_hand(user)
/obj/machinery/crema_switch/attack_hand(mob/user)
if(allowed(usr) || user.can_advanced_admin_interact())
for(var/obj/structure/crematorium/C in world)
if(C.id == id)
if(!C.cremating)
C.cremate(user)
else
to_chat(usr, "<span class='warning'>Access denied.</span>")
if(powered(power_channel)) // Do we have power?
if(allowed(usr) || user.can_advanced_admin_interact())
use_power(400000)
for(var/obj/structure/crematorium/C in world)
if(C.id == id)
if(!C.cremating)
C.cremate(user)
else
to_chat(usr, "<span class='warning'>Access denied.</span>")
/mob/proc/update_morgue()
if(stat == DEAD)
+1 -1
View File
@@ -123,7 +123,7 @@
return 1
if(mover.throwing)
return 1
if(locate(/obj/structure/table) in get_turf(mover))
if(length(get_atoms_of_type(get_turf(mover), /obj/structure/table) - mover))
return 1
if(flipped)
if(get_dir(loc, target) == dir)
+5 -5
View File
@@ -27,7 +27,7 @@
user.changeNext_move(CLICK_CD_MELEE)
playsound(src.loc, "swing_hit", 25, 1)
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='italics'>You hear reverberating porcelain.</span>")
swirlie.adjustBruteLoss(5)
swirlie.apply_damage(5, BRUTE, BODY_ZONE_HEAD)
return
if(cistern && !open)
@@ -101,8 +101,8 @@
swirlie = null
else
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
GM.visible_message("<span class='danger'>[user] slams [GM.name] into [src]!</span>", "<span class='userdanger'>[user] slams [GM.name] into [src]!</span>")
GM.adjustBruteLoss(5)
GM.visible_message("<span class='danger'>[user] slams [GM.name]'s head into [src]!</span>", "<span class='userdanger'>[user] slams [GM.name]'s head into [src]!</span>")
GM.apply_damage(5, BRUTE, BODY_ZONE_HEAD)
else
to_chat(user, "<span class='warning'>You need a tighter grip!</span>")
@@ -212,8 +212,8 @@
return
user.changeNext_move(CLICK_CD_MELEE)
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
user.visible_message("<span class='danger'>[user] slams [GM] into [src]!</span>", "<span class='notice'>You slam [GM] into [src]!</span>")
GM.adjustBruteLoss(8)
user.visible_message("<span class='danger'>[user] slams [GM]'s head into [src]!</span>", "<span class='danger'>You slam [GM]'s head into [src]!</span>")
GM.apply_damage(8, BRUTE, BODY_ZONE_HEAD)
else
to_chat(user, "<span class='warning'>You need a tighter grip!</span>")
+46 -76
View File
@@ -1,26 +1,3 @@
GLOBAL_LIST_INIT(wcBar, pick(list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff")))
GLOBAL_LIST_INIT(wcBrig, pick(list("#aa0808", "#7f0606", "#ff0000")))
GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")))
/obj/proc/color_windows(obj/W)
var/list/wcBarAreas = list(/area/crew_quarters/bar)
var/list/wcBrigAreas = list(/area/security, /area/shuttle/gamma)
var/newcolor
var/turf/T = get_turf(W)
if(!istype(T))
return
var/area/A = T.loc
if(is_type_in_list(A,wcBarAreas))
newcolor = GLOB.wcBar
else if(is_type_in_list(A,wcBrigAreas))
newcolor = GLOB.wcBrig
else
newcolor = GLOB.wcCommon
return newcolor
/obj/structure/window
name = "window"
desc = "A window."
@@ -43,11 +20,10 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
var/decon_speed = null
var/fulltile = FALSE
var/shardtype = /obj/item/shard
var/glass_decal = /obj/effect/decal/cleanable/glass
var/glass_type = /obj/item/stack/sheet/glass
var/glass_amount = 1
var/cancolor = FALSE
var/image/crack_overlay
var/list/debris = list()
var/mutable_appearance/crack_overlay
var/real_explosion_block //ignore this, just use explosion_block
var/breaksound = "shatter"
var/hitsound = 'sound/effects/Glasshit.ogg'
@@ -81,30 +57,12 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
ini_dir = dir
if(!color && cancolor)
color = color_windows(src)
// Precreate our own debris
var/shards = 1
if(fulltile)
shards++
setDir()
if(decon_speed == null && fulltile)
decon_speed = 2 SECONDS
var/rods = 0
if(reinf)
rods++
if(fulltile)
rods++
for(var/i in 1 to shards)
debris += new shardtype(src)
if(rods)
debris += new /obj/item/stack/rods(src, rods)
//windows only block while reinforced and fulltile, so we'll use the proc
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
@@ -113,8 +71,6 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
/obj/structure/window/narsie_act()
color = NARSIE_WINDOW_COLOUR
for(var/obj/item/shard/shard in debris)
shard.color = NARSIE_WINDOW_COLOUR
/obj/structure/window/ratvar_act()
if(!fulltile)
@@ -210,7 +166,15 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
return 1 //skip the afterattack
add_fingerprint(user)
if(istype(I, /obj/item/grab) && get_dist(src, user) < 2)
if(istype(I, /obj/item/stack/rods) && user.a_intent == INTENT_HELP)
for(var/obj/structure/grille/G in get_turf(src))
if(!G.broken)
continue
to_chat(user, "<span class='notice'>You start rebuilding the broken grille.</span>")
if(do_after(user, 4 SECONDS, FALSE, G))
G.repair(user, I)
else if(istype(I, /obj/item/grab) && get_dist(src, user) < 2)
var/obj/item/grab/G = I
if(isliving(G.affecting))
var/mob/living/M = G.affecting
@@ -237,8 +201,8 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
M.Weaken(5)
M.apply_damage(30)
take_damage(75)
return
return ..()
else
return ..()
/obj/structure/window/crowbar_act(mob/user, obj/item/I)
@@ -324,6 +288,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
WELDER_ATTEMPT_REPAIR_MESSAGE
if(I.use_tool(src, user, 40, volume = I.tool_volume))
obj_integrity = max_integrity
update_nearby_icons()
WELDER_REPAIR_SUCCESS_MESSAGE
/obj/structure/window/proc/check_state(checked_state)
@@ -371,13 +336,20 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
if(!disassembled)
playsound(src, breaksound, 70, 1)
if(!(flags & NODECONSTRUCT))
for(var/i in debris)
var/obj/item/I = i
I.forceMove(loc)
transfer_fingerprints_to(I)
for(var/obj/item/shard/debris in spawnDebris(drop_location()))
transfer_fingerprints_to(debris) // transfer fingerprints to shards only
qdel(src)
update_nearby_icons()
/obj/structure/window/proc/spawnDebris(location)
. = list()
. += new shardtype(location)
. += new glass_decal(location)
if(reinf)
. += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
if(fulltile)
. += new shardtype(location)
/obj/structure/window/verb/rotate()
set name = "Rotate Window Counter-Clockwise"
set category = "Object"
@@ -479,14 +451,16 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
if(!fulltile)
return
var/ratio = obj_integrity / max_integrity
ratio = CEILING(ratio*4, 1) * 25
ratio = CEILING(ratio * 4, 1) * 25
if(smooth)
queue_smooth(src)
overlays -= crack_overlay
cut_overlay(crack_overlay)
if(ratio > 75)
return
crack_overlay = image('icons/obj/structures.dmi',"damage[ratio]",-(layer+0.1))
overlays += crack_overlay
crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1))
add_overlay(crack_overlay)
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
@@ -504,7 +478,6 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon_state = "rwindow"
reinf = TRUE
cancolor = TRUE
heat_resistance = 1600
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
@@ -576,6 +549,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
name = "plasma window"
desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through."
icon_state = "plasmawindow"
glass_decal = /obj/effect/decal/cleanable/glass/plasma
shardtype = /obj/item/shard/plasma
glass_type = /obj/item/stack/sheet/plasmaglass
heat_resistance = 32000
@@ -591,6 +565,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
name = "reinforced plasma window"
desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
icon_state = "plasmarwindow"
glass_decal = /obj/effect/decal/cleanable/glass/plasma
shardtype = /obj/item/shard/plasma
glass_type = /obj/item/stack/sheet/plasmarglass
reinf = TRUE
@@ -619,20 +594,20 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
icon_state = "window"
max_integrity = 50
smooth = SMOOTH_TRUE
cancolor = 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)
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)
/obj/structure/window/full/plasmabasic
name = "plasma window"
desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
icon = 'icons/obj/smooth_structures/plasma_window.dmi'
icon_state = "plasmawindow"
glass_decal = /obj/effect/decal/cleanable/glass/plasma
shardtype = /obj/item/shard/plasma
glass_type = /obj/item/stack/sheet/plasmaglass
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)
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)
explosion_block = 1
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
@@ -642,9 +617,11 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
icon = 'icons/obj/smooth_structures/rplasma_window.dmi'
icon_state = "rplasmawindow"
glass_decal = /obj/effect/decal/cleanable/glass/plasma
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)
reinf = TRUE
max_integrity = 1000
explosion_block = 2
@@ -660,7 +637,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
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)
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)
max_integrity = 100
reinf = TRUE
heat_resistance = 1600
@@ -668,7 +645,6 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
rad_insulation = RAD_HEAVY_INSULATION
explosion_block = 1
glass_type = /obj/item/stack/sheet/rglass
cancolor = TRUE
/obj/structure/window/full/reinforced/tinted
name = "tinted window"
@@ -681,7 +657,6 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
icon = 'icons/obj/smooth_structures/rice_window.dmi'
icon_state = "ice_window"
max_integrity = 150
cancolor = FALSE
/obj/structure/window/full/shuttle
name = "shuttle window"
@@ -703,15 +678,12 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
/obj/structure/window/full/shuttle/tinted
opacity = TRUE
/obj/structure/window/plastitanium
/obj/structure/window/full/plastitanium
name = "plastitanium window"
desc = "An evil looking window of plasma and titanium."
icon = 'icons/obj/smooth_structures/plastitanium_window.dmi'
icon_state = "plastitanium_window"
dir = FULLTILE_WINDOW_DIR
max_integrity = 100
fulltile = TRUE
flags = PREVENT_CLICK_UNDER
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)
@@ -719,9 +691,8 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
smooth = SMOOTH_TRUE
canSmoothWith = null
explosion_block = 3
level = 3
glass_type = /obj/item/stack/sheet/plastitaniumglass
glass_amount = 2
canSmoothWith = list(/turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium)
/obj/structure/window/reinforced/clockwork
name = "brass window"
@@ -734,19 +705,18 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
glass_type = /obj/item/stack/tile/brass
reinf = FALSE
cancolor = FALSE
var/made_glow = FALSE
/obj/structure/window/reinforced/clockwork/Initialize(mapload, direct)
. = ..()
if(fulltile)
made_glow = TRUE
QDEL_LIST(debris)
if(fulltile)
new /obj/effect/temp_visual/ratvar/window(get_turf(src))
debris += new/obj/item/stack/tile/brass(src, 2)
else
debris += new/obj/item/stack/tile/brass(src, 1)
/obj/structure/window/reinforced/clockwork/spawnDebris(location)
. = list()
. += new /obj/item/stack/tile/brass(location, (fulltile ? 2 : 1))
/obj/structure/window/reinforced/clockwork/setDir(direct)
if(!made_glow)
@@ -757,7 +727,7 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e",
/obj/structure/window/reinforced/clockwork/ratvar_act()
obj_integrity = max_integrity
update_icon()
update_nearby_icons()
/obj/structure/window/reinforced/clockwork/narsie_act()
take_damage(rand(25, 75), BRUTE)