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:
deathride58
2018-05-31 23:03:18 +00:00
committed by kevinz000
parent b6e608cb4c
commit 2f9e3e403d
395 changed files with 134016 additions and 26287 deletions
+4
View File
@@ -22,3 +22,7 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
name = "Super Secret Room"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
has_gravity = TRUE
/area/awaymission/vr
name = "Virtual Reality"
icon_state = "awaycontent1"
+6 -1
View File
@@ -107,7 +107,12 @@
name = "Syndicate Elite Squad"
icon_state = "syndie-elite"
/area/fabric_of_reality
name = "Tear in the Fabric of Reality"
requires_power = FALSE
has_gravity = TRUE
noteleport = TRUE
blob_allowed = FALSE
//CAPTURE THE FLAG
+3
View File
@@ -70,6 +70,9 @@
/area/ruin/unpowered/syndicate_lava_base/telecomms
name = "Syndicate Lavaland Telecommunications"
/area/ruin/unpowered/syndicate_lava_base/circuits
name = "Syndicate Lavaland Circuit Lab"
//Xeno Nest
+6 -7
View File
@@ -6,7 +6,6 @@
var/flags_1 = NONE
var/interaction_flags_atom = NONE
var/container_type = NONE
var/admin_spawned = 0 //was this spawned by an admin? used for stat tracking stuff.
var/datum/reagents/reagents = null
//This atom's HUD (med/sec, etc) images. Associative list.
@@ -19,7 +18,6 @@
var/list/atom_colours //used to store the different colors on an atom
//its inherent color, the colored paint applied on it, special color effect etc...
var/initialized = FALSE
var/list/our_overlays //our local copy of (non-priority) overlays without byond magic. Use procs in SSoverlays to manipulate
var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4.
@@ -59,9 +57,9 @@
// /turf/open/space/Initialize
/atom/proc/Initialize(mapload, ...)
if(initialized)
if(flags_1 & INITIALIZED_1)
stack_trace("Warning: [src]([type]) initialized multiple times!")
initialized = TRUE
flags_1 |= INITIALIZED_1
//atom color stuff
if(color)
@@ -221,9 +219,10 @@
return
/atom/proc/emp_act(severity)
SendSignal(COMSIG_ATOM_EMP_ACT, severity)
if(istype(wires) && !(flags_1 & NO_EMP_WIRES_1))
var/protection = SendSignal(COMSIG_ATOM_EMP_ACT, severity)
if(!(protection & EMP_PROTECT_WIRES) && istype(wires))
wires.emp_pulse()
return protection // Pass the protection value collected here upwards
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
SendSignal(COMSIG_ATOM_BULLET_ACT, P, def_zone)
@@ -517,7 +516,7 @@
/atom/vv_edit_var(var_name, var_value)
if(!GLOB.Debug2)
admin_spawned = TRUE
flags_1 |= ADMIN_SPAWNED_1
. = ..()
switch(var_name)
if("color")
-4
View File
@@ -248,10 +248,6 @@
if (orbiting)
orbiting.Check()
var/datum/proximity_monitor/proximity_monitor = src.proximity_monitor
if(proximity_monitor)
proximity_monitor.HandleMove()
return 1
/atom/movable/Destroy(force)
+1 -1
View File
@@ -165,7 +165,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
return
/obj/effect/meteor/examine(mob/user)
if(!admin_spawned && isliving(user))
if(!(flags_1 & ADMIN_SPAWNED_1) && isliving(user))
SSmedals.UnlockMedal(MEDAL_METEOR, user.client)
..()
+3 -1
View File
@@ -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())
+10 -11
View File
@@ -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)
. = ..()
+2 -2
View File
@@ -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)
+2 -8
View File
@@ -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)
+1
View File
@@ -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
+4 -5
View File
@@ -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()
+8 -7
View File
@@ -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)
..()
+9 -8
View File
@@ -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()
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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)
+3 -4
View File
@@ -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)
+3 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+5 -1
View File
@@ -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)
+2 -2
View File
@@ -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))
+3 -1
View File
@@ -120,6 +120,8 @@
return 1
/obj/machinery/sparker/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(!(stat & (BROKEN|NOPOWER)))
ignite()
..()
+3 -1
View File
@@ -61,6 +61,8 @@
updateicon()
/obj/machinery/light_switch/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(!(stat & (BROKEN|NOPOWER)))
power_change()
..()
+3 -1
View File
@@ -31,7 +31,9 @@
/obj/machinery/mass_driver/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(stat & (BROKEN|NOPOWER))
return
drive()
..(severity)
+5
View File
@@ -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
+3 -1
View File
@@ -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.
+4 -3
View File
@@ -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)
+3
View File
@@ -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)
+2 -1
View File
@@ -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
+2 -3
View File
@@ -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)
+4 -6
View File
@@ -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
..()
+3 -1
View File
@@ -85,7 +85,9 @@
return answer
/obj/item/mecha_parts/mecha_tracking/emp_act()
qdel(src)
. = ..()
if(!(. & EMP_PROTECT_SELF))
qdel(src)
/obj/item/mecha_parts/mecha_tracking/Destroy()
if(ismecha(loc))
+3 -1
View File
@@ -142,6 +142,9 @@
setDir(dir_in)
/obj/mecha/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(get_charge())
use_power((cell.charge/3)/(severity*2))
take_damage(30 / severity, BURN, "energy", 1)
@@ -333,4 +336,3 @@
else if(damtype == TOX)
visual_effect_icon = ATTACK_EFFECT_MECHTOXIN
..()
@@ -9,7 +9,7 @@
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
. = ..()
if (random_icon_states && length(random_icon_states) > 0)
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
icon_state = pick(random_icon_states)
create_reagents(300)
if(loc && isturf(loc))
+21 -5
View File
@@ -1,21 +1,37 @@
/datum/proximity_monitor
var/atom/host //the atom we are tracking
var/atom/hasprox_reciever //the atom that will recieve HasProximity calls.
var/atom/last_host_loc
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
var/current_range
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
var/datum/component/movement_tracker
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
host = _host
checkers = list()
last_host_loc = _host.loc
ignore_if_not_on_turf = _ignore_if_not_on_turf
checkers = list()
SetRange(range)
current_range = range
SetHost(_host)
/datum/proximity_monitor/proc/SetHost(atom/H,atom/R)
if(R)
hasprox_reciever = R
else if(hasprox_reciever == host) //Default case
hasprox_reciever = H
host = H
last_host_loc = host.loc
if(movement_tracker)
QDEL_NULL(movement_tracker)
movement_tracker = host.AddComponent(/datum/component/redirect, COMSIG_MOVABLE_MOVED, CALLBACK(src, .proc/HandleMove))
SetRange(current_range,TRUE)
/datum/proximity_monitor/Destroy()
host = null
last_host_loc = null
hasprox_reciever = null
QDEL_LIST(checkers)
QDEL_NULL(movement_tracker)
return ..()
/datum/proximity_monitor/proc/HandleMove()
@@ -27,7 +43,7 @@
SetRange(curr_range, TRUE)
if(curr_range)
testing("HasProx: [host] -> [host]")
_host.HasProximity(host) //if we are processing, we're guaranteed to be a movable
hasprox_reciever.HasProximity(host) //if we are processing, we're guaranteed to be a movable
/datum/proximity_monitor/proc/SetRange(range, force_rebuild = FALSE)
if(!force_rebuild && range == current_range)
@@ -93,4 +109,4 @@
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
set waitfor = FALSE
monitor.host.HasProximity(AM)
monitor.hasprox_reciever.HasProximity(AM)
+153 -136
View File
@@ -3,11 +3,14 @@ CONTAINS:
RPD
*/
#define PAINT_MODE -2
#define EATING_MODE -1
#define ATMOS_MODE 0
#define DISPOSALS_MODE 1
#define TRANSIT_MODE 2
#define ATMOS_CATEGORY 0
#define DISPOSALS_CATEGORY 1
#define TRANSIT_CATEGORY 2
#define BUILD_MODE 1
#define WRENCH_MODE 2
#define DESTROY_MODE 4
#define PAINT_MODE 8
GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
@@ -69,7 +72,6 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
)
))
/datum/pipe_info
var/name
var/icon_state
@@ -186,17 +188,21 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
resistance_flags = FIRE_PROOF
var/datum/effect_system/spark_spread/spark_system
var/working = 0
var/mode = ATMOS_MODE
var/p_dir = NORTH
var/p_flipped = FALSE
var/paint_color="Grey"
var/screen = ATMOS_MODE //Starts on the atmos tab.
var/paint_color = "grey"
var/atmos_build_speed = 5 //deciseconds (500ms)
var/disposal_build_speed = 5
var/transit_build_speed = 5
var/destroy_speed = 5
var/paint_speed = 5
var/category = ATMOS_CATEGORY
var/piping_layer = PIPING_LAYER_DEFAULT
var/datum/pipe_info/recipe
var/static/datum/pipe_info/first_atmos
var/static/datum/pipe_info/first_disposal
var/static/datum/pipe_info/first_transit
var/autowrench = FALSE
var/mode = BUILD_MODE | PAINT_MODE | DESTROY_MODE | WRENCH_MODE
/obj/item/pipe_dispenser/New()
. = ..()
@@ -238,21 +244,22 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
/obj/item/pipe_dispenser/ui_data(mob/user)
var/list/data = list(
"mode" = mode,
"screen" = screen,
"category" = category,
"piping_layer" = piping_layer,
"preview_rows" = recipe.get_preview(p_dir),
"categories" = list(),
"paint_colors" = list()
"selected_color" = paint_color,
"paint_colors" = GLOB.pipe_paint_colors,
"mode" = mode
)
var/list/recipes
switch(screen)
if(ATMOS_MODE)
switch(category)
if(ATMOS_CATEGORY)
recipes = GLOB.atmos_pipe_recipes
if(DISPOSALS_MODE)
if(DISPOSALS_CATEGORY)
recipes = GLOB.disposal_pipe_recipes
if(TRANSIT_MODE)
if(TRANSIT_CATEGORY)
recipes = GLOB.transit_tube_recipes
for(var/c in recipes)
var/list/cat = recipes[c]
@@ -262,10 +269,6 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
r += list(list("pipe_name" = info.name, "pipe_index" = i, "selected" = (info == recipe)))
data["categories"] += list(list("cat_name" = c, "recipes" = r))
data["paint_colors"] = list()
for(var/c in GLOB.pipe_paint_colors)
data["paint_colors"] += list(list("color_name" = c, "color_hex" = GLOB.pipe_paint_colors[c], "selected" = (c == paint_color)))
return data
/obj/item/pipe_dispenser/ui_act(action, params)
@@ -277,18 +280,14 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
switch(action)
if("color")
paint_color = params["paint_color"]
if("mode")
mode = text2num(params["mode"])
if("screen")
if(mode == screen)
mode = text2num(params["screen"])
screen = text2num(params["screen"])
switch(screen)
if(DISPOSALS_MODE)
if("category")
category = text2num(params["category"])
switch(category)
if(DISPOSALS_CATEGORY)
recipe = first_disposal
if(ATMOS_MODE)
if(ATMOS_CATEGORY)
recipe = first_atmos
if(TRANSIT_MODE)
if(TRANSIT_CATEGORY)
recipe = first_transit
p_dir = NORTH
playeffect = FALSE
@@ -305,6 +304,15 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
p_dir = text2dir(params["dir"])
p_flipped = text2num(params["flipped"])
playeffect = FALSE
if("mode")
var/n = text2num(params["mode"])
if(n == 2 && !(mode&1) && !(mode&2))
mode |= 3
else if(mode&n)
mode &= ~n
else
mode |= n
if(playeffect)
spark_system.start()
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
@@ -314,135 +322,144 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
return ..()
//So that changing the menu settings doesn't affect the pipes already being built.
var/temp_piping_layer = piping_layer
var/queued_p_type = recipe.id
var/queued_p_dir = p_dir
var/queued_p_flipped = p_flipped
// clicking on an existing component puts the new one on the same layer
if (mode == ATMOS_MODE && istype(A, /obj/machinery/atmospherics))
var/obj/machinery/atmospherics/AM = A
temp_piping_layer = AM.piping_layer
A = get_turf(user)
//make sure what we're clicking is valid for the current mode
//make sure what we're clicking is valid for the current category
var/static/list/make_pipe_whitelist
if(!make_pipe_whitelist)
make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe))
var/can_make_pipe = (isturf(A) || is_type_in_typecache(A, make_pipe_whitelist))
. = FALSE
switch(mode) //if we've gotten this var, the target is valid
if(PAINT_MODE) //Paint pipes
if(!istype(A, /obj/machinery/atmospherics/pipe))
return ..()
if((mode&DESTROY_MODE) && istype(A, /obj/item/pipe) || istype(A, /obj/structure/disposalconstruct) || istype(A, /obj/structure/c_transit_tube) || istype(A, /obj/structure/c_transit_tube_pod) || istype(A, /obj/item/pipe_meter))
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, destroy_speed, target = A))
activate()
qdel(A)
return
if((mode&PAINT_MODE))
if(istype(A, /obj/machinery/atmospherics/pipe) && !istype(A, /obj/machinery/atmospherics/pipe/layer_manifold))
var/obj/machinery/atmospherics/pipe/P = A
to_chat(user, "<span class='notice'>You start painting \the [P] [paint_color]...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
P.paint(GLOB.pipe_paint_colors[paint_color])
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
if(do_after(user, paint_speed, target = A))
P.paint(GLOB.pipe_paint_colors[paint_color]) //paint the pipe
user.visible_message("<span class='notice'>[user] paints \the [P] [paint_color].</span>","<span class='notice'>You paint \the [P] [paint_color].</span>")
return
var/obj/item/pipe/P = A
if(istype(P) && findtext("[P.pipe_type]", "/obj/machinery/atmospherics/pipe") && !findtext("[P.pipe_type]", "layer_manifold"))
to_chat(user, "<span class='notice'>You start painting \the [A] [paint_color]...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, paint_speed, target = A))
A.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY) //paint the pipe
user.visible_message("<span class='notice'>[user] paints \the [A] [paint_color].</span>","<span class='notice'>You paint \the [A] [paint_color].</span>")
return
if(EATING_MODE) //Eating pipes
if(!(istype(A, /obj/item/pipe) || istype(A, /obj/item/pipe_meter) || istype(A, /obj/structure/disposalconstruct) || istype(A, /obj/structure/c_transit_tube) || istype(A, /obj/structure/c_transit_tube_pod)))
return ..()
to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 2, target = A))
activate()
qdel(A)
if(mode&BUILD_MODE)
switch(category) //if we've gotten this var, the target is valid
if(ATMOS_CATEGORY) //Making pipes
if(!can_make_pipe)
return ..()
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if (recipe.type == /datum/pipe_info/meter)
to_chat(user, "<span class='notice'>You start building a meter...</span>")
if(do_after(user, atmos_build_speed, target = A))
activate()
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(get_turf(A))
PM.setAttachLayer(piping_layer)
if(mode&WRENCH_MODE)
PM.wrench_act(user, src)
else
to_chat(user, "<span class='notice'>You start building a pipe...</span>")
if(do_after(user, atmos_build_speed, target = A))
activate()
var/obj/machinery/atmospherics/path = queued_p_type
var/pipe_item_type = initial(path.construction_type) || /obj/item/pipe
var/obj/item/pipe/P = new pipe_item_type(get_turf(A), queued_p_type, queued_p_dir)
if(queued_p_flipped && istype(P, /obj/item/pipe/trinary/flippable))
var/obj/item/pipe/trinary/flippable/F = P
F.flipped = queued_p_flipped
P.update()
P.add_fingerprint(usr)
P.setPipingLayer(piping_layer)
if(findtext("[queued_p_type]", "/obj/machinery/atmospherics/pipe") && !findtext("[queued_p_type]", "layer_manifold"))
P.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
if(mode&WRENCH_MODE)
P.wrench_act(user, src)
if(DISPOSALS_CATEGORY) //Making disposals pipes
if(!can_make_pipe)
return ..()
A = get_turf(A)
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, disposal_build_speed, target = A))
var/obj/structure/disposalconstruct/C = new (A, queued_p_type, queued_p_dir, queued_p_flipped)
if(!C.can_place())
to_chat(user, "<span class='warning'>There's not enough room to build that here!</span>")
qdel(C)
return
if(ATMOS_MODE) //Making pipes
if(!can_make_pipe)
return ..()
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if (recipe.type == /datum/pipe_info/meter)
to_chat(user, "<span class='notice'>You start building a meter...</span>")
if(do_after(user, 2, target = A))
activate()
var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(get_turf(A))
PM.setAttachLayer(temp_piping_layer)
if(autowrench)
PM.wrench_act(user, src)
else
to_chat(user, "<span class='notice'>You start building a pipe...</span>")
if(do_after(user, 2, target = A))
activate()
var/obj/machinery/atmospherics/path = queued_p_type
var/pipe_item_type = initial(path.construction_type) || /obj/item/pipe
var/obj/item/pipe/P = new pipe_item_type(get_turf(A), queued_p_type, queued_p_dir)
if(queued_p_flipped && istype(P, /obj/item/pipe/trinary/flippable))
var/obj/item/pipe/trinary/flippable/F = P
F.flipped = queued_p_flipped
P.update()
P.add_fingerprint(usr)
P.setPipingLayer(temp_piping_layer)
P.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY)
if(autowrench)
P.wrench_act(user, src)
if(DISPOSALS_MODE) //Making disposals pipes
if(!can_make_pipe)
return ..()
A = get_turf(A)
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 4, target = A))
var/obj/structure/disposalconstruct/C = new (A, queued_p_type, queued_p_dir, queued_p_flipped)
if(!C.can_place())
to_chat(user, "<span class='warning'>There's not enough room to build that here!</span>")
qdel(C)
C.add_fingerprint(usr)
C.update_icon()
if(mode&WRENCH_MODE)
C.wrench_act(user, src)
return
activate()
if(TRANSIT_CATEGORY) //Making transit tubes
if(!can_make_pipe)
return ..()
A = get_turf(A)
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
to_chat(user, "<span class='notice'>You start building a transit tube...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, transit_build_speed, target = A))
activate()
if(queued_p_type == /obj/structure/c_transit_tube_pod)
var/obj/structure/c_transit_tube_pod/pod = new /obj/structure/c_transit_tube_pod(A)
pod.add_fingerprint(usr)
if(mode&WRENCH_MODE)
pod.wrench_act(user, src)
C.add_fingerprint(usr)
C.update_icon()
return
else
var/obj/structure/c_transit_tube/tube = new queued_p_type(A)
tube.dir = queued_p_dir
if(TRANSIT_MODE) //Making transit tubes
if(!can_make_pipe)
if(queued_p_flipped)
tube.dir = turn(queued_p_dir, 45)
tube.simple_rotate_flip()
tube.add_fingerprint(usr)
if(mode&WRENCH_MODE)
tube.wrench_act(user, src)
return
else
return ..()
A = get_turf(A)
if(isclosedturf(A))
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
return
to_chat(user, "<span class='notice'>You start building a transit tube...</span>")
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 4, target = A))
activate()
if(queued_p_type == /obj/structure/c_transit_tube_pod)
var/obj/structure/c_transit_tube_pod/pod = new /obj/structure/c_transit_tube_pod(A)
pod.add_fingerprint(usr)
else
var/obj/structure/c_transit_tube/tube = new queued_p_type(A)
tube.dir = queued_p_dir
if(queued_p_flipped)
tube.dir = turn(queued_p_dir, 45)
tube.simple_rotate_flip()
tube.add_fingerprint(usr)
return
else
return ..()
/obj/item/pipe_dispenser/AltClick(mob/living/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
autowrench = !autowrench
to_chat(user, "<span class='notice'>You [autowrench ? "enable" : "disable"] auto wrenching.</span>")
/obj/item/pipe_dispenser/proc/activate()
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
#undef ATMOS_CATEGORY
#undef DISPOSALS_CATEGORY
#undef TRANSIT_CATEGORY
#undef BUILD_MODE
#undef DESTROY_MODE
#undef PAINT_MODE
#undef EATING_MODE
#undef ATMOS_MODE
#undef DISPOSALS_MODE
#undef WRENCH_MODE
+2 -2
View File
@@ -159,7 +159,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null)
if(lit)
return
if(!initialized)
if(!(flags_1 & INITIALIZED_1))
icon_state = icon_on
item_state = icon_on
return
@@ -315,7 +315,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
src.pixel_y = rand(-5, 5)
/obj/item/clothing/mask/cigarette/rollie/nicotine
list_reagents = list("nicotine" = 15)
list_reagents = list("nicotine" = 15)
/obj/item/clothing/mask/cigarette/rollie/trippy
list_reagents = list("nicotine" = 15, "mushroomhallucinogen" = 35)
@@ -135,6 +135,10 @@
name = "Power Monitor (Computer Board)" //name fixed 250810
build_path = /obj/machinery/computer/monitor
/obj/item/circuitboard/computer/powermonitor/secret
name = "Outdated Power Monitor (Computer Board)" //Variant used on ruins to prevent them from showing up on PDA's.
build_path = /obj/machinery/computer/monitor/secret
/obj/item/circuitboard/computer/olddoor
name = "DoorMex (Computer Board)"
build_path = /obj/machinery/computer/pod/old
@@ -228,6 +232,10 @@
name = "Supply Request Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/request
/obj/item/circuitboard/computer/bounty
name = "Nanotrasen Bounty Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/request
/obj/item/circuitboard/computer/operating
name = "Operating Computer (Computer Board)"
build_path = /obj/machinery/computer/operating
@@ -7,6 +7,15 @@
/obj/item/stack/cable_coil = 1,
/obj/item/stack/sheet/glass = 2)
/obj/item/circuitboard/machine/vr_sleeper
name = "VR Sleeper (Machine Board)"
build_path = /obj/machinery/vr_sleeper
req_components = list(
/obj/item/stock_parts/manipulator = 1,
/obj/item/stack/cable_coil = 1,
/obj/item/stock_parts/scanning_module = 2,
/obj/item/stack/sheet/glass = 2)
/obj/item/circuitboard/machine/announcement_system
name = "Announcement System (Machine Board)"
build_path = /obj/machinery/announcement_system
@@ -216,6 +225,23 @@
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
/obj/machinery/vending/games = "\improper Good Clean Fun",
/obj/machinery/vending/autodrobe = "AutoDrobe",
/obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe",
/obj/machinery/vending/wardrobe/medi_wardrobe = "MediDrobe",
/obj/machinery/vending/wardrobe/engi_wardrobe = "EngiDrobe",
/obj/machinery/vending/wardrobe/atmos_wardrobe = "AtmosDrobe",
/obj/machinery/vending/wardrobe/cargo_wardrobe = "CargoDrobe",
/obj/machinery/vending/wardrobe/robo_wardrobe = "RoboDrobe",
/obj/machinery/vending/wardrobe/science_wardrobe = "SciDrobe",
/obj/machinery/vending/wardrobe/hydro_wardrobe = "HyDrobe",
/obj/machinery/vending/wardrobe/curator_wardrobe = "CuraDrobe",
/obj/machinery/vending/wardrobe/bar_wardrobe = "BarDrobe",
/obj/machinery/vending/wardrobe/chef_wardrobe = "ChefDrobe",
/obj/machinery/vending/wardrobe/jani_wardrobe = "JaniDrobe",
/obj/machinery/vending/wardrobe/law_wardrobe = "LawDrobe",
/obj/machinery/vending/wardrobe/chap_wardrobe = "ChapDrobe",
/obj/machinery/vending/wardrobe/chem_wardrobe = "ChemDrobe",
/obj/machinery/vending/wardrobe/gene_wardrobe = "GeneDrobe",
/obj/machinery/vending/wardrobe/viro_wardrobe = "ViroDrobe",
/obj/machinery/vending/clothing = "ClothesMate",
/obj/machinery/vending/medical = "NanoMed Plus",
/obj/machinery/vending/wallmed = "NanoMed")
+4 -2
View File
@@ -144,8 +144,11 @@
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.</span>")
/obj/item/defibrillator/emp_act(severity)
if(cell)
. = ..()
if(cell && !(. & EMP_PROTECT_CONTENTS))
deductcharge(1000 / severity)
if (. & EMP_PROTECT_SELF)
return
if(safety)
safety = FALSE
visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
@@ -155,7 +158,6 @@
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon()
..()
/obj/item/defibrillator/proc/toggle_paddles()
set name = "Toggle Paddles"
+9 -6
View File
@@ -661,7 +661,7 @@ GLOBAL_LIST_EMPTY(PDAs)
to_chat(user, "<span class='info'>Message sent to [target_text]: \"[message]\"</span>")
// Reset the photo
photo = null
last_text = world.time
last_text = world.time
if (everyone)
last_everyone = world.time
@@ -979,11 +979,14 @@ GLOBAL_LIST_EMPTY(PDAs)
// Pass along the pulse to atoms in contents, largely added so pAIs are vulnerable to EMP
/obj/item/pda/emp_act(severity)
for(var/atom/A in src)
A.emp_act(severity)
emped += 1
spawn(200 * severity)
emped -= 1
. = ..()
if (!(. & EMP_PROTECT_CONTENTS))
for(var/atom/A in src)
A.emp_act(severity)
if (!(. & EMP_PROTECT_SELF))
emped += 1
spawn(200 * severity)
emped -= 1
/proc/get_viewable_pdas()
. = list()
+14 -7
View File
@@ -260,10 +260,16 @@ Code:
var/turf/pda_turf = get_turf(src)
for(var/obj/machinery/computer/monitor/pMon in GLOB.machines)
if(!(pMon.stat & (NOPOWER | BROKEN)) )
powercount++
powermonitors += pMon
if(pMon.stat & (NOPOWER | BROKEN)) //check to make sure the computer is functional
continue
if(pda_turf.z != pMon.z) //and that we're on the same zlevel as the computer (lore: limited signal strength)
continue
if(pMon.is_secret_monitor) //make sure it isn't a secret one (ie located on a ruin), allowing people to metagame that the location exists
continue
powercount++
powermonitors += pMon
if(!powercount)
@@ -274,22 +280,23 @@ Code:
var/count = 0
for(var/obj/machinery/computer/monitor/pMon in powermonitors)
count++
menu += "<a href='byond://?src=[REF(src)];choice=Power Select;target=[count]'>[pMon] </a><BR>"
menu += "<a href='byond://?src=[REF(src)];choice=Power Select;target=[count]'>[pMon] - [get_area_name(pMon, TRUE)] </a><BR>"
menu += "</FONT>"
if (433)
menu = "<h4>[PDAIMG(power)] Power Monitor </h4><BR>"
if(!powmonitor)
if(!powmonitor || !powmonitor.get_powernet())
menu += "<span class='danger'>No connection<BR></span>"
else
var/list/L = list()
for(var/obj/machinery/power/terminal/term in powmonitor.attached.powernet.nodes)
var/datum/powernet/connected_powernet = powmonitor.get_powernet()
for(var/obj/machinery/power/terminal/term in connected_powernet.nodes)
if(istype(term.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = term.master
L += A
menu += "<PRE>Total power: [DisplayPower(powmonitor.attached.powernet.viewavail)]<BR>Total load: [DisplayPower(powmonitor.attached.powernet.viewload)]<BR>"
menu += "<PRE>Location: [get_area_name(powmonitor, TRUE)]<BR>Total power: [DisplayPower(connected_powernet.viewavail)]<BR>Total load: [DisplayPower(connected_powernet.viewload)]<BR>"
menu += "<FONT SIZE=-1>"
+12 -4
View File
@@ -202,6 +202,8 @@
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["monitor"]) in cameras
if(C && istype(C))
if(!same_z_level(C))
return
track_mode = BUGMODE_MONITOR
current = C
usr.reset_perspective(null)
@@ -221,6 +223,8 @@
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["emp"]) in cameras
if(C && istype(C) && C.bug == src)
if(!same_z_level(C))
return
C.emp_act(EMP_HEAVY)
C.bug = null
bugged_cameras -= C.c_tag
@@ -235,13 +239,11 @@
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["view"]) in cameras
if(C && istype(C))
if(!same_z_level(C))
return
if(!C.can_use())
to_chat(usr, "<span class='warning'>Something's wrong with that camera! You can't get a feed.</span>")
return
var/turf/T = get_turf(loc)
if(!T || C.z != T.z)
to_chat(usr, "<span class='warning'>You can't get a signal!</span>")
return
current = C
spawn(6)
if(src.check_eye(usr))
@@ -293,6 +295,12 @@
break
src.updateSelfDialog()
/obj/item/camera_bug/proc/same_z_level(var/obj/machinery/camera/C)
var/turf/T = get_turf(loc)
if(!T || C.z != T.z)
to_chat(usr, "<span class='warning'>You can't get a signal!</span>")
return FALSE
return TRUE
#undef BUGMODE_LIST
#undef BUGMODE_MONITOR
+3
View File
@@ -29,6 +29,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
return ..()
/obj/item/gps/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
emped = TRUE
cut_overlay("working")
add_overlay("emp")
+3 -2
View File
@@ -156,7 +156,8 @@
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
/obj/item/paicard/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
if(pai)
pai.emp_act(severity)
..()
@@ -6,7 +6,7 @@
desc = "A basic handheld radio that communicates with local telecommunication networks."
dog_fashion = /datum/dog_fashion/back
flags_1 = CONDUCT_1 | HEAR_1 | NO_EMP_WIRES_1
flags_1 = CONDUCT_1 | HEAR_1
slot_flags = ITEM_SLOT_BELT
throw_speed = 3
throw_range = 7
@@ -95,6 +95,10 @@
for(var/ch_name in channels)
secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name])
/obj/item/radio/ComponentInitialize()
. = ..()
AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES)
/obj/item/radio/interact(mob/user)
if (..())
return
@@ -339,6 +343,9 @@
return ..()
/obj/item/radio/emp_act(severity)
. = ..()
if (. & EMP_PROTECT_SELF)
return
emped++ //There's been an EMP; better count it
var/curremp = emped //Remember which EMP this was
if (listening && ismob(loc)) // if the radio is turned on and on someone's person they notice
@@ -353,7 +360,6 @@
emped = 0
if (!istype(src, /obj/item/radio/intercom)) // intercoms will turn back on on their own
on = TRUE
..()
///////////////////////////////
//////////Borg Radios//////////
@@ -1,7 +1,6 @@
/obj/item/transfer_valve
icon = 'icons/obj/assemblies.dmi'
name = "tank transfer valve"
icon = 'icons/obj/device.dmi'
icon_state = "valve_1"
item_state = "ttv"
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
+1 -1
View File
@@ -235,7 +235,7 @@
spellname = "knock"
icon_state ="bookknock"
desc = "This book is hard to hold closed properly."
remarks = list("Open Sesame!", "So THAT'S the magic password!", "Slow down, book. I still haven't finished this page...", "The book won't stop moving!", "I think this is hurting the spine of the book...", "I can't get to the next page, it's stuck t I'm good, it just turned to the next page on it's own.", "Yeah, staff of doors does the same thing. Go figure...")
remarks = list("Open Sesame!", "So THAT'S the magic password!", "Slow down, book. I still haven't finished this page...", "The book won't stop moving!", "I think this is hurting the spine of the book...", "I can't get to the next page, it's stuck t- I'm good, it just turned to the next page on it's own.", "Yeah, staff of doors does the same thing. Go figure...")
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
..()
+7 -3
View File
@@ -5,7 +5,7 @@
item_state = "plastic-explosive"
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
flags_1 = NOBLUDGEON_1 | NO_EMP_WIRES_1
flags_1 = NOBLUDGEON_1
det_time = 10
display_timer = 0
w_class = WEIGHT_CLASS_SMALL
@@ -19,9 +19,13 @@
var/can_attach_mob = FALSE
var/full_damage_on_mobs = FALSE
/obj/item/grenade/plastic/New()
/obj/item/grenade/plastic/Initialize()
. = ..()
plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER)
..()
/obj/item/grenade/plastic/ComponentInitialize()
. = ..()
AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES)
/obj/item/grenade/plastic/Destroy()
qdel(nadeassembly)
@@ -17,7 +17,7 @@
C.flash_act()
// Spawn some hostile syndicate critters and spread them out
spawn_and_random_walk(spawner_type, T, deliveryamt, walk_chance=50, admin_spawn=admin_spawned)
spawn_and_random_walk(spawner_type, T, deliveryamt, walk_chance=50, admin_spawn=((flags_1 & ADMIN_SPAWNED_1) ? TRUE : FALSE))
qdel(src)
+169
View File
@@ -1,3 +1,172 @@
// CHAPLAIN CUSTOM ARMORS //
/obj/item/clothing/head/helmet/chaplain
name = "crusader helmet"
desc = "Deus Vult."
icon_state = "knight_templar"
item_state = "knight_templar"
armor = list("melee" = 41, "bullet" = 15, "laser" = 5,"energy" = 5, "bomb" = 5, "bio" = 2, "rad" = 0, "fire" = 0, "acid" = 50)
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
strip_delay = 80
dog_fashion = null
/obj/item/clothing/suit/armor/riot/chaplain
name = "crusader armour"
desc = "God wills it!"
icon_state = "knight_templar"
item_state = "knight_templar"
/obj/item/holybeacon
name = "armaments beacon"
desc = "Contains a set of armaments for the chaplain."
icon = 'icons/obj/device.dmi'
icon_state = "gangtool-red"
item_state = "radio"
/obj/item/holybeacon/attack_self(mob/user)
if(user.mind && (user.mind.isholy) && !SSreligion.holy_armor_type)
beacon_armor(user)
else
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
/obj/item/holybeacon/proc/beacon_armor(mob/M)
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
var/list/display_names = list()
for(var/V in holy_armor_list)
var/atom/A = V
display_names += list(initial(A.name) = A)
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || SSreligion.holy_armor_type)
return
var/index = display_names.Find(choice)
var/A = holy_armor_list[index]
SSreligion.holy_armor_type = A
var/holy_armor_box = new A
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
if(holy_armor_box)
qdel(src)
M.put_in_active_hand(holy_armor_box)///YOU COMPILED
/obj/item/storage/box/holy
name = "Templar Kit"
/obj/item/storage/box/holy/PopulateContents()
new /obj/item/clothing/head/helmet/chaplain(src)
new /obj/item/clothing/suit/armor/riot/chaplain(src)
/obj/item/storage/box/holy/student
name = "Profane Scholar Kit"
/obj/item/storage/box/holy/student/PopulateContents()
new /obj/item/clothing/suit/armor/riot/chaplain/studentuni(src)
new /obj/item/clothing/head/helmet/chaplain/cage(src)
/obj/item/clothing/suit/armor/riot/chaplain/studentuni
name = "student robe"
desc = "The uniform of a bygone institute of learning."
icon_state = "studentuni"
item_state = "studentuni"
body_parts_covered = ARMS|CHEST
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
/obj/item/clothing/head/helmet/chaplain/cage
name = "cage"
desc = "A cage that restrains the will of the self, allowing one to see the profane world for what it is."
alternate_worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi'
icon_state = "cage"
item_state = "cage"
worn_x_dimension = 64
worn_y_dimension = 64
dynamic_hair_suffix = ""
/obj/item/storage/box/holy/sentinel
name = "Stone Sentinel Kit"
/obj/item/storage/box/holy/sentinel/PopulateContents()
new /obj/item/clothing/suit/armor/riot/chaplain/ancient(src)
new /obj/item/clothing/head/helmet/chaplain/ancient(src)
/obj/item/clothing/head/helmet/chaplain/ancient
name = "ancient helmet"
desc = "None may pass!"
icon_state = "knight_ancient"
item_state = "knight_ancient"
/obj/item/clothing/suit/armor/riot/chaplain/ancient
name = "ancient armour"
desc = "Defend the treasure..."
icon_state = "knight_ancient"
item_state = "knight_ancient"
/obj/item/storage/box/holy/witchhunter
name = "Witchhunter Kit"
/obj/item/storage/box/holy/witchhunter/PopulateContents()
new /obj/item/clothing/suit/armor/riot/chaplain/witchhunter(src)
new /obj/item/clothing/head/helmet/chaplain/witchunter_hat(src)
/obj/item/clothing/suit/armor/riot/chaplain/witchhunter
name = "witchunter garb"
desc = "This worn outfit saw much use back in the day."
icon_state = "witchhunter"
item_state = "witchhunter"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
/obj/item/clothing/head/helmet/chaplain/witchunter_hat
name = "witchunter hat"
desc = "This hat saw much use back in the day."
icon_state = "witchhunterhat"
item_state = "witchhunterhat"
flags_cover = HEADCOVERSEYES
/obj/item/storage/box/holy/follower
name = "Followers of the Chaplain Kit"
/obj/item/storage/box/holy/follower/PopulateContents()
new /obj/item/clothing/suit/hooded/chaplain_hoodie/leader(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
/obj/item/clothing/suit/hooded/chaplain_hoodie
name = "follower hoodie"
desc = "Hoodie made for acolytes of the chaplain."
icon_state = "chaplain_hoodie"
item_state = "chaplain_hoodie"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood
/obj/item/clothing/head/hooded/chaplain_hood
name = "follower hood"
desc = "Hood made for acolytes of the chaplain."
icon_state = "chaplain_hood"
body_parts_covered = HEAD
flags_inv = HIDEHAIR|HIDEFACE|HIDEEARS
/obj/item/clothing/suit/hooded/chaplain_hoodie/leader
name = "leader hoodie"
desc = "Now you're ready for some 50 dollar bling water."
icon_state = "chaplain_hoodie_leader"
item_state = "chaplain_hoodie_leader"
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood/leader
/obj/item/clothing/head/hooded/chaplain_hood/leader
name = "leader hood"
desc = "I mean, you don't /have/ to seek bling water. I just think you should."
icon_state = "chaplain_hood_leader"
// CHAPLAIN NULLROD AND CUSTOM WEAPONS //
/obj/item/nullrod
name = "null rod"
desc = "A rod of pure obsidian; its very presence disrupts and dampens the powers of Nar-Sie and Ratvar's followers."
+2 -4
View File
@@ -29,8 +29,8 @@
return cell
/obj/item/inducer/emp_act(severity)
..()
if(cell)
. = ..()
if(cell && !(. & EMP_PROTECT_CONTENTS))
cell.emp_act(severity)
/obj/item/inducer/attack_obj(obj/O, mob/living/carbon/user)
@@ -181,5 +181,3 @@
/obj/item/inducer/sci/Initialize()
. = ..()
update_icon()
+21 -7
View File
@@ -276,6 +276,7 @@
/obj/item/harmalarm
name = "\improper Sonic Harm Prevention Tool"
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH."
icon = 'icons/obj/device.dmi'
icon_state = "megaphone"
var/cooldown = 0
@@ -339,10 +340,11 @@
#define DISPENSE_LOLLIPOP_MODE 1
#define THROW_LOLLIPOP_MODE 2
#define THROW_GUMBALL_MODE 3
#define DISPENSE_ICECREAM_MODE 4
/obj/item/borg/lollipop
name = "lollipop fabricator"
desc = "Reward good humans with this. Toggle in-module to switch between dispensing and high velocity ejection modes."
name = "treat fabricator"
desc = "Reward humans with various treats. Toggle in-module to switch between dispensing and high velocity ejection modes."
icon_state = "lollipop"
var/candy = 30
var/candymax = 30
@@ -378,7 +380,7 @@
/obj/item/borg/lollipop/proc/dispense(atom/A, mob/user)
if(candy <= 0)
to_chat(user, "<span class='warning'>No lollipops left in storage!</span>")
to_chat(user, "<span class='warning'>No treats left in storage!</span>")
return FALSE
var/turf/T = get_turf(A)
if(!T || !istype(T) || !isopenturf(T))
@@ -388,7 +390,15 @@
if(O.density)
return FALSE
var/obj/item/reagent_containers/food/snacks/lollipop/L = new(T)
var/obj/item/reagent_containers/food/snacks/L
switch(mode)
if(DISPENSE_LOLLIPOP_MODE)
L = new /obj/item/reagent_containers/food/snacks/lollipop(T)
if(DISPENSE_ICECREAM_MODE)
L = new /obj/item/reagent_containers/food/snacks/icecream(T)
var/obj/item/reagent_containers/food/snacks/icecream/I = L
I.add_ice_cream("vanilla")
I.desc = "Eat the ice cream."
var/into_hands = FALSE
if(ismob(A))
@@ -399,9 +409,9 @@
check_amount()
if(into_hands)
user.visible_message("<span class='notice'>[user] dispenses a lollipop into the hands of [A].</span>", "<span class='notice'>You dispense a lollipop into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
user.visible_message("<span class='notice'>[user] dispenses a treat into the hands of [A].</span>", "<span class='notice'>You dispense a treat into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
else
user.visible_message("<span class='notice'>[user] dispenses a lollipop.</span>", "<span class='notice'>You dispense a lollipop.</span>", "<span class='italics'>You hear a click.</span>")
user.visible_message("<span class='notice'>[user] dispenses a treat.</span>", "<span class='notice'>You dispense a treat.</span>", "<span class='italics'>You hear a click.</span>")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
return TRUE
@@ -447,7 +457,7 @@
if(R.emagged)
hitdamage = emaggedhitdamage
switch(mode)
if(DISPENSE_LOLLIPOP_MODE)
if(DISPENSE_LOLLIPOP_MODE, DISPENSE_ICECREAM_MODE)
if(!proximity)
return FALSE
dispense(target, user)
@@ -466,6 +476,9 @@
mode = THROW_GUMBALL_MODE
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
if(THROW_GUMBALL_MODE)
mode = DISPENSE_ICECREAM_MODE
to_chat(user, "<span class='notice'>Module is now dispensing ice cream.</span>")
if(DISPENSE_ICECREAM_MODE)
mode = DISPENSE_LOLLIPOP_MODE
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
..()
@@ -473,6 +486,7 @@
#undef DISPENSE_LOLLIPOP_MODE
#undef THROW_LOLLIPOP_MODE
#undef THROW_GUMBALL_MODE
#undef DISPENSE_ICECREAM_MODE
/obj/item/ammo_casing/caseless/gumball
name = "Gumball"
@@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \
+1 -1
View File
@@ -607,4 +607,4 @@
/obj/item/storage/belt/sabre/PopulateContents()
new /obj/item/melee/sabre(src)
update_icon()
update_icon()
+3 -2
View File
@@ -178,8 +178,9 @@
return 1
/obj/item/melee/baton/emp_act(severity)
deductcharge(1000 / severity)
..()
. = ..()
if (!(. & EMP_PROTECT_SELF))
deductcharge(1000 / severity)
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/melee/baton/cattleprod
+1 -1
View File
@@ -103,7 +103,7 @@
H.bleedsuppress = TRUE //AND WE WON'T BLEED OUT LIKE COWARDS
H.adjustStaminaLoss(-5) //CIT CHANGE - AND MAY HE NEVER SUCCUMB TO EXHAUSTION
else
if(!admin_spawned)
if(!(flags_1 & ADMIN_SPAWNED_1))
qdel(src)
+2 -4
View File
@@ -222,12 +222,10 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
cut_overlay(GLOB.fire_overlay, TRUE)
SSfire_burning.processing -= src
/obj/proc/tesla_act(var/power)
/obj/proc/tesla_act(power, tesla_flags, shocked_targets)
obj_flags |= BEING_SHOCKED
var/power_bounced = power / 2
tesla_zap(src, 3, power_bounced)
tesla_zap(src, 3, power_bounced, tesla_flags, shocked_targets)
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
//The surgeon general warns that being buckled to certain objects recieving powerful shocks is greatly hazardous to your health
+1
View File
@@ -115,6 +115,7 @@
anchored = TRUE
density = FALSE
layer = TURF_LAYER
plane = FLOOR_PLANE
icon_state = "weeds"
max_integrity = 15
canSmoothWith = list(/obj/structure/alien/weeds, /turf/closed/wall)
+5 -2
View File
@@ -106,8 +106,11 @@
/obj/structure/sign/barsign/emp_act(severity)
set_sign(new /datum/barsign/hiddensigns/empbarsign)
broken = 1
. = ..()
if(. & EMP_PROTECT_SELF)
return
set_sign(new /datum/barsign/hiddensigns/empbarsign)
broken = 1
@@ -436,9 +436,13 @@
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/structure/closet/emp_act(severity)
for(var/obj/O in src)
O.emp_act(severity)
if(secure && !broken)
. = ..()
if(. & EMP_PROTECT_SELF)
return
if (!(. & EMP_PROTECT_CONTENTS))
for(var/obj/O in src)
O.emp_act(severity)
if(secure && !broken && !(. & EMP_PROTECT_SELF))
if(prob(50 / severity))
locked = !locked
update_icon()
@@ -448,8 +452,6 @@
else
req_access = list()
req_access += pick(get_all_accesses())
..()
/obj/structure/closet/contents_explosion(severity, target)
for(var/atom/A in contents)
@@ -107,35 +107,18 @@
icon_door = "black"
/obj/structure/closet/wardrobe/chaplain_black/PopulateContents()
new /obj/item/holybeacon(src)
new /obj/item/clothing/accessory/pocketprotector/cosmetology(src)
new /obj/item/clothing/under/rank/chaplain(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/suit/nun(src)
new /obj/item/clothing/head/nun_hood(src)
new /obj/item/clothing/suit/studentuni(src)
new /obj/item/clothing/head/cage(src)
new /obj/item/clothing/suit/witchhunter(src)
new /obj/item/clothing/head/witchunter_hat(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/holidaypriest(src)
new /obj/item/storage/backpack/cultpack (src)
new /obj/item/clothing/head/helmet/knight/templar(src)
new /obj/item/clothing/suit/armor/riot/knight/templar(src)
new /obj/item/storage/backpack/cultpack(src)
new /obj/item/storage/fancy/candle_box(src)
new /obj/item/storage/fancy/candle_box(src)
return
/obj/structure/closet/coffin
name = "coffin"
desc = "It's a burial receptacle for the dearly departed."
icon_state = "coffin"
resistance_flags = FLAMMABLE
max_integrity = 70
horizontal = TRUE
delivery_icon = "deliverycrate"
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 5
/obj/structure/closet/wardrobe/red
name = "security wardrobe"
icon_door = "red"
@@ -1,5 +1,6 @@
//The "BDPtarget" temp visual is created by the expressconsole, which in turn makes two things: a falling droppod animation, and the droppod itself.
#define POD_STANDARD 0
#define POD_BLUESPACE 1
//------------------------------------SUPPLY POD-------------------------------------//
/obj/structure/closet/supplypod
@@ -52,11 +53,11 @@
update_icon()
playsound(src, open_sound, 15, 1, -3)
if(istype(src,/obj/structure/closet/supplypod/bluespacepod))
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
do_sparks(5, TRUE, src)
qdel(src)//no need for QDEL_IN if we already have a timer
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
do_sparks(5, TRUE, src)
qdel(src)//no need for QDEL_IN if we already have a timer
/obj/structure/closet/supplypod/Destroy()//make some sparks b4 deletion
QDEL_NULL(SupplyOrder)
@@ -74,7 +75,7 @@
randomdir = FALSE
/obj/effect/temp_visual/DPfall/Initialize(var/dropLocation, var/podID)
if (podID == 1)
if (podID == POD_BLUESPACE)
icon_state = "bluespacepod_falling"
name = "Bluespace Drop Pod"
else
@@ -92,15 +93,15 @@
/obj/effect/DPtarget/Initialize(mapload, datum/supply_order/SO, var/podID)
. = ..()
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), 30)//wait 3 seconds
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), podID == POD_BLUESPACE ? 15 : 30)//standard pods take 3 seconds to come in, bluespace pods take 1.5
/obj/effect/DPtarget/proc/beginLaunch(datum/supply_order/SO, var/podID)
fallingPod = new /obj/effect/temp_visual/DPfall(drop_location(), podID)
animate(fallingPod, pixel_z = 0, time = 3, easing = LINEAR_EASING)//make and animate a falling pod
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
/obj/effect/DPtarget/proc/endLaunch(datum/supply_order/SO, var/podID)
if (podID == 1)//podID 1 = bluespace supplypod, podID 0 = standard supplypod
if (podID == POD_BLUESPACE)
new /obj/structure/closet/supplypod/bluespacepod(drop_location(), SO)//pod is created
explosion(src,0,0,2, flame_range = 1) //explosion and camshake (shoutout to @cyberboss)
else
@@ -64,6 +64,15 @@
manifest = null
update_icon()
/obj/structure/closet/crate/coffin
name = "coffin"
desc = "It's a burial receptacle for the dearly departed."
icon_state = "coffin"
resistance_flags = FLAMMABLE
max_integrity = 70
material_drop = /obj/item/stack/sheet/mineral/wood
material_drop_amount = 5
/obj/structure/closet/crate/internals
desc = "An internals crate."
name = "internals crate"
+1 -1
View File
@@ -269,7 +269,7 @@
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 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.powernet.avail * 0.01, TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN | TESLA_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.powernet.load += C.powernet.avail * 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 ..()
+29
View File
@@ -178,3 +178,32 @@
break // break if both our connections are filled
update_icon()
/obj/structure/ladder/unbreakable/binary
name = "mysterious ladder"
desc = "Where does it go?"
height = 0
id = "lavaland_binary"
var/area_to_place = /area/lavaland/surface/outdoors
/obj/structure/ladder/unbreakable/binary/Initialize()
if(area_to_place)
var/turf/T = safepick(get_area_turfs(area_to_place))
if(T)
var/obj/structure/ladder/unbreakable/U = new (T)
U.id = id
U.height = height+1
for(var/turf/TT in range(2,U))
TT.TerraformTurf(/turf/open/indestructible/binary, /turf/open/indestructible/binary)
return ..()
/obj/structure/ladder/unbreakable/binary/space
id = "space_binary"
area_to_place = /area/space
/obj/structure/ladder/unbreakable/binary/unlinked //Crew gets to complete one
id = "unlinked_binary"
area_to_place = null
+3 -1
View File
@@ -10,6 +10,9 @@
CanAtmosPass = ATMOS_PASS_NO
var/state = PLASTIC_FLAPS_NORMAL
/obj/structure/plasticflaps/opaque
opacity = TRUE
/obj/structure/plasticflaps/examine(mob/user)
. = ..()
switch(state)
@@ -103,4 +106,3 @@
. = ..()
if (oldloc)
oldloc.air_update_turf(1)
+5 -10
View File
@@ -54,7 +54,6 @@
/obj/structure/reflector/setDir(new_dir)
setAngle(dir_map_to_angle(new_dir))
return ..(NORTH)
/obj/structure/reflector/proc/dir_map_to_angle(dir)
@@ -196,11 +195,10 @@
anchored = TRUE
/obj/structure/reflector/single/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, P.Angle)
var/norm_inc = WRAP(incidence, -90, 90)
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
if(ISINRANGE_EX(norm_inc, -90, 90))
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, (P.Angle + 180))
if(abs(incidence) > 90 && abs(incidence) < 270)
return FALSE
var/new_angle = SIMPLIFY_DEGREES(rotation_angle + incidence)
P.setAngle(new_angle)
return ..()
@@ -223,11 +221,8 @@
anchored = TRUE
/obj/structure/reflector/double/auto_reflect(obj/item/projectile/P, pdir, turf/ploc, pangle)
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, P.Angle)
var/norm_inc = WRAP(incidence, -90, 90)
var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180)
if(ISINRANGE_EX(norm_inc, -90, 90))
new_angle += 180
var/incidence = GET_ANGLE_OF_INCIDENCE(rotation_angle, (P.Angle + 180))
var/new_angle = SIMPLIFY_DEGREES(rotation_angle + incidence)
P.setAngle(new_angle)
return ..()
+3 -3
View File
@@ -130,7 +130,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
if(new_baseturfs.len == 1)
new_baseturfs = new_baseturfs[1]
return ChangeTurf(turf_type, new_baseturfs, flags)
if(baseturfs == type)
return src
@@ -171,7 +171,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
var/turf/newT
if(flags & CHANGETURF_SKIP) // We haven't been initialized
if(initialized)
if(flags_1 & INITIALIZED_1)
stack_trace("CHANGETURF_SKIP was used in a PlaceOnTop call for a turf that's initialized. This is a mistake. [src]([type])")
assemble_baseturfs()
if(fake_turf_type)
@@ -217,7 +217,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
if(depth)
var/list/target_baseturfs
if(length(copytarget.baseturfs))
if(length(copytarget.baseturfs))
// with default inputs this would be Copy(CLAMP(2, -INFINITY, baseturfs.len))
// Don't forget a lower index is lower in the baseturfs stack, the bottom is baseturfs[1]
target_baseturfs = copytarget.baseturfs.Copy(CLAMP(1 + ignore_bottom, 1 + copytarget.baseturfs.len - depth, copytarget.baseturfs.len))
+11
View File
@@ -72,6 +72,17 @@
desc = "A floor made of invulnerable notebook paper."
icon_state = "paperfloor"
/turf/open/indestructible/binary
name = "tear in the fabric of reality"
CanAtmosPass = ATMOS_PASS_NO
baseturfs = /turf/open/indestructible/binary
icon_state = "binary"
/turf/open/indestructible/airblock
icon_state = "bluespace"
CanAtmosPass = ATMOS_PASS_NO
baseturfs = /turf/open/indestructible/airblock
/turf/open/indestructible/clock_spawn_room
name = "cogmetal"
desc = "Brass plating that gently radiates heat. For some reason, it reminds you of blood."
+30
View File
@@ -28,6 +28,20 @@
/turf/open/chasm/MakeDry()
return
/turf/open/chasm/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_FLOORWALL)
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
return FALSE
/turf/open/chasm/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
switch(passed_mode)
if(RCD_FLOORWALL)
to_chat(user, "<span class='notice'>You build a floor.</span>")
PlaceOnTop(/turf/open/floor/plating)
return TRUE
return FALSE
/turf/open/chasm/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/floors.dmi'
underlay_appearance.icon_state = "basalt"
@@ -86,3 +100,19 @@
underlay_appearance.icon = 'icons/turf/floors.dmi'
underlay_appearance.icon_state = "dirt"
return TRUE
//For Bag of Holding Bombs
/turf/open/chasm/magic
name = "tear in the fabric of reality"
desc = "Where does it lead?"
icon = 'icons/turf/floors/magic_chasm.dmi'
baseturfs = /turf/open/chasm/magic
light_range = 1.9
light_power = 0.65
/turf/open/chasm/magic/Initialize()
. = ..()
var/turf/T = safepick(get_area_turfs(/area/fabric_of_reality))
if(T)
set_target(T)
+4 -7
View File
@@ -45,13 +45,10 @@
var/turf/p_turf = get_turf(P)
var/face_direction = get_dir(src, p_turf)
var/face_angle = dir2angle(face_direction)
var/incidence_s = WRAP(GET_ANGLE_OF_INCIDENCE(face_angle, P.Angle), -90, 90)
var/new_angle = face_angle + incidence_s
var/new_angle_s = new_angle
while(new_angle_s > 180) // Translate to regular projectile degrees
new_angle_s -= 360
while(new_angle_s < -180)
new_angle_s += 360
var/incidence_s = GET_ANGLE_OF_INCIDENCE(face_angle, (P.Angle + 180))
if(abs(incidence_s) > 90 && abs(incidence_s) < 270)
return FALSE
var/new_angle_s = SIMPLIFY_DEGREES(face_angle + incidence_s)
P.setAngle(new_angle_s)
return TRUE
+2 -2
View File
@@ -28,9 +28,9 @@
icon_state = SPACE_ICON_STATE
air = space_gas
if(initialized)
if(flags_1 & INITIALIZED_1)
stack_trace("Warning: [src]([type]) initialized multiple times!")
initialized = TRUE
flags_1 |= INITIALIZED_1
var/area/A = loc
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
+6 -6
View File
@@ -40,9 +40,9 @@
. = ..()
/turf/Initialize()
if(initialized)
if(flags_1 & INITIALIZED_1)
stack_trace("Warning: [src]([type]) initialized multiple times!")
initialized = TRUE
flags_1 |= INITIALIZED_1
assemble_baseturfs()
@@ -92,7 +92,7 @@
SSair.remove_from_active(src)
visibilityChanged()
QDEL_LIST(blueprint_data)
initialized = FALSE
flags_1 &= ~INITIALIZED_1
requires_activation = FALSE
..()
@@ -245,19 +245,19 @@
/turf/proc/levelupdate()
for(var/obj/O in src)
if(O.level == 1 && O.initialized)
if(O.level == 1 && (O.flags_1 & INITIALIZED_1))
O.hide(src.intact)
// override for space turfs, since they should never hide anything
/turf/open/space/levelupdate()
for(var/obj/O in src)
if(O.level == 1 && O.initialized)
if(O.level == 1 && (O.flags_1 & INITIALIZED_1))
O.hide(0)
// Removes all signs of lattice on the pos of the turf -Donkieyo
/turf/proc/RemoveLattice()
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L && L.initialized)
if(L && (L.flags_1 & INITIALIZED_1))
qdel(L)
/turf/proc/phase_damage_creatures(damage,mob/U = null)//>Ninja Code. Hurts and knocks out creatures on this turf //NINJACODE