# Conflicts:
#	code/modules/ninja/suit/suit.dm
This commit is contained in:
zerothebigboy
2021-08-19 21:55:22 -04:00
708 changed files with 22153 additions and 13237 deletions
+20 -2
View File
@@ -148,11 +148,15 @@ Class Procs:
START_PROCESSING(SSmachines, src)
else
START_PROCESSING(SSfastprocess, src)
power_change()
RegisterSignal(src, COMSIG_ENTER_AREA, .proc/power_change)
if (occupant_typecache)
occupant_typecache = typecacheof(occupant_typecache)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/LateInitialize()
. = ..()
power_change()
/obj/machinery/Destroy()
GLOB.machines.Remove(src)
@@ -176,6 +180,17 @@ Class Procs:
/obj/machinery/proc/process_atmos()//If you dont use process why are you here
return PROCESS_KILL
///Called when we want to change the value of the stat variable. Holds bitflags.
/obj/machinery/proc/set_machine_stat(new_value)
if(new_value == stat)
return
. = stat
stat = new_value
on_machine_stat_update(stat)
/obj/machinery/proc/on_machine_stat_update(stat)
return
/obj/machinery/emp_act(severity)
. = ..()
if(use_power && !stat && !(. & EMP_PROTECT_SELF))
@@ -383,8 +398,11 @@ Class Procs:
M.icon_state = "box_1"
/obj/machinery/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
. = ..()
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN
SEND_SIGNAL(src, COMSIG_MACHINERY_BROKEN, damage_flag)
update_appearance()
return TRUE
/obj/machinery/contents_explosion(severity, target)
+1 -1
View File
@@ -407,7 +407,7 @@
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
if(view_range == short_range) //unfocused
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
/obj/machinery/camera/update_remote_sight(mob/living/user)
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
+9 -5
View File
@@ -173,10 +173,7 @@
clonemind.transfer_to(H)
else if(get_clone_mind == CLONEPOD_POLL_MIND)
var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone? (Don't ERP without permission from the original)", null, null, null, 100, H, POLL_IGNORE_CLONE)
if(LAZYLEN(candidates))
var/mob/C = pick(candidates)
H.key = C.key
poll_for_mind(H, clonename)
if(grab_ghost_when == CLONER_FRESH_CLONE)
H.grab_ghost()
@@ -206,6 +203,13 @@
attempting = FALSE
return TRUE
/obj/machinery/clonepod/proc/poll_for_mind(mob/living/carbon/human/H, clonename)
set waitfor = FALSE
var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone? (Don't ERP without permission from the original)", null, null, null, 100, H, POLL_IGNORE_CLONE)
if(LAZYLEN(candidates))
var/mob/C = pick(candidates)
H.key = C.key
//Grow clones to maturity then kick them out. FREELOADERS
/obj/machinery/clonepod/process()
var/mob/living/mob_occupant = occupant
@@ -384,7 +388,7 @@
to_chat(occupant, "<span class='notice'><b>There is a bright flash!</b><br><i>You feel like a new being.</i></span>")
mob_occupant.flash_act()
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
var/list/policies = CONFIG_GET(keyed_list/policy)
var/policy = policies[POLICYCONFIG_ON_CLONE]
if(policy)
to_chat(occupant, policy)
+2 -2
View File
@@ -57,8 +57,8 @@
var/overlay_state = icon_screen
if(stat & BROKEN)
overlay_state = "[icon_state]_broken"
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha=128)
. += mutable_appearance(icon, overlay_state)
. += emissive_appearance(icon, overlay_state)
/obj/machinery/computer/power_change()
..()
@@ -60,7 +60,7 @@
var/total_moles = air_sample.total_moles()
if(total_moles)
for(var/gas_id in air_sample.get_gases())
var/gas_name = GLOB.meta_gas_names[gas_id]
var/gas_name = GLOB.gas_data.names[gas_id]
signal.data["gases"][gas_name] = air_sample.get_moles(gas_id) / total_moles * 100
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
@@ -73,11 +73,11 @@
/obj/machinery/air_sensor/Initialize()
. = ..()
SSair.atmos_machinery += src
SSair.atmos_air_machinery += src
set_frequency(frequency)
/obj/machinery/air_sensor/Destroy()
SSair.atmos_machinery -= src
SSair.atmos_air_machinery -= src
SSradio.remove_object(src, frequency)
return ..()
+4 -4
View File
@@ -16,10 +16,10 @@
// Stuff needed to render the map
var/map_name
var/obj/screen/map_view/cam_screen
var/atom/movable/screen/map_view/cam_screen
/// All the plane masters that need to be applied.
var/list/cam_plane_masters
var/obj/screen/background/cam_background
var/atom/movable/screen/background/cam_background
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_SET_MACHINE //| INTERACT_MACHINE_REQUIRES_SIGHT
@@ -40,8 +40,8 @@
cam_screen.del_on_map_removal = FALSE
cam_screen.screen_loc = "[map_name]:1,1"
cam_plane_masters = list()
for(var/plane in subtypesof(/obj/screen/plane_master))
var/obj/screen/instance = new plane()
for(var/plane in subtypesof(/atom/movable/screen/plane_master))
var/atom/movable/screen/instance = new plane()
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
@@ -275,7 +275,7 @@
if(final)
playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
remote_eye.setLoc(get_turf(final))
C.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static)
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console!
else
playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
@@ -123,7 +123,7 @@
var/list/this_pad = list()
this_pad["name"] = pad.display_name
this_pad["id"] = i
if(pad.machine_stat & NOPOWER)
if(pad.stat & NOPOWER)
this_pad["inactive"] = TRUE
pad_list += list(this_pad)
else
@@ -135,7 +135,7 @@
var/obj/machinery/mechpad/current_pad = mechpads[selected_id]
data["pad_name"] = current_pad.display_name
data["selected_pad"] = current_pad
if(QDELETED(current_pad) || (current_pad.machine_stat & NOPOWER))
if(QDELETED(current_pad) || (current_pad.stat & NOPOWER))
data["pad_active"] = FALSE
return data
data["pad_active"] = TRUE
+1
View File
@@ -34,6 +34,7 @@
* Initiates launching sequence by checking if all components are functional, opening poddoors, firing mass drivers and then closing poddoors
*/
/obj/machinery/computer/pod/proc/alarm()
set waitfor = FALSE
if(stat & (NOPOWER|BROKEN))
return
+1 -1
View File
@@ -254,7 +254,7 @@
DA.update_name()
qdel(src)
/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~
/obj/machinery/door/airlock/plasma/BlockThermalConductivity() //we don't stop the heat~
return 0
/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params)
+3 -7
View File
@@ -9,6 +9,7 @@
layer = OPEN_DOOR_LAYER
power_channel = ENVIRON
max_integrity = 350
damage_deflection = 10
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1
@@ -38,7 +39,7 @@
var/locked = FALSE //whether the door is bolted or not.
var/assemblytype //the type of door frame to drop during deconstruction
var/datum/effect_system/spark_spread/spark_system
var/damage_deflection = 10
var/real_explosion_block //ignore this, just use explosion_block
var/red_alert_access = FALSE //if TRUE, this door will always open on red alert
var/poddoor = FALSE
@@ -223,11 +224,6 @@
return 1
return ..()
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < damage_deflection)
return 0
. = ..()
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(. && obj_integrity > 0)
@@ -386,7 +382,7 @@
if(!glass && GLOB.cameranet)
GLOB.cameranet.updateVisibility(src, 0)
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
/obj/machinery/door/BlockThermalConductivity() // All non-glass airlocks block heat, this is intended.
if(opacity || heat_proof)
return 1
return 0
+15 -5
View File
@@ -79,23 +79,33 @@
if(is_station_level(z))
. += "fire_[GLOB.security_level]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_[GLOB.security_level]")
. += emissive_appearance(icon, "fire_[GLOB.security_level]")
else
. += "fire_[SEC_LEVEL_GREEN]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_[SEC_LEVEL_GREEN]")
. += emissive_appearance(icon, "fire_[SEC_LEVEL_GREEN]")
var/area/A = src.loc
A = A.loc
if(!detecting || !A.fire)
. += "fire_off"
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_off")
. += emissive_appearance(icon, "fire_off")
else if(obj_flags & EMAGGED)
. += "fire_emagged"
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_emagged")
. += emissive_appearance(icon, "fire_emagged")
else
. += "fire_on"
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_on")
. += emissive_appearance(icon, "fire_on")
if(!panel_open && detecting) //It just looks horrible with the panel open
. += "fire_detected"
. += mutable_appearance(icon, "fire_detected")
. += emissive_appearance(icon, "fire_detected") //Pain
/obj/machinery/firealarm/emp_act(severity)
. = ..()
+41 -23
View File
@@ -1,52 +1,70 @@
// the light switch
// can have multiple per area
// can also operate on non-loc area through "otherarea" var
/// The light switch. Can have multiple per area.
/obj/machinery/light_switch
name = "light switch"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
plane = ABOVE_WALL_PLANE
base_icon_state = "light"
desc = "Make dark."
var/on = TRUE
var/area/area = null
var/otherarea = null
/obj/machinery/light_switch/directional/north
dir = SOUTH
pixel_y = 26
/obj/machinery/light_switch/directional/south
dir = NORTH
pixel_y = -26
/obj/machinery/light_switch/directional/east
dir = WEST
pixel_x = 26
/obj/machinery/light_switch/directional/west
dir = EAST
pixel_x = -26
/obj/machinery/light_switch/Initialize()
. = ..()
area = get_area(src)
if(istext(area))
area = text2path(area)
if(ispath(area))
area = GLOB.areas_by_type[area]
if(otherarea)
area = locate(text2path("/area/[otherarea]"))
if(!area)
area = get_area(src)
if(!name)
name = "light switch ([area.name])"
on = area.lightswitch
update_icon()
/obj/machinery/light_switch/update_appearance(updates=ALL)
. = ..()
luminosity = (stat & NOPOWER) ? 0 : 1
/obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER)
icon_state = "light-p"
else
if(on)
icon_state = "light1"
else
icon_state = "light0"
icon_state = "[base_icon_state]-p"
return ..()
icon_state = "[base_icon_state][area.lightswitch ? 1 : 0]"
return ..()
/obj/machinery/light_switch/update_overlays()
. = ..()
if(!(stat & NOPOWER))
. += emissive_appearance(icon, "[base_icon_state]-glow", alpha = src.alpha)
/obj/machinery/light_switch/examine(mob/user)
. = ..()
. += "It is [on? "on" : "off"]."
. += "It is [area.lightswitch ? "on" : "off"]."
/obj/machinery/light_switch/interact(mob/user)
. = ..()
on = !on
area.lightswitch = on
area.update_icon()
area.lightswitch = !area.lightswitch
area.update_appearance()
for(var/obj/machinery/light_switch/L in area)
L.on = on
L.update_icon()
L.update_appearance()
area.power_change()
@@ -58,7 +76,7 @@
else
stat |= NOPOWER
update_icon()
update_appearance()
/obj/machinery/light_switch/emp_act(severity)
. = ..()
@@ -30,7 +30,7 @@
integrity_failure = 0.5
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
/// Base turret icon state
var/base_icon_state = "standard"
base_icon_state = "standard"
/// Scan range of the turret for locating targets
var/scan_range = 7
/// For turrets inside other objects
@@ -459,11 +459,11 @@
else if(iscarbon(A))
var/mob/living/carbon/C = A
//If not emagged, only target carbons that can use items
if(mode != TURRET_LETHAL && (C.stat || C.handcuffed || !(C.mobility_flags & MOBILITY_USE)))
//If not on lethal, only target carbons that aren't cuffed nor stamcrit or just plain crit.
if(mode != TURRET_LETHAL && (C.stat || C.handcuffed || IS_STAMCRIT(C)))
continue
//If emagged, target all but dead carbons
//If on lethal, target all but dead carbons
if(mode == TURRET_LETHAL && C.stat == DEAD)
continue
@@ -503,6 +503,7 @@
return 1
/obj/machinery/porta_turret/proc/popUp() //pops the turret up
set waitfor = FALSE
if(!anchored)
return
if(raising || raised)
@@ -521,6 +522,7 @@
layer = MOB_LAYER
/obj/machinery/porta_turret/proc/popDown() //pops the turret down
set waitfor = FALSE
if(raising || !raised)
return
if(stat & BROKEN)
+25 -11
View File
@@ -2,6 +2,7 @@
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
base_icon_state = "recharger"
desc = "A charging dock for energy based weaponry."
use_power = IDLE_POWER_USE
idle_power_usage = 4
@@ -187,16 +188,29 @@
if(B.cell)
B.cell.charge = 0
/obj/machinery/recharger/update_appearance(updates)
. = ..()
if((stat & (NOPOWER|BROKEN)) || panel_open || !anchored)
luminosity = 0
return
luminosity = 1
/obj/machinery/recharger/update_icon_state()
/obj/machinery/recharger/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff"
else if(panel_open)
icon_state = "rechargeropen"
else if(charging)
if(using_power)
icon_state = "recharger1"
else
icon_state = "recharger2"
else
icon_state = "recharger0"
return
if(panel_open)
. += mutable_appearance(icon, "[base_icon_state]-open", alpha = src.alpha)
return
if(!charging)
. += mutable_appearance(icon, "[base_icon_state]-empty", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-empty", alpha = src.alpha)
return
if(using_power)
. += mutable_appearance(icon, "[base_icon_state]-charging", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-charging", alpha = src.alpha)
return
. += mutable_appearance(icon, "[base_icon_state]-full", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-full", alpha = src.alpha)
@@ -28,7 +28,7 @@
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
var/gas_type = /datum/gas/plasma
var/gas_type = GAS_PLASMA
var/efficiency_multiplier = 1
var/gas_capacity = 0
+2 -2
View File
@@ -66,7 +66,7 @@
if(panel_open)
. += "sheater-open"
/obj/machinery/space_heater/process()
/obj/machinery/space_heater/process_atmos()
if(!on || !is_operational())
if (on) // If it's broken, turn it off too
on = FALSE
@@ -220,7 +220,7 @@
usr.visible_message("<span class='notice'>[usr] switches [on ? "on" : "off"] \the [src].</span>", "<span class='notice'>You switch [on ? "on" : "off"] \the [src].</span>")
update_icon()
if (on)
START_PROCESSING(SSmachines, src)
SSair.atmos_air_machinery += src
. = TRUE
if("mode")
setMode = params["mode"]
+1
View File
@@ -288,6 +288,7 @@
qdel(src)
/obj/item/bombcore/proc/defuse()
set waitfor = FALSE
//Note: Because of how var/defused is used you shouldn't override this UNLESS you intend to set the var to 0 or
// otherwise remove the core/reset the wires before the end of defuse(). It will repeatedly be called otherwise.