Hard upstream sync (#6951)
* maps - none of our changes included yet i'll get them in after i finish up the rest of the sync * sync part 1 - underscore folders in code * controllers folder * datums folder * game folder * cmon, work * modules - admin to awaymissions * cargo to events * fields to lighting * mapping > ruins * rest of the code folder * rest of the folders in the root directory * DME * fixes compiling errors. it compiles so it works * readds map changes * fixes dogborg module select * fixes typo in moduleselect_alternate_icon filepath
This commit is contained in:
@@ -78,9 +78,11 @@
|
||||
to_chat(occupant, "[enter_message]")
|
||||
|
||||
/obj/machinery/sleeper/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(is_operational() && occupant)
|
||||
open_machine()
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user)
|
||||
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
|
||||
|
||||
@@ -153,10 +153,10 @@ Class Procs:
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/emp_act(severity)
|
||||
if(use_power && !stat)
|
||||
. = ..()
|
||||
if(use_power && !stat && !(. & EMP_PROTECT_SELF))
|
||||
use_power(7500/severity)
|
||||
new /obj/effect/temp_visual/emp(loc)
|
||||
..()
|
||||
|
||||
/obj/machinery/proc/open_machine(drop = TRUE)
|
||||
state_open = TRUE
|
||||
@@ -180,7 +180,7 @@ Class Procs:
|
||||
density = TRUE
|
||||
if(!target)
|
||||
for(var/am in loc)
|
||||
if(!is_type_in_typecache(am, (occupant_typecache || GLOB.typecache_living)))
|
||||
if (!(occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am)))
|
||||
continue
|
||||
var/atom/movable/AM = am
|
||||
if(AM.has_buckled_mobs())
|
||||
@@ -463,15 +463,14 @@ Class Procs:
|
||||
/obj/machinery/proc/can_be_overridden()
|
||||
. = 1
|
||||
|
||||
|
||||
/obj/machinery/tesla_act(power, explosive = FALSE)
|
||||
/obj/machinery/tesla_act(power, tesla_flags, shocked_objects)
|
||||
..()
|
||||
if(prob(85) && explosive)
|
||||
explosion(src.loc, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE)
|
||||
else if(prob(50))
|
||||
emp_act(EMP_LIGHT)
|
||||
else
|
||||
ex_act(EXPLODE_HEAVY)
|
||||
if(prob(85) && (tesla_flags & TESLA_MACHINE_EXPLOSIVE))
|
||||
explosion(src, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE)
|
||||
if(tesla_flags & TESLA_OBJ_DAMAGE)
|
||||
take_damage(power/2000, BURN, "energy")
|
||||
if(prob(40))
|
||||
emp_act(EMP_LIGHT)
|
||||
|
||||
/obj/machinery/Exited(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
|
||||
@@ -173,9 +173,9 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
newhead = pick("OV#RL()D: \[UNKNOWN??\] DET*#CT)D!", "ER)#R - B*@ TEXT F*O(ND!", "AAS.exe is not responding. NanoOS is searching for a solution to the problem.")
|
||||
|
||||
/obj/machinery/announcement_system/emp_act(severity)
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
. = ..()
|
||||
if(!(stat & (NOPOWER|BROKEN)) && !(. & EMP_PROTECT_SELF))
|
||||
act_up()
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/announcement_system/emag_act()
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
@@ -77,9 +77,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
. = ..()
|
||||
if(!status)
|
||||
return
|
||||
if(!isEmpProof())
|
||||
if(!(. & EMP_PROTECT_SELF))
|
||||
if(prob(150/severity))
|
||||
update_icon()
|
||||
var/list/previous_network = network
|
||||
@@ -107,13 +108,6 @@
|
||||
M.unset_machine()
|
||||
M.reset_perspective(null)
|
||||
to_chat(M, "The screen bursts into static.")
|
||||
..()
|
||||
|
||||
/obj/machinery/camera/tesla_act(var/power)//EMP proof upgrade also makes it tesla immune
|
||||
if(isEmpProof())
|
||||
return
|
||||
..()
|
||||
qdel(src)//to prevent bomb testing camera from exploding over and over forever
|
||||
|
||||
/obj/machinery/camera/ex_act(severity, target)
|
||||
if(invuln)
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
// UPGRADE PROCS
|
||||
|
||||
/obj/machinery/camera/proc/upgradeEmpProof()
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES | EMP_PROTECT_CONTENTS)
|
||||
assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/plasma(assembly))
|
||||
upgrades |= CAMERA_UPGRADE_EMP_PROOF
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
|
||||
chargelevel = -1
|
||||
updateicon()
|
||||
else
|
||||
else
|
||||
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(W))
|
||||
@@ -105,14 +105,14 @@
|
||||
return
|
||||
|
||||
/obj/machinery/cell_charger/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
. = ..()
|
||||
|
||||
if(stat & (BROKEN|NOPOWER) || . & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
|
||||
if(charging)
|
||||
charging.emp_act(severity)
|
||||
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/cell_charger/RefreshParts()
|
||||
charge_rate = 500
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
@@ -128,4 +128,3 @@
|
||||
charging.give(charge_rate) //this is 2558, efficient batteries exist
|
||||
|
||||
updateicon()
|
||||
|
||||
@@ -406,13 +406,14 @@
|
||||
go_out()
|
||||
|
||||
/obj/machinery/clonepod/emp_act(severity)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
if(mob_occupant && prob(100/(severity*efficiency)))
|
||||
connected_message(Gibberish("EMP-caused Accidental Ejection", 0))
|
||||
SPEAK(Gibberish("Exposure to electromagnetic fields has caused the ejection of [mob_occupant.real_name] prematurely." ,0))
|
||||
go_out()
|
||||
mob_occupant.apply_vore_prefs()
|
||||
..()
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
var/mob/living/mob_occupant = occupant
|
||||
if(mob_occupant && prob(100/(severity*efficiency)))
|
||||
connected_message(Gibberish("EMP-caused Accidental Ejection", 0))
|
||||
SPEAK(Gibberish("Exposure to electromagnetic fields has caused the ejection of [mob_occupant.real_name] prematurely." ,0))
|
||||
mob_occupant.apply_vore_prefs()
|
||||
go_out()
|
||||
|
||||
/obj/machinery/clonepod/ex_act(severity, target)
|
||||
..()
|
||||
|
||||
@@ -95,14 +95,15 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/computer/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(50))
|
||||
obj_break("energy")
|
||||
if(2)
|
||||
if(prob(10))
|
||||
obj_break("energy")
|
||||
..()
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
switch(severity)
|
||||
if(1)
|
||||
if(prob(50))
|
||||
obj_break("energy")
|
||||
if(2)
|
||||
if(prob(10))
|
||||
obj_break("energy")
|
||||
|
||||
/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user)
|
||||
on_deconstruction()
|
||||
|
||||
@@ -85,9 +85,9 @@
|
||||
prize.forceMove(get_turf(src))
|
||||
|
||||
/obj/machinery/computer/arcade/emp_act(severity)
|
||||
..(severity)
|
||||
. = ..()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
|
||||
var/empprize = null
|
||||
|
||||
@@ -553,7 +553,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/med_data/emp_act(severity)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && !(. & EMP_PROTECT_SELF))
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if(prob(10/severity))
|
||||
switch(rand(1,6))
|
||||
@@ -577,7 +578,6 @@
|
||||
else if(prob(1))
|
||||
qdel(R)
|
||||
continue
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/med_data/proc/canUseMedicalRecordsConsole(mob/user, message = 1, record1, record2)
|
||||
if(user)
|
||||
|
||||
@@ -783,8 +783,9 @@ What a mess.*/
|
||||
printing = FALSE
|
||||
|
||||
/obj/machinery/computer/secure_data/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
. = ..()
|
||||
|
||||
if(stat & (BROKEN|NOPOWER) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
@@ -817,8 +818,6 @@ What a mess.*/
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2)
|
||||
if(user)
|
||||
if(authenticated)
|
||||
|
||||
@@ -208,6 +208,9 @@
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
|
||||
/obj/machinery/door/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
if(prob(severity*10 - 20))
|
||||
@@ -215,7 +218,6 @@
|
||||
secondsElectrified = -1
|
||||
LAZYADD(shockedby, "\[[time_stamp()]\]EM Pulse")
|
||||
addtimer(CALLBACK(src, .proc/unelectrify), 300)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/proc/unelectrify()
|
||||
secondsElectrified = 0
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
use_power(power_used)
|
||||
|
||||
var/atom/A = new dispense_type(loc)
|
||||
A.admin_spawned = admin_spawned
|
||||
A.flags_1 |= (flags_1 & ADMIN_SPAWNED_1)
|
||||
|
||||
if(create_sound)
|
||||
playsound(src, create_sound, 50, 1)
|
||||
|
||||
@@ -81,9 +81,13 @@
|
||||
add_overlay("overlay_fire")
|
||||
|
||||
/obj/machinery/firealarm/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
|
||||
if(prob(50 / severity))
|
||||
alarm()
|
||||
..()
|
||||
|
||||
/obj/machinery/firealarm/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
@@ -119,12 +119,12 @@
|
||||
|
||||
|
||||
/obj/machinery/flasher/emp_act(severity)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && !(. & EMP_PROTECT_SELF))
|
||||
if(bulb && prob(75/severity))
|
||||
flash()
|
||||
bulb.burn_out()
|
||||
power_change()
|
||||
..()
|
||||
|
||||
/obj/machinery/flasher/obj_break(damage_flag)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -120,6 +120,8 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/sparker/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
ignite()
|
||||
..()
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
updateicon()
|
||||
|
||||
/obj/machinery/light_switch/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
power_change()
|
||||
..()
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
|
||||
|
||||
/obj/machinery/mass_driver/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
drive()
|
||||
..(severity)
|
||||
@@ -165,6 +165,11 @@ Buildable meters
|
||||
|
||||
if(pipename)
|
||||
A.name = pipename
|
||||
if(A.on)
|
||||
// Certain pre-mapped subtypes are on by default, we want to preserve
|
||||
// every other aspect of these subtypes (name, pre-set filters, etc.)
|
||||
// but they shouldn't turn on automatically when wrenched.
|
||||
A.on = FALSE
|
||||
|
||||
/obj/item/pipe/trinary/flippable/build_pipe(obj/machinery/atmospherics/components/trinary/T)
|
||||
..()
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
power_channel = EQUIP //drains power from the EQUIPMENT channel
|
||||
|
||||
var/base_icon_state = "standard"
|
||||
|
||||
var/emp_vunerable = TRUE // Can be empd
|
||||
|
||||
var/scan_range = 7
|
||||
var/atom/base = null //for turrets inside other objects
|
||||
|
||||
@@ -307,7 +304,10 @@
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/emp_act(severity)
|
||||
if(on && emp_vunerable)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(on)
|
||||
//if the turret is on, the EMP no matter how severe disables the turret for a while
|
||||
//and scrambles its settings, with a slight chance of having an emag effect
|
||||
check_records = pick(0, 1)
|
||||
@@ -322,8 +322,6 @@
|
||||
if(!on)
|
||||
on = TRUE
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
. = ..()
|
||||
if(.) //damage received
|
||||
@@ -646,9 +644,12 @@
|
||||
icon_state = "syndie_off"
|
||||
base_icon_state = "syndie"
|
||||
faction = list(ROLE_SYNDICATE)
|
||||
emp_vunerable = 0
|
||||
desc = "A ballistic machine gun auto-turret."
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES)
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/energy
|
||||
icon_state = "standard_stun"
|
||||
base_icon_state = "standard"
|
||||
@@ -723,9 +724,12 @@
|
||||
icon_state = "syndie_off"
|
||||
base_icon_state = "syndie"
|
||||
faction = list("neutral","silicon","turret")
|
||||
emp_vunerable = 0
|
||||
mode = TURRET_LETHAL
|
||||
|
||||
/obj/machinery/porta_turret/centcom_shuttle/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES)
|
||||
|
||||
/obj/machinery/porta_turret/centcom_shuttle/assess_perp(mob/living/carbon/human/perp)
|
||||
return 0
|
||||
|
||||
@@ -1036,4 +1040,4 @@
|
||||
if(istype(P, /obj/item/projectile/beam/lasertag/bluetag))
|
||||
on = FALSE
|
||||
spawn(100)
|
||||
on = TRUE
|
||||
on = TRUE
|
||||
|
||||
@@ -120,6 +120,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
if(!(stat & (NOPOWER|BROKEN)) && anchored)
|
||||
if(istype(charging, /obj/item/gun/energy))
|
||||
var/obj/item/gun/energy/E = charging
|
||||
@@ -130,7 +133,6 @@
|
||||
var/obj/item/melee/baton/B = charging
|
||||
if(B.cell)
|
||||
B.cell.charge = 0
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
|
||||
|
||||
@@ -43,11 +43,12 @@
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/recharge_station/emp_act(severity)
|
||||
. = ..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
if(occupant)
|
||||
if(occupant && !(. & EMP_PROTECT_CONTENTS))
|
||||
occupant.emp_act(severity)
|
||||
open_machine()
|
||||
..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/recharge_station/attackby(obj/item/P, mob/user, params)
|
||||
if(state_open)
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/emergency_shield/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
|
||||
@@ -152,7 +152,8 @@
|
||||
balance = 0
|
||||
|
||||
/obj/machinery/computer/slot_machine/emp_act(severity)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(15 * severity))
|
||||
return
|
||||
|
||||
@@ -126,12 +126,11 @@
|
||||
settableTemperatureMedian + settableTemperatureRange)
|
||||
|
||||
/obj/machinery/space_heater/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_CONTENTS)
|
||||
return
|
||||
if(cell)
|
||||
cell.emp_act(severity)
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/space_heater/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -63,11 +63,10 @@
|
||||
update()
|
||||
|
||||
/obj/machinery/status_display/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
set_picture("ai_bsod")
|
||||
..(severity)
|
||||
|
||||
// set what is displayed
|
||||
|
||||
@@ -259,11 +258,10 @@
|
||||
update()
|
||||
|
||||
/obj/machinery/ai_status_display/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN) || . & EMP_PROTECT_SELF)
|
||||
return
|
||||
set_picture("ai_bsod")
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/ai_status_display/proc/update()
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
idle_power_usage = 0
|
||||
var/intercept = FALSE // If true, only works on the Syndicate frequency.
|
||||
|
||||
/obj/machinery/telecomms/allinone/indestructable
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
|
||||
/obj/machinery/telecomms/allinone/Initialize()
|
||||
..()
|
||||
if (intercept)
|
||||
|
||||
@@ -140,10 +140,12 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
traffic -= netspeed
|
||||
|
||||
/obj/machinery/telecomms/emp_act(severity)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(100/severity))
|
||||
if(!(stat & EMPED))
|
||||
stat |= EMPED
|
||||
var/duration = (300 * 10)/severity
|
||||
spawn(rand(duration - 20, duration + 20)) // Takes a long time for the machines to reboot.
|
||||
stat &= ~EMPED
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user