diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
index 1301895facd..0e64cefc7aa 100644
--- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
@@ -11703,7 +11703,7 @@
})
"auD" = (
/obj/machinery/light_construct/small,
-/obj/item/toolbox_tiles_sensor,
+/obj/item/toolbox_tiles/sensor,
/turf/simulated/floor/plating,
/area/maintenance/fpmaint2{
name = "Port Maintenance"
diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm
index 606fabcc4b5..15154bd85d3 100644
--- a/_maps/map_files/cyberiad/cyberiad.dmm
+++ b/_maps/map_files/cyberiad/cyberiad.dmm
@@ -9787,6 +9787,7 @@
pixel_y = 2
},
/obj/item/stamp/law,
+/obj/item/pen/multi,
/turf/simulated/floor/plasteel{
tag = "icon-cult";
icon_state = "cult";
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index b138d19b513..8171efa7825 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -28,6 +28,46 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
+/obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/binary/pump/AICtrlClick()
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/binary/pump/AltClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ set_max()
+ return
+
+/obj/machinery/atmospherics/binary/pump/AIAltClick()
+ set_max()
+ return ..()
+
+/obj/machinery/atmospherics/binary/pump/proc/toggle()
+ if(powered())
+ on = !on
+ update_icon()
+
+/obj/machinery/atmospherics/binary/pump/proc/set_max()
+ if(powered())
+ target_pressure = MAX_OUTPUT_PRESSURE
+ update_icon()
+
/obj/machinery/atmospherics/binary/pump/Destroy()
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -203,7 +243,15 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(obj/item/W, mob/user, params)
- if(!istype(W, /obj/item/wrench))
+ if(istype(W, /obj/item/pen))
+ var/t = copytext(stripped_input(user, "Enter the name for the pump.", "Rename", name), 1, MAX_NAME_LEN)
+ if(!t)
+ return
+ if(!in_range(src, usr) && loc != usr)
+ return
+ name = t
+ return
+ else if(!istype(W, /obj/item/wrench))
return ..()
if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index 11874172340..6633c1ac10d 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -28,6 +28,46 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
+/obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/binary/volume_pump/AICtrlClick()
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/binary/volume_pump/AltClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ set_max()
+ return
+
+/obj/machinery/atmospherics/binary/volume_pump/AIAltClick()
+ set_max()
+ return ..()
+
+/obj/machinery/atmospherics/binary/volume_pump/proc/toggle()
+ if(powered())
+ on = !on
+ update_icon()
+
+/obj/machinery/atmospherics/binary/volume_pump/proc/set_max()
+ if(powered())
+ transfer_rate = MAX_TRANSFER_RATE
+ update_icon()
+
/obj/machinery/atmospherics/binary/volume_pump/Destroy()
if(SSradio)
SSradio.remove_object(src, frequency)
@@ -199,7 +239,15 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W, mob/user, params)
- if(!istype(W, /obj/item/wrench))
+ if(istype(W, /obj/item/pen))
+ var/t = copytext(stripped_input(user, "Enter the name for the volume pump.", "Rename", name), 1, MAX_NAME_LEN)
+ if(!t)
+ return
+ if(!in_range(src, usr) && loc != usr)
+ return
+ name = t
+ return
+ else if(!istype(W, /obj/item/wrench))
return ..()
if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index c6720e45f6e..a778b01ea86 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -22,6 +22,45 @@ Filter types:
var/frequency = 0
var/datum/radio_frequency/radio_connection
+/obj/machinery/atmospherics/trinary/filter/CtrlClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/trinary/filter/AICtrlClick()
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/trinary/filter/AltClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ set_max()
+ return
+
+/obj/machinery/atmospherics/trinary/filter/AIAltClick()
+ set_max()
+ return ..()
+
+/obj/machinery/atmospherics/trinary/filter/proc/toggle()
+ if(powered())
+ on = !on
+ update_icon()
+
+/obj/machinery/atmospherics/trinary/filter/proc/set_max()
+ if(powered())
+ target_pressure = MAX_OUTPUT_PRESSURE
+ update_icon()
/obj/machinery/atmospherics/trinary/filter/Destroy()
if(SSradio)
@@ -211,4 +250,16 @@ Filter types:
. = TRUE
update_icon()
- SSnanoui.update_uis(src)
\ No newline at end of file
+ SSnanoui.update_uis(src)
+
+/obj/machinery/atmospherics/trinary/filter/attackby(obj/item/W, mob/user, params)
+ if(istype(W, /obj/item/pen))
+ var/t = copytext(stripped_input(user, "Enter the name for the filter.", "Rename", name), 1, MAX_NAME_LEN)
+ if(!t)
+ return
+ if(!in_range(src, usr) && loc != usr)
+ return
+ name = t
+ return
+ else
+ return ..()
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 0c64804b6da..e7c91172e3b 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -12,10 +12,50 @@
//node 3 is the outlet, nodes 1 & 2 are intakes
+/obj/machinery/atmospherics/trinary/mixer/CtrlClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/trinary/mixer/AICtrlClick()
+ toggle()
+ return ..()
+
+/obj/machinery/atmospherics/trinary/mixer/AltClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user) && !issilicon(usr))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ set_max()
+ return
+
+/obj/machinery/atmospherics/trinary/mixer/AIAltClick()
+ set_max()
+ return ..()
+
/obj/machinery/atmospherics/trinary/mixer/flipped
icon_state = "mmap"
flipped = 1
+/obj/machinery/atmospherics/trinary/mixer/proc/toggle()
+ if(powered())
+ on = !on
+ update_icon()
+
+/obj/machinery/atmospherics/trinary/mixer/proc/set_max()
+ if(powered())
+ target_pressure = MAX_OUTPUT_PRESSURE
+ update_icon()
+
/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
if(flipped)
icon_state = "m"
@@ -176,4 +216,16 @@
. = TRUE
update_icon()
- SSnanoui.update_uis(src)
\ No newline at end of file
+ SSnanoui.update_uis(src)
+
+/obj/machinery/atmospherics/trinary/mixer/attackby(obj/item/W, mob/user, params)
+ if(istype(W, /obj/item/pen))
+ var/t = copytext(stripped_input(user, "Enter the name for the mixer.", "Rename", name), 1, MAX_NAME_LEN)
+ if(!t)
+ return
+ if(!in_range(src, usr) && loc != usr)
+ return
+ name = t
+ return
+ else
+ return ..()
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm
index b4a0cd9ba7b..43082c38ded 100644
--- a/code/ATMOSPHERICS/datum_pipeline.dm
+++ b/code/ATMOSPHERICS/datum_pipeline.dm
@@ -22,7 +22,7 @@
A.nullifyPipenet(src)
return ..()
-/datum/pipeline/proc/process()//This use to be called called from the pipe networks
+/datum/pipeline/process()//This use to be called called from the pipe networks
if(update)
update = 0
reconcile_air()
diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm
index 1c4c12c243d..cbcf2c1dd90 100644
--- a/code/__DEFINES/MC.dm
+++ b/code/__DEFINES/MC.dm
@@ -21,7 +21,6 @@
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing += Datum}
#define STOP_PROCESSING(Processor, Datum) Datum.isprocessing = FALSE;Processor.processing -= Datum
-#define START_DEFERRED_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing.Insert(1,Datum)}
//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index 5ee80535780..ba0d1858616 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -13,6 +13,8 @@
//Objects
#define isitem(A) (istype(A, /obj/item))
+#define ismachinery(A) (istype(A, /obj/machinery))
+
#define ismecha(A) (istype(A, /obj/mecha))
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm
index 5ade3b0baef..29a93ae94f9 100644
--- a/code/__DEFINES/subsystems.dm
+++ b/code/__DEFINES/subsystems.dm
@@ -61,6 +61,8 @@
#define INIT_ORDER_LANGUAGE 6
#define INIT_ORDER_MACHINES 5
#define INIT_ORDER_CIRCUIT 4
+#define INIT_ORDER_HOLIDAY 3
+#define INIT_ORDER_ALARMS 2
#define INIT_ORDER_TIMER 1
#define INIT_ORDER_DEFAULT 0
#define INIT_ORDER_AIR -1
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index fd5fd510e40..c567ba7adb2 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -491,7 +491,7 @@ GLOBAL_LIST_INIT(do_after_once_tracker, list())
to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];")
to_chat(user, "Location = [location_description];")
to_chat(user, "[special_role_description]")
- to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)")
+ to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)")
// Gets the first mob contained in an atom, and warns the user if there's not exactly one
/proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr)
diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm
index 930a8ee9de5..5b90cda376e 100644
--- a/code/__HELPERS/names.dm
+++ b/code/__HELPERS/names.dm
@@ -49,10 +49,10 @@ var/religion_name = null
name = ""
// Prefix
- for(var/holiday_name in holiday_master.holidays)
+ for(var/holiday_name in SSholiday.holidays)
if(holiday_name == "Friday the 13th")
random = 13
- var/datum/holiday/holiday = holiday_master.holidays[holiday_name]
+ var/datum/holiday/holiday = SSholiday.holidays[holiday_name]
name = holiday.getStationPrefix()
//get normal name
if(!name)
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index 5b639cc80f8..b90f7502e65 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -113,9 +113,14 @@
/proc/typing_input(mob/user, message = "", title = "", default = "")
if(user.client.checkTyping()) // Prevent double windows
return null
- user.client.typing = TRUE
+ var/client/C = user.client // Save it in a var in case the client disconnects from the mob
+ C.typing = TRUE
var/msg = input(user, message, title, default) as text|null
- user.client.typing = FALSE
+ if(!C)
+ return null
+ C.typing = FALSE
+ if(!user || C != user.client) // User got out of the mob for some reason or the mob is gone
+ return null
return msg
//Filters out undesirable characters from names
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 436970567a0..968a2f4d577 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -27,7 +27,5 @@ Due to BYOND features used in this codebase, you must update to version 510 or l
This may require updating to a beta release.
#endif
-var/global/list/processing_objects = list() //This has to be initialized BEFORE world
-
// Macros that must exist before world.dm
-#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
+#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
\ No newline at end of file
diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm
index 1e35e150a25..6dc18d4fdff 100644
--- a/code/_globalvars/configuration.dm
+++ b/code/_globalvars/configuration.dm
@@ -3,7 +3,7 @@ var/datum/configuration/config = null
var/host = null
var/join_motd = null
GLOBAL_VAR(join_tos)
-var/game_version = "Custom ParaCode"
+var/game_version = "ParaCode"
var/changelog_hash = md5('html/changelog.html') //used to check if the CL changed
var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm
index c7217221585..e6f463d6f23 100644
--- a/code/_globalvars/lists/objects.dm
+++ b/code/_globalvars/lists/objects.dm
@@ -19,8 +19,6 @@ GLOBAL_LIST_INIT(navigation_computers, list())
GLOBAL_LIST_INIT(all_areas, list())
GLOBAL_LIST_INIT(machines, list())
-GLOBAL_LIST_INIT(fast_processing, list())
-GLOBAL_LIST_INIT(processing_power_items, list()) //items that ask to be called every cycle
GLOBAL_LIST_INIT(rcd_list, list()) //list of Rapid Construction Devices.
GLOBAL_LIST_INIT(apcs, list())
diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm
index f0bb813a336..77443fb4ab2 100644
--- a/code/_globalvars/misc.dm
+++ b/code/_globalvars/misc.dm
@@ -1,8 +1,9 @@
var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null
-// Event Manager, the manager for events.
-var/datum/event_manager/event_manager = new()
+GLOBAL_VAR_INIT(CELLRATE, 0.002) // conversion ratio between a watt-tick and kilojoule
+GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
+
// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
var/global/obj/item/radio/intercom/global_announcer = create_global_announcer()
var/global/obj/item/radio/intercom/command/command_announcer = create_command_announcer()
diff --git a/code/_globalvars/station.dm b/code/_globalvars/station.dm
index 2d635996b30..e997a672e1f 100644
--- a/code/_globalvars/station.dm
+++ b/code/_globalvars/station.dm
@@ -1,6 +1,3 @@
var/global/datum/datacore/data_core = null
-var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
-var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
-
var/map_name = "Unknown" //The name of the map that is loaded. Assigned in world/New()
\ No newline at end of file
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index c84a64722c5..22921f5228d 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -49,7 +49,7 @@
if(!can_see(A))
if(isturf(A)) //On unmodified clients clicking the static overlay clicks the turf underneath
return // So there's no point messaging admins
- message_admins("[key_name_admin(src)] might be running a modified client! (failed can_see on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))")
+ add_attack_logs(src, src, "[key_name_admin(src)] might be running a modified client! (failed can_see on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))", ATKLOG_ALL)
var/message = "[key_name(src)] might be running a modified client! (failed can_see on AI click of [A]([COORD(pixel_turf)]))"
log_admin(message)
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
@@ -64,7 +64,7 @@
else
if(pixel_turf.obscured)
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)])")
- message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))")
+ add_attack_logs(src, src, "[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))", ATKLOG_ALL)
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
return
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 24e58b502ad..286f8ce7095 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -122,6 +122,10 @@
throw_item(A)
return
+ if(isLivingSSD(A))
+ if(client && client.send_ssd_warning(A))
+ return
+
var/obj/item/W = get_active_hand()
if(W == A)
diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm
index 24a2442faeb..e3d423130e5 100644
--- a/code/_onclick/hud/_defines.dm
+++ b/code/_onclick/hud/_defines.dm
@@ -154,6 +154,12 @@
#define ui_bot_radio "EAST-1:28,SOUTH:7"
#define ui_bot_pull "EAST-2:26,SOUTH:7"
+//Ghosts
+#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
+#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
+#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
+#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
+
//HUD styles. Please ensure HUD_VERSIONS is the same as the maximum index. Index order defines how they are cycled in F12.
#define HUD_STYLE_STANDARD 1
#define HUD_STYLE_REDUCED 2
diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm
index 32a9d7cf46d..5780e86a298 100644
--- a/code/_onclick/hud/action_button.dm
+++ b/code/_onclick/hud/action_button.dm
@@ -17,6 +17,7 @@
//Hide/Show Action Buttons ... Button
/obj/screen/movable/action_button/hide_toggle
name = "Hide Buttons"
+ desc = "Shift-click any button to reset its position. Alt-click to reset all buttons to their default positions."
icon = 'icons/mob/actions/actions.dmi'
icon_state = "bg_default"
var/hidden = 0
@@ -24,8 +25,18 @@
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
var/list/modifiers = params2list(params)
if(modifiers["shift"])
- moved = 0
- return 1
+ moved = FALSE
+ usr.update_action_buttons(TRUE)
+ return TRUE
+ if(modifiers["alt"])
+ for(var/V in usr.actions)
+ var/datum/action/A = V
+ var/obj/screen/movable/action_button/B = A.button
+ B.moved = FALSE
+ moved = FALSE
+ usr.update_action_buttons(TRUE)
+ to_chat(usr, "Action button positions have been reset.")
+ return TRUE
usr.hud_used.action_buttons_hidden = !usr.hud_used.action_buttons_hidden
hidden = usr.hud_used.action_buttons_hidden
@@ -36,6 +47,15 @@
UpdateIcon()
usr.update_action_buttons()
+/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user)
+ for(var/V in user.actions)
+ var/datum/action/A = V
+ var/obj/screen/movable/action_button/B = A.button
+ B.moved = FALSE
+ if(moved)
+ moved = FALSE
+ user.update_action_buttons(TRUE)
+ to_chat(user, "Action button positions have been reset.")
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
if(isalien(user))
diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm
new file mode 100644
index 00000000000..4e92395f4cc
--- /dev/null
+++ b/code/_onclick/hud/ghost.dm
@@ -0,0 +1,61 @@
+/mob/dead/observer/create_mob_hud()
+ if(client && !hud_used)
+ hud_used = new /datum/hud/ghost(src)
+
+/obj/screen/ghost
+ icon = 'icons/mob/screen_ghost.dmi'
+
+/obj/screen/ghost/MouseEntered()
+ flick(icon_state + "_anim", src)
+
+/obj/screen/ghost/jumptomob
+ name = "Jump to mob"
+ icon_state = "jumptomob"
+
+/obj/screen/ghost/jumptomob/Click()
+ var/mob/dead/observer/G = usr
+ G.jumptomob()
+
+/obj/screen/ghost/orbit
+ name = "Orbit"
+ icon_state = "orbit"
+
+/obj/screen/ghost/orbit/Click()
+ var/mob/dead/observer/G = usr
+ G.follow()
+
+/obj/screen/ghost/reenter_corpse
+ name = "Re-enter corpse"
+ icon_state = "reenter_corpse"
+
+/obj/screen/ghost/reenter_corpse/Click()
+ var/mob/dead/observer/G = usr
+ G.reenter_corpse()
+
+/obj/screen/ghost/teleport
+ name = "Teleport"
+ icon_state = "teleport"
+
+/obj/screen/ghost/teleport/Click()
+ var/mob/dead/observer/G = usr
+ G.dead_tele()
+
+/datum/hud/ghost/New(mob/owner)
+ ..()
+ var/obj/screen/using
+
+ using = new /obj/screen/ghost/jumptomob()
+ using.screen_loc = ui_ghost_jumptomob
+ static_inventory += using
+
+ using = new /obj/screen/ghost/orbit()
+ using.screen_loc = ui_ghost_orbit
+ static_inventory += using
+
+ using = new /obj/screen/ghost/reenter_corpse()
+ using.screen_loc = ui_ghost_reenter_corpse
+ static_inventory += using
+
+ using = new /obj/screen/ghost/teleport()
+ using.screen_loc = ui_ghost_teleport
+ static_inventory += using
diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm
index 134eaec96a6..f997109f90b 100644
--- a/code/controllers/ProcessScheduler/core/process.dm
+++ b/code/controllers/ProcessScheduler/core/process.dm
@@ -158,7 +158,7 @@
/datum/controller/process/proc/setup()
-/datum/controller/process/proc/process()
+/datum/controller/process/proc/process_decrepit()
started()
doWork()
finished()
diff --git a/code/controllers/ProcessScheduler/core/processScheduler.dm b/code/controllers/ProcessScheduler/core/processScheduler.dm
index 9fcf6d13759..66d101d178e 100644
--- a/code/controllers/ProcessScheduler/core/processScheduler.dm
+++ b/code/controllers/ProcessScheduler/core/processScheduler.dm
@@ -72,9 +72,9 @@ var/global/datum/controller/processScheduler/processScheduler
scheduler_sleep_interval = world.tick_lag
updateStartDelays()
spawn(0)
- process()
+ process_decrepit()
-/datum/controller/processScheduler/proc/process()
+/datum/controller/processScheduler/proc/process_decrepit()
while(isRunning)
checkRunningProcesses()
queueProcesses()
@@ -154,7 +154,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/runProcess(var/datum/controller/process/process)
spawn(0)
- process.process()
+ process.process_decrepit()
/datum/controller/processScheduler/proc/processStarted(var/datum/controller/process/process)
setRunningProcessState(process)
diff --git a/code/controllers/Processes/alarm.dm b/code/controllers/Processes/alarm.dm
deleted file mode 100644
index 068ef0c1213..00000000000
--- a/code/controllers/Processes/alarm.dm
+++ /dev/null
@@ -1,37 +0,0 @@
-// We manually initialize the alarm handlers instead of looping over all existing types
-// to make it possible to write: camera.triggerAlarm() rather than alarm_manager.managers[datum/alarm_handler/camera].triggerAlarm() or a variant thereof.
-/var/global/datum/alarm_handler/atmosphere/atmosphere_alarm = new()
-/var/global/datum/alarm_handler/burglar/burglar_alarm = new()
-/var/global/datum/alarm_handler/camera/camera_alarm = new()
-/var/global/datum/alarm_handler/fire/fire_alarm = new()
-/var/global/datum/alarm_handler/motion/motion_alarm = new()
-/var/global/datum/alarm_handler/power/power_alarm = new()
-
-// Alarm Manager, the manager for alarms.
-var/datum/controller/process/alarm/alarm_manager
-
-/datum/controller/process/alarm
- var/list/datum/alarm/all_handlers
-
-/datum/controller/process/alarm/setup()
- name = "alarm"
- schedule_interval = 20 // every 2 seconds
- all_handlers = list(atmosphere_alarm, burglar_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
-
-/datum/controller/process/alarm/doWork()
- for(var/datum/alarm_handler/AH in all_handlers)
- AH.process()
-
-DECLARE_GLOBAL_CONTROLLER(alarm, alarm_manager)
-
-/datum/controller/process/alarm/proc/active_alarms()
- var/list/all_alarms = new
- for(var/datum/alarm_handler/AH in all_handlers)
- var/list/alarms = AH.alarms
- all_alarms += alarms
-
- return all_alarms
-
-/datum/controller/process/alarm/proc/number_of_active_alarms()
- var/list/alarms = active_alarms()
- return alarms.len
diff --git a/code/controllers/Processes/event.dm b/code/controllers/Processes/event.dm
deleted file mode 100644
index 42e8c4bcc1d..00000000000
--- a/code/controllers/Processes/event.dm
+++ /dev/null
@@ -1,48 +0,0 @@
-/datum/controller/process/event/setup()
- name = "event"
- schedule_interval = 20 // every 2 seconds
- if(!holiday_master)
- holiday_master = new
- holiday_master.Setup()
-
-/datum/controller/process/event/doWork()
- event_manager.process()
- holiday_master.process()
-
-/////////
-//Holiday controller
-/////////
-
-var/global/datum/controller/holiday/holiday_master //This has to be defined before world.
-
-/datum/controller/holiday
- var/list/holidays
-
-/datum/controller/holiday/proc/Setup()
- getHoliday()
-
-/datum/controller/holiday/proc/process()
- if(holiday_master.holidays)
- for(var/datum/holiday/H in holiday_master.holidays)
- if(H.eventChance)
- if(prob(H.eventChance))
- H.handle_event()
-
-/datum/controller/holiday/proc/getHoliday()
- if(!config.allow_holidays) return //Holiday stuff was not enabled in the config!
-
- var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
- var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
- var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
-
- for(var/H in subtypesof(/datum/holiday))
- var/datum/holiday/holiday = new H()
- if(holiday.shouldCelebrate(DD, MM, YY))
- holiday.celebrate()
- if(!holidays)
- holidays = list()
- holidays[holiday.name] = holiday
-
- if(holidays)
- holidays = shuffle(holidays)
- world.update_status()
diff --git a/code/controllers/Processes/fast_process.dm b/code/controllers/Processes/fast_process.dm
deleted file mode 100644
index c27a749f526..00000000000
--- a/code/controllers/Processes/fast_process.dm
+++ /dev/null
@@ -1,17 +0,0 @@
-/datum/controller/process/fast_process/setup()
- name = "fast processing"
- schedule_interval = 2 //every 0.2 seconds
- start_delay = 9
- log_startup_progress("Fast Processing starting up.")
-
-/datum/controller/process/fast_process/statProcess()
- ..()
- stat(null, "[GLOB.fast_processing.len] fast processes")
-
-/datum/controller/process/fast_process/doWork()
- for(last_object in GLOB.fast_processing)
- var/obj/O = last_object
- try
- O.process()
- catch(var/exception/e)
- catchException(e, O)
\ No newline at end of file
diff --git a/code/controllers/Processes/obj.dm b/code/controllers/Processes/obj.dm
deleted file mode 100644
index 454709b6194..00000000000
--- a/code/controllers/Processes/obj.dm
+++ /dev/null
@@ -1,28 +0,0 @@
-/datum/controller/process/obj/setup()
- name = "obj"
- schedule_interval = 20 // every 2 seconds
- start_delay = 8
-
-/datum/controller/process/obj/started()
- ..()
- if(!processing_objects)
- processing_objects = list()
-
-/datum/controller/process/obj/statProcess()
- ..()
- stat(null, "[processing_objects.len] objects")
-
-/datum/controller/process/obj/doWork()
- for(last_object in processing_objects)
- var/datum/O = last_object
- if(istype(O) && !QDELETED(O))
- try
- // Reagent datums get shoved in here, but the process proc isn't on the
- // base datum type, so we just call it blindly.
- O:process()
- catch(var/exception/e)
- catchException(e, O)
- SCHECK
- else
- catchBadType(O)
- processing_objects -= O
diff --git a/code/controllers/Processes/ticker.dm b/code/controllers/Processes/ticker.dm
index 8fc476116e5..578c2725710 100644
--- a/code/controllers/Processes/ticker.dm
+++ b/code/controllers/Processes/ticker.dm
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_CONTROLLER(ticker, tickerProcess)
lastTickerTime = currentTime
- ticker.process()
+ ticker.process_decrepit()
/datum/controller/process/ticker/proc/getLastTickerTimeDuration()
return lastTickerTimeDuration
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index ad9cb166970..a424fb1ac55 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -1,5 +1,7 @@
/datum/configuration
var/server_name = null // server name (for world name / status)
+ var/server_tag_line = null // server tagline (for showing on hub entry)
+ var/server_extra_features = null // server-specific extra features (for hub entry)
var/server_suffix = 0 // generate numeric suffix based on server port
var/minimum_client_build = 1421 // Build 1421 due to the middle mouse button exploit
@@ -53,7 +55,6 @@
var/humans_need_surnames = 0
var/allow_random_events = 0 // enables random events mid-round when set to 1
var/allow_ai = 1 // allow ai job
- var/hostedby = null
var/respawn = 0
var/guest_jobban = 1
var/usewhitelist = 0
@@ -69,6 +70,9 @@
var/assistantlimit = 0 //enables assistant limiting
var/assistantratio = 2 //how many assistants to security members
+ var/auto_cryo_ssd_mins = 0
+ var/ssd_warning = 0
+
var/prob_free_golems = 75 //chance for free golems spawners to appear roundstart
var/unrestricted_free_golems = FALSE //if true, free golems can appear on all roundtypes
@@ -301,6 +305,11 @@
if("shadowling_max_age")
config.shadowling_max_age = text2num(value)
+ if("auto_cryo_ssd_mins")
+ config.auto_cryo_ssd_mins = text2num(value)
+ if("ssd_warning")
+ config.ssd_warning = 1
+
if("ipintel_email")
if(value != "ch@nge.me")
config.ipintel_email = value
@@ -408,6 +417,12 @@
if("servername")
config.server_name = value
+ if("server_tag_line")
+ config.server_tag_line = value
+
+ if("server_extra_features")
+ config.server_extra_features = value
+
if("serversuffix")
config.server_suffix = 1
@@ -417,9 +432,6 @@
if("nudge_script_path")
config.nudge_script_path = value
- if("hostedby")
- config.hostedby = value
-
if("server")
config.server = value
diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm
index 8fbed1f0b0f..79de45c3248 100644
--- a/code/controllers/subsystem/air.dm
+++ b/code/controllers/subsystem/air.dm
@@ -67,7 +67,7 @@ SUBSYSTEM_DEF(air)
setup_allturfs()
setup_atmos_machinery(GLOB.machines)
setup_pipenets(GLOB.machines)
- ..()
+ return ..()
/datum/controller/subsystem/air/fire(resumed = 0)
diff --git a/code/controllers/subsystem/alarm.dm b/code/controllers/subsystem/alarm.dm
new file mode 100644
index 00000000000..90e3ff960f1
--- /dev/null
+++ b/code/controllers/subsystem/alarm.dm
@@ -0,0 +1,30 @@
+SUBSYSTEM_DEF(alarms)
+ name = "Alarms"
+ init_order = INIT_ORDER_ALARMS // 2
+ var/datum/alarm_handler/atmosphere/atmosphere_alarm = new()
+ var/datum/alarm_handler/burglar/burglar_alarm = new()
+ var/datum/alarm_handler/camera/camera_alarm = new()
+ var/datum/alarm_handler/fire/fire_alarm = new()
+ var/datum/alarm_handler/motion/motion_alarm = new()
+ var/datum/alarm_handler/power/power_alarm = new()
+ var/list/datum/alarm/all_handlers
+
+/datum/controller/subsystem/alarms/Initialize(start_timeofday)
+ all_handlers = list(SSalarms.atmosphere_alarm, SSalarms.burglar_alarm, SSalarms.camera_alarm, SSalarms.fire_alarm, SSalarms.motion_alarm, SSalarms.power_alarm)
+ return ..()
+
+/datum/controller/subsystem/alarms/fire()
+ for(var/datum/alarm_handler/AH in all_handlers)
+ AH.process()
+
+/datum/controller/subsystem/alarms/proc/active_alarms()
+ var/list/all_alarms = new ()
+ for(var/datum/alarm_handler/AH in all_handlers)
+ var/list/alarms = AH.alarms
+ all_alarms += alarms
+
+ return all_alarms
+
+/datum/controller/subsystem/alarms/proc/number_of_active_alarms()
+ var/list/alarms = active_alarms()
+ return alarms.len
diff --git a/code/controllers/subsystem/assets.dm b/code/controllers/subsystem/assets.dm
index 1423c6cf9bd..cd531db614a 100644
--- a/code/controllers/subsystem/assets.dm
+++ b/code/controllers/subsystem/assets.dm
@@ -14,4 +14,4 @@ SUBSYSTEM_DEF(assets)
for(var/client/C in GLOB.clients)
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10)
- ..()
\ No newline at end of file
+ return ..()
\ No newline at end of file
diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm
index a0b2d49d958..cbe8806fc15 100644
--- a/code/controllers/subsystem/atoms.dm
+++ b/code/controllers/subsystem/atoms.dm
@@ -19,6 +19,7 @@ SUBSYSTEM_DEF(atoms)
setupgenetics()
initialized = INITIALIZATION_INNEW_MAPLOAD
InitializeAtoms()
+ return ..()
diff --git a/code/modules/events/event_manager.dm b/code/controllers/subsystem/events.dm
similarity index 73%
rename from code/modules/events/event_manager.dm
rename to code/controllers/subsystem/events.dm
index 1545ddbbdf0..95553ab0d7e 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/controllers/subsystem/events.dm
@@ -1,19 +1,25 @@
-/datum/event_manager
+SUBSYSTEM_DEF(events)
+ name = "Events"
+ init_order = INIT_ORDER_EVENTS
+ runlevels = RUNLEVEL_GAME
+ // Report events at the end of the rouund
+ var/report_at_round_end = 0
+
+ // UI vars
var/window_x = 700
var/window_y = 600
- var/report_at_round_end = 0
var/table_options = " align='center'"
var/head_options = " style='font-weight:bold;'"
var/row_options1 = " width='85px'"
var/row_options2 = " width='260px'"
var/row_options3 = " width='150px'"
+
+ // Event vars
var/datum/event_container/selected_event_container = null
-
- var/list/datum/event/active_events = list()
- var/list/datum/event/finished_events = list()
-
- var/list/datum/event/allEvents
- var/list/datum/event_container/event_containers = list(
+ var/list/active_events = list()
+ var/list/finished_events = list()
+ var/list/allEvents
+ var/list/event_containers = list(
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
EVENT_LEVEL_MAJOR = new/datum/event_container/major
@@ -21,18 +27,19 @@
var/datum/event_meta/new_event = new
-/datum/event_manager/New()
+/datum/controller/subsystem/events/Initialize()
allEvents = subtypesof(/datum/event)
+ return ..()
-/datum/event_manager/proc/process()
- for(var/datum/event/E in event_manager.active_events)
+/datum/controller/subsystem/events/fire()
+ for(var/datum/event/E in active_events)
E.process()
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/list/datum/event_container/EC = event_containers[i]
EC.process()
-/datum/event_manager/proc/event_complete(var/datum/event/E)
+/datum/controller/subsystem/events/proc/event_complete(var/datum/event/E)
if(!E.event_meta) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
log_debug("Event of '[E.type]' with missing meta-data has completed.")
return
@@ -57,11 +64,11 @@
log_debug("Event '[EM.name]' has completed at [station_time_timestamp()].")
-/datum/event_manager/proc/delay_events(var/severity, var/delay)
+/datum/controller/subsystem/events/proc/delay_events(var/severity, var/delay)
var/list/datum/event_container/EC = event_containers[severity]
EC.next_event_time += delay
-/datum/event_manager/proc/Interact(var/mob/living/user)
+/datum/controller/subsystem/events/proc/Interact(var/mob/living/user)
var/html = GetInteractWindow()
@@ -69,7 +76,7 @@
popup.set_content(html)
popup.open()
-/datum/event_manager/proc/RoundEnd()
+/datum/controller/subsystem/events/proc/RoundEnd()
if(!report_at_round_end)
return
@@ -89,7 +96,7 @@
to_chat(world, message)
-/datum/event_manager/proc/GetInteractWindow()
+/datum/controller/subsystem/events/proc/GetInteractWindow()
var/html = "Refresh"
if(selected_event_container)
@@ -197,7 +204,7 @@
return html
-/datum/event_manager/Topic(href, href_list)
+/datum/controller/subsystem/events/Topic(href, href_list)
if(..())
return
@@ -290,123 +297,3 @@
EC.next_event = null
Interact(usr)
-
-/client/proc/forceEvent(var/type in event_manager.allEvents)
- set name = "Trigger Event (Debug Only)"
- set category = "Debug"
-
- if(!holder)
- return
-
- if(ispath(type))
- new type(new /datum/event_meta(EVENT_LEVEL_MAJOR))
- message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
-
-/client/proc/event_manager_panel()
- set name = "Event Manager Panel"
- set category = "Event"
- if(event_manager)
- event_manager.Interact(usr)
- feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- return
-
-/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
- var/area/candidate = null
-
- var/list/safe_areas = list(
- /area/turret_protected/ai,
- /area/turret_protected/ai_upload,
- /area/engine,
- /area/solar,
- /area/holodeck,
- /area/shuttle/arrival,
- /area/shuttle/escape,
- /area/shuttle/escape_pod1/station,
- /area/shuttle/escape_pod2/station,
- /area/shuttle/escape_pod3/station,
- /area/shuttle/escape_pod5/station,
- /area/shuttle/specops/station,
- /area/shuttle/prison/station,
- /area/shuttle/administration/station
- )
-
- //These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
- var/list/danger_areas = list(
- /area/engine/break_room,
- /area/engine/chiefs_office)
-
- var/list/event_areas = list()
-
- for(var/areapath in the_station_areas)
- event_areas += typesof(areapath)
- for(var/areapath in safe_areas)
- event_areas -= typesof(areapath)
- for(var/areapath in danger_areas)
- event_areas += typesof(areapath)
-
- while(event_areas.len > 0)
- var/list/event_turfs = null
- candidate = locate(pick_n_take(event_areas))
- event_turfs = get_area_turfs(candidate)
- if(event_turfs.len > 0)
- break
-
- return candidate
-
-/datum/event/proc/num_players()
- var/players = 0
- for(var/mob/living/carbon/human/P in GLOB.player_list)
- if(P.client)
- players++
- return players
-
-// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
-// with a specific role.
-// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
-/proc/number_active_with_role()
- var/list/active_with_role = list()
- active_with_role["Engineer"] = 0
- active_with_role["Medical"] = 0
- active_with_role["Security"] = 0
- active_with_role["Scientist"] = 0
- active_with_role["AI"] = 0
- active_with_role["Cyborg"] = 0
- active_with_role["Janitor"] = 0
- active_with_role["Botanist"] = 0
- active_with_role["Any"] = GLOB.player_list.len
-
- for(var/mob/M in GLOB.player_list)
- if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
- continue
-
- if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
- active_with_role["Engineer"]++
- if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
- active_with_role["Engineer"]++
-
- if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
- active_with_role["Medical"]++
- if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
- active_with_role["Medical"]++
-
- if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
- active_with_role["Security"]++
- if(M.mind.assigned_role in security_positions)
- active_with_role["Security"]++
-
- if(M.mind.assigned_role in list("Research Director", "Scientist"))
- active_with_role["Scientist"]++
-
- if(M.mind.assigned_role == "AI")
- active_with_role["AI"]++
-
- if(M.mind.assigned_role == "Cyborg")
- active_with_role["Cyborg"]++
-
- if(M.mind.assigned_role == "Janitor")
- active_with_role["Janitor"]++
-
- if(M.mind.assigned_role == "Botanist")
- active_with_role["Botanist"]++
-
- return active_with_role
diff --git a/code/controllers/subsystem/holiday.dm b/code/controllers/subsystem/holiday.dm
new file mode 100644
index 00000000000..be9d6d4fc7d
--- /dev/null
+++ b/code/controllers/subsystem/holiday.dm
@@ -0,0 +1,31 @@
+SUBSYSTEM_DEF(holiday)
+ name = "Holiday"
+ init_order = INIT_ORDER_HOLIDAY // 3
+ flags = SS_NO_FIRE
+ var/list/holidays
+
+/datum/controller/subsystem/holiday/Initialize(start_timeofday)
+ if(!config.allow_holidays)
+ return ..() //Holiday stuff was not enabled in the config!
+
+ var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
+ var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
+ var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
+
+ for(var/H in subtypesof(/datum/holiday))
+ var/datum/holiday/holiday = new H()
+ if(holiday.shouldCelebrate(DD, MM, YY))
+ holiday.celebrate()
+ if(!holidays)
+ holidays = list()
+ holidays[holiday.name] = holiday
+
+ if(holidays)
+ holidays = shuffle(holidays)
+ world.update_status()
+ for(var/datum/holiday/H in holidays)
+ if(H.eventChance)
+ if(prob(H.eventChance))
+ H.handle_event()
+
+ return ..()
\ No newline at end of file
diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm
index 65260e5af55..531b6af2e78 100644
--- a/code/controllers/subsystem/icon_smooth.dm
+++ b/code/controllers/subsystem/icon_smooth.dm
@@ -29,4 +29,4 @@ SUBSYSTEM_DEF(icon_smooth)
smooth_icon(A)
CHECK_TICK
- ..()
+ return ..()
diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm
index 3639db6bbd2..02f2681b22d 100644
--- a/code/controllers/subsystem/jobs.dm
+++ b/code/controllers/subsystem/jobs.dm
@@ -8,6 +8,8 @@ SUBSYSTEM_DEF(jobs)
var/list/name_occupations = list() //Dict of all jobs, keys are titles
var/list/type_occupations = list() //Dict of all jobs, keys are types
var/list/prioritized_jobs = list() // List of jobs set to priority by HoP/Captain
+ var/list/id_change_records = list() // List of all job transfer records
+ var/list/id_change_counter = 1
//Players who need jobs
var/list/unassigned = list()
//Debug info
@@ -17,7 +19,7 @@ SUBSYSTEM_DEF(jobs)
if(!occupations.len)
SetupOccupations()
LoadJobs("config/jobs.txt")
- ..()
+ return ..()
/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station"))
occupations = list()
@@ -601,3 +603,84 @@ SUBSYSTEM_DEF(jobs)
spawn(0)
to_chat(H, "Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]")
+
+/datum/controller/subsystem/jobs/proc/format_jobs_for_id_computer(obj/item/card/id/tgtcard)
+ var/list/jobs_to_formats = list()
+ if(tgtcard)
+ var/mob/M = tgtcard.getPlayer()
+ for(var/datum/job/job in occupations)
+ if(tgtcard.assignment && tgtcard.assignment == job.title)
+ jobs_to_formats[job.title] = "disabled" // the job they already have is pre-selected
+ else if(!job.would_accept_job_transfer_from_player(M))
+ jobs_to_formats[job.title] = "linkDiscourage" // karma jobs they don't have available are discouraged
+ else if(job.total_positions && !job.current_positions && job.title != "Civilian")
+ jobs_to_formats[job.title] = "linkEncourage" // jobs with nobody doing them at all are encouraged
+ else if(job.total_positions >= 0 && job.current_positions >= job.total_positions)
+ jobs_to_formats[job.title] = "linkDiscourage" // jobs that are full (no free positions) are discouraged
+ return jobs_to_formats
+
+
+/datum/controller/subsystem/jobs/proc/log_job_transfer(transferee, oldvalue, newvalue, whodidit)
+ id_change_records["[id_change_counter]"] = list("transferee" = transferee, "oldvalue" = oldvalue, "newvalue" = newvalue, "whodidit" = whodidit, "timestamp" = station_time_timestamp())
+ id_change_counter++
+
+/datum/controller/subsystem/jobs/proc/slot_job_transfer(oldtitle, newtitle)
+ var/datum/job/oldjobdatum = SSjobs.GetJob(oldtitle)
+ var/datum/job/newjobdatum = SSjobs.GetJob(newtitle)
+ if(istype(oldjobdatum) && oldjobdatum.current_positions > 0 && istype(newjobdatum))
+ if(!(oldjobdatum.title in command_positions) && !(newjobdatum.title in command_positions))
+ oldjobdatum.current_positions--
+ newjobdatum.current_positions++
+
+
+/datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom)
+ var/record_html = "
"
+
+ var/table_headers = list("Crewman", "Old Rank", "New Rank", "Authorized By", "Time")
+ var/hidden_fields = list("deletedby")
+ if(centcom)
+ table_headers += "Deleted By"
+ record_html += ""
+ for(var/thisheader in table_headers)
+ record_html += "| [thisheader] | "
+ record_html += "
"
+
+ var/visible_record_count = 0
+ for(var/thisid in id_change_records)
+ var/thisrecord = id_change_records[thisid]
+
+ if(thisrecord["deletedby"] && !centcom)
+ continue
+
+ record_html += ""
+ for(var/lkey in thisrecord)
+ if(lkey in hidden_fields)
+ if(centcom)
+ record_html += "| [thisrecord[lkey]] | "
+ else
+ continue
+ else
+ record_html += "[thisrecord[lkey]] | "
+ record_html += "
"
+ visible_record_count++
+
+ record_html += "
"
+
+ if(!visible_record_count)
+ return "No records on file yet."
+ return record_html
+
+/datum/controller/subsystem/jobs/proc/delete_log_records(sourceuser, delete_all)
+ . = 0
+ if(!sourceuser)
+ return
+ var/list/new_id_change_records = list()
+ for(var/thisid in id_change_records)
+ var/thisrecord = id_change_records[thisid]
+ if(!thisrecord["deletedby"])
+ if(delete_all || thisrecord["whodidit"] == sourceuser)
+ thisrecord["deletedby"] = sourceuser
+ .++
+ new_id_change_records["[id_change_counter]"] = thisrecord
+ id_change_counter++
+ id_change_records = new_id_change_records
\ No newline at end of file
diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm
index af6898c39bd..9a73c1dbabb 100644
--- a/code/controllers/subsystem/machinery.dm
+++ b/code/controllers/subsystem/machinery.dm
@@ -17,7 +17,7 @@ SUBSYSTEM_DEF(machines)
/datum/controller/subsystem/machines/Initialize()
makepowernets()
fire()
- ..()
+ return ..()
/datum/controller/subsystem/machines/proc/makepowernets()
for(var/datum/powernet/PN in powernets)
@@ -64,23 +64,6 @@ SUBSYSTEM_DEF(machines)
if(MC_TICK_CHECK)
return
-/datum/controller/subsystem/machines/proc/process_premachines(resumed = 0)
- /* Literally exists as snowflake for fucking powersinks goddamnit */
- if(!resumed)
- src.currentrun = GLOB.processing_power_items.Copy()
- //cache for sanid speed (lists are references anyways)
- var/list/currentrun = src.currentrun
- while(currentrun.len)
- var/obj/item/I = currentrun[currentrun.len]
- currentrun.len--
- if(!QDELETED(I))
- if(!I.pwr_drain())
- GLOB.processing_power_items.Remove(I)
- else
- GLOB.processing_power_items.Remove(I)
- if(MC_TICK_CHECK)
- return
-
/datum/controller/subsystem/machines/proc/process_machines(resumed = 0)
var/seconds = wait * 0.1
if(!resumed)
@@ -113,13 +96,6 @@ SUBSYSTEM_DEF(machines)
if(state != SS_RUNNING)
return
resumed = 0
- currentpart = SSMACHINES_PREMACHINERY
-
- if(currentpart == SSMACHINES_PREMACHINERY || !resumed)
- process_premachines(resumed)
- if(state != SS_RUNNING)
- return
- resumed = 0
currentpart = SSMACHINES_MACHINERY
if(currentpart == SSMACHINES_MACHINERY || !resumed)
diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm
index 43c2f406365..d08fba5ff4f 100644
--- a/code/controllers/subsystem/mapping.dm
+++ b/code/controllers/subsystem/mapping.dm
@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(mapping)
// Populate mining Z-level hidden rooms
for(var/i=0, i= max_spores)
- return 0
+ return
if(spore_delay > world.time)
- return 0
+ return
+ flick("blob_factory_glow", src)
spore_delay = world.time + 100 // 10 seconds
var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore(src.loc, src)
BS.color = overmind.blob_reagent_datum.complementary_color
BS.overmind = overmind
overmind.blob_mobs.Add(BS)
- return 0
-
diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm
index e1a08555a10..4a2699802c1 100644
--- a/code/game/gamemodes/blob/blobs/node.dm
+++ b/code/game/gamemodes/blob/blobs/node.dm
@@ -9,7 +9,7 @@
/obj/structure/blob/node/New(loc, var/h = 100)
blob_nodes += src
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
..(loc, h)
/obj/structure/blob/node/adjustcolors(var/a_color)
@@ -26,7 +26,7 @@
/obj/structure/blob/node/Destroy()
blob_nodes -= src
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/blob/node/Life(seconds, times_fired)
diff --git a/code/game/gamemodes/blob/blobs/resource.dm b/code/game/gamemodes/blob/blobs/resource.dm
index 7198d3ef081..14c240f681b 100644
--- a/code/game/gamemodes/blob/blobs/resource.dm
+++ b/code/game/gamemodes/blob/blobs/resource.dm
@@ -13,13 +13,9 @@
qdel(src)
/obj/structure/blob/resource/run_action()
-
if(resource_delay > world.time)
- return 0
-
+ return
+ flick("blob_resource_glow", src)
resource_delay = world.time + 40 // 4 seconds
-
if(overmind)
overmind.add_points(1)
- return 0
-
diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm
index ca1dffbfa74..7ec1ec3b3f0 100644
--- a/code/game/gamemodes/blob/overmind.dm
+++ b/code/game/gamemodes/blob/overmind.dm
@@ -98,7 +98,7 @@
if(isovermind(M) || isobserver(M))
M.show_message(rendered, 2)
-/mob/camera/blob/emote(var/act,var/m_type=1,var/message = null)
+/mob/camera/blob/emote(act, m_type = 1, message = null, force)
return
/mob/camera/blob/blob_act()
diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm
index 748823829b5..61196c9862f 100644
--- a/code/game/gamemodes/blob/powers.dm
+++ b/code/game/gamemodes/blob/powers.dm
@@ -331,17 +331,13 @@
/mob/camera/blob/verb/rally_spores_power()
set category = "Blob"
- set name = "Rally Spores (5)"
+ set name = "Rally Spores"
set desc = "Rally the spores to move to your location."
var/turf/T = get_turf(src)
rally_spores(T)
/mob/camera/blob/proc/rally_spores(var/turf/T)
-
- if(!can_buy(5))
- return
-
to_chat(src, "You rally your spores.")
var/list/surrounding_turfs = block(locate(T.x - 1, T.y - 1, T.z), locate(T.x + 1, T.y + 1, T.z))
@@ -373,12 +369,12 @@
if(!N)
to_chat(src, "A node is required to birth your offspring...")
return
-
+
if(!can_buy(100))
return
split_used = TRUE
-
+
new /obj/structure/blob/core/ (get_turf(N), 200, null, blob_core.point_rate, "offspring")
qdel(N)
@@ -399,7 +395,8 @@
else
to_chat(usr, "You broadcast with your minions, [speak_text]")
for(var/mob/living/simple_animal/hostile/blob_minion in blob_mobs)
- blob_minion.say(speak_text)
+ if(blob_minion.stat == CONSCIOUS)
+ blob_minion.say(speak_text)
return
/mob/camera/blob/verb/create_storage()
@@ -478,4 +475,4 @@
to_chat(src, "Node Blobs are blobs which grow, like the core. Like the core it can activate resource and factory blobs.")
to_chat(src, "In addition to the buttons on your HUD, there are a few click shortcuts to speed up expansion and defense.")
to_chat(src, "Shortcuts: Click = Expand Blob | CTRL Click = Create Shield Blob | Middle Mouse Click = Rally Spores | Alt Click = Remove Blob")
- to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.")
\ No newline at end of file
+ to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.")
diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm
index 21d97863105..f6f7c16fd21 100644
--- a/code/game/gamemodes/changeling/powers/fleshmend.dm
+++ b/code/game/gamemodes/changeling/powers/fleshmend.dm
@@ -13,10 +13,10 @@
/obj/effect/proc_holder/changeling/fleshmend/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/effect/proc_holder/changeling/fleshmend/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/proc_holder/changeling/fleshmend/process()
diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm
index 6288bed2964..4b5560fe333 100644
--- a/code/game/gamemodes/changeling/powers/mutations.dm
+++ b/code/game/gamemodes/changeling/powers/mutations.dm
@@ -433,7 +433,7 @@
..()
if(ismob(loc))
loc.visible_message("[loc.name]\'s flesh rapidly inflates, forming a bloated mass around [loc.p_their()] body!", "We inflate our flesh, creating a spaceproof suit!", "You hear organic matter ripping and tearing!")
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/space/changeling/process()
if(ishuman(loc))
diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm
index 2fbbcdc413d..e93556ca843 100644
--- a/code/game/gamemodes/cult/cult_comms.dm
+++ b/code/game/gamemodes/cult/cult_comms.dm
@@ -39,7 +39,7 @@
my_message = "Harbringer of the Slaughter: [message]"
else
my_message = "[(ishuman(user) ? "Acolyte" : "Construct")] [user]: [message]"
- for(var/mob/M in GLOB.mob_list)
+ for(var/mob/M in GLOB.player_list)
if(iscultist(M))
to_chat(M, my_message)
else if(M in GLOB.dead_mob_list)
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index 63e0626f481..60f878257db 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -193,11 +193,11 @@ var/list/blacklisted_pylon_turfs = typecacheof(list(
return
/obj/structure/cult/functional/pylon/New()
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
..()
/obj/structure/cult/functional/pylon/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/cult/functional/pylon/process()
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 535823ebfee..5f3ed489107 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -88,7 +88,7 @@
///process()
///Called by the gameticker
-/datum/game_mode/proc/process()
+/datum/game_mode/process()
return 0
//Called by the gameticker
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index c2268063822..972075ceece 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -172,10 +172,10 @@ var/round_start_time = 0
to_chat(world, "Enjoy the game!")
world << sound('sound/AI/welcome.ogg')// Skie
- if(holiday_master.holidays)
+ if(SSholiday.holidays)
to_chat(world, "and...")
- for(var/holidayname in holiday_master.holidays)
- var/datum/holiday/holiday = holiday_master.holidays[holidayname]
+ for(var/holidayname in SSholiday.holidays)
+ var/datum/holiday/holiday = SSholiday.holidays[holidayname]
to_chat(world, "[holiday.greet()]
")
spawn(0) // Forking dynamic room selection
@@ -400,7 +400,7 @@ var/round_start_time = 0
if(m)
to_chat(world, "Tip of the round: [html_encode(m)]")
-/datum/controller/gameticker/proc/process()
+/datum/controller/gameticker/proc/process_decrepit()
if(current_state != GAME_STATE_PLAYING)
return 0
@@ -506,7 +506,13 @@ var/round_start_time = 0
mode.declare_station_goal_completion()
//Ask the event manager to print round end information
- event_manager.RoundEnd()
+ SSevents.RoundEnd()
+
+ // Add AntagHUD to everyone, see who was really evil the whole time!
+ for(var/datum/atom_hud/antag/H in huds)
+ for(var/m in GLOB.player_list)
+ var/mob/M = m
+ H.add_hud_to(M)
return 1
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 830ae26f3c1..bfde102ca35 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -56,7 +56,7 @@
var/announced = 0
/obj/machinery/doomsday_device/Destroy()
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
SSshuttle.emergencyNoEscape = 0
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
SSshuttle.emergency.mode = SHUTTLE_DOCKED
@@ -67,7 +67,7 @@
/obj/machinery/doomsday_device/proc/start()
detonation_timer = world.time + default_timer
timing = 1
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
SSshuttle.emergencyNoEscape = 1
/obj/machinery/doomsday_device/proc/seconds_remaining()
@@ -84,7 +84,7 @@
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
qdel(src)
if(!timing)
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
return
var/sec_left = seconds_remaining()
if(sec_left <= 0)
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 92ac300cc00..827eefb569d 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -110,15 +110,15 @@
M.SetStunned(0)
M.SetWeakened(0)
combat_cooldown = 0
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/armor/abductor/vest/process()
combat_cooldown++
if(combat_cooldown==initial(combat_cooldown))
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/clothing/suit/armor/abductor/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
for(var/obj/machinery/abductor/console/C in GLOB.machines)
if(C.vest == src)
C.vest = null
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index 8f058a872e6..fbe1774525f 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -373,11 +373,11 @@
/obj/effect/cocoon/abductor/proc/Start()
hatch_time = world.time + 600
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/effect/cocoon/abductor/process()
if(world.time > hatch_time)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
for(var/mob/M in contents)
src.visible_message("[src] hatches!")
M.forceMove(get_turf(src))
diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm
index 34d1f64f0d0..fa797ac929b 100644
--- a/code/game/gamemodes/miniantags/borer/borer.dm
+++ b/code/game/gamemodes/miniantags/borer/borer.dm
@@ -32,7 +32,7 @@
return FALSE
return B.host.say_understands(other, speaking)
-/mob/living/captive_brain/emote(var/message)
+/mob/living/captive_brain/emote(act, m_type = 1, message = null, force)
return
/mob/living/captive_brain/resist()
@@ -157,7 +157,7 @@
if(!istype(S.speaking, /datum/language/corticalborer) && loc == host && !talk_inside_host)
to_chat(src, "You've disabled audible speech while inside a host! Re-enable it under the borer tab, or stick to borer communications.")
return
-
+
. = ..()
/mob/living/simple_animal/borer/verb/Communicate()
@@ -475,7 +475,7 @@
set category = "Borer"
set name = "Dominate Victim"
set desc = "Freeze the limbs of a potential host with supernatural fear."
-
+
if(world.time - used_dominate < 150)
to_chat(src, "You cannot use that ability again so soon.")
return
@@ -487,22 +487,22 @@
if(stat)
to_chat(src, "You cannot do that in your current state.")
return
-
+
if(attempting_to_dominate)
to_chat(src, "You're already targeting someone!")
return
-
+
var/list/choices = list()
for(var/mob/living/carbon/C in view(3,src))
if(C.stat != DEAD)
choices += C
-
+
if(world.time - used_dominate < 300)
to_chat(src, "You cannot use that ability again so soon.")
return
-
+
attempting_to_dominate = TRUE
-
+
var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices
if(!M)
@@ -519,8 +519,8 @@
if(incapacitated())
attempting_to_dominate = FALSE
- return
-
+ return
+
if(get_dist(src, M) > 7) //to avoid people remotely doing from across the map etc, 7 is the default view range
to_chat(src, "You're too far away!")
attempting_to_dominate = FALSE
@@ -760,10 +760,9 @@
to_chat(src, "Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.")
visible_message("[src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!")
B.chemicals -= 100
-
- new /obj/effect/decal/cleanable/vomit(get_turf(src))
- playsound(loc, 'sound/effects/splat.ogg', 50, 1)
- new /mob/living/simple_animal/borer(get_turf(src),B.generation + 1)
+ var/turf/T = get_turf(src)
+ T.add_vomit_floor()
+ new /mob/living/simple_animal/borer(T, B.generation + 1)
else
to_chat(src, "You need 100 chemicals to reproduce!")
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index bde3f7ee8e9..54b01ff38ce 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -2,7 +2,9 @@
//"Ghosts" that are invisible and move like ghosts, cannot take damage while invsible
//Don't hear deadchat and are NOT normal ghosts
//Admin-spawn or random event
+
#define INVISIBILITY_REVENANT 50
+#define REVENANT_NAME_FILE "revenant_names.json"
/mob/living/simple_animal/revenant
name = "revenant"
@@ -124,9 +126,17 @@
ghost_darkness_images |= ghostimage
updateallghostimages()
remove_from_all_data_huds()
+ random_revenant_name()
addtimer(CALLBACK(src, .proc/firstSetupAttempt), 15 SECONDS) // Give admin 15 seconds to put in a ghost (Or wait 15 seconds before giving it objectives)
+/mob/living/simple_animal/revenant/proc/random_revenant_name()
+ var/built_name = ""
+ built_name += pick(strings(REVENANT_NAME_FILE, "spirit_type"))
+ built_name += " of "
+ built_name += pick(strings(REVENANT_NAME_FILE, "adjective"))
+ built_name += pick(strings(REVENANT_NAME_FILE, "theme"))
+ name = built_name
/mob/living/simple_animal/revenant/proc/firstSetupAttempt()
if(mind)
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 94190149848..2e36488cc8a 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -407,7 +407,7 @@ var/bomb_set
/obj/item/disk/nuclear/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
/obj/item/disk/nuclear/process()
@@ -437,7 +437,7 @@ var/bomb_set
message_admins("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z] - JMP":"nonexistent location"]).")
log_game("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z]":"nonexistent location"]).")
GLOB.poi_list.Remove(src)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
if(blobstart.len > 0)
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 30c79798b2f..ea95f62af57 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -335,7 +335,7 @@
include_user = 1
var/blind_smoke_acquired
var/screech_acquired
- var/drainLifeAcquired
+ var/nullChargeAcquired
var/reviveThrallAcquired
action_icon_state = "collective_mind"
@@ -370,10 +370,11 @@
It will create a choking cloud that will blind any non-thralls who enter.")
target.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null))
- if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !drainLifeAcquired)
- drainLifeAcquired = 1
- to_chat(target, "The power of your thralls has granted you the Drain Life ability. You can now drain the health of nearby humans to heal yourself.")
- target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife(null))
+ if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !nullChargeAcquired)
+ nullChargeAcquired = 1
+ to_chat(user, "The power of your thralls has granted you the Null Charge ability. This ability will drain an APC's contents to the void, preventing it from recharging \
+ or sending power until repaired.")
+ target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/null_charge(null))
if(thralls >= CEILING(9 * ticker.mode.thrall_ratio, 1) && !reviveThrallAcquired)
reviveThrallAcquired = 1
@@ -491,45 +492,57 @@
for(var/obj/structure/window/W in T.contents)
W.take_damage(rand(80, 100))
-/obj/effect/proc_holder/spell/aoe_turf/drainLife
- name = "Drain Life"
- desc = "Damages nearby humans, draining their life and healing your own wounds."
+/obj/effect/proc_holder/spell/aoe_turf/null_charge
+ name = "Null Charge"
+ desc = "Empties an APC, preventing it from recharging until fixed."
panel = "Shadowling Abilities"
- range = 3
- charge_max = 100
- clothes_req = 0
- var/targetsDrained
- var/list/nearbyTargets
- action_icon_state = "drain_life"
+ charge_max = 600
+ clothes_req = FALSE
+ action_icon_state = "null_charge"
-/obj/effect/proc_holder/spell/aoe_turf/drainLife/cast(list/targets, mob/user = usr)
+/obj/effect/proc_holder/spell/aoe_turf/null_charge/cast(mob/user = usr)
if(!shadowling_check(user))
charge_counter = charge_max
return
- var/mob/living/carbon/human/U = usr
- targetsDrained = 0
- nearbyTargets = list()
- for(var/turf/T in targets)
- for(var/mob/living/carbon/M in T.contents)
- if(M == src)
- continue
- targetsDrained++
- nearbyTargets.Add(M)
- if(!targetsDrained)
+
+ var/list/local_objs = view(1, user)
+ var/obj/machinery/power/apc/target_apc
+ for(var/object in local_objs)
+ if(istype(object, /obj/machinery/power/apc))
+ target_apc = object
+ break
+
+ if(!target_apc)
+ to_chat(user, "You must stand next to an APC to drain it!")
charge_counter = charge_max
- to_chat(U, "There were no nearby humans for you to drain.")
return
- for(var/mob/living/carbon/M in nearbyTargets)
- U.heal_organ_damage(10, 10)
- U.adjustToxLoss(-10)
- U.adjustOxyLoss(-10)
- U.adjustStaminaLoss(-20)
- U.AdjustWeakened(-1)
- U.AdjustStunned(-1)
- M.adjustOxyLoss(20)
- M.adjustStaminaLoss(20)
- to_chat(M, "You feel a wave of exhaustion and a curious draining sensation directed towards [U]!")
- to_chat(U, "You draw life from those around you to heal your wounds.")
+
+ if(target_apc.cell?.charge == 0)
+ to_chat(user, "APC must have a power to drain!")
+ charge_counter = charge_max
+ return
+
+ target_apc.operating = 0
+ target_apc.update()
+ target_apc.update_icon()
+ target_apc.visible_message("The [target_apc] flickers and begins to grow dark.")
+
+ to_chat(user, "You dim the APC's screen and carefully begin siphoning its power into the void.")
+ if(!do_after(user, 200, target=target_apc))
+ //Whoops! The APC's powers back on
+ to_chat(user, "Your concentration breaks and the APC suddenly repowers!")
+ target_apc.operating = 1
+ target_apc.update()
+ target_apc.update_icon()
+ target_apc.visible_message("The [target_apc] begins glowing brightly!")
+ else
+ //We did it!
+ to_chat(user, "You sent the APC's power to the void while overloading all it's lights!")
+ target_apc.cell?.charge = 0 //Sent to the shadow realm
+ target_apc.chargemode = 0 //Won't recharge either until an someone hits the button
+ target_apc.charging = 0
+ target_apc.null_charge()
+ target_apc.update_icon()
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index f78520ac7eb..5e7b8f9a237 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -226,6 +226,7 @@
target.Weaken(5)
target.stuttering = 20
to_chat(target, "You are blinded by [user]'s glare.")
+ add_attack_logs(user, target, "(Vampire) Glared at")
/obj/effect/proc_holder/spell/vampire/self/shapeshift
name = "Shapeshift (50)"
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index dbe3146dd7f..243f4e3a3fa 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -153,9 +153,13 @@
src.spawn_amt_left = spawn_amt
src.desc = desc
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
//return
+/obj/effect/rend/Destroy()
+ STOP_PROCESSING(SSobj, src)
+ return ..()
+
/obj/effect/rend/process()
for(var/mob/M in loc)
return
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 66cdff69b3f..0a1340d885b 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -469,6 +469,24 @@
dat += "Already cast!
"
return dat
+/datum/spellbook_entry/summon/ghosts
+ name = "Summon Ghosts"
+ desc = "Spook the crew out by making them see dead people. Be warned, ghosts are capricious and occasionally vindicative, and some will use their incredibly minor abilities to frustrate you."
+ cost = 0
+
+/datum/spellbook_entry/summon/ghosts/IsAvailible()
+ if(!ticker.mode)
+ return FALSE
+ else
+ return TRUE
+
+/datum/spellbook_entry/summon/ghosts/Buy(mob/living/carbon/human/user, obj/item/spellbook/book)
+ new /datum/event/wizard/ghost()
+ active = TRUE
+ to_chat(user, "You have cast summon ghosts!")
+ playsound(get_turf(user), 'sound/effects/ghost2.ogg', 50, 1)
+ return TRUE
+
/datum/spellbook_entry/summon/guns
name = "Summon Guns"
category = "Rituals"
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 9e06d662053..eebe4f2e9e4 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -256,6 +256,8 @@
if(H.mind && H.mind.initial_account)
C.associated_account_number = H.mind.initial_account.account_number
+ C.owner_uid = H.UID()
+ C.owner_ckey = H.ckey
/datum/outfit/job/proc/imprint_pda(mob/living/carbon/human/H)
var/obj/item/pda/PDA = H.wear_pda
@@ -265,3 +267,10 @@
PDA.ownjob = C.assignment
PDA.ownrank = C.rank
PDA.name = "PDA-[H.real_name] ([PDA.ownjob])"
+
+/datum/job/proc/would_accept_job_transfer_from_player(mob/player)
+ if(!guest_jobbans(title)) // actually checks if job is a whitelisted position
+ return TRUE
+ if(!istype(player))
+ return FALSE
+ return is_job_whitelisted(player, title)
diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm
index 6f5be69280a..7c228ba554f 100644
--- a/code/game/jobs/job_exp.dm
+++ b/code/game/jobs/job_exp.dm
@@ -257,13 +257,14 @@ var/global/list/role_playtime_requirements = list(
play_records[rtype] = text2num(read_records[rtype])
else
play_records[rtype] = 0
- if(mob.stat == CONSCIOUS && mob.mind.assigned_role)
+ var/myrole = mob.mind.playtime_role ? mob.mind.playtime_role : mob.mind.assigned_role
+ if(mob.stat == CONSCIOUS && myrole)
play_records[EXP_TYPE_LIVING] += minutes
if(announce_changes)
to_chat(mob,"You got: [minutes] Living EXP!")
for(var/category in exp_jobsmap)
if(exp_jobsmap[category]["titles"])
- if(mob.mind.assigned_role in exp_jobsmap[category]["titles"])
+ if(myrole in exp_jobsmap[category]["titles"])
play_records[category] += minutes
if(announce_changes)
to_chat(mob,"You got: [minutes] [category] EXP!")
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 95e609ee524..e392b468557 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -371,7 +371,15 @@ update_flag
SSnanoui.update_uis(src) // Update all NanoUIs attached to src
-
+/obj/machinery/portable_atmospherics/canister/replace_tank(mob/living/user, close_valve)
+ . = ..()
+ if(.)
+ if(close_valve)
+ valve_open = FALSE
+ update_icon()
+ investigate_log("Valve was closed by [key_name(user)].
", "atmos")
+ else if(valve_open && holding)
+ investigate_log("[key_name(user)] started a transfer into [holding].
", "atmos")
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
src.add_hiddenprint(user)
diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm
index dfecc3a4409..71e1310f96b 100644
--- a/code/game/machinery/atmoalter/portable_atmospherics.dm
+++ b/code/game/machinery/atmoalter/portable_atmospherics.dm
@@ -82,16 +82,49 @@
/obj/machinery/portable_atmospherics/portableConnectorReturnAir()
return air_contents
-/obj/machinery/portable_atmospherics/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
- if((istype(W, /obj/item/tank) && !( src.destroyed )))
- if(src.holding)
- return
- var/obj/item/tank/T = W
- user.drop_item()
- T.loc = src
- src.holding = T
- update_icon()
+/obj/machinery/portable_atmospherics/AltClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
return
+ if(!in_range(src, user))
+ return
+ if(!ishuman(usr) && !issilicon(usr))
+ return
+ if(holding)
+ to_chat(user, "You remove [holding] from [src].")
+ replace_tank(user, TRUE)
+
+/obj/machinery/portable_atmospherics/examine(mob/user)
+ ..()
+ if(holding)
+ to_chat(user, "\The [src] contains [holding]. Alt-click [src] to remove it.")
+
+/obj/machinery/portable_atmospherics/proc/replace_tank(mob/living/user, close_valve, obj/item/tank/new_tank)
+ if(holding)
+ holding.forceMove(drop_location())
+ if(Adjacent(user) && !issilicon(user))
+ user.put_in_hands(holding)
+ if(new_tank)
+ holding = new_tank
+ else
+ holding = null
+ update_icon()
+ return TRUE
+
+/obj/machinery/portable_atmospherics/attackby(obj/item/W, mob/user, params)
+ if(istype(W, /obj/item/tank))
+ if(!(stat & BROKEN))
+ if(!user.drop_item())
+ return
+ var/obj/item/tank/T = W
+ user.drop_item()
+ if(src.holding)
+ to_chat(user, "[holding ? "In one smooth motion you pop [holding] out of [src]'s connector and replace it with [T]" : "You insert [T] into [src]"].")
+ replace_tank(user, FALSE)
+ T.loc = src
+ src.holding = T
+ update_icon()
+ return
else if(istype(W, /obj/item/wrench))
if(connected_port)
diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm
index a7680e815ff..5bd441f6748 100644
--- a/code/game/machinery/atmoalter/pump.dm
+++ b/code/game/machinery/atmoalter/pump.dm
@@ -95,6 +95,16 @@
/obj/machinery/portable_atmospherics/pump/return_air()
return air_contents
+/obj/machinery/portable_atmospherics/pump/replace_tank(mob/living/user, close_valve)
+ . = ..()
+ if(.)
+ if(close_valve)
+ if(on)
+ on = FALSE
+ update_icon()
+ else if(on && holding && direction_out)
+ investigate_log("[key_name(user)] started a transfer into [holding].
", "atmos")
+
/obj/machinery/portable_atmospherics/pump/attack_ai(var/mob/user as mob)
src.add_hiddenprint(user)
return src.attack_hand(user)
@@ -139,10 +149,14 @@
if(href_list["power"])
on = !on
+ if(on && direction_out)
+ investigate_log("[key_name(usr)] started a transfer into [holding].
", "atmos")
update_icon()
if(href_list["direction"])
direction_out = !direction_out
+ if(on && holding)
+ investigate_log("[key_name(usr)] started a transfer into [holding].
", "atmos")
if(href_list["remove_tank"])
if(holding)
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 7535381197a..0eb627d1e62 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -295,10 +295,10 @@
to_chat(O, "The screen bursts into static.")
/obj/machinery/camera/proc/triggerCameraAlarm()
- camera_alarm.triggerAlarm(loc, src)
+ SSalarms.camera_alarm.triggerAlarm(loc, src)
/obj/machinery/camera/proc/cancelCameraAlarm()
- camera_alarm.clearAlarm(loc, src)
+ SSalarms.camera_alarm.clearAlarm(loc, src)
/obj/machinery/camera/proc/can_use()
if(!status)
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index eeb9eeb60d3..17f64c07cb8 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -45,7 +45,7 @@
if(!status || (stat & NOPOWER))
return 0
if(detectTime == -1)
- motion_alarm.clearAlarm(loc, src)
+ SSalarms.motion_alarm.clearAlarm(loc, src)
detectTime = 0
return 1
@@ -53,7 +53,7 @@
if(!status || (stat & NOPOWER))
return 0
if(!detectTime) return 0
- motion_alarm.triggerAlarm(loc, src)
+ SSalarms.motion_alarm.triggerAlarm(loc, src)
detectTime = -1
return 1
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 6d360a2ddb3..54841a78a08 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -470,7 +470,7 @@
M.nutrition -= 50 //lose a lot of food
var/turf/location = usr.loc
if(istype(location, /turf/simulated))
- location.add_vomit_floor(src, 1)
+ location.add_vomit_floor(TRUE)
if(ORION_TRAIL_FLUX)
if(prob(75))
M.Weaken(3)
diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm
index f2137d2ee8f..f8c2979e043 100644
--- a/code/game/machinery/computer/atmos_alert.dm
+++ b/code/game/machinery/computer/atmos_alert.dm
@@ -12,10 +12,10 @@ var/global/list/minor_air_alarms = list()
/obj/machinery/computer/atmos_alert/New()
..()
- atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/update_icon)
+ SSalarms.atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/update_icon)
/obj/machinery/computer/atmos_alert/Destroy()
- atmosphere_alarm.unregister(src)
+ SSalarms.atmosphere_alarm.unregister(src)
return ..()
/obj/machinery/computer/atmos_alert/attack_hand(mob/user)
@@ -33,10 +33,10 @@ var/global/list/minor_air_alarms = list()
var/major_alarms[0]
var/minor_alarms[0]
- for(var/datum/alarm/alarm in atmosphere_alarm.major_alarms())
+ for(var/datum/alarm/alarm in SSalarms.atmosphere_alarm.major_alarms())
major_alarms[++major_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
- for(var/datum/alarm/alarm in atmosphere_alarm.minor_alarms())
+ for(var/datum/alarm/alarm in SSalarms.atmosphere_alarm.minor_alarms())
minor_alarms[++minor_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
data["priority_alarms"] = major_alarms
@@ -45,11 +45,11 @@ var/global/list/minor_air_alarms = list()
return data
/obj/machinery/computer/atmos_alert/update_icon()
- var/list/alarms = atmosphere_alarm.major_alarms()
+ var/list/alarms = SSalarms.atmosphere_alarm.major_alarms()
if(alarms.len)
icon_screen = "alert:2"
else
- alarms = atmosphere_alarm.minor_alarms()
+ alarms = SSalarms.atmosphere_alarm.minor_alarms()
if(alarms.len)
icon_screen = "alert:1"
else
@@ -61,7 +61,7 @@ var/global/list/minor_air_alarms = list()
return 1
if(href_list["clear_alarm"])
- var/datum/alarm/alarm = locate(href_list["clear_alarm"]) in atmosphere_alarm.alarms
+ var/datum/alarm/alarm = locate(href_list["clear_alarm"]) in SSalarms.atmosphere_alarm.alarms
if(alarm)
for(var/datum/alarm_source/alarm_source in alarm.sources)
var/obj/machinery/alarm/air_alarm = alarm_source.source
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 2b294db78c9..c9e5e8ba676 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -56,6 +56,17 @@
/obj/item/circuitboard/machine
board_type = "machine"
+/obj/item/circuitboard/examine(mob/user)
+ ..()
+ if(LAZYLEN(req_components))
+ var/list/nice_list = list()
+ for(var/B in req_components)
+ var/atom/A = B
+ if(!ispath(A))
+ continue
+ nice_list += list("[req_components[A]] [initial(A.name)]")
+ to_chat(user,"Required components: [english_list(nice_list)].")
+
/obj/item/circuitboard/message_monitor
name = "Circuit board (Message Monitor)"
build_path = /obj/machinery/computer/message_monitor
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 5cb19358358..f4d21cbd125 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -66,14 +66,15 @@ var/time_last_changed_position = 0
/obj/machinery/computer/card/proc/get_target_rank()
return modify && modify.assignment ? modify.assignment : "Unassigned"
-/obj/machinery/computer/card/proc/format_jobs(list/jobs)
+/obj/machinery/computer/card/proc/format_jobs(list/jobs, targetrank, list/jobformats)
var/list/formatted = list()
for(var/job in jobs)
if(job_in_department(SSjobs.GetJob(job)))
formatted.Add(list(list(
"display_name" = replacetext(job, " ", " "),
- "target_rank" = get_target_rank(),
- "job" = job)))
+ "target_rank" = targetrank,
+ "job" = job,
+ "jlinkformat" = jobformats[job] ? jobformats[job] : null)))
return formatted
@@ -117,12 +118,14 @@ var/time_last_changed_position = 0
if(!usr.get_active_hand() && Adjacent(usr))
usr.put_in_hands(scan)
scan = null
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else if(modify)
to_chat(usr, "You remove \the [modify] from \the [src].")
modify.forceMove(get_turf(src))
if(!usr.get_active_hand() && Adjacent(usr))
usr.put_in_hands(modify)
modify = null
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else
to_chat(usr, "There is nothing to remove from the console.")
@@ -134,10 +137,12 @@ var/time_last_changed_position = 0
user.drop_item()
id_card.loc = src
scan = id_card
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else if(!modify)
user.drop_item()
id_card.loc = src
modify = id_card
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
SSnanoui.update_uis(src)
attack_hand(user)
@@ -242,6 +247,7 @@ var/time_last_changed_position = 0
data["target_owner"] = modify && modify.registered_name ? modify.registered_name : "-----"
data["target_rank"] = get_target_rank()
data["scan_name"] = scan ? scan.name : "-----"
+ data["scan_owner"] = scan && scan.registered_name ? scan.registered_name : null
data["authenticated"] = is_authenticated(user)
data["has_modify"] = !!modify
data["account_number"] = modify ? modify.associated_account_number : null
@@ -249,15 +255,19 @@ var/time_last_changed_position = 0
data["all_centcom_access"] = null
data["regions"] = null
data["target_dept"] = target_dept
+ data["card_is_owned"] = modify && modify.owner_ckey
- data["engineering_jobs"] = format_jobs(engineering_positions)
- data["medical_jobs"] = format_jobs(medical_positions)
- data["science_jobs"] = format_jobs(science_positions)
- data["security_jobs"] = format_jobs(security_positions)
- data["support_jobs"] = format_jobs(support_positions)
- data["civilian_jobs"] = format_jobs(civilian_positions)
- data["special_jobs"] = format_jobs(whitelisted_positions)
- data["centcom_jobs"] = format_jobs(get_all_centcom_jobs())
+ var/list/job_formats = SSjobs.format_jobs_for_id_computer(modify)
+
+ data["top_jobs"] = format_jobs(list("Captain", "Custom"), data["target_rank"], job_formats)
+ data["engineering_jobs"] = format_jobs(engineering_positions, data["target_rank"], job_formats)
+ data["medical_jobs"] = format_jobs(medical_positions, data["target_rank"], job_formats)
+ data["science_jobs"] = format_jobs(science_positions, data["target_rank"], job_formats)
+ data["security_jobs"] = format_jobs(security_positions, data["target_rank"], job_formats)
+ data["support_jobs"] = format_jobs(support_positions, data["target_rank"], job_formats)
+ data["civilian_jobs"] = format_jobs(civilian_positions, data["target_rank"], job_formats)
+ data["special_jobs"] = format_jobs(whitelisted_positions, data["target_rank"], job_formats)
+ data["centcom_jobs"] = format_jobs(get_all_centcom_jobs(), data["target_rank"], job_formats)
data["card_skins"] = format_card_skins(get_station_card_skins())
data["job_slots"] = format_job_slots()
@@ -268,6 +278,9 @@ var/time_last_changed_position = 0
data["cooldown_mins"] = mins
data["cooldown_secs"] = (seconds < 10) ? "0[seconds]" : seconds
+ if(mode == 3 && is_authenticated(user))
+ data["id_change_html"] = SSjobs.fetch_transfer_record_html(is_centcom())
+
if(modify)
data["current_skin"] = modify.icon_state
@@ -315,15 +328,18 @@ var/time_last_changed_position = 0
if(!usr.get_active_hand() && Adjacent(usr))
usr.put_in_hands(modify)
modify = null
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else
modify.forceMove(get_turf(src))
modify = null
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else if(Adjacent(usr))
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/card/id))
usr.drop_item()
I.forceMove(src)
modify = I
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
if("scan")
if(scan)
@@ -332,15 +348,18 @@ var/time_last_changed_position = 0
if(!usr.get_active_hand() && Adjacent(usr))
usr.put_in_hands(scan)
scan = null
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else
scan.forceMove(get_turf(src))
scan = null
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else if(Adjacent(usr))
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/card/id))
usr.drop_item()
I.forceMove(src)
scan = I
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
if("access")
if(href_list["allowed"] && !target_dept)
@@ -361,7 +380,7 @@ var/time_last_changed_position = 0
if("assign")
if(is_authenticated(usr) && modify)
var/t1 = href_list["assign_target"]
- if(target_dept && modify.assignment == "Unassigned")
+ if(target_dept && modify.assignment == "Demoted")
visible_message("[src]: Demoted individuals must see the HoP for a new job.")
return 0
if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE))
@@ -373,11 +392,12 @@ var/time_last_changed_position = 0
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
+ SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name)
modify.assignment = temp_t
log_game("[key_name(usr)] has given \"[modify.registered_name]\" the custom job title \"[temp_t]\".")
else
var/list/access = list()
- if(is_centcom())
+ if(is_centcom() && islist(get_centcom_access(t1)))
access = get_centcom_access(t1)
else
var/datum/job/jobdatum
@@ -397,6 +417,16 @@ var/time_last_changed_position = 0
if(t1 == "Civilian")
message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
+ SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name)
+ SSjobs.slot_job_transfer(modify.rank, t1)
+
+ var/mob/living/carbon/human/H = modify.getPlayer()
+ if(istype(H))
+ if(jobban_isbanned(H, t1))
+ message_admins("[ADMIN_FULLMONTY(H)] has been assigned the job [t1], in possible violation of their job ban.")
+ if(H.mind)
+ H.mind.playtime_role = t1
+
modify.access = access
modify.rank = t1
modify.assignment = t1
@@ -426,6 +456,20 @@ var/time_last_changed_position = 0
if("mode")
mode = text2num(href_list["mode_target"])
+ if("wipe_my_logs")
+ if(is_authenticated(usr) && is_centcom())
+ var/delcount = SSjobs.delete_log_records(scan.registered_name, FALSE)
+ if(delcount)
+ playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
+ SSnanoui.update_uis(src)
+
+ if("wipe_all_logs")
+ if(is_authenticated(usr) && !target_dept)
+ var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE)
+ if(delcount)
+ playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
+ SSnanoui.update_uis(src)
+
if("print")
if(!printing && !target_dept)
printing = 1
@@ -464,14 +508,15 @@ var/time_last_changed_position = 0
var/jobnamedata = modify.getRankAndAssignment()
log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
+ SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name)
modify.assignment = "Terminated"
modify.access = list()
callHook("terminate_employee", list(modify))
if("demote")
if(is_authenticated(usr))
- if(modify.assignment == "Unassigned")
- visible_message("[src]: Unassigned crew cannot be demoted any further. If further action is warranted, ask the Captain about Termination.")
+ if(modify.assignment == "Demoted")
+ visible_message("[src]: Demoted crew cannot be demoted any further. If further action is warranted, ask the Captain about Termination.")
return 0
if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE))
visible_message("[src]: Heads may only demote members of their own department.")
@@ -482,12 +527,13 @@ var/time_last_changed_position = 0
access = jobdatum.get_access()
var/jobnamedata = modify.getRankAndAssignment()
- log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".")
- message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Unassigned)\".")
+ log_game("[key_name(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Demoted)\".")
+ message_admins("[key_name_admin(usr)] has demoted \"[modify.registered_name]\" the \"[jobnamedata]\" to \"Civilian (Demoted)\".")
+ SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Demoted", scan.registered_name)
modify.access = access
modify.rank = "Civilian"
- modify.assignment = "Unassigned"
+ modify.assignment = "Demoted"
modify.icon_state = "id"
if("make_job_available")
diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm
index a5198da6e56..b39c005855c 100644
--- a/code/game/machinery/computer/power.dm
+++ b/code/game/machinery/computer/power.dm
@@ -38,7 +38,7 @@
if(isturf(T))
attached = locate() in T
if(attached)
- return attached.get_powernet()
+ return attached.powernet
/obj/machinery/computer/monitor/attack_ai(mob/user)
attack_hand(user)
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index 8fefabbf877..75c4e466a79 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -54,6 +54,7 @@
/obj/machinery/disco/Destroy()
dance_over()
selection = null
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/machinery/disco/attackby(obj/item/O, mob/user, params)
@@ -128,7 +129,7 @@
active = TRUE
update_icon()
dance_setup()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
lights_spin()
updateUsrDialog()
else if(active)
@@ -472,7 +473,7 @@
L.stop_sound_channel(CHANNEL_JUKEBOX)
else if(active)
active = FALSE
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
dance_over()
playsound(src,'sound/machines/terminal_off.ogg',50,1)
icon_state = "disco0"
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 496d8942bcc..5a53381ef07 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -39,8 +39,7 @@
if(command_completed(cur_command))
cur_command = null
else
- if(!isprocessing)
- START_PROCESSING(SSmachines, src)
+ START_PROCESSING(SSmachines, src)
/obj/machinery/door/airlock/proc/do_command(command)
switch(command)
diff --git a/code/game/machinery/embedded_controller/embedded_program_base.dm b/code/game/machinery/embedded_controller/embedded_program_base.dm
index 1fe527df13b..5bd46b2f3e0 100644
--- a/code/game/machinery/embedded_controller/embedded_program_base.dm
+++ b/code/game/machinery/embedded_controller/embedded_program_base.dm
@@ -17,8 +17,8 @@
/datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
return
-/datum/computer/file/embedded_program/proc/process()
- return
+/datum/computer/file/embedded_program/process()
+ return FALSE
/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
if(master)
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index f1651d5bb99..835b0264229 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -143,7 +143,7 @@ FIRE ALARM
alarm()
time = 0
timing = 0
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
updateDialog()
last_process = world.timeofday
@@ -206,9 +206,9 @@ FIRE ALARM
last_process = world.timeofday
if(oldTiming != timing)
if(timing)
- processing_objects += src
+ START_PROCESSING(SSobj, src)
else
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
else if(href_list["tp"])
var/tp = text2num(href_list["tp"])
time += tp
@@ -220,7 +220,7 @@ FIRE ALARM
var/area/A = get_area(src)
A.fire_reset()
for(var/obj/machinery/firealarm/FA in A)
- fire_alarm.clearAlarm(loc, FA)
+ SSalarms.fire_alarm.clearAlarm(loc, FA)
return
/obj/machinery/firealarm/proc/alarm(var/duration = 0)
@@ -228,7 +228,7 @@ FIRE ALARM
return
var/area/A = get_area(src)
for(var/obj/machinery/firealarm/FA in A)
- fire_alarm.triggerAlarm(loc, FA, duration)
+ SSalarms.fire_alarm.triggerAlarm(loc, FA, duration)
update_icon()
//playsound(loc, 'sound/ambience/signal.ogg', 75, 0)
return
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index c74ee23d25c..91dcb43ab57 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -118,25 +118,22 @@ Class Procs:
var/use_log = list()
var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
atom_say_verb = "beeps"
- var/defer_process = 0
var/siemens_strength = 0.7 // how badly will it shock you?
-/obj/machinery/Initialize()
- addAtProcessing()
+/obj/machinery/Initialize(mapload)
+ if(!armor)
+ armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0)
. = ..()
- power_change()
+ GLOB.machines += src
-/obj/machinery/proc/addAtProcessing()
if(use_power)
myArea = get_area(src)
if(!speed_process)
- if(!defer_process)
- START_PROCESSING(SSmachines, src)
- else
- START_DEFERRED_PROCESSING(SSmachines, src)
+ START_PROCESSING(SSmachines, src)
else
- GLOB.fast_processing += src
- isprocessing = TRUE // all of these isprocessing = TRUE can be removed when the PS is dead
+ START_PROCESSING(SSfastprocess, src)
+
+ power_change()
// gotta go fast
/obj/machinery/makeSpeedProcess()
@@ -144,7 +141,7 @@ Class Procs:
return
speed_process = TRUE
STOP_PROCESSING(SSmachines, src)
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
// gotta go slow
/obj/machinery/makeNormalProcess()
@@ -152,20 +149,16 @@ Class Procs:
return
speed_process = FALSE
START_PROCESSING(SSmachines, src)
- GLOB.fast_processing -= src
-
-/obj/machinery/New() //new
- if(!armor)
- armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0)
- GLOB.machines += src
- ..()
+ STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/Destroy()
if(myArea)
myArea = null
- GLOB.fast_processing -= src
- STOP_PROCESSING(SSmachines, src)
- GLOB.machines -= src
+ GLOB.machines.Remove(src)
+ if(!speed_process)
+ STOP_PROCESSING(SSmachines, src)
+ else
+ STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/machinery/proc/locate_machinery()
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 1b3dfe19001..bb5847fc6fb 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -2,8 +2,8 @@
name = "Pipe Dispenser"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "pipe_d"
- density = 1
- anchored = 1
+ density = TRUE
+ anchored = TRUE
var/unwrenched = 0
var/wait = 0
@@ -75,29 +75,25 @@
/obj/machinery/pipedispenser/Topic(href, href_list)
if(..() || unwrenched)
- return 1
+ return
usr.set_machine(src)
add_fingerprint(usr)
+ if(world.time < wait + 4)
+ return
+ wait = world.time
if(href_list["make"])
- if(!wait)
- var/p_type = text2num(href_list["make"])
- var/p_dir = text2num(href_list["dir"])
- var/obj/item/pipe/P = new (loc, pipe_type=p_type, dir=p_dir)
- P.update()
- P.add_fingerprint(usr)
- wait = world.time + 10
+ var/p_type = text2num(href_list["make"])
+ var/p_dir = text2num(href_list["dir"])
+ var/obj/item/pipe/P = new (loc, pipe_type=p_type, dir=p_dir)
+ P.update()
+ P.add_fingerprint(usr)
if(href_list["makemeter"])
- if(wait < world.time)
- new /obj/item/pipe_meter(loc)
- wait = world.time + 15
+ new /obj/item/pipe_meter(loc)
if(href_list["makegsensor"])
- if(!wait)
- new /obj/item/pipe_gsensor(loc)
- wait = 1
- spawn(15)
- wait = 0
+ new /obj/item/pipe_gsensor(loc)
+ return TRUE
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
add_fingerprint(usr)
@@ -140,8 +136,6 @@
name = "Disposal Pipe Dispenser"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "pipe_d"
- density = 1
- anchored = 1.0
//Allow you to drag-drop disposal pipes into it
/obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe, mob/usr)
@@ -182,16 +176,10 @@
popup.open()
/obj/machinery/pipedispenser/disposal/Topic(href, href_list)
- if(..() || unwrenched)
- return 1
-
- usr.set_machine(src)
- add_fingerprint(usr)
-
- if(wait < world.time)
+ if(!..())
+ return
+ if(href_list["dmake"])
var/p_type = text2num(href_list["dmake"])
var/obj/structure/disposalconstruct/C = new(loc, p_type)
if(p_type in list(PIPE_DISPOSALS_BIN, PIPE_DISPOSALS_OUTLET, PIPE_DISPOSALS_CHUTE))
C.density = TRUE
- C.add_fingerprint(usr)
- wait = world.time + 15
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 304dc7dc639..6422e94dc74 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -188,11 +188,11 @@
/obj/machinery/power/singularity_beacon/process()
if(!active)
return PROCESS_KILL
+
+ if(surplus() >= 1500)
+ add_load(1500)
else
- if(surplus() > 1500)
- draw_power(1500)
- else
- Deactivate()
+ Deactivate()
/obj/machinery/power/singularity_beacon/syndicate
icontype = "beaconsynd"
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index f02b8411e38..9f664eaad76 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -39,7 +39,7 @@
/obj/machinery/syndicatebomb/process()
if(!active)
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
detonation_timer = null
next_beep = null
countdown.stop()
@@ -73,7 +73,7 @@
if(defused && payload in src)
payload.defuse()
countdown.stop()
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/syndicatebomb/New()
wires = new(src)
@@ -86,7 +86,7 @@
/obj/machinery/syndicatebomb/Destroy()
QDEL_NULL(wires)
QDEL_NULL(countdown)
- GLOB.fast_processing -= src
+ STOP_PROCESSING(SSfastprocess, src)
return ..()
/obj/machinery/syndicatebomb/examine(mob/user)
@@ -205,7 +205,7 @@
/obj/machinery/syndicatebomb/proc/activate()
active = TRUE
- GLOB.fast_processing += src
+ START_PROCESSING(SSfastprocess, src)
countdown.start()
next_beep = world.time + 10
detonation_timer = world.time + (timer_set * 10)
diff --git a/code/game/machinery/telecomms/ntsl2.dm b/code/game/machinery/telecomms/ntsl2.dm
index f01f173ebb3..604fcdfbe7e 100644
--- a/code/game/machinery/telecomms/ntsl2.dm
+++ b/code/game/machinery/telecomms/ntsl2.dm
@@ -10,109 +10,109 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new())
*/
/datum/nttc_configuration
// ALL OF THE JOB CRAP
- // Dict of all jobs and their colors
+ // Dict of all jobs and their department color classes
var/all_jobs = list(
// AI
- "AI" = "#FF00FF",
- "Android" = "#FF00FF",
- "Cyborg" = "#FF00FF",
- "Personal AI" = "#FF00FF",
- "Robot" = "#FF00FF",
+ "AI" = "airadio",
+ "Android" = "airadio",
+ "Cyborg" = "airadio",
+ "Personal AI" = "airadio",
+ "Robot" = "airadio",
// Civilian + Varients
- "Assistant" = "#408010",
- "Businessman" = "#408010",
- "Civilian" = "#408010",
- "Tourist" = "#408010",
- "Trader" = "#408010",
+ "Assistant" = "radio",
+ "Businessman" = "radio",
+ "Civilian" = "radio",
+ "Tourist" = "radio",
+ "Trader" = "radio",
// Command (Solo command, not department heads)
- "Blueshield" = "#204090",
- "Captain" = "#204090",
- "Head of Personnel" = "#204090",
- "Nanotrasen Representative" = "#204090",
+ "Blueshield" = "comradio",
+ "Captain" = "comradio",
+ "Head of Personnel" = "comradio",
+ "Nanotrasen Representative" = "comradio",
// Engineeering
- "Atmospheric Technician" = "#A66300",
- "Chief Engineer" = "#A66300",
- "Electrician" = "#A66300",
- "Engine Technician" = "#A66300",
- "Life Support Specialist" = "#A66300",
- "Maintenance Technician" = "#A66300",
- "Mechanic" = "#A66300",
- "Station Engineer" = "#A66300",
+ "Atmospheric Technician" = "engradio",
+ "Chief Engineer" = "engradio",
+ "Electrician" = "engradio",
+ "Engine Technician" = "engradio",
+ "Life Support Specialist" = "engradio",
+ "Maintenance Technician" = "engradio",
+ "Mechanic" = "engradio",
+ "Station Engineer" = "engradio",
// ERT
- "Emergency Response Team Engineer" = "#5C5C7C",
- "Emergency Response Team Leader" = "#5C5C7C",
- "Emergency Response Team Medic" = "#5C5C7C",
- "Emergency Response Team Member" = "#5C5C7C",
- "Emergency Response Team Officer" = "#5C5C7C",
+ "Emergency Response Team Engineer" = "dsquadradio", // I know this says deathsquad but the class for responseteam is neon green. No.
+ "Emergency Response Team Leader" = "dsquadradio",
+ "Emergency Response Team Medic" = "dsquadradio",
+ "Emergency Response Team Member" = "dsquadradio",
+ "Emergency Response Team Officer" = "dsquadradio",
// Medical
- "Chemist" = "#009190",
- "Chief Medical Officer" = "#009190",
- "Coroner" = "#009190",
- "Medical Doctor" = "#009190",
- "Microbiologist" = "#009190",
- "Nurse" = "#009190",
- "Paramedic" = "#009190",
- "Pharmacologist" = "#009190",
- "Pharmacist" = "#009190",
- "Psychiatrist" = "#009190",
- "Psychologist" = "#009190",
- "Surgeon" = "#009190",
- "Therapist" = "#009190",
- "Virologist" = "#009190",
+ "Chemist" = "medradio",
+ "Chief Medical Officer" = "medradio",
+ "Coroner" = "medradio",
+ "Medical Doctor" = "medradio",
+ "Microbiologist" = "medradio",
+ "Nurse" = "medradio",
+ "Paramedic" = "medradio",
+ "Pharmacologist" = "medradio",
+ "Pharmacist" = "medradio",
+ "Psychiatrist" = "medradio",
+ "Psychologist" = "medradio",
+ "Surgeon" = "medradio",
+ "Therapist" = "medradio",
+ "Virologist" = "medradio",
// Science
- "Anomalist" = "#993399",
- "Biomechanical Engineer" = "#993399",
- "Chemical Researcher" = "#993399",
- "Geneticist" = "#993399",
- "Mechatronic Engineer" = "#993399",
- "Plasma Researcher" = "#993399",
- "Research Director" = "#993399",
- "Roboticist" = "#993399",
- "Scientist" = "#993399",
- "Xenoarcheologist" = "#993399",
- "Xenobiologist" = "#993399",
+ "Anomalist" = "sciradio",
+ "Biomechanical Engineer" = "sciradio",
+ "Chemical Researcher" = "sciradio",
+ "Geneticist" = "sciradio",
+ "Mechatronic Engineer" = "sciradio",
+ "Plasma Researcher" = "sciradio",
+ "Research Director" = "sciradio",
+ "Roboticist" = "sciradio",
+ "Scientist" = "sciradio",
+ "Xenoarcheologist" = "sciradio",
+ "Xenobiologist" = "sciradio",
// Security
- "Brig Physician" = "#A30000",
- "Detective" = "#A30000",
- "Forensic Technician" = "#A30000",
- "Head of Security" = "#A30000",
- "Human Resources Agent" = "#A30000",
- "Internal Affairs Agent" = "#A30000",
- "Magistrate" = "#A30000",
- "Security Officer" = "#A30000",
- "Security Pod Pilot" = "#A30000",
- "Warden" = "#A30000",
+ "Brig Physician" = "secradio",
+ "Detective" = "secradio",
+ "Forensic Technician" = "secradio",
+ "Head of Security" = "secradio",
+ "Human Resources Agent" = "secradio",
+ "Internal Affairs Agent" = "secradio",
+ "Magistrate" = "secradio",
+ "Security Officer" = "secradio",
+ "Security Pod Pilot" = "secradio",
+ "Warden" = "secradio",
// Supply
- "Quartermaster" = "#7F6539",
- "Cargo Technician" = "#7F6539",
- "Shaft Miner" = "#7F6539",
- "Spelunker" = "#7F6539",
+ "Quartermaster" = "supradio",
+ "Cargo Technician" = "supradio",
+ "Shaft Miner" = "supradio",
+ "Spelunker" = "supradio",
// Service
- "Barber" = "#80A000",
- "Bartender" = "#80A000",
- "Beautician" = "#80A000",
- "Botanical Researcher" = "#80A000",
- "Botanist" = "#80A000",
- "Butcher" = "#80A000",
- "Chaplain" = "#80A000",
- "Chef" = "#80A000",
- "Clown" = "#80A000",
- "Cook" = "#80A000",
- "Culinary Artist" = "#80A000",
- "Custodial Technician" = "#80A000",
- "Hair Stylist" = "#80A000",
- "Hydroponicist" = "#80A000",
- "Janitor" = "#80A000",
- "Journalist" = "#80A000",
- "Librarian" = "#80A000",
- "Mime" = "#80A000",
+ "Barber" = "srvradio",
+ "Bartender" = "srvradio",
+ "Beautician" = "srvradio",
+ "Botanical Researcher" = "srvradio",
+ "Botanist" = "srvradio",
+ "Butcher" = "srvradio",
+ "Chaplain" = "srvradio",
+ "Chef" = "srvradio",
+ "Clown" = "srvradio",
+ "Cook" = "srvradio",
+ "Culinary Artist" = "srvradio",
+ "Custodial Technician" = "srvradio",
+ "Hair Stylist" = "srvradio",
+ "Hydroponicist" = "srvradio",
+ "Janitor" = "srvradio",
+ "Journalist" = "srvradio",
+ "Librarian" = "srvradio",
+ "Mime" = "srvradio",
)
// Just command members
var/heads = list("Captain", "Head of Personnel", "Nanotrasen Representative", "Blueshield", "Chief Engineer", "Chief Medical Officer", "Research Director", "Head of Security")
// Just ERT
var/ert_jobs = list("Emergency Response Team Officer", "Emergency Response Team Engineer", "Emergency Response Team Medic", "Emergency Response Team Leader", "Emergency Response Team Member")
// Defined so code compiles and incase someone has a non-standard job
- var/job_color = "#000000"
+ var/job_class = "radio"
// NOW FOR ACTUAL TOGGLES
/* Simple Toggles */
var/toggle_activated = TRUE
@@ -274,10 +274,10 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new())
// All job and coloring shit
if(toggle_job_color || toggle_name_color)
var/job = signal.data["job"]
- job_color = all_jobs[job]
+ job_class = all_jobs[job]
if(toggle_name_color)
- var/new_name = "" + signal.data["name"] + ""
+ var/new_name = "" + signal.data["name"] + ""
signal.data["name"] = new_name
signal.data["realname"] = new_name // this is required because the broadcaster uses this directly if the speaker doesn't have a voice changer on
@@ -289,13 +289,13 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new())
if(toggle_job_color)
switch(job_indicator_type)
if(JOB_STYLE_1)
- new_name = signal.data["name"] + " ([job]) "
+ new_name = signal.data["name"] + " ([job]) "
if(JOB_STYLE_2)
- new_name = signal.data["name"] + " - [job] "
+ new_name = signal.data["name"] + " - [job] "
if(JOB_STYLE_3)
- new_name = "\[[job]\] " + signal.data["name"] + " "
+ new_name = "\[[job]\] " + signal.data["name"] + " "
if(JOB_STYLE_4)
- new_name = "([job]) " + signal.data["name"] + " "
+ new_name = "([job]) " + signal.data["name"] + " "
else
switch(job_indicator_type)
if(JOB_STYLE_1)
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index 8014a149cf4..54bd17920bd 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -166,10 +166,10 @@
name = "Automatic X-Ray 5000"
desc = "A large metalic machine with an entrance and an exit. A sign on the side reads, 'backpack go in, backpack come out', 'human go in, irradiated human come out'."
-/obj/machinery/transformer/xray/New()
+/obj/machinery/transformer/xray/Initialize(mapload)
+ . = ..()
// On us
new /obj/machinery/conveyor/auto(loc, EAST)
- addAtProcessing()
/obj/machinery/transformer/xray/conveyor/New()
..()
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index f1ad010ea93..8a910670201 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -4,7 +4,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/medical/can_attach(obj/mecha/medical/M)
@@ -13,19 +13,19 @@
/obj/item/mecha_parts/mecha_equipment/medical/attach(obj/mecha/M)
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/medical/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/process()
if(!chassis)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return 1
/obj/item/mecha_parts/mecha_equipment/medical/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper
@@ -66,7 +66,7 @@
return
target.forceMove(src)
patient = target
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_equip_info()
occupant_message("[target] successfully loaded into [src]. Life support functions engaged.")
chassis.visible_message("[chassis] loads [target] into [src].")
@@ -90,7 +90,7 @@
patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.")
log_message("[patient] ejected. Life support functions disabled.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
patient = null
update_equip_info()
@@ -98,7 +98,7 @@
if(patient)
occupant_message("Unable to detach [src] - equipment occupied!")
return
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/get_equip_info()
@@ -221,7 +221,7 @@
set_ready_state(1)
log_message("Deactivated.")
occupant_message("[src] deactivated - no power.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/M = patient
if(!M)
@@ -263,11 +263,11 @@
processed_reagents = new
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
@@ -374,7 +374,7 @@
m++
if(processed_reagents.len)
message += " added to production"
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
occupant_message(message)
occupant_message("Reagent processing started.")
log_message("Reagent processing started.")
@@ -513,7 +513,7 @@
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
occupant_message("Reagent processing stopped.")
log_message("Reagent processing stopped.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/amount = synth_speed / processed_reagents.len
for(var/reagent in processed_reagents)
diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm
index b1a110813e8..edeb2424711 100644
--- a/code/game/mecha/equipment/tools/mining_tools.dm
+++ b/code/game/mecha/equipment/tools/mining_tools.dm
@@ -116,14 +116,14 @@
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M)
. = ..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
M.occupant_sight_flags |= SEE_TURFS
if(M.occupant)
M.occupant.update_sight()
/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach()
chassis.occupant_sight_flags &= ~SEE_TURFS
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(chassis.occupant)
chassis.occupant.update_sight()
return ..()
diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm
index a42e76015c1..4cfbc5c8143 100644
--- a/code/game/mecha/equipment/tools/other_tools.dm
+++ b/code/game/mecha/equipment/tools/other_tools.dm
@@ -193,7 +193,7 @@
selectable = 0
/obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if(chassis)
chassis.overlays -= droid_overlay
return ..()
@@ -205,7 +205,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
chassis.overlays -= droid_overlay
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
if(!chassis) return
@@ -217,12 +217,12 @@
if(href_list["toggle_repairs"])
chassis.overlays -= droid_overlay
if(equip_ready)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
droid_overlay = new(icon, icon_state = "repair_droid_a")
log_message("Activated.")
set_ready_state(0)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
droid_overlay = new(icon, icon_state = "repair_droid")
log_message("Deactivated.")
set_ready_state(1)
@@ -232,7 +232,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
if(!chassis)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
var/h_boost = health_boost
@@ -250,10 +250,10 @@
repaired = 1
if(repaired)
if(!chassis.use_power(energy_drain))
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
else //no repair needed, we turn off
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
chassis.overlays -= droid_overlay
droid_overlay = new(icon, icon_state = "repair_droid")
@@ -273,11 +273,11 @@
selectable = 0
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
..()
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
@@ -302,11 +302,11 @@
..()
if(href_list["toggle_relay"])
if(equip_ready) //inactive
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
set_ready_state(0)
log_message("Activated.")
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
log_message("Deactivated.")
@@ -317,12 +317,12 @@
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
var/cur_charge = chassis.get_charge()
if(isnull(cur_charge) || !chassis.cell)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
occupant_message("No powercell detected.")
return
@@ -358,11 +358,11 @@
/obj/item/mecha_parts/mecha_equipment/generator/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/mecha_parts/mecha_equipment/generator/detach()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
..()
/obj/item/mecha_parts/mecha_equipment/generator/Topic(href, href_list)
@@ -370,11 +370,11 @@
if(href_list["toggle"])
if(equip_ready) //inactive
set_ready_state(0)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
log_message("Activated.")
else
set_ready_state(1)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
@@ -447,11 +447,11 @@
/obj/item/mecha_parts/mecha_equipment/generator/process()
if(!chassis)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
set_ready_state(1)
return
if(fuel_amount<=0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
log_message("Deactivated - no fuel.")
set_ready_state(1)
return
@@ -460,7 +460,7 @@
set_ready_state(1)
occupant_message("No powercell detected.")
log_message("Deactivated.")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/use_fuel = fuel_per_cycle_idle
if(cur_charge < chassis.cell.maxcharge)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 6cfd1d63942..35b94e2eed2 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -118,7 +118,7 @@
smoke_system.attach(src)
add_cell()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
log_message("[src] created.")
GLOB.mechas_list += src //global mech list
@@ -670,7 +670,7 @@
QDEL_NULL(cell)
QDEL_NULL(internal_tank)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src)
equipment.Cut()
cell = null
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 59533b338a4..b44c4e3dd1b 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -24,7 +24,7 @@
spawn(3 + metal*3)
process()
spawn(120)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
sleep(30)
if(metal)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 405a0ec46f7..ddce32f68fa 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -30,15 +30,15 @@
/obj/effect/particle_effect/smoke/New()
..()
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
lifetime += rand(-1,1)
/obj/effect/particle_effect/smoke/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/particle_effect/smoke/proc/kill_smoke()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
INVOKE_ASYNC(src, .proc/fade_out)
QDEL_IN(src, 10)
diff --git a/code/game/objects/effects/snowcloud.dm b/code/game/objects/effects/snowcloud.dm
index 08a64d62f17..5723b66bc04 100644
--- a/code/game/objects/effects/snowcloud.dm
+++ b/code/game/objects/effects/snowcloud.dm
@@ -9,12 +9,12 @@
/obj/effect/snowcloud/New(turf, obj/machinery/snow_machine/SM)
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(SM && istype(SM))
parent_machine = SM
/obj/effect/snowcloud/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/snowcloud/process()
@@ -73,12 +73,12 @@
anchored = TRUE
/obj/effect/snow/New()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
icon_state = "snow[rand(1,6)]"
..()
/obj/effect/snow/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/snow/process()
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index f0233bb0f9e..d4336aa6cf3 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -107,7 +107,7 @@
..()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2)
@@ -140,10 +140,10 @@
..()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/spider/spiderling/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
entry_vent = null
return ..()
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 77b263fb8f2..9d199a404d0 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -100,6 +100,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
var/trip_walksafe = TRUE
var/trip_tiles = 0
+ //Tooltip vars
+ var/in_inventory = FALSE //is this item equipped into an inventory slot or hand of a mob?
+ var/tip_timer = 0
+
/obj/item/New()
..()
for(var/path in actions_types)
@@ -340,11 +344,13 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
A.Remove(user)
if(flags & DROPDEL)
qdel(src)
+ in_inventory = FALSE
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
+ in_inventory = TRUE
return TRUE
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
@@ -374,6 +380,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
var/datum/action/A = X
if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot.
A.Grant(user)
+ in_inventory = TRUE
/obj/item/proc/item_action_slot_check(slot, mob/user)
return 1
@@ -532,6 +539,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
if(callback) //call the original callback
. = callback.Invoke()
throw_speed = initial(throw_speed) //explosions change this.
+ in_inventory = FALSE
/obj/item/proc/pwr_drain()
return 0 // Process Kill
@@ -578,4 +586,17 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
return TRUE
/obj/item/attack_hulk(mob/living/carbon/human/user)
- return FALSE
\ No newline at end of file
+ return FALSE
+
+/obj/item/proc/openTip(location, control, params, user)
+ openToolTip(user, src, params, title = name, content = "[desc]", theme = "")
+
+/obj/item/MouseEntered(location, control, params)
+ if(in_inventory)
+ var/timedelay = 5
+ var/user = usr
+ tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)
+
+/obj/item/MouseExited()
+ deltimer(tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes
+ closeToolTip(usr)
diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm
index b32176cb155..8e85709ef97 100644
--- a/code/game/objects/items/ashtray.dm
+++ b/code/game/objects/items/ashtray.dm
@@ -28,7 +28,6 @@
var/obj/item/clothing/mask/cigarette/cig = W
if(cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
- processing_objects.Remove(cig)
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
qdel(cig)
diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm
index 85780484264..5ea13308de5 100644
--- a/code/game/objects/items/candle.dm
+++ b/code/game/objects/items/candle.dm
@@ -18,7 +18,7 @@
light(show_message = 0)
/obj/item/candle/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/candle/update_icon()
@@ -62,7 +62,7 @@
if(show_message)
usr.visible_message(show_message)
set_light(CANDLE_LUM)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_icon()
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index 575ce0cb6d6..7bf80244072 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -32,7 +32,7 @@
/obj/item/camera_bug/New()
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/item/camera_bug/Destroy()
get_cameras()
diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm
index 27132b75346..5fa2bd692e0 100644
--- a/code/game/objects/items/devices/chameleonproj.dm
+++ b/code/game/objects/items/devices/chameleonproj.dm
@@ -227,7 +227,7 @@
return PROCESS_KILL
/obj/item/borg_chameleon/proc/activate(mob/living/silicon/robot/syndicate/saboteur/user)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
S = user
user.base_icon = disguise
user.icon_state = disguise
@@ -236,7 +236,7 @@
user.update_icons()
/obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/syndicate/saboteur/user)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
S = user
user.base_icon = initial(user.base_icon)
user.icon_state = initial(user.icon_state)
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index d0b8637b280..2fb1aae8ff0 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -207,10 +207,10 @@
/obj/item/flash/cameraflash/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/flash/cameraflash/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/flash/cameraflash/process() //this and the two parts above are part of the charge system.
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 24c8cbcd3b7..e65c9a683a7 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -183,10 +183,10 @@
turn_off()
if(!fuel)
src.icon_state = "[initial(icon_state)]-empty"
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
/obj/item/flashlight/flare/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/flashlight/flare/proc/turn_off()
@@ -222,7 +222,7 @@
user.visible_message("[user] activates [src].", "You activate [src].")
src.force = on_damage
src.damtype = "fire"
- processing_objects += src
+ START_PROCESSING(SSobj, src)
// GLOWSTICKS
@@ -307,6 +307,9 @@
brightness_on = 7
icon_state = "torch"
item_state = "torch"
+ lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/items_righthand.dmi'
+ light_color = LIGHT_COLOR_ORANGE
on_damage = 10
/obj/item/flashlight/slime
@@ -344,10 +347,10 @@
/obj/item/flashlight/emp/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/flashlight/emp/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/flashlight/emp/process()
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 32b548c38aa..43b22eb4979 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -167,7 +167,7 @@
if(energy <= max_energy)
if(!recharging)
recharging = 1
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(energy <= 0)
to_chat(user, "You've overused the battery of [src], now it needs time to recharge!")
recharge_locked = 1
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index d142136ed23..62fc36863fc 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -47,10 +47,10 @@
/obj/item/multitool/ai_detect/New()
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/item/multitool/ai_detect/Destroy()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/multitool/ai_detect/process()
diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm
index 0d0475df8ee..562800c2ce0 100644
--- a/code/game/objects/items/devices/powersink.dm
+++ b/code/game/objects/items/devices/powersink.dm
@@ -1,3 +1,7 @@
+#define DISCONNECTED 0
+#define CLAMPED_OFF 1
+#define OPERATING 2
+
// Powersink - used to drain station power
/obj/item/powersink
@@ -13,28 +17,55 @@
throw_range = 2
materials = list(MAT_METAL=750)
origin_tech = "powerstorage=5;syndicate=5"
- var/drain_rate = 1600000 // amount of power to drain per tick
- var/apc_drain_rate = 50 // Max. amount drained from single APC. In Watts.
- var/dissipation_rate = 20000 // Passive dissipation of drained power. In Watts.
- var/power_drained = 0 // Amount of power drained.
- var/max_power = 1e10 // Detonation point.
- var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
- var/drained_this_tick = 0 // This is unfortunately necessary to ensure we process powersinks BEFORE other machinery such as APCs.
- var/admins_warned = 0 // stop spam, only warn the admins once that we are about to go boom
+ var/drain_rate = 2000000 // amount of power to drain per tick
+ var/power_drained = 0 // has drained this much power
+ var/max_power = 6e8 // maximum power that can be drained before exploding
+ var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
+ var/admins_warned = FALSE // stop spam, only warn the admins once that we are about to boom
- var/datum/powernet/PN // Our powernet
var/obj/structure/cable/attached // the attached cable
/obj/item/powersink/Destroy()
- processing_objects.Remove(src)
- GLOB.processing_power_items.Remove(src)
- PN = null
+ STOP_PROCESSING(SSobj, src)
attached = null
return ..()
-/obj/item/powersink/attackby(var/obj/item/I, var/mob/user)
- if(istype(I, /obj/item/screwdriver))
- if(mode == 0)
+/obj/item/powersink/update_icon()
+ icon_state = "powersink[mode == OPERATING]"
+
+/obj/item/powersink/proc/set_mode(value)
+ if(value == mode)
+ return
+ switch(value)
+ if(DISCONNECTED)
+ attached = null
+ if(mode == OPERATING)
+ STOP_PROCESSING(SSobj, src)
+ anchored = FALSE
+ density = FALSE
+
+ if(CLAMPED_OFF)
+ if(!attached)
+ return
+ if(mode == OPERATING)
+ STOP_PROCESSING(SSobj, src)
+ anchored = TRUE
+ density = TRUE
+
+ if(OPERATING)
+ if(!attached)
+ return
+ START_PROCESSING(SSobj, src)
+ anchored = TRUE
+ density = TRUE
+
+ mode = value
+ update_icon()
+ set_light(0)
+
+/obj/item/powersink/attackby(obj/item/I, mob/user)
+ if(isscrewdriver(I))
+ if(mode == DISCONNECTED)
var/turf/T = loc
if(isturf(T) && !T.intact)
attached = locate() in T
@@ -42,98 +73,81 @@
to_chat(user, "No exposed cable here to attach to.")
return
else
- anchored = 1
- mode = 1
- src.visible_message("[user] attaches [src] to the cable!")
+ set_mode(CLAMPED_OFF)
+ visible_message("[user] attaches [src] to the cable!")
message_admins("Power sink activated by [key_name_admin(user)] at ([x],[y],[z] - JMP)")
log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])")
- return
else
to_chat(user, "Device must be placed over an exposed cable to attach to it.")
- return
else
- if(mode == 2)
- processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
- GLOB.processing_power_items.Remove(src)
- anchored = 0
- mode = 0
+ set_mode(DISCONNECTED)
src.visible_message("[user] detaches [src] from the cable!")
- set_light(0)
- icon_state = "powersink0"
-
- return
else
- ..()
+ return ..()
/obj/item/powersink/attack_ai()
return
/obj/item/powersink/attack_hand(var/mob/user)
switch(mode)
- if(0)
+ if(DISCONNECTED)
..()
- if(1)
- src.visible_message("[user] activates [src]!")
- mode = 2
- icon_state = "powersink1"
- processing_objects.Add(src)
- GLOB.processing_power_items.Add(src)
- if(2) //This switch option wasn't originally included. It exists now. --NeoFite
- src.visible_message("[user] deactivates [src]!")
- mode = 1
- set_light(0)
- icon_state = "powersink0"
- processing_objects.Remove(src)
- GLOB.processing_power_items.Remove(src)
-
-/obj/item/powersink/pwr_drain()
- if(!attached)
- return 0
-
- if(drained_this_tick)
- return 1
- drained_this_tick = 1
-
- var/drained = 0
-
- if(!PN)
- return 1
-
- set_light(12)
- PN.trigger_warning()
- // found a powernet, so drain up to max power from it
- drained = PN.draw_power(drain_rate)
- // if tried to drain more than available on powernet
- // now look for APCs and drain their cells
- if(drained < drain_rate)
- for(var/obj/machinery/power/terminal/T in PN.nodes)
- // Enough power drained this tick, no need to torture more APCs
- if(drained >= drain_rate)
- break
- if(istype(T.master, /obj/machinery/power/apc))
- var/obj/machinery/power/apc/A = T.master
- if(A.operating && A.cell)
- A.cell.charge = max(0, A.cell.charge - apc_drain_rate)
- drained += apc_drain_rate
- if(A.charging == 2) // If the cell was full
- A.charging = 1 // It's no longer full
- power_drained += drained
- return 1
+ if(CLAMPED_OFF)
+ user.visible_message( \
+ "[user] activates \the [src]!", \
+ "You activate \the [src].",
+ "You hear a click.")
+ message_admins("Power sink activated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_VERBOSEJMP(src)]")
+ log_game("Power sink activated by [key_name(user)] at [AREACOORD(src)]")
+ set_mode(OPERATING)
+ if(OPERATING)
+ user.visible_message( \
+ "[user] deactivates \the [src]!", \
+ "You deactivate \the [src].",
+ "You hear a click.")
+ set_mode(CLAMPED_OFF)
/obj/item/powersink/process()
- drained_this_tick = 0
- power_drained -= min(dissipation_rate, power_drained)
+ if(!attached)
+ set_mode(DISCONNECTED)
+ return
+
+ var/datum/powernet/PN = attached.powernet
+ if(PN)
+ set_light(5)
+
+ // found a powernet, so drain up to max power from it
+
+ var/drained = min (drain_rate, attached.newavail())
+ attached.add_delayedload(drained)
+ power_drained += drained
+
+ // if tried to drain more than available on powernet
+ // now look for APCs and drain their cells
+ if(drained < drain_rate)
+ for(var/obj/machinery/power/terminal/T in PN.nodes)
+ if(istype(T.master, /obj/machinery/power/apc))
+ var/obj/machinery/power/apc/A = T.master
+ if(A.operating && A.cell)
+ A.cell.charge = max(0, A.cell.charge - 50)
+ power_drained += 50
+ if(A.charging == 2) // If the cell was full
+ A.charging = 1 // It's no longer full
+ if(drained >= drain_rate)
+ break
+
if(power_drained > max_power * 0.98)
- if(!admins_warned)
- admins_warned = 1
+ if (!admins_warned)
+ admins_warned = TRUE
message_admins("Power sink at ([x],[y],[z] - JMP) is 95% full. Explosion imminent.")
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
+
if(power_drained >= max_power)
+ STOP_PROCESSING(SSobj, src)
explosion(src.loc, 4,8,16,32)
qdel(src)
- return
- if(attached && attached.powernet)
- PN = attached.powernet
- else
- PN = null
+
+#undef DISCONNECTED
+#undef CLAMPED_OFF
+#undef OPERATING
\ No newline at end of file
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 62057880b9b..3064b0ae3c8 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -49,7 +49,7 @@
..()
buildstage = building
if(buildstage)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
@@ -105,7 +105,7 @@
)
/obj/item/radio/intercom/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
GLOB.global_intercoms.Remove(src)
return ..()
@@ -150,7 +150,7 @@
b_stat = 1
buildstage = 1
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return 1
else return ..()
if(2)
@@ -163,7 +163,7 @@
buildstage = 3
to_chat(user, "You secure the electronics!")
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
for(var/i, i<= 5, i++)
wires.UpdateCut(i,1)
return 1
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 4a20a52fa04..9bb036c4d05 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -34,7 +34,7 @@ REAGENT SCANNER
/obj/item/t_scanner/Destroy()
if(on)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/t_scanner/attack_self(mob/user)
@@ -43,12 +43,12 @@ REAGENT SCANNER
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
if(on)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/t_scanner/process()
if(!on)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return null
scan()
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index 064b66b78f4..0b9f6c3aca9 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -256,7 +256,7 @@
/obj/item/borg/upgrade/selfrepair/Destroy()
cyborg = null
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
on = 0
return ..()
@@ -264,10 +264,10 @@
on = !on
if(on)
to_chat(cyborg, "You activate the self-repair module.")
- processing_objects |= src
+ START_PROCESSING(SSobj, src)
else
to_chat(cyborg, "You deactivate the self-repair module.")
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
update_icon()
/obj/item/borg/upgrade/selfrepair/update_icon()
@@ -280,7 +280,7 @@
icon_state = "cyborg_upgrade5"
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
on = 0
update_icon()
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 5cab26e062b..b0a1286d3b2 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -54,7 +54,7 @@
to_chat(user, "There are [amount] [singular_name]\s in the stack.")
else
to_chat(user, "There are [amount] [name]\s in the stack.")
- to_chat(user,"Ctrl-Shift-click to take a custom amount.")
+ to_chat(user,"Alt-click to take a custom amount.")
/obj/item/stack/proc/add(newamount)
amount += newamount
@@ -263,7 +263,7 @@
else
..()
-/obj/item/stack/CtrlShiftClick(mob/living/user)
+/obj/item/stack/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "You can't do that right now!")
return
@@ -276,7 +276,7 @@
//get amount from user
var/min = 0
var/max = get_amount()
- var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as num)
+ var/stackmaterial = round(input(user, "How many sheets do you wish to take out of this stack? (Maximum: [max])") as null|num)
if(stackmaterial == null || stackmaterial <= min || stackmaterial > get_amount())
return
change_stack(user,stackmaterial)
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 150b21692f2..74318bfa16d 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -98,6 +98,8 @@
//alt titles are handled a bit weirdly in order to unobtrusively integrate into existing ID system
var/assignment = null //can be alt title or the actual job
var/rank = null //actual job
+ var/owner_uid
+ var/owner_ckey
var/dorm = 0 // determines if this ID has claimed a dorm already
var/sex
@@ -195,6 +197,19 @@
jobnamedata += " (" + assignment + ")"
return jobnamedata
+/obj/item/card/id/proc/getPlayer()
+ if(owner_uid)
+ var/mob/living/carbon/human/H = locateUID(owner_uid)
+ if(istype(H) && H.ckey == owner_ckey)
+ return H
+ owner_uid = null
+ if(owner_ckey)
+ for(var/mob/M in GLOB.player_list)
+ if(M.ckey && M.ckey == owner_ckey)
+ owner_uid = M.UID()
+ return M
+ owner_ckey = null
+
/obj/item/card/id/proc/is_untrackable()
return untrackable
diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm
index a4599a2e79f..b1b573f77ad 100644
--- a/code/game/objects/items/weapons/caution.dm
+++ b/code/game/objects/items/weapons/caution.dm
@@ -26,7 +26,7 @@
return
timing = !timing
if(timing)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
armed = 0
timepassed = 0
@@ -34,7 +34,7 @@
/obj/item/caution/proximity_sign/process()
if(!timing)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
timepassed++
if(timepassed >= 15 && !armed)
armed = 1
diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm
index 58c2dd2594f..7e7f1642e3a 100644
--- a/code/game/objects/items/weapons/chrono_eraser.dm
+++ b/code/game/objects/items/weapons/chrono_eraser.dm
@@ -177,7 +177,7 @@
update_icon()
desc = initial(desc) + "
It appears to contain [target.name]."
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/effect/chrono_field/Destroy()
if(gun && gun.field_check(src))
diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm
index 1378b5c004d..ce9f5d916a2 100644
--- a/code/game/objects/items/weapons/cigs.dm
+++ b/code/game/objects/items/weapons/cigs.dm
@@ -48,7 +48,7 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/Destroy()
QDEL_NULL(reagents)
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/mask/cigarette/attack(mob/living/M, mob/living/user, def_zone)
@@ -161,7 +161,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
set_light(2, 0.25, "#E38F46")
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/mask/cigarette/process()
@@ -213,7 +213,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/mob/living/M = loc
to_chat(M, "Your [name] goes out.")
M.unEquip(src, 1) //Force the un-equip so the overlays update
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
@@ -341,7 +341,7 @@ LIGHTERS ARE IN LIGHTERS.DM
if(flavor_text)
var/turf/T = get_turf(src)
T.visible_message(flavor_text)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/clothing/mask/cigarette/pipe/process()
var/turf/location = get_turf(src)
@@ -355,7 +355,7 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
smoke()
return
@@ -366,7 +366,7 @@ LIGHTERS ARE IN LIGHTERS.DM
lit = 0
icon_state = icon_off
item_state = icon_off
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
if(smoketime <= 0)
to_chat(user, "You refill the pipe with tobacco.")
diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm
index 666c14801d8..40fc1bf7d56 100644
--- a/code/game/objects/items/weapons/dice.dm
+++ b/code/game/objects/items/weapons/dice.dm
@@ -112,10 +112,9 @@
/obj/item/dice/attack_self(mob/user as mob)
diceroll(user)
-/obj/item/dice/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
- if(!..())
- return
- diceroll(thrower)
+/obj/item/dice/throw_impact(atom/target)
+ diceroll(thrownby)
+ . = ..()
/obj/item/dice/proc/diceroll(mob/user)
result = rand(1, sides)
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index 75d29c7c6be..dd67d7c67a4 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -33,7 +33,7 @@
/obj/item/flamethrower/process()
if(!lit)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return null
var/turf/location = loc
if(istype(location, /mob/))
@@ -141,7 +141,7 @@
if(!status) return
lit = !lit
if(lit)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if(href_list["remove"])
if(!ptank) return
usr.put_in_hands(ptank)
diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm
index dd65df1ea3f..4bddaf551ea 100644
--- a/code/game/objects/items/weapons/garrote.dm
+++ b/code/game/objects/items/weapons/garrote.dm
@@ -44,7 +44,7 @@
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
else
..()
@@ -97,7 +97,7 @@
M.AdjustSilence(1)
garrote_time = world.time + 10
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
strangling = M
update_icon()
@@ -113,14 +113,14 @@
if(!strangling)
// Our mark got gibbed or similar
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
if(!istype(loc, /mob/living/carbon/human))
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
var/mob/living/carbon/human/user = loc
@@ -138,7 +138,7 @@
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
@@ -148,7 +148,7 @@
strangling = null
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index 9e471583d3b..a20dd86c897 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -402,10 +402,10 @@
/obj/item/nullrod/tribal_knife/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/nullrod/tribal_knife/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/nullrod/tribal_knife/process()
@@ -432,10 +432,10 @@
/obj/item/nullrod/rosary/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/nullrod/rosary/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 9a7c3f0e27c..88dc4ed6542 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -14,7 +14,7 @@
flags = DROPDEL
-/obj/item/implant/proc/trigger(emote, mob/source)
+/obj/item/implant/proc/trigger(emote, mob/source, force)
return
/obj/item/implant/proc/activate()
diff --git a/code/game/objects/items/weapons/implants/implant_abductor.dm b/code/game/objects/items/weapons/implants/implant_abductor.dm
index a86545f8722..64bb7345f7a 100644
--- a/code/game/objects/items/weapons/implants/implant_abductor.dm
+++ b/code/game/objects/items/weapons/implants/implant_abductor.dm
@@ -13,7 +13,7 @@
if(cooldown == total_cooldown)
home.Retrieve(imp_in,1)
cooldown = 0
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
to_chat(imp_in, "You must wait [(total_cooldown - cooldown)*2] seconds to use [src] again!")
@@ -21,7 +21,7 @@
if(cooldown < total_cooldown)
cooldown++
if(cooldown == total_cooldown)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/item/implant/abductor/implant(mob/source, mob/user)
if(..())
diff --git a/code/game/objects/items/weapons/implants/implant_chem.dm b/code/game/objects/items/weapons/implants/implant_chem.dm
index 5f0fea79da9..f1c4dd4126b 100644
--- a/code/game/objects/items/weapons/implants/implant_chem.dm
+++ b/code/game/objects/items/weapons/implants/implant_chem.dm
@@ -33,8 +33,8 @@
-/obj/item/implant/chem/trigger(emote, mob/source)
- if(emote == "deathgasp")
+/obj/item/implant/chem/trigger(emote, mob/source, force)
+ if(force && emote == "deathgasp")
activate(reagents.total_volume)
/obj/item/implant/chem/activate(cause)
diff --git a/code/game/objects/items/weapons/implants/implant_death_alarm.dm b/code/game/objects/items/weapons/implants/implant_death_alarm.dm
index dea34b2ba91..68c8e111520 100644
--- a/code/game/objects/items/weapons/implants/implant_death_alarm.dm
+++ b/code/game/objects/items/weapons/implants/implant_death_alarm.dm
@@ -18,7 +18,7 @@
return dat
/obj/item/implant/death_alarm/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/implant/death_alarm/process()
@@ -61,12 +61,12 @@
/obj/item/implant/death_alarm/implant(mob/target)
if(..())
mobname = target.real_name
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
return 1
return 0
/obj/item/implant/death_alarm/removed(mob/target)
if(..())
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return 1
return 0
diff --git a/code/game/objects/items/weapons/implants/implant_explosive.dm b/code/game/objects/items/weapons/implants/implant_explosive.dm
index 30113ea4e96..f37e148bee6 100644
--- a/code/game/objects/items/weapons/implants/implant_explosive.dm
+++ b/code/game/objects/items/weapons/implants/implant_explosive.dm
@@ -20,8 +20,8 @@
"}
return dat
-/obj/item/implant/explosive/trigger(emote, mob/source)
- if(emote == "deathgasp")
+/obj/item/implant/explosive/trigger(emote, mob/source, force)
+ if(force && emote == "deathgasp")
activate("death")
/obj/item/implant/explosive/activate(cause)
@@ -148,8 +148,8 @@
"}
return dat
-/obj/item/implant/dust/trigger(emote, mob/source)
- if(emote == "deathgasp")
+/obj/item/implant/dust/trigger(emote, mob/source, force)
+ if(force && emote == "deathgasp")
activate("death")
/obj/item/implant/dust/activate(cause)
diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm
index 297966525f0..66e0ba6b110 100644
--- a/code/game/objects/items/weapons/legcuffs.dm
+++ b/code/game/objects/items/weapons/legcuffs.dm
@@ -152,8 +152,14 @@
breakouttime = 35//easy to apply, easy to break out of
gender = NEUTER
origin_tech = "engineering=3;combat=1"
+ hitsound = 'sound/effects/snap.ogg'
var/weaken = 0
+/obj/item/restraints/legcuffs/bola/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
+ playsound(loc,'sound/weapons/bolathrow.ogg', 50, TRUE)
+ if(!..())
+ return
+
/obj/item/restraints/legcuffs/bola/throw_impact(atom/hit_atom)
if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed,
return//abort
@@ -166,6 +172,7 @@
feedback_add_details("handcuffs","B")
to_chat(C, "[src] ensnares you!")
C.Weaken(weaken)
+ playsound(loc, hitsound, 50, TRUE)
/obj/item/restraints/legcuffs/bola/tactical //traitor variant
name = "reinforced bola"
diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm
index a2d8b03da84..ab946de5f0f 100644
--- a/code/game/objects/items/weapons/lighters.dm
+++ b/code/game/objects/items/weapons/lighters.dm
@@ -58,7 +58,7 @@
user.visible_message("After a few attempts, [user] manages to light the [src], [user.p_they()] however burn[user.p_s()] [user.p_their()] finger in the process.")
set_light(2)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
lit = 0
w_class = WEIGHT_CLASS_TINY
@@ -74,7 +74,7 @@
user.visible_message("[user] quietly shuts off the [src].")
set_light(0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
else
return ..()
return
@@ -181,7 +181,7 @@
name = "lit match"
desc = "A match. This one is lit."
attack_verb = list("burnt","singed")
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
update_icon()
return TRUE
@@ -196,7 +196,7 @@
name = "burnt match"
desc = "A match. This one has seen better days."
attack_verb = list("flicked")
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return TRUE
/obj/item/match/dropped(mob/user)
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index e642e3b994a..7c5c6f9421f 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -89,14 +89,14 @@
/obj/item/mop/advanced/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
to_chat(user, "You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.")
playsound(user, 'sound/machines/click.ogg', 30, 1)
@@ -111,7 +111,7 @@
/obj/item/mop/advanced/Destroy()
if(refill_enabled)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 03cf28b25ed..e8a181a197b 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -107,7 +107,7 @@
/obj/item/storage/bag/plasticbag/equipped(var/mob/user, var/slot)
if(slot==slot_head)
storage_slots = 0
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
return
/obj/item/storage/bag/plasticbag/process()
@@ -120,7 +120,7 @@
H.AdjustLoseBreath(1)
else
storage_slots = 7
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
// -----------------------------
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index abf68deb765..e406b097bee 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -642,9 +642,13 @@
new /obj/item/grenade/smokebomb(src)
new /obj/item/restraints/legcuffs/bola(src)
new /obj/item/restraints/legcuffs/bola(src)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
cooldown = world.time
+/obj/item/storage/belt/bluespace/owlman/Destroy()
+ STOP_PROCESSING(SSobj, src)
+ return ..()
+
/obj/item/storage/belt/bluespace/owlman/process()
if(cooldown < world.time - 600)
smokecount = 0
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index d533a7e595b..c44264c6529 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -27,13 +27,13 @@
air_contents.volume = volume //liters
air_contents.temperature = T20C
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
return
/obj/item/tank/Destroy()
QDEL_NULL(air_contents)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 98f97b66f53..7afb1885ea2 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -377,7 +377,7 @@
damtype = "brute"
update_icon()
if(!can_off_process)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
@@ -539,7 +539,7 @@
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
else
to_chat(user, "You need more fuel!")
switched_off(user)
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index 29f2c2dd488..4053f747af5 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -557,10 +557,10 @@
/obj/item/twohanded/singularityhammer/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/twohanded/singularityhammer/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/twohanded/singularityhammer/process()
@@ -664,10 +664,10 @@
/obj/item/twohanded/knighthammer/New()
..()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/item/twohanded/knighthammer/Destroy()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/twohanded/knighthammer/process()
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 6506a5fdf2e..c2428dd8d97 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -66,17 +66,14 @@
// Nada
/obj/Destroy()
- GLOB.machines -= src
- processing_objects -= src
- GLOB.fast_processing -= src
+ if(!ismachinery(src))
+ if(!speed_process)
+ STOP_PROCESSING(SSobj, src) // TODO: Have a processing bitflag to reduce on unnecessary loops through the processing lists
+ else
+ STOP_PROCESSING(SSfastprocess, src)
SSnanoui.close_uis(src)
return ..()
-/obj/proc/process()
- set waitfor = 0
- processing_objects.Remove(src)
- return 0
-
//user: The mob that is suiciding
//damagetype: The type of damage the item will inflict on the user
//BRUTELOSS = 1
@@ -300,15 +297,15 @@ a {
if(speed_process)
return
speed_process = TRUE
- processing_objects.Remove(src)
- GLOB.fast_processing.Add(src)
+ STOP_PROCESSING(SSobj, src)
+ START_PROCESSING(SSfastprocess, src)
/obj/proc/makeNormalProcess()
if(!speed_process)
return
speed_process = FALSE
- processing_objects.Add(src)
- GLOB.fast_processing.Remove(src)
+ START_PROCESSING(SSobj, src)
+ STOP_PROCESSING(SSfastprocess, src)
/obj/vv_get_dropdown()
. = ..()
diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm
index 0692c90ec6d..909ee79e1ab 100644
--- a/code/game/objects/structures/crates_lockers/closets/statue.dm
+++ b/code/game/objects/structures/crates_lockers/closets/statue.dm
@@ -41,7 +41,7 @@
qdel(src)
return
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
..()
/obj/structure/closet/statue/process()
@@ -53,7 +53,7 @@
M.setOxyLoss(intialOxy)
if(timer <= 0)
dump_contents()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
/obj/structure/closet/statue/dump_contents()
diff --git a/code/game/objects/structures/depot.dm b/code/game/objects/structures/depot.dm
index b286749f908..a3dc4ac7007 100644
--- a/code/game/objects/structures/depot.dm
+++ b/code/game/objects/structures/depot.dm
@@ -87,7 +87,7 @@
/obj/effect/overload/New()
. = ..()
// Do not attempt to put the code below into Initialize() or even LateInitialize() with a "return INITIALIZE_HINT_LATELOAD". It won't work!
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
depotarea = areaMaster
if(istype(depotarea))
if(!depotarea.used_self_destruct)
@@ -122,6 +122,6 @@
for(var/obj/mecha/E in range(30, T))
E.Destroy()
explosion(get_turf(src), 25, 35, 45, 55, 1, 1, 60, 0, 0)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
qdel(src)
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index 568fb0ededc..303862ff66f 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -28,6 +28,22 @@
else
has_extinguisher = new/obj/item/extinguisher
+/obj/structure/extinguisher_cabinet/examine(mob/user)
+ ..()
+ to_chat(user, "Alt-click to [opened ? "close":"open"] it.")
+
+/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
+ if(!istype(user) || user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!in_range(src, user))
+ return
+ if(!iscarbon(usr))
+ return
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
+ opened = !opened
+ update_icon()
+
/obj/structure/extinguisher_cabinet/Destroy()
QDEL_NULL(has_extinguisher)
return ..()
@@ -37,11 +53,16 @@
return
if(istype(O, /obj/item/extinguisher))
if(!has_extinguisher && opened)
+ if(!user.drop_item())
+ return
user.drop_item(O)
contents += O
has_extinguisher = O
+ update_icon()
to_chat(user, "You place [O] in [src].")
+ return TRUE
else
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
opened = !opened
else if(istype(O, /obj/item/weldingtool))
if(has_extinguisher)
@@ -65,6 +86,7 @@
new material_drop(T)
qdel(src)
else
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
opened = !opened
update_icon()
@@ -81,21 +103,27 @@
to_chat(user, "You try to move your [temp.name], but cannot!")
return
if(has_extinguisher)
+ if(icon_state == "extinguisher_closed")
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
user.put_in_hands(has_extinguisher)
to_chat(user, "You take [has_extinguisher] from [src].")
has_extinguisher = null
opened = 1
else
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
if(has_extinguisher)
+ if(icon_state == "extinguisher_closed")
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
has_extinguisher.loc = loc
to_chat(user, "You telekinetically remove [has_extinguisher] from [src].")
has_extinguisher = null
opened = 1
else
+ playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
opened = !opened
update_icon()
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 154d4438530..1e3cb331cd1 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -273,8 +273,8 @@
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(loc, '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.
- 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.
+ tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
+ C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
/obj/structure/grille/broken // Pre-broken grilles for map placement
diff --git a/code/game/objects/structures/misc.dm b/code/game/objects/structures/misc.dm
index 6be7bf072d8..01fab63dd57 100644
--- a/code/game/objects/structures/misc.dm
+++ b/code/game/objects/structures/misc.dm
@@ -92,11 +92,11 @@
last_ghost_alert = world.time
attack_atom = src
if(active)
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
/obj/structure/ghost_beacon/Destroy()
if(active)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
attack_atom = null
return ..()
@@ -111,9 +111,9 @@
return
to_chat(user, "You [active ? "disable" : "enable"] \the [src].")
if(active)
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
else
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
active = !active
/obj/structure/ghost_beacon/process()
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index f0a0c89880f..1bb19a81bd2 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(safes)
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
icon = 'icons/obj/structures.dmi'
icon_state = "safe"
-
+
anchored = TRUE
density = TRUE
resistance_flags = LAVA_PROOF | FIRE_PROOF
@@ -159,14 +159,14 @@ GLOBAL_LIST_EMPTY(safes)
drill_start_time = world.time
drill.soundloop.start()
update_icon()
- processing_objects.Add(src)
+ START_PROCESSING(SSobj, src)
if("Turn Off")
if(do_after(user, 2 SECONDS, target = src))
deltimer(drill_timer)
drill_timer = null
drill.soundloop.stop()
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
if("Remove Drill")
if(drill_timer)
to_chat(user, "You cant remove the drill while it's running!")
@@ -208,7 +208,7 @@ GLOBAL_LIST_EMPTY(safes)
if(current_tick == 2)
to_chat(user, "The sounds from [src] are too fast and blend together.")
-
+
if(total_ticks == 1 || prob(10))
to_chat(user, "You hear a [pick(sounds)] from [src].")
@@ -252,7 +252,7 @@ GLOBAL_LIST_EMPTY(safes)
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
current_tumbler_index = 1
-
+
if(!invalid_turn && dial == tumblers[current_tumbler_index])
notify_user(user, canhear, list("tink", "krink", "plink"), ticks, i)
current_tumbler_index++
@@ -308,7 +308,7 @@ GLOBAL_LIST_EMPTY(safes)
drill_timer = null
drill.soundloop.stop()
update_icon()
- processing_objects.Remove(src)
+ STOP_PROCESSING(SSobj, src)
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
if(open)
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index 810659d81bb..04271015f4c 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -19,10 +19,10 @@
/obj/structure/transit_tube/station/New()
..()
- processing_objects += src
+ START_PROCESSING(SSobj, src)
/obj/structure/transit_tube/station/Destroy()
- processing_objects -= src
+ STOP_PROCESSING(SSobj, src)
return ..()
// Stations which will send the tube in the opposite direction after their stop.
diff --git a/code/game/world.dm b/code/game/world.dm
index 4681f46498a..86ca6d883bd 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -374,26 +374,28 @@ var/world_topic_spam_protect_time = world.timeofday
// apply some settings from config..
/world/proc/update_status()
+ status = get_status_text()
+
+/proc/get_world_status_text()
+ return world.get_status_text()
+
+/world/proc/get_status_text()
var/s = ""
if(config && config.server_name)
s += "[config.server_name] — "
+ s += "[station_name()] "
+ if(config && config.githuburl)
+ s+= "([game_version])"
- s += "[station_name()]";
- s += " ("
- s += "" //Change this to wherever you want the hub to link to.
- s += "[game_version]"
- s += ""
- s += ")"
- s += "
The Perfect Mix of RP & Action
"
-
-
-
+ if(config && config.server_tag_line)
+ s += "
[config.server_tag_line]"
+ s += "
"
var/list/features = list()
if(ticker)
- if(master_mode)
+ if(master_mode && master_mode != "secret")
features += master_mode
else
features += "STARTING"
@@ -401,39 +403,22 @@ var/world_topic_spam_protect_time = world.timeofday
if(!enter_allowed)
features += "closed"
- features += abandon_allowed ? "respawn" : "no respawn"
+ if(config && config.server_extra_features)
+ features += config.server_extra_features
if(config && config.allow_vote_mode)
features += "vote"
- if(config && config.allow_ai)
- features += "AI allowed"
+ if(config && config.wikiurl)
+ features += "Wiki"
- var/n = 0
- for(var/mob/M in GLOB.player_list)
- if(M.client)
- n++
-
- if(n > 1)
- features += "~[n] players"
- else if(n > 0)
- features += "~[n] player"
-
- /*
- is there a reason for this? the byond site shows 'hosted by X' when there is a proper host already.
- if(host)
- features += "hosted by [host]"
- */
-
-// if(!host && config && config.hostedby)
-// features += "hosted by [config.hostedby]"
+ if(abandon_allowed)
+ features += "respawn"
if(features)
- s += ": [jointext(features, ", ")]"
+ s += "[jointext(features, ", ")]"
- /* does this help? I do not know */
- if(src.status != s)
- src.status = s
+ return s
#define FAILED_DB_CONNECTION_CUTOFF 5
var/failed_db_connections = 0
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index c15600f7bb6..4fcf95dbfd2 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -78,7 +78,7 @@ var/global/nologevent = 0
body += "VV - "
body += "[ADMIN_TP(M,"TP")] - "
if(M.client)
- body += "PM - "
+ body += "PM - "
body += "[ADMIN_SM(M,"SM")] - "
if(ishuman(M) && M.mind)
body += "HM -"
@@ -950,9 +950,6 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
for(var/obj/machinery/mech_bay_recharge_port/P in toArea)
P.update_recharge_turf()
- for(var/obj/machinery/power/apc/A in toArea)
- A.init()
-
if(gamma_ship_location)
gamma_ship_location = 0
else
@@ -1096,7 +1093,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
dat += "| " + id + " | "
dat += "" + ckey + " | "
dat += "Unlink |
"
-
+
dat += "