Merge remote-tracking branch 'upstream/master' into diagonal-movement

This commit is contained in:
Couls
2019-04-25 23:45:08 -04:00
222 changed files with 1040 additions and 866 deletions

View File

@@ -22,7 +22,7 @@
A.nullifyPipenet(src) A.nullifyPipenet(src)
return ..() 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) if(update)
update = 0 update = 0
reconcile_air() reconcile_air()

View File

@@ -21,7 +21,6 @@
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing += Datum} #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 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) //SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)

View File

@@ -13,6 +13,8 @@
//Objects //Objects
#define isitem(A) (istype(A, /obj/item)) #define isitem(A) (istype(A, /obj/item))
#define ismachinery(A) (istype(A, /obj/machinery))
#define ismecha(A) (istype(A, /obj/mecha)) #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 #define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable

View File

@@ -61,6 +61,8 @@
#define INIT_ORDER_LANGUAGE 6 #define INIT_ORDER_LANGUAGE 6
#define INIT_ORDER_MACHINES 5 #define INIT_ORDER_MACHINES 5
#define INIT_ORDER_CIRCUIT 4 #define INIT_ORDER_CIRCUIT 4
#define INIT_ORDER_HOLIDAY 3
#define INIT_ORDER_ALARMS 2
#define INIT_ORDER_TIMER 1 #define INIT_ORDER_TIMER 1
#define INIT_ORDER_DEFAULT 0 #define INIT_ORDER_DEFAULT 0
#define INIT_ORDER_AIR -1 #define INIT_ORDER_AIR -1

View File

@@ -49,10 +49,10 @@ var/religion_name = null
name = "" name = ""
// Prefix // Prefix
for(var/holiday_name in holiday_master.holidays) for(var/holiday_name in SSholiday.holidays)
if(holiday_name == "Friday the 13th") if(holiday_name == "Friday the 13th")
random = 13 random = 13
var/datum/holiday/holiday = holiday_master.holidays[holiday_name] var/datum/holiday/holiday = SSholiday.holidays[holiday_name]
name = holiday.getStationPrefix() name = holiday.getStationPrefix()
//get normal name //get normal name
if(!name) if(!name)

View File

@@ -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. This may require updating to a beta release.
#endif #endif
var/global/list/processing_objects = list() //This has to be initialized BEFORE world
// Macros that must exist before world.dm // 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

View File

@@ -19,7 +19,6 @@ GLOBAL_LIST_INIT(navigation_computers, list())
GLOBAL_LIST_INIT(all_areas, list()) GLOBAL_LIST_INIT(all_areas, list())
GLOBAL_LIST_INIT(machines, 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(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(rcd_list, list()) //list of Rapid Construction Devices.

View File

@@ -1,8 +1,6 @@
var/global/obj/effect/overlay/plmaster = null var/global/obj/effect/overlay/plmaster = null
var/global/obj/effect/overlay/slmaster = null var/global/obj/effect/overlay/slmaster = null
// Event Manager, the manager for events.
var/datum/event_manager/event_manager = new()
// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. // 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/global_announcer = create_global_announcer()
var/global/obj/item/radio/intercom/command/command_announcer = create_command_announcer() var/global/obj/item/radio/intercom/command/command_announcer = create_command_announcer()

View File

@@ -154,6 +154,12 @@
#define ui_bot_radio "EAST-1:28,SOUTH:7" #define ui_bot_radio "EAST-1:28,SOUTH:7"
#define ui_bot_pull "EAST-2:26,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. //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_STANDARD 1
#define HUD_STYLE_REDUCED 2 #define HUD_STYLE_REDUCED 2

View File

@@ -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

View File

@@ -158,7 +158,7 @@
/datum/controller/process/proc/setup() /datum/controller/process/proc/setup()
/datum/controller/process/proc/process() /datum/controller/process/proc/process_decrepit()
started() started()
doWork() doWork()
finished() finished()

View File

@@ -72,9 +72,9 @@ var/global/datum/controller/processScheduler/processScheduler
scheduler_sleep_interval = world.tick_lag scheduler_sleep_interval = world.tick_lag
updateStartDelays() updateStartDelays()
spawn(0) spawn(0)
process() process_decrepit()
/datum/controller/processScheduler/proc/process() /datum/controller/processScheduler/proc/process_decrepit()
while(isRunning) while(isRunning)
checkRunningProcesses() checkRunningProcesses()
queueProcesses() queueProcesses()
@@ -154,7 +154,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/runProcess(var/datum/controller/process/process) /datum/controller/processScheduler/proc/runProcess(var/datum/controller/process/process)
spawn(0) spawn(0)
process.process() process.process_decrepit()
/datum/controller/processScheduler/proc/processStarted(var/datum/controller/process/process) /datum/controller/processScheduler/proc/processStarted(var/datum/controller/process/process)
setRunningProcessState(process) setRunningProcessState(process)

View File

@@ -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

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -30,7 +30,7 @@ DECLARE_GLOBAL_CONTROLLER(ticker, tickerProcess)
lastTickerTime = currentTime lastTickerTime = currentTime
ticker.process() ticker.process_decrepit()
/datum/controller/process/ticker/proc/getLastTickerTimeDuration() /datum/controller/process/ticker/proc/getLastTickerTimeDuration()
return lastTickerTimeDuration return lastTickerTimeDuration

View File

@@ -67,7 +67,7 @@ SUBSYSTEM_DEF(air)
setup_allturfs() setup_allturfs()
setup_atmos_machinery(GLOB.machines) setup_atmos_machinery(GLOB.machines)
setup_pipenets(GLOB.machines) setup_pipenets(GLOB.machines)
..() return ..()
/datum/controller/subsystem/air/fire(resumed = 0) /datum/controller/subsystem/air/fire(resumed = 0)

View File

@@ -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

View File

@@ -14,4 +14,4 @@ SUBSYSTEM_DEF(assets)
for(var/client/C in GLOB.clients) for(var/client/C in GLOB.clients)
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10) addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10)
..() return ..()

View File

@@ -19,6 +19,7 @@ SUBSYSTEM_DEF(atoms)
setupgenetics() setupgenetics()
initialized = INITIALIZATION_INNEW_MAPLOAD initialized = INITIALIZATION_INNEW_MAPLOAD
InitializeAtoms() InitializeAtoms()
return ..()

View File

@@ -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_x = 700
var/window_y = 600 var/window_y = 600
var/report_at_round_end = 0
var/table_options = " align='center'" var/table_options = " align='center'"
var/head_options = " style='font-weight:bold;'" var/head_options = " style='font-weight:bold;'"
var/row_options1 = " width='85px'" var/row_options1 = " width='85px'"
var/row_options2 = " width='260px'" var/row_options2 = " width='260px'"
var/row_options3 = " width='150px'" var/row_options3 = " width='150px'"
// Event vars
var/datum/event_container/selected_event_container = null var/datum/event_container/selected_event_container = null
var/list/active_events = list()
var/list/datum/event/active_events = list() var/list/finished_events = list()
var/list/datum/event/finished_events = list() var/list/allEvents
var/list/event_containers = list(
var/list/datum/event/allEvents
var/list/datum/event_container/event_containers = list(
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane, EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate, EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
EVENT_LEVEL_MAJOR = new/datum/event_container/major EVENT_LEVEL_MAJOR = new/datum/event_container/major
@@ -21,18 +27,19 @@
var/datum/event_meta/new_event = new var/datum/event_meta/new_event = new
/datum/event_manager/New() /datum/controller/subsystem/events/Initialize()
allEvents = subtypesof(/datum/event) allEvents = subtypesof(/datum/event)
return ..()
/datum/event_manager/proc/process() /datum/controller/subsystem/events/fire()
for(var/datum/event/E in event_manager.active_events) for(var/datum/event/E in active_events)
E.process() E.process()
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR) for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/list/datum/event_container/EC = event_containers[i] var/list/datum/event_container/EC = event_containers[i]
EC.process() 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" 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.") log_debug("Event of '[E.type]' with missing meta-data has completed.")
return return
@@ -57,11 +64,11 @@
log_debug("Event '[EM.name]' has completed at [station_time_timestamp()].") 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] var/list/datum/event_container/EC = event_containers[severity]
EC.next_event_time += delay 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() var/html = GetInteractWindow()
@@ -69,7 +76,7 @@
popup.set_content(html) popup.set_content(html)
popup.open() popup.open()
/datum/event_manager/proc/RoundEnd() /datum/controller/subsystem/events/proc/RoundEnd()
if(!report_at_round_end) if(!report_at_round_end)
return return
@@ -89,7 +96,7 @@
to_chat(world, message) to_chat(world, message)
/datum/event_manager/proc/GetInteractWindow() /datum/controller/subsystem/events/proc/GetInteractWindow()
var/html = "<A align='right' href='?src=[UID()];refresh=1'>Refresh</A>" var/html = "<A align='right' href='?src=[UID()];refresh=1'>Refresh</A>"
if(selected_event_container) if(selected_event_container)
@@ -197,7 +204,7 @@
return html return html
/datum/event_manager/Topic(href, href_list) /datum/controller/subsystem/events/Topic(href, href_list)
if(..()) if(..())
return return
@@ -290,123 +297,3 @@
EC.next_event = null EC.next_event = null
Interact(usr) 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

View File

@@ -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 ..()

View File

@@ -29,4 +29,4 @@ SUBSYSTEM_DEF(icon_smooth)
smooth_icon(A) smooth_icon(A)
CHECK_TICK CHECK_TICK
..() return ..()

View File

@@ -17,7 +17,7 @@ SUBSYSTEM_DEF(jobs)
if(!occupations.len) if(!occupations.len)
SetupOccupations() SetupOccupations()
LoadJobs("config/jobs.txt") LoadJobs("config/jobs.txt")
..() return ..()
/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station")) /datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station"))
occupations = list() occupations = list()

View File

@@ -17,7 +17,7 @@ SUBSYSTEM_DEF(machines)
/datum/controller/subsystem/machines/Initialize() /datum/controller/subsystem/machines/Initialize()
makepowernets() makepowernets()
fire() fire()
..() return ..()
/datum/controller/subsystem/machines/proc/makepowernets() /datum/controller/subsystem/machines/proc/makepowernets()
for(var/datum/powernet/PN in powernets) for(var/datum/powernet/PN in powernets)

View File

@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(mapping)
// Populate mining Z-level hidden rooms // Populate mining Z-level hidden rooms
for(var/i=0, i<max_secret_rooms, i++) for(var/i=0, i<max_secret_rooms, i++)
make_mining_asteroid_secret() make_mining_asteroid_secret()
..() return ..()
/datum/controller/subsystem/mapping/Recover() /datum/controller/subsystem/mapping/Recover()
flags |= SS_NO_INIT flags |= SS_NO_INIT

View File

@@ -0,0 +1,6 @@
//Fires five times every second.
PROCESSING_SUBSYSTEM_DEF(fastprocess)
name = "Fast Processing"
wait = 2
stat_tag = "FP"

View File

@@ -0,0 +1,5 @@
PROCESSING_SUBSYSTEM_DEF(obj)
name = "Objects"
priority = FIRE_PRIORITY_OBJ
flags = SS_NO_INIT
wait = 20

View File

@@ -1,7 +1,5 @@
//Used to process objects. Fires once every second. //Used to process objects. Fires once every second.
//TODO: Implement fully when process scheduler dies
/*
SUBSYSTEM_DEF(processing) SUBSYSTEM_DEF(processing)
name = "Processing" name = "Processing"
priority = FIRE_PRIORITY_PROCESS priority = FIRE_PRIORITY_PROCESS
@@ -24,15 +22,16 @@ SUBSYSTEM_DEF(processing)
while(current_run.len) while(current_run.len)
var/datum/thing = current_run[current_run.len] var/datum/thing = current_run[current_run.len]
current_run.len-- current_run.len--
if(QDELETED(thing) || thing.process(wait) == PROCESS_KILL) if(QDELETED(thing))
processing -= thing processing -= thing
else if(thing.process(wait) == PROCESS_KILL)
// fully stop so that a future START_PROCESSING will work
STOP_PROCESSING(src, thing)
if(MC_TICK_CHECK) if(MC_TICK_CHECK)
return return
*/
/datum/var/isprocessing = FALSE /datum/var/isprocessing = FALSE
/*
/datum/proc/process() /datum/proc/process()
set waitfor = 0 set waitfor = 0
STOP_PROCESSING(SSobj, src) return PROCESS_KILL
return 0
*/

View File

@@ -9,7 +9,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
ticket_system_name = "Mentor Tickets" ticket_system_name = "Mentor Tickets"
ticket_name = "Mentor Ticket" ticket_name = "Mentor Ticket"
span_text = "<span class='mentorhelp'>" span_text = "<span class='mentorhelp'>"
close_rights = R_MENTOR close_rights = R_MENTOR | R_ADMIN
/datum/controller/subsystem/tickets/mentor_tickets/message_staff(var/msg) /datum/controller/subsystem/tickets/mentor_tickets/message_staff(var/msg)
message_mentorTicket(msg) message_mentorTicket(msg)

View File

@@ -45,7 +45,7 @@ SUBSYSTEM_DEF(weather)
for(var/z in levels_by_trait(target_trait)) for(var/z in levels_by_trait(target_trait))
LAZYINITLIST(eligible_zlevels["[z]"]) LAZYINITLIST(eligible_zlevels["[z]"])
eligible_zlevels["[z]"][W] = probability eligible_zlevels["[z]"][W] = probability
..() return ..()
/datum/controller/subsystem/weather/proc/run_weather(datum/weather/weather_datum_type, z_levels) /datum/controller/subsystem/weather/proc/run_weather(datum/weather/weather_datum_type, z_levels)
if(istext(weather_datum_type)) if(istext(weather_datum_type))

View File

@@ -60,10 +60,10 @@
debug_variables(cameranet) debug_variables(cameranet)
feedback_add_details("admin_verb","DCameras") feedback_add_details("admin_verb","DCameras")
if("Event") if("Event")
debug_variables(event_manager) debug_variables(SSevents)
feedback_add_details("admin_verb","DEvent") feedback_add_details("admin_verb","DEvent")
if("Alarm") if("Alarm")
debug_variables(alarm_manager) debug_variables(SSalarms)
feedback_add_details("admin_verb", "DAlarm") feedback_add_details("admin_verb", "DAlarm")
if("Garbage") if("Garbage")
debug_variables(SSgarbage) debug_variables(SSgarbage)

View File

@@ -621,6 +621,33 @@
src.give_spell(M) src.give_spell(M)
href_list["datumrefresh"] = href_list["give_spell"] href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["givemartialart"])
if(!check_rights(R_SERVER|R_EVENT)) return
var/mob/living/carbon/C = locateUID(href_list["givemartialart"])
if(!istype(C))
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/list/artpaths = subtypesof(/datum/martial_art)
var/list/artnames = list()
for(var/i in artpaths)
var/datum/martial_art/M = i
artnames[initial(M.name)] = M
var/result = input(usr, "Choose the martial art to teach", "JUDO CHOP") as null|anything in artnames
if(!usr)
return
if(QDELETED(C))
to_chat(usr, "Mob doesn't exist anymore")
return
if(result)
var/chosenart = artnames[result]
var/datum/martial_art/MA = new chosenart
MA.teach(C)
href_list["datumrefresh"] = href_list["givemartialart"]
else if(href_list["give_disease"]) else if(href_list["give_disease"])
if(!check_rights(R_SERVER|R_EVENT)) return if(!check_rights(R_SERVER|R_EVENT)) return

View File

@@ -109,7 +109,7 @@ Data storage vars:
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.") CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
return 1 return 1
/datum/global_iterator/proc/process() /datum/global_iterator/process()
return return
/datum/global_iterator/proc/active() /datum/global_iterator/proc/active()

View File

@@ -32,11 +32,11 @@
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type) var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
A.attached_effect = src //so the alert can reference us, if it needs to A.attached_effect = src //so the alert can reference us, if it needs to
linked_alert = A //so we can reference the alert, if we need to linked_alert = A //so we can reference the alert, if we need to
GLOB.fast_processing.Add(src) START_PROCESSING(SSfastprocess, src)
return TRUE return TRUE
/datum/status_effect/Destroy() /datum/status_effect/Destroy()
GLOB.fast_processing.Remove(src) STOP_PROCESSING(SSfastprocess, src)
if(owner) if(owner)
owner.clear_alert(id) owner.clear_alert(id)
LAZYREMOVE(owner.status_effects, src) LAZYREMOVE(owner.status_effects, src)
@@ -44,7 +44,7 @@
owner = null owner = null
return ..() return ..()
/datum/status_effect/proc/process() /datum/status_effect/process()
if(!owner) if(!owner)
qdel(src) qdel(src)
return return

View File

@@ -78,9 +78,9 @@
/area/proc/atmosalert(danger_level, var/alarm_source, var/force = FALSE) /area/proc/atmosalert(danger_level, var/alarm_source, var/force = FALSE)
if(danger_level == ATMOS_ALARM_NONE) if(danger_level == ATMOS_ALARM_NONE)
atmosphere_alarm.clearAlarm(src, alarm_source) SSalarms.atmosphere_alarm.clearAlarm(src, alarm_source)
else else
atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level) SSalarms.atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level)
//Check all the alarms before lowering atmosalm. Raising is perfectly fine. If force = 1 we don't care. //Check all the alarms before lowering atmosalm. Raising is perfectly fine. If force = 1 we don't care.
for(var/obj/machinery/alarm/AA in src) for(var/obj/machinery/alarm/AA in src)
@@ -158,9 +158,9 @@
if(A.density) if(A.density)
A.lock() A.lock()
burglar_alarm.triggerAlarm(src, trigger) SSalarms.burglar_alarm.triggerAlarm(src, trigger)
spawn(600) spawn(600)
burglar_alarm.clearAlarm(src, trigger) SSalarms.burglar_alarm.clearAlarm(src, trigger)
/area/proc/set_fire_alarm_effect() /area/proc/set_fire_alarm_effect()
fire = 1 fire = 1

View File

@@ -642,15 +642,22 @@ var/list/blood_splatter_icons = list()
update_icons() //apply the now updated overlays to the mob update_icons() //apply the now updated overlays to the mob
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0) /atom/proc/add_vomit_floor(toxvomit = 0, green = FALSE)
if( istype(src, /turf/simulated) ) playsound(src, 'sound/effects/splat.ogg', 50, 1)
var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src) if(!isspaceturf(src))
var/type = green ? /obj/effect/decal/cleanable/vomit/green : /obj/effect/decal/cleanable/vomit
var/vomit_reagent = green ? "green_vomit" : "vomit"
for(var/obj/effect/decal/cleanable/vomit/V in get_turf(src))
if(V.type == type)
V.reagents.add_reagent(vomit_reagent, 5)
return
var/obj/effect/decal/cleanable/vomit/this = new type(src)
// Make toxins vomit look different // Make toxins vomit look different
if(toxvomit) if(toxvomit)
this.icon_state = "vomittox_[pick(1,4)]" this.icon_state = "vomittox_[pick(1,4)]"
/atom/proc/get_global_map_pos() /atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return if(!islist(global_map) || isemptylist(global_map)) return
var/cur_x = null var/cur_x = null

View File

@@ -14,7 +14,7 @@
/obj/structure/blob/core/New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2, offspring) /obj/structure/blob/core/New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2, offspring)
blob_cores += src blob_cores += src
processing_objects.Add(src) START_PROCESSING(SSobj, src)
GLOB.poi_list |= src GLOB.poi_list |= src
adjustcolors(color) //so it atleast appears adjustcolors(color) //so it atleast appears
if(!overmind) if(!overmind)
@@ -42,7 +42,7 @@
if(overmind) if(overmind)
overmind.blob_core = null overmind.blob_core = null
overmind = null overmind = null
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src) GLOB.poi_list.Remove(src)
return ..() return ..()

View File

@@ -9,7 +9,7 @@
/obj/structure/blob/node/New(loc, var/h = 100) /obj/structure/blob/node/New(loc, var/h = 100)
blob_nodes += src blob_nodes += src
processing_objects.Add(src) START_PROCESSING(SSobj, src)
..(loc, h) ..(loc, h)
/obj/structure/blob/node/adjustcolors(var/a_color) /obj/structure/blob/node/adjustcolors(var/a_color)
@@ -26,7 +26,7 @@
/obj/structure/blob/node/Destroy() /obj/structure/blob/node/Destroy()
blob_nodes -= src blob_nodes -= src
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/structure/blob/node/Life(seconds, times_fired) /obj/structure/blob/node/Life(seconds, times_fired)

View File

@@ -98,7 +98,7 @@
if(isovermind(M) || isobserver(M)) if(isovermind(M) || isobserver(M))
M.show_message(rendered, 2) 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 return
/mob/camera/blob/blob_act() /mob/camera/blob/blob_act()

View File

@@ -13,10 +13,10 @@
/obj/effect/proc_holder/changeling/fleshmend/New() /obj/effect/proc_holder/changeling/fleshmend/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/effect/proc_holder/changeling/fleshmend/Destroy() /obj/effect/proc_holder/changeling/fleshmend/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/effect/proc_holder/changeling/fleshmend/process() /obj/effect/proc_holder/changeling/fleshmend/process()

View File

@@ -433,7 +433,7 @@
..() ..()
if(ismob(loc)) if(ismob(loc))
loc.visible_message("<span class='warning'>[loc.name]\'s flesh rapidly inflates, forming a bloated mass around [loc.p_their()] body!</span>", "<span class='warning'>We inflate our flesh, creating a spaceproof suit!</span>", "<span class='warning'>You hear organic matter ripping and tearing!</span>") loc.visible_message("<span class='warning'>[loc.name]\'s flesh rapidly inflates, forming a bloated mass around [loc.p_their()] body!</span>", "<span class='warning'>We inflate our flesh, creating a spaceproof suit!</span>", "<span class='warning'>You hear organic matter ripping and tearing!</span>")
processing_objects += src START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/space/changeling/process() /obj/item/clothing/suit/space/changeling/process()
if(ishuman(loc)) if(ishuman(loc))

View File

@@ -39,7 +39,7 @@
my_message = "<span class='cultlarge'><b>Harbringer of the Slaughter:</b> [message]</span>" my_message = "<span class='cultlarge'><b>Harbringer of the Slaughter:</b> [message]</span>"
else else
my_message = "<span class='cultspeech'><b>[(ishuman(user) ? "Acolyte" : "Construct")] [user]:</b> [message]</span>" my_message = "<span class='cultspeech'><b>[(ishuman(user) ? "Acolyte" : "Construct")] [user]:</b> [message]</span>"
for(var/mob/M in GLOB.mob_list) for(var/mob/M in GLOB.player_list)
if(iscultist(M)) if(iscultist(M))
to_chat(M, my_message) to_chat(M, my_message)
else if(M in GLOB.dead_mob_list) else if(M in GLOB.dead_mob_list)

View File

@@ -193,11 +193,11 @@ var/list/blacklisted_pylon_turfs = typecacheof(list(
return return
/obj/structure/cult/functional/pylon/New() /obj/structure/cult/functional/pylon/New()
processing_objects |= src START_PROCESSING(SSobj, src)
..() ..()
/obj/structure/cult/functional/pylon/Destroy() /obj/structure/cult/functional/pylon/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/structure/cult/functional/pylon/process() /obj/structure/cult/functional/pylon/process()

View File

@@ -88,7 +88,7 @@
///process() ///process()
///Called by the gameticker ///Called by the gameticker
/datum/game_mode/proc/process() /datum/game_mode/process()
return 0 return 0
//Called by the gameticker //Called by the gameticker

View File

@@ -172,10 +172,10 @@ var/round_start_time = 0
to_chat(world, "<FONT color='blue'><B>Enjoy the game!</B></FONT>") to_chat(world, "<FONT color='blue'><B>Enjoy the game!</B></FONT>")
world << sound('sound/AI/welcome.ogg')// Skie world << sound('sound/AI/welcome.ogg')// Skie
if(holiday_master.holidays) if(SSholiday.holidays)
to_chat(world, "<font color='blue'>and...</font>") to_chat(world, "<font color='blue'>and...</font>")
for(var/holidayname in holiday_master.holidays) for(var/holidayname in SSholiday.holidays)
var/datum/holiday/holiday = holiday_master.holidays[holidayname] var/datum/holiday/holiday = SSholiday.holidays[holidayname]
to_chat(world, "<h4>[holiday.greet()]</h4>") to_chat(world, "<h4>[holiday.greet()]</h4>")
spawn(0) // Forking dynamic room selection spawn(0) // Forking dynamic room selection
@@ -400,7 +400,7 @@ var/round_start_time = 0
if(m) if(m)
to_chat(world, "<span class='purple'><b>Tip of the round: </b>[html_encode(m)]</span>") to_chat(world, "<span class='purple'><b>Tip of the round: </b>[html_encode(m)]</span>")
/datum/controller/gameticker/proc/process() /datum/controller/gameticker/proc/process_decrepit()
if(current_state != GAME_STATE_PLAYING) if(current_state != GAME_STATE_PLAYING)
return 0 return 0
@@ -506,7 +506,7 @@ var/round_start_time = 0
mode.declare_station_goal_completion() mode.declare_station_goal_completion()
//Ask the event manager to print round end information //Ask the event manager to print round end information
event_manager.RoundEnd() SSevents.RoundEnd()
return 1 return 1

View File

@@ -56,7 +56,7 @@
var/announced = 0 var/announced = 0
/obj/machinery/doomsday_device/Destroy() /obj/machinery/doomsday_device/Destroy()
GLOB.fast_processing -= src STOP_PROCESSING(SSfastprocess, src)
SSshuttle.emergencyNoEscape = 0 SSshuttle.emergencyNoEscape = 0
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED) if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
SSshuttle.emergency.mode = SHUTTLE_DOCKED SSshuttle.emergency.mode = SHUTTLE_DOCKED
@@ -67,7 +67,7 @@
/obj/machinery/doomsday_device/proc/start() /obj/machinery/doomsday_device/proc/start()
detonation_timer = world.time + default_timer detonation_timer = world.time + default_timer
timing = 1 timing = 1
GLOB.fast_processing += src START_PROCESSING(SSfastprocess, src)
SSshuttle.emergencyNoEscape = 1 SSshuttle.emergencyNoEscape = 1
/obj/machinery/doomsday_device/proc/seconds_remaining() /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') priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
qdel(src) qdel(src)
if(!timing) if(!timing)
GLOB.fast_processing -= src STOP_PROCESSING(SSfastprocess, src)
return return
var/sec_left = seconds_remaining() var/sec_left = seconds_remaining()
if(sec_left <= 0) if(sec_left <= 0)

View File

@@ -110,15 +110,15 @@
M.SetStunned(0) M.SetStunned(0)
M.SetWeakened(0) M.SetWeakened(0)
combat_cooldown = 0 combat_cooldown = 0
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/clothing/suit/armor/abductor/vest/process() /obj/item/clothing/suit/armor/abductor/vest/process()
combat_cooldown++ combat_cooldown++
if(combat_cooldown==initial(combat_cooldown)) if(combat_cooldown==initial(combat_cooldown))
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
/obj/item/clothing/suit/armor/abductor/Destroy() /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) for(var/obj/machinery/abductor/console/C in GLOB.machines)
if(C.vest == src) if(C.vest == src)
C.vest = null C.vest = null

View File

@@ -373,11 +373,11 @@
/obj/effect/cocoon/abductor/proc/Start() /obj/effect/cocoon/abductor/proc/Start()
hatch_time = world.time + 600 hatch_time = world.time + 600
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/effect/cocoon/abductor/process() /obj/effect/cocoon/abductor/process()
if(world.time > hatch_time) if(world.time > hatch_time)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
for(var/mob/M in contents) for(var/mob/M in contents)
src.visible_message("<span class='warning'>[src] hatches!</span>") src.visible_message("<span class='warning'>[src] hatches!</span>")
M.forceMove(get_turf(src)) M.forceMove(get_turf(src))

View File

@@ -32,7 +32,7 @@
return FALSE return FALSE
return B.host.say_understands(other, speaking) 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 return
/mob/living/captive_brain/resist() /mob/living/captive_brain/resist()
@@ -760,10 +760,9 @@
to_chat(src, "<span class='danger'>Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.</span>") to_chat(src, "<span class='danger'>Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.</span>")
visible_message("<span class='danger'>[src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!</span>") visible_message("<span class='danger'>[src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!</span>")
B.chemicals -= 100 B.chemicals -= 100
var/turf/T = get_turf(src)
new /obj/effect/decal/cleanable/vomit(get_turf(src)) T.add_vomit_floor()
playsound(loc, 'sound/effects/splat.ogg', 50, 1) new /mob/living/simple_animal/borer(T, B.generation + 1)
new /mob/living/simple_animal/borer(get_turf(src),B.generation + 1)
else else
to_chat(src, "You need 100 chemicals to reproduce!") to_chat(src, "You need 100 chemicals to reproduce!")

View File

@@ -407,7 +407,7 @@ var/bomb_set
/obj/item/disk/nuclear/New() /obj/item/disk/nuclear/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
GLOB.poi_list |= src GLOB.poi_list |= src
/obj/item/disk/nuclear/process() /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] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[diskturf.x];Y=[diskturf.y];Z=[diskturf.z]'>JMP</a>":"nonexistent location"]).") message_admins("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[diskturf.x];Y=[diskturf.y];Z=[diskturf.z]'>JMP</a>":"nonexistent location"]).")
log_game("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z]":"nonexistent location"]).") log_game("[src] has been !!force deleted!! in ([diskturf ? "[diskturf.x], [diskturf.y] ,[diskturf.z]":"nonexistent location"]).")
GLOB.poi_list.Remove(src) GLOB.poi_list.Remove(src)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
if(blobstart.len > 0) if(blobstart.len > 0)

View File

@@ -335,7 +335,7 @@
include_user = 1 include_user = 1
var/blind_smoke_acquired var/blind_smoke_acquired
var/screech_acquired var/screech_acquired
var/drainLifeAcquired var/nullChargeAcquired
var/reviveThrallAcquired var/reviveThrallAcquired
action_icon_state = "collective_mind" action_icon_state = "collective_mind"
@@ -370,10 +370,11 @@
It will create a choking cloud that will blind any non-thralls who enter.</i></span>") It will create a choking cloud that will blind any non-thralls who enter.</i></span>")
target.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null)) target.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null))
if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !drainLifeAcquired) if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !nullChargeAcquired)
drainLifeAcquired = 1 nullChargeAcquired = 1
to_chat(target, "<span class='shadowling'><i>The power of your thralls has granted you the <b>Drain Life</b> ability. You can now drain the health of nearby humans to heal yourself.</i></span>") to_chat(user, "<span class='shadowling'><i>The power of your thralls has granted you the <b>Null Charge</b> ability. This ability will drain an APC's contents to the void, preventing it from recharging \
target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife(null)) or sending power until repaired.</i></span>")
target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/null_charge(null))
if(thralls >= CEILING(9 * ticker.mode.thrall_ratio, 1) && !reviveThrallAcquired) if(thralls >= CEILING(9 * ticker.mode.thrall_ratio, 1) && !reviveThrallAcquired)
reviveThrallAcquired = 1 reviveThrallAcquired = 1
@@ -491,45 +492,57 @@
for(var/obj/structure/window/W in T.contents) for(var/obj/structure/window/W in T.contents)
W.take_damage(rand(80, 100)) W.take_damage(rand(80, 100))
/obj/effect/proc_holder/spell/aoe_turf/drainLife /obj/effect/proc_holder/spell/aoe_turf/null_charge
name = "Drain Life" name = "Null Charge"
desc = "Damages nearby humans, draining their life and healing your own wounds." desc = "Empties an APC, preventing it from recharging until fixed."
panel = "Shadowling Abilities" panel = "Shadowling Abilities"
range = 3 charge_max = 600
charge_max = 100 clothes_req = FALSE
clothes_req = 0 action_icon_state = "null_charge"
var/targetsDrained
var/list/nearbyTargets
action_icon_state = "drain_life"
/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)) if(!shadowling_check(user))
charge_counter = charge_max charge_counter = charge_max
return return
var/mob/living/carbon/human/U = usr
targetsDrained = 0 var/list/local_objs = view(1, user)
nearbyTargets = list() var/obj/machinery/power/apc/target_apc
for(var/turf/T in targets) for(var/object in local_objs)
for(var/mob/living/carbon/M in T.contents) if(istype(object, /obj/machinery/power/apc))
if(M == src) target_apc = object
continue break
targetsDrained++
nearbyTargets.Add(M) if(!target_apc)
if(!targetsDrained) to_chat(user, "<span class='warning'>You must stand next to an APC to drain it!</span>")
charge_counter = charge_max charge_counter = charge_max
to_chat(U, "<span class='warning'>There were no nearby humans for you to drain.</span>")
return return
for(var/mob/living/carbon/M in nearbyTargets)
U.heal_organ_damage(10, 10) if(target_apc.cell?.charge == 0)
U.adjustToxLoss(-10) to_chat(user, "<span class='warning'>APC must have a power to drain!</span>")
U.adjustOxyLoss(-10) charge_counter = charge_max
U.adjustStaminaLoss(-20) return
U.AdjustWeakened(-1)
U.AdjustStunned(-1) target_apc.operating = 0
M.adjustOxyLoss(20) target_apc.update()
M.adjustStaminaLoss(20) target_apc.update_icon()
to_chat(M, "<span class='boldannounce'>You feel a wave of exhaustion and a curious draining sensation directed towards [U]!</span>") target_apc.visible_message("<span class='warning'>The [target_apc] flickers and begins to grow dark.</span>")
to_chat(U, "<span class='shadowling'>You draw life from those around you to heal your wounds.</span>")
to_chat(user, "<span class='shadowling'>You dim the APC's screen and carefully begin siphoning its power into the void.</span>")
if(!do_after(user, 200, target=target_apc))
//Whoops! The APC's powers back on
to_chat(user, "<span class='shadowling'>Your concentration breaks and the APC suddenly repowers!</span>")
target_apc.operating = 1
target_apc.update()
target_apc.update_icon()
target_apc.visible_message("<span class='warning'>The [target_apc] begins glowing brightly!</span>")
else
//We did it!
to_chat(user, "<span class='shadowling'>You sent the APC's power to the void while overloading all it's lights!</span>")
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()

View File

@@ -226,6 +226,7 @@
target.Weaken(5) target.Weaken(5)
target.stuttering = 20 target.stuttering = 20
to_chat(target, "<span class='warning'>You are blinded by [user]'s glare.</span>") to_chat(target, "<span class='warning'>You are blinded by [user]'s glare.</span>")
add_attack_logs(user, target, "(Vampire) Glared at")
/obj/effect/proc_holder/spell/vampire/self/shapeshift /obj/effect/proc_holder/spell/vampire/self/shapeshift
name = "Shapeshift (50)" name = "Shapeshift (50)"

View File

@@ -153,9 +153,13 @@
src.spawn_amt_left = spawn_amt src.spawn_amt_left = spawn_amt
src.desc = desc src.desc = desc
processing_objects.Add(src) START_PROCESSING(SSobj, src)
//return //return
/obj/effect/rend/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/rend/process() /obj/effect/rend/process()
for(var/mob/M in loc) for(var/mob/M in loc)
return return

View File

@@ -469,6 +469,24 @@
dat += "<b>Already cast!</b><br>" dat += "<b>Already cast!</b><br>"
return dat 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, "<span class='notice'>You have cast summon ghosts!</span>")
playsound(get_turf(user), 'sound/effects/ghost2.ogg', 50, 1)
return TRUE
/datum/spellbook_entry/summon/guns /datum/spellbook_entry/summon/guns
name = "Summon Guns" name = "Summon Guns"
category = "Rituals" category = "Rituals"

View File

@@ -295,10 +295,10 @@
to_chat(O, "The screen bursts into static.") to_chat(O, "The screen bursts into static.")
/obj/machinery/camera/proc/triggerCameraAlarm() /obj/machinery/camera/proc/triggerCameraAlarm()
camera_alarm.triggerAlarm(loc, src) SSalarms.camera_alarm.triggerAlarm(loc, src)
/obj/machinery/camera/proc/cancelCameraAlarm() /obj/machinery/camera/proc/cancelCameraAlarm()
camera_alarm.clearAlarm(loc, src) SSalarms.camera_alarm.clearAlarm(loc, src)
/obj/machinery/camera/proc/can_use() /obj/machinery/camera/proc/can_use()
if(!status) if(!status)

View File

@@ -45,7 +45,7 @@
if(!status || (stat & NOPOWER)) if(!status || (stat & NOPOWER))
return 0 return 0
if(detectTime == -1) if(detectTime == -1)
motion_alarm.clearAlarm(loc, src) SSalarms.motion_alarm.clearAlarm(loc, src)
detectTime = 0 detectTime = 0
return 1 return 1
@@ -53,7 +53,7 @@
if(!status || (stat & NOPOWER)) if(!status || (stat & NOPOWER))
return 0 return 0
if(!detectTime) return 0 if(!detectTime) return 0
motion_alarm.triggerAlarm(loc, src) SSalarms.motion_alarm.triggerAlarm(loc, src)
detectTime = -1 detectTime = -1
return 1 return 1

View File

@@ -470,7 +470,7 @@
M.nutrition -= 50 //lose a lot of food M.nutrition -= 50 //lose a lot of food
var/turf/location = usr.loc var/turf/location = usr.loc
if(istype(location, /turf/simulated)) if(istype(location, /turf/simulated))
location.add_vomit_floor(src, 1) location.add_vomit_floor(TRUE)
if(ORION_TRAIL_FLUX) if(ORION_TRAIL_FLUX)
if(prob(75)) if(prob(75))
M.Weaken(3) M.Weaken(3)

View File

@@ -12,10 +12,10 @@ var/global/list/minor_air_alarms = list()
/obj/machinery/computer/atmos_alert/New() /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() /obj/machinery/computer/atmos_alert/Destroy()
atmosphere_alarm.unregister(src) SSalarms.atmosphere_alarm.unregister(src)
return ..() return ..()
/obj/machinery/computer/atmos_alert/attack_hand(mob/user) /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/major_alarms[0]
var/minor_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]") 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]") minor_alarms[++minor_alarms.len] = list("name" = sanitize(alarm.alarm_name()), "ref" = "\ref[alarm]")
data["priority_alarms"] = major_alarms data["priority_alarms"] = major_alarms
@@ -45,11 +45,11 @@ var/global/list/minor_air_alarms = list()
return data return data
/obj/machinery/computer/atmos_alert/update_icon() /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) if(alarms.len)
icon_screen = "alert:2" icon_screen = "alert:2"
else else
alarms = atmosphere_alarm.minor_alarms() alarms = SSalarms.atmosphere_alarm.minor_alarms()
if(alarms.len) if(alarms.len)
icon_screen = "alert:1" icon_screen = "alert:1"
else else
@@ -61,7 +61,7 @@ var/global/list/minor_air_alarms = list()
return 1 return 1
if(href_list["clear_alarm"]) 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) if(alarm)
for(var/datum/alarm_source/alarm_source in alarm.sources) for(var/datum/alarm_source/alarm_source in alarm.sources)
var/obj/machinery/alarm/air_alarm = alarm_source.source var/obj/machinery/alarm/air_alarm = alarm_source.source

View File

@@ -54,6 +54,7 @@
/obj/machinery/disco/Destroy() /obj/machinery/disco/Destroy()
dance_over() dance_over()
selection = null selection = null
STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/machinery/disco/attackby(obj/item/O, mob/user, params) /obj/machinery/disco/attackby(obj/item/O, mob/user, params)
@@ -128,7 +129,7 @@
active = TRUE active = TRUE
update_icon() update_icon()
dance_setup() dance_setup()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
lights_spin() lights_spin()
updateUsrDialog() updateUsrDialog()
else if(active) else if(active)
@@ -472,7 +473,7 @@
L.stop_sound_channel(CHANNEL_JUKEBOX) L.stop_sound_channel(CHANNEL_JUKEBOX)
else if(active) else if(active)
active = FALSE active = FALSE
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
dance_over() dance_over()
playsound(src,'sound/machines/terminal_off.ogg',50,1) playsound(src,'sound/machines/terminal_off.ogg',50,1)
icon_state = "disco0" icon_state = "disco0"

View File

@@ -39,7 +39,6 @@
if(command_completed(cur_command)) if(command_completed(cur_command))
cur_command = null cur_command = null
else else
if(!isprocessing)
START_PROCESSING(SSmachines, src) START_PROCESSING(SSmachines, src)
/obj/machinery/door/airlock/proc/do_command(command) /obj/machinery/door/airlock/proc/do_command(command)

View File

@@ -17,8 +17,8 @@
/datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param) /datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
return return
/datum/computer/file/embedded_program/proc/process() /datum/computer/file/embedded_program/process()
return return FALSE
/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line) /datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
if(master) if(master)

View File

@@ -143,7 +143,7 @@ FIRE ALARM
alarm() alarm()
time = 0 time = 0
timing = 0 timing = 0
processing_objects -= src STOP_PROCESSING(SSobj, src)
updateDialog() updateDialog()
last_process = world.timeofday last_process = world.timeofday
@@ -206,9 +206,9 @@ FIRE ALARM
last_process = world.timeofday last_process = world.timeofday
if(oldTiming != timing) if(oldTiming != timing)
if(timing) if(timing)
processing_objects += src START_PROCESSING(SSobj, src)
else else
processing_objects -= src STOP_PROCESSING(SSobj, src)
else if(href_list["tp"]) else if(href_list["tp"])
var/tp = text2num(href_list["tp"]) var/tp = text2num(href_list["tp"])
time += tp time += tp
@@ -220,7 +220,7 @@ FIRE ALARM
var/area/A = get_area(src) var/area/A = get_area(src)
A.fire_reset() A.fire_reset()
for(var/obj/machinery/firealarm/FA in A) for(var/obj/machinery/firealarm/FA in A)
fire_alarm.clearAlarm(loc, FA) SSalarms.fire_alarm.clearAlarm(loc, FA)
return return
/obj/machinery/firealarm/proc/alarm(var/duration = 0) /obj/machinery/firealarm/proc/alarm(var/duration = 0)
@@ -228,7 +228,7 @@ FIRE ALARM
return return
var/area/A = get_area(src) var/area/A = get_area(src)
for(var/obj/machinery/firealarm/FA in A) for(var/obj/machinery/firealarm/FA in A)
fire_alarm.triggerAlarm(loc, FA, duration) SSalarms.fire_alarm.triggerAlarm(loc, FA, duration)
update_icon() update_icon()
//playsound(loc, 'sound/ambience/signal.ogg', 75, 0) //playsound(loc, 'sound/ambience/signal.ogg', 75, 0)
return return

View File

@@ -118,25 +118,22 @@ Class Procs:
var/use_log = list() 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. 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" atom_say_verb = "beeps"
var/defer_process = 0
var/siemens_strength = 0.7 // how badly will it shock you? var/siemens_strength = 0.7 // how badly will it shock you?
/obj/machinery/Initialize() /obj/machinery/Initialize(mapload)
addAtProcessing() 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) if(use_power)
myArea = get_area(src) myArea = get_area(src)
if(!speed_process) if(!speed_process)
if(!defer_process)
START_PROCESSING(SSmachines, src) START_PROCESSING(SSmachines, src)
else else
START_DEFERRED_PROCESSING(SSmachines, src) START_PROCESSING(SSfastprocess, src)
else
GLOB.fast_processing += src power_change()
isprocessing = TRUE // all of these isprocessing = TRUE can be removed when the PS is dead
// gotta go fast // gotta go fast
/obj/machinery/makeSpeedProcess() /obj/machinery/makeSpeedProcess()
@@ -144,7 +141,7 @@ Class Procs:
return return
speed_process = TRUE speed_process = TRUE
STOP_PROCESSING(SSmachines, src) STOP_PROCESSING(SSmachines, src)
GLOB.fast_processing += src START_PROCESSING(SSfastprocess, src)
// gotta go slow // gotta go slow
/obj/machinery/makeNormalProcess() /obj/machinery/makeNormalProcess()
@@ -152,20 +149,16 @@ Class Procs:
return return
speed_process = FALSE speed_process = FALSE
START_PROCESSING(SSmachines, src) START_PROCESSING(SSmachines, src)
GLOB.fast_processing -= src STOP_PROCESSING(SSfastprocess, 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
..()
/obj/machinery/Destroy() /obj/machinery/Destroy()
if(myArea) if(myArea)
myArea = null myArea = null
GLOB.fast_processing -= src GLOB.machines.Remove(src)
if(!speed_process)
STOP_PROCESSING(SSmachines, src) STOP_PROCESSING(SSmachines, src)
GLOB.machines -= src else
STOP_PROCESSING(SSfastprocess, src)
return ..() return ..()
/obj/machinery/proc/locate_machinery() /obj/machinery/proc/locate_machinery()

View File

@@ -39,7 +39,7 @@
/obj/machinery/syndicatebomb/process() /obj/machinery/syndicatebomb/process()
if(!active) if(!active)
GLOB.fast_processing -= src STOP_PROCESSING(SSfastprocess, src)
detonation_timer = null detonation_timer = null
next_beep = null next_beep = null
countdown.stop() countdown.stop()
@@ -73,7 +73,7 @@
if(defused && payload in src) if(defused && payload in src)
payload.defuse() payload.defuse()
countdown.stop() countdown.stop()
GLOB.fast_processing -= src STOP_PROCESSING(SSfastprocess, src)
/obj/machinery/syndicatebomb/New() /obj/machinery/syndicatebomb/New()
wires = new(src) wires = new(src)
@@ -86,7 +86,7 @@
/obj/machinery/syndicatebomb/Destroy() /obj/machinery/syndicatebomb/Destroy()
QDEL_NULL(wires) QDEL_NULL(wires)
QDEL_NULL(countdown) QDEL_NULL(countdown)
GLOB.fast_processing -= src STOP_PROCESSING(SSfastprocess, src)
return ..() return ..()
/obj/machinery/syndicatebomb/examine(mob/user) /obj/machinery/syndicatebomb/examine(mob/user)
@@ -205,7 +205,7 @@
/obj/machinery/syndicatebomb/proc/activate() /obj/machinery/syndicatebomb/proc/activate()
active = TRUE active = TRUE
GLOB.fast_processing += src START_PROCESSING(SSfastprocess, src)
countdown.start() countdown.start()
next_beep = world.time + 10 next_beep = world.time + 10
detonation_timer = world.time + (timer_set * 10) detonation_timer = world.time + (timer_set * 10)

View File

@@ -166,10 +166,10 @@
name = "Automatic X-Ray 5000" 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'." 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 // On us
new /obj/machinery/conveyor/auto(loc, EAST) new /obj/machinery/conveyor/auto(loc, EAST)
addAtProcessing()
/obj/machinery/transformer/xray/conveyor/New() /obj/machinery/transformer/xray/conveyor/New()
..() ..()

View File

@@ -4,7 +4,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/New() /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) /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) /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() /obj/item/mecha_parts/mecha_equipment/medical/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/medical/process() /obj/item/mecha_parts/mecha_equipment/medical/process()
if(!chassis) if(!chassis)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return 1 return 1
/obj/item/mecha_parts/mecha_equipment/medical/detach() /obj/item/mecha_parts/mecha_equipment/medical/detach()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper /obj/item/mecha_parts/mecha_equipment/medical/sleeper
@@ -66,7 +66,7 @@
return return
target.forceMove(src) target.forceMove(src)
patient = target patient = target
processing_objects.Add(src) START_PROCESSING(SSobj, src)
update_equip_info() update_equip_info()
occupant_message("<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>") occupant_message("<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>")
chassis.visible_message("<span class='warning'>[chassis] loads [target] into [src].</span>") chassis.visible_message("<span class='warning'>[chassis] loads [target] into [src].</span>")
@@ -90,7 +90,7 @@
patient.forceMove(get_turf(src)) patient.forceMove(get_turf(src))
occupant_message("[patient] ejected. Life support functions disabled.") occupant_message("[patient] ejected. Life support functions disabled.")
log_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 patient = null
update_equip_info() update_equip_info()
@@ -98,7 +98,7 @@
if(patient) if(patient)
occupant_message("<span class='warning'>Unable to detach [src] - equipment occupied!</span>") occupant_message("<span class='warning'>Unable to detach [src] - equipment occupied!</span>")
return return
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/get_equip_info() /obj/item/mecha_parts/mecha_equipment/medical/sleeper/get_equip_info()
@@ -221,7 +221,7 @@
set_ready_state(1) set_ready_state(1)
log_message("Deactivated.") log_message("Deactivated.")
occupant_message("[src] deactivated - no power.") occupant_message("[src] deactivated - no power.")
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
var/mob/living/carbon/M = patient var/mob/living/carbon/M = patient
if(!M) if(!M)
@@ -263,11 +263,11 @@
processed_reagents = new processed_reagents = new
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/detach() /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/detach()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Destroy() /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail() /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/critfail()
@@ -374,7 +374,7 @@
m++ m++
if(processed_reagents.len) if(processed_reagents.len)
message += " added to production" message += " added to production"
processing_objects.Add(src) START_PROCESSING(SSobj, src)
occupant_message(message) occupant_message(message)
occupant_message("Reagent processing started.") occupant_message("Reagent processing started.")
log_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)) if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
occupant_message("<span class=\"alert\">Reagent processing stopped.</a>") occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
log_message("Reagent processing stopped.") log_message("Reagent processing stopped.")
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
var/amount = synth_speed / processed_reagents.len var/amount = synth_speed / processed_reagents.len
for(var/reagent in processed_reagents) for(var/reagent in processed_reagents)

View File

@@ -116,14 +116,14 @@
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M) /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 M.occupant_sight_flags |= SEE_TURFS
if(M.occupant) if(M.occupant)
M.occupant.update_sight() M.occupant.update_sight()
/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach() /obj/item/mecha_parts/mecha_equipment/mining_scanner/detach()
chassis.occupant_sight_flags &= ~SEE_TURFS chassis.occupant_sight_flags &= ~SEE_TURFS
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
if(chassis.occupant) if(chassis.occupant)
chassis.occupant.update_sight() chassis.occupant.update_sight()
return ..() return ..()

View File

@@ -193,7 +193,7 @@
selectable = 0 selectable = 0
/obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy() /obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
if(chassis) if(chassis)
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
return ..() return ..()
@@ -205,7 +205,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach() /obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info() /obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
if(!chassis) return if(!chassis) return
@@ -217,12 +217,12 @@
if(href_list["toggle_repairs"]) if(href_list["toggle_repairs"])
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
if(equip_ready) if(equip_ready)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
droid_overlay = new(icon, icon_state = "repair_droid_a") droid_overlay = new(icon, icon_state = "repair_droid_a")
log_message("Activated.") log_message("Activated.")
set_ready_state(0) set_ready_state(0)
else else
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
droid_overlay = new(icon, icon_state = "repair_droid") droid_overlay = new(icon, icon_state = "repair_droid")
log_message("Deactivated.") log_message("Deactivated.")
set_ready_state(1) set_ready_state(1)
@@ -232,7 +232,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/process() /obj/item/mecha_parts/mecha_equipment/repair_droid/process()
if(!chassis) if(!chassis)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
return return
var/h_boost = health_boost var/h_boost = health_boost
@@ -250,10 +250,10 @@
repaired = 1 repaired = 1
if(repaired) if(repaired)
if(!chassis.use_power(energy_drain)) if(!chassis.use_power(energy_drain))
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
else //no repair needed, we turn off else //no repair needed, we turn off
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
chassis.overlays -= droid_overlay chassis.overlays -= droid_overlay
droid_overlay = new(icon, icon_state = "repair_droid") droid_overlay = new(icon, icon_state = "repair_droid")
@@ -273,11 +273,11 @@
selectable = 0 selectable = 0
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach() /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() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
@@ -302,11 +302,11 @@
..() ..()
if(href_list["toggle_relay"]) if(href_list["toggle_relay"])
if(equip_ready) //inactive if(equip_ready) //inactive
processing_objects.Add(src) START_PROCESSING(SSobj, src)
set_ready_state(0) set_ready_state(0)
log_message("Activated.") log_message("Activated.")
else else
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
log_message("Deactivated.") log_message("Deactivated.")
@@ -317,12 +317,12 @@
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT) if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
return return
var/cur_charge = chassis.get_charge() var/cur_charge = chassis.get_charge()
if(isnull(cur_charge) || !chassis.cell) if(isnull(cur_charge) || !chassis.cell)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
occupant_message("No powercell detected.") occupant_message("No powercell detected.")
return return
@@ -358,11 +358,11 @@
/obj/item/mecha_parts/mecha_equipment/generator/Destroy() /obj/item/mecha_parts/mecha_equipment/generator/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/mecha_parts/mecha_equipment/generator/detach() /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) /obj/item/mecha_parts/mecha_equipment/generator/Topic(href, href_list)
@@ -370,11 +370,11 @@
if(href_list["toggle"]) if(href_list["toggle"])
if(equip_ready) //inactive if(equip_ready) //inactive
set_ready_state(0) set_ready_state(0)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
log_message("Activated.") log_message("Activated.")
else else
set_ready_state(1) set_ready_state(1)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
log_message("Deactivated.") log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info() /obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
@@ -447,11 +447,11 @@
/obj/item/mecha_parts/mecha_equipment/generator/process() /obj/item/mecha_parts/mecha_equipment/generator/process()
if(!chassis) if(!chassis)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
set_ready_state(1) set_ready_state(1)
return return
if(fuel_amount<=0) if(fuel_amount<=0)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
log_message("Deactivated - no fuel.") log_message("Deactivated - no fuel.")
set_ready_state(1) set_ready_state(1)
return return
@@ -460,7 +460,7 @@
set_ready_state(1) set_ready_state(1)
occupant_message("No powercell detected.") occupant_message("No powercell detected.")
log_message("Deactivated.") log_message("Deactivated.")
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
var/use_fuel = fuel_per_cycle_idle var/use_fuel = fuel_per_cycle_idle
if(cur_charge < chassis.cell.maxcharge) if(cur_charge < chassis.cell.maxcharge)

View File

@@ -118,7 +118,7 @@
smoke_system.attach(src) smoke_system.attach(src)
add_cell() add_cell()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
GLOB.poi_list |= src GLOB.poi_list |= src
log_message("[src] created.") log_message("[src] created.")
GLOB.mechas_list += src //global mech list GLOB.mechas_list += src //global mech list
@@ -670,7 +670,7 @@
QDEL_NULL(cell) QDEL_NULL(cell)
QDEL_NULL(internal_tank) QDEL_NULL(internal_tank)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
GLOB.poi_list.Remove(src) GLOB.poi_list.Remove(src)
equipment.Cut() equipment.Cut()
cell = null cell = null

View File

@@ -24,7 +24,7 @@
spawn(3 + metal*3) spawn(3 + metal*3)
process() process()
spawn(120) spawn(120)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
sleep(30) sleep(30)
if(metal) if(metal)

View File

@@ -30,15 +30,15 @@
/obj/effect/particle_effect/smoke/New() /obj/effect/particle_effect/smoke/New()
..() ..()
processing_objects |= src START_PROCESSING(SSobj, src)
lifetime += rand(-1,1) lifetime += rand(-1,1)
/obj/effect/particle_effect/smoke/Destroy() /obj/effect/particle_effect/smoke/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/effect/particle_effect/smoke/proc/kill_smoke() /obj/effect/particle_effect/smoke/proc/kill_smoke()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
INVOKE_ASYNC(src, .proc/fade_out) INVOKE_ASYNC(src, .proc/fade_out)
QDEL_IN(src, 10) QDEL_IN(src, 10)

View File

@@ -9,12 +9,12 @@
/obj/effect/snowcloud/New(turf, obj/machinery/snow_machine/SM) /obj/effect/snowcloud/New(turf, obj/machinery/snow_machine/SM)
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
if(SM && istype(SM)) if(SM && istype(SM))
parent_machine = SM parent_machine = SM
/obj/effect/snowcloud/Destroy() /obj/effect/snowcloud/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/effect/snowcloud/process() /obj/effect/snowcloud/process()
@@ -73,12 +73,12 @@
anchored = TRUE anchored = TRUE
/obj/effect/snow/New() /obj/effect/snow/New()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
icon_state = "snow[rand(1,6)]" icon_state = "snow[rand(1,6)]"
..() ..()
/obj/effect/snow/Destroy() /obj/effect/snow/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/effect/snow/process() /obj/effect/snow/process()

View File

@@ -107,7 +107,7 @@
..() ..()
pixel_x = rand(3,-3) pixel_x = rand(3,-3)
pixel_y = rand(3,-3) pixel_y = rand(3,-3)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/structure/spider/eggcluster/process() /obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2) amount_grown += rand(0,2)
@@ -140,10 +140,10 @@
..() ..()
pixel_x = rand(6,-6) pixel_x = rand(6,-6)
pixel_y = rand(6,-6) pixel_y = rand(6,-6)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/structure/spider/spiderling/Destroy() /obj/structure/spider/spiderling/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
entry_vent = null entry_vent = null
return ..() return ..()

View File

@@ -28,7 +28,6 @@
var/obj/item/clothing/mask/cigarette/cig = W var/obj/item/clothing/mask/cigarette/cig = W
if(cig.lit == 1) if(cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.") src.visible_message("[user] crushes [cig] in [src], putting it out.")
processing_objects.Remove(cig)
var/obj/item/butt = new cig.type_butt(src) var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt) cig.transfer_fingerprints_to(butt)
qdel(cig) qdel(cig)

View File

@@ -18,7 +18,7 @@
light(show_message = 0) light(show_message = 0)
/obj/item/candle/Destroy() /obj/item/candle/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/candle/update_icon() /obj/item/candle/update_icon()
@@ -62,7 +62,7 @@
if(show_message) if(show_message)
usr.visible_message(show_message) usr.visible_message(show_message)
set_light(CANDLE_LUM) set_light(CANDLE_LUM)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
update_icon() update_icon()

View File

@@ -32,7 +32,7 @@
/obj/item/camera_bug/New() /obj/item/camera_bug/New()
..() ..()
processing_objects += src START_PROCESSING(SSobj, src)
/obj/item/camera_bug/Destroy() /obj/item/camera_bug/Destroy()
get_cameras() get_cameras()

View File

@@ -227,7 +227,7 @@
return PROCESS_KILL return PROCESS_KILL
/obj/item/borg_chameleon/proc/activate(mob/living/silicon/robot/syndicate/saboteur/user) /obj/item/borg_chameleon/proc/activate(mob/living/silicon/robot/syndicate/saboteur/user)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
S = user S = user
user.base_icon = disguise user.base_icon = disguise
user.icon_state = disguise user.icon_state = disguise
@@ -236,7 +236,7 @@
user.update_icons() user.update_icons()
/obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/syndicate/saboteur/user) /obj/item/borg_chameleon/proc/deactivate(mob/living/silicon/robot/syndicate/saboteur/user)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
S = user S = user
user.base_icon = initial(user.base_icon) user.base_icon = initial(user.base_icon)
user.icon_state = initial(user.icon_state) user.icon_state = initial(user.icon_state)

View File

@@ -207,10 +207,10 @@
/obj/item/flash/cameraflash/New() /obj/item/flash/cameraflash/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/flash/cameraflash/Destroy() /obj/item/flash/cameraflash/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/flash/cameraflash/process() //this and the two parts above are part of the charge system. /obj/item/flash/cameraflash/process() //this and the two parts above are part of the charge system.

View File

@@ -183,10 +183,10 @@
turn_off() turn_off()
if(!fuel) if(!fuel)
src.icon_state = "[initial(icon_state)]-empty" src.icon_state = "[initial(icon_state)]-empty"
processing_objects -= src STOP_PROCESSING(SSobj, src)
/obj/item/flashlight/flare/Destroy() /obj/item/flashlight/flare/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/flashlight/flare/proc/turn_off() /obj/item/flashlight/flare/proc/turn_off()
@@ -222,7 +222,7 @@
user.visible_message("<span class='notice'>[user] activates [src].</span>", "<span class='notice'>You activate [src].</span>") user.visible_message("<span class='notice'>[user] activates [src].</span>", "<span class='notice'>You activate [src].</span>")
src.force = on_damage src.force = on_damage
src.damtype = "fire" src.damtype = "fire"
processing_objects += src START_PROCESSING(SSobj, src)
// GLOWSTICKS // GLOWSTICKS
@@ -344,10 +344,10 @@
/obj/item/flashlight/emp/New() /obj/item/flashlight/emp/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/flashlight/emp/Destroy() /obj/item/flashlight/emp/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/flashlight/emp/process() /obj/item/flashlight/emp/process()

View File

@@ -167,7 +167,7 @@
if(energy <= max_energy) if(energy <= max_energy)
if(!recharging) if(!recharging)
recharging = 1 recharging = 1
processing_objects.Add(src) START_PROCESSING(SSobj, src)
if(energy <= 0) if(energy <= 0)
to_chat(user, "<span class='warning'>You've overused the battery of [src], now it needs time to recharge!</span>") to_chat(user, "<span class='warning'>You've overused the battery of [src], now it needs time to recharge!</span>")
recharge_locked = 1 recharge_locked = 1

View File

@@ -47,10 +47,10 @@
/obj/item/multitool/ai_detect/New() /obj/item/multitool/ai_detect/New()
..() ..()
processing_objects += src START_PROCESSING(SSobj, src)
/obj/item/multitool/ai_detect/Destroy() /obj/item/multitool/ai_detect/Destroy()
processing_objects -= src STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/multitool/ai_detect/process() /obj/item/multitool/ai_detect/process()

View File

@@ -26,7 +26,7 @@
var/obj/structure/cable/attached // the attached cable var/obj/structure/cable/attached // the attached cable
/obj/item/powersink/Destroy() /obj/item/powersink/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
GLOB.processing_power_items.Remove(src) GLOB.processing_power_items.Remove(src)
PN = null PN = null
attached = null attached = null
@@ -53,7 +53,7 @@
return return
else else
if(mode == 2) if(mode == 2)
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite STOP_PROCESSING(SSobj, src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
GLOB.processing_power_items.Remove(src) GLOB.processing_power_items.Remove(src)
anchored = 0 anchored = 0
mode = 0 mode = 0
@@ -76,14 +76,14 @@
src.visible_message("<span class='notice'>[user] activates [src]!</span>") src.visible_message("<span class='notice'>[user] activates [src]!</span>")
mode = 2 mode = 2
icon_state = "powersink1" icon_state = "powersink1"
processing_objects.Add(src) START_PROCESSING(SSobj, src)
GLOB.processing_power_items.Add(src) GLOB.processing_power_items.Add(src)
if(2) //This switch option wasn't originally included. It exists now. --NeoFite if(2) //This switch option wasn't originally included. It exists now. --NeoFite
src.visible_message("<span class='notice'>[user] deactivates [src]!</span>") src.visible_message("<span class='notice'>[user] deactivates [src]!</span>")
mode = 1 mode = 1
set_light(0) set_light(0)
icon_state = "powersink0" icon_state = "powersink0"
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
GLOB.processing_power_items.Remove(src) GLOB.processing_power_items.Remove(src)
/obj/item/powersink/pwr_drain() /obj/item/powersink/pwr_drain()

View File

@@ -49,7 +49,7 @@
..() ..()
buildstage = building buildstage = building
if(buildstage) if(buildstage)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
else else
if(ndir) if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0 pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
@@ -105,7 +105,7 @@
) )
/obj/item/radio/intercom/Destroy() /obj/item/radio/intercom/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
GLOB.global_intercoms.Remove(src) GLOB.global_intercoms.Remove(src)
return ..() return ..()
@@ -150,7 +150,7 @@
b_stat = 1 b_stat = 1
buildstage = 1 buildstage = 1
update_icon() update_icon()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return 1 return 1
else return ..() else return ..()
if(2) if(2)
@@ -163,7 +163,7 @@
buildstage = 3 buildstage = 3
to_chat(user, "<span class='notice'>You secure the electronics!</span>") to_chat(user, "<span class='notice'>You secure the electronics!</span>")
update_icon() update_icon()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
for(var/i, i<= 5, i++) for(var/i, i<= 5, i++)
wires.UpdateCut(i,1) wires.UpdateCut(i,1)
return 1 return 1

View File

@@ -34,7 +34,7 @@ REAGENT SCANNER
/obj/item/t_scanner/Destroy() /obj/item/t_scanner/Destroy()
if(on) if(on)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/t_scanner/attack_self(mob/user) /obj/item/t_scanner/attack_self(mob/user)
@@ -43,12 +43,12 @@ REAGENT SCANNER
icon_state = copytext(icon_state, 1, length(icon_state))+"[on]" icon_state = copytext(icon_state, 1, length(icon_state))+"[on]"
if(on) if(on)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/t_scanner/process() /obj/item/t_scanner/process()
if(!on) if(!on)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return null return null
scan() scan()

View File

@@ -256,7 +256,7 @@
/obj/item/borg/upgrade/selfrepair/Destroy() /obj/item/borg/upgrade/selfrepair/Destroy()
cyborg = null cyborg = null
processing_objects -= src STOP_PROCESSING(SSobj, src)
on = 0 on = 0
return ..() return ..()
@@ -264,10 +264,10 @@
on = !on on = !on
if(on) if(on)
to_chat(cyborg, "<span class='notice'>You activate the self-repair module.</span>") to_chat(cyborg, "<span class='notice'>You activate the self-repair module.</span>")
processing_objects |= src START_PROCESSING(SSobj, src)
else else
to_chat(cyborg, "<span class='notice'>You deactivate the self-repair module.</span>") to_chat(cyborg, "<span class='notice'>You deactivate the self-repair module.</span>")
processing_objects -= src STOP_PROCESSING(SSobj, src)
update_icon() update_icon()
/obj/item/borg/upgrade/selfrepair/update_icon() /obj/item/borg/upgrade/selfrepair/update_icon()
@@ -280,7 +280,7 @@
icon_state = "cyborg_upgrade5" icon_state = "cyborg_upgrade5"
/obj/item/borg/upgrade/selfrepair/proc/deactivate() /obj/item/borg/upgrade/selfrepair/proc/deactivate()
processing_objects -= src STOP_PROCESSING(SSobj, src)
on = 0 on = 0
update_icon() update_icon()

View File

@@ -26,7 +26,7 @@
return return
timing = !timing timing = !timing
if(timing) if(timing)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
else else
armed = 0 armed = 0
timepassed = 0 timepassed = 0
@@ -34,7 +34,7 @@
/obj/item/caution/proximity_sign/process() /obj/item/caution/proximity_sign/process()
if(!timing) if(!timing)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
timepassed++ timepassed++
if(timepassed >= 15 && !armed) if(timepassed >= 15 && !armed)
armed = 1 armed = 1

View File

@@ -177,7 +177,7 @@
update_icon() update_icon()
desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>" desc = initial(desc) + "<br><span class='info'>It appears to contain [target.name].</span>"
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/effect/chrono_field/Destroy() /obj/effect/chrono_field/Destroy()
if(gun && gun.field_check(src)) if(gun && gun.field_check(src))

View File

@@ -48,7 +48,7 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/Destroy() /obj/item/clothing/mask/cigarette/Destroy()
QDEL_NULL(reagents) QDEL_NULL(reagents)
processing_objects -= src STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/clothing/mask/cigarette/attack(mob/living/M, mob/living/user, def_zone) /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) var/turf/T = get_turf(src)
T.visible_message(flavor_text) T.visible_message(flavor_text)
set_light(2, 0.25, "#E38F46") set_light(2, 0.25, "#E38F46")
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/clothing/mask/cigarette/process() /obj/item/clothing/mask/cigarette/process()
@@ -213,7 +213,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/mob/living/M = loc var/mob/living/M = loc
to_chat(M, "<span class='notice'>Your [name] goes out.</span>") to_chat(M, "<span class='notice'>Your [name] goes out.</span>")
M.unEquip(src, 1) //Force the un-equip so the overlays update M.unEquip(src, 1) //Force the un-equip so the overlays update
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
qdel(src) qdel(src)
@@ -341,7 +341,7 @@ LIGHTERS ARE IN LIGHTERS.DM
if(flavor_text) if(flavor_text)
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
T.visible_message(flavor_text) T.visible_message(flavor_text)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/clothing/mask/cigarette/pipe/process() /obj/item/clothing/mask/cigarette/pipe/process()
var/turf/location = get_turf(src) var/turf/location = get_turf(src)
@@ -355,7 +355,7 @@ LIGHTERS ARE IN LIGHTERS.DM
icon_state = icon_off icon_state = icon_off
item_state = icon_off item_state = icon_off
M.update_inv_wear_mask(0) M.update_inv_wear_mask(0)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
smoke() smoke()
return return
@@ -366,7 +366,7 @@ LIGHTERS ARE IN LIGHTERS.DM
lit = 0 lit = 0
icon_state = icon_off icon_state = icon_off
item_state = icon_off item_state = icon_off
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
if(smoketime <= 0) if(smoketime <= 0)
to_chat(user, "<span class='notice'>You refill the pipe with tobacco.</span>") to_chat(user, "<span class='notice'>You refill the pipe with tobacco.</span>")

View File

@@ -33,7 +33,7 @@
/obj/item/flamethrower/process() /obj/item/flamethrower/process()
if(!lit) if(!lit)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return null return null
var/turf/location = loc var/turf/location = loc
if(istype(location, /mob/)) if(istype(location, /mob/))
@@ -141,7 +141,7 @@
if(!status) return if(!status) return
lit = !lit lit = !lit
if(lit) if(lit)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
if(href_list["remove"]) if(href_list["remove"])
if(!ptank) return if(!ptank) return
usr.put_in_hands(ptank) usr.put_in_hands(ptank)

View File

@@ -44,7 +44,7 @@
strangling = null strangling = null
update_icon() update_icon()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
else else
..() ..()
@@ -97,7 +97,7 @@
M.AdjustSilence(1) M.AdjustSilence(1)
garrote_time = world.time + 10 garrote_time = world.time + 10
processing_objects.Add(src) START_PROCESSING(SSobj, src)
strangling = M strangling = M
update_icon() update_icon()
@@ -113,14 +113,14 @@
if(!strangling) if(!strangling)
// Our mark got gibbed or similar // Our mark got gibbed or similar
update_icon() update_icon()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
if(!istype(loc, /mob/living/carbon/human)) if(!istype(loc, /mob/living/carbon/human))
strangling = null strangling = null
update_icon() update_icon()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
var/mob/living/carbon/human/user = loc var/mob/living/carbon/human/user = loc
@@ -138,7 +138,7 @@
strangling = null strangling = null
update_icon() update_icon()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return
@@ -148,7 +148,7 @@
strangling = null strangling = null
update_icon() update_icon()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return return

View File

@@ -402,10 +402,10 @@
/obj/item/nullrod/tribal_knife/New() /obj/item/nullrod/tribal_knife/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/nullrod/tribal_knife/Destroy() /obj/item/nullrod/tribal_knife/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/nullrod/tribal_knife/process() /obj/item/nullrod/tribal_knife/process()
@@ -432,10 +432,10 @@
/obj/item/nullrod/rosary/New() /obj/item/nullrod/rosary/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/nullrod/rosary/Destroy() /obj/item/nullrod/rosary/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) /obj/item/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)

View File

@@ -14,7 +14,7 @@
flags = DROPDEL flags = DROPDEL
/obj/item/implant/proc/trigger(emote, mob/source) /obj/item/implant/proc/trigger(emote, mob/source, force)
return return
/obj/item/implant/proc/activate() /obj/item/implant/proc/activate()

View File

@@ -13,7 +13,7 @@
if(cooldown == total_cooldown) if(cooldown == total_cooldown)
home.Retrieve(imp_in,1) home.Retrieve(imp_in,1)
cooldown = 0 cooldown = 0
processing_objects.Add(src) START_PROCESSING(SSobj, src)
else else
to_chat(imp_in, "<span class='warning'>You must wait [(total_cooldown - cooldown)*2] seconds to use [src] again!</span>") to_chat(imp_in, "<span class='warning'>You must wait [(total_cooldown - cooldown)*2] seconds to use [src] again!</span>")
@@ -21,7 +21,7 @@
if(cooldown < total_cooldown) if(cooldown < total_cooldown)
cooldown++ cooldown++
if(cooldown == total_cooldown) if(cooldown == total_cooldown)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
/obj/item/implant/abductor/implant(mob/source, mob/user) /obj/item/implant/abductor/implant(mob/source, mob/user)
if(..()) if(..())

View File

@@ -33,8 +33,8 @@
/obj/item/implant/chem/trigger(emote, mob/source) /obj/item/implant/chem/trigger(emote, mob/source, force)
if(emote == "deathgasp") if(force && emote == "deathgasp")
activate(reagents.total_volume) activate(reagents.total_volume)
/obj/item/implant/chem/activate(cause) /obj/item/implant/chem/activate(cause)

View File

@@ -18,7 +18,7 @@
return dat return dat
/obj/item/implant/death_alarm/Destroy() /obj/item/implant/death_alarm/Destroy()
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()
/obj/item/implant/death_alarm/process() /obj/item/implant/death_alarm/process()
@@ -61,12 +61,12 @@
/obj/item/implant/death_alarm/implant(mob/target) /obj/item/implant/death_alarm/implant(mob/target)
if(..()) if(..())
mobname = target.real_name mobname = target.real_name
processing_objects.Add(src) START_PROCESSING(SSobj, src)
return 1 return 1
return 0 return 0
/obj/item/implant/death_alarm/removed(mob/target) /obj/item/implant/death_alarm/removed(mob/target)
if(..()) if(..())
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return 1 return 1
return 0 return 0

View File

@@ -20,8 +20,8 @@
"} "}
return dat return dat
/obj/item/implant/explosive/trigger(emote, mob/source) /obj/item/implant/explosive/trigger(emote, mob/source, force)
if(emote == "deathgasp") if(force && emote == "deathgasp")
activate("death") activate("death")
/obj/item/implant/explosive/activate(cause) /obj/item/implant/explosive/activate(cause)
@@ -148,8 +148,8 @@
"} "}
return dat return dat
/obj/item/implant/dust/trigger(emote, mob/source) /obj/item/implant/dust/trigger(emote, mob/source, force)
if(emote == "deathgasp") if(force && emote == "deathgasp")
activate("death") activate("death")
/obj/item/implant/dust/activate(cause) /obj/item/implant/dust/activate(cause)

View File

@@ -58,7 +58,7 @@
user.visible_message("<span class='notice'>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.</span>") user.visible_message("<span class='notice'>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.</span>")
set_light(2) set_light(2)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
else else
lit = 0 lit = 0
w_class = WEIGHT_CLASS_TINY w_class = WEIGHT_CLASS_TINY
@@ -74,7 +74,7 @@
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].") user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
set_light(0) set_light(0)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
else else
return ..() return ..()
return return
@@ -181,7 +181,7 @@
name = "lit match" name = "lit match"
desc = "A match. This one is lit." desc = "A match. This one is lit."
attack_verb = list("burnt","singed") attack_verb = list("burnt","singed")
processing_objects.Add(src) START_PROCESSING(SSobj, src)
update_icon() update_icon()
return TRUE return TRUE
@@ -196,7 +196,7 @@
name = "burnt match" name = "burnt match"
desc = "A match. This one has seen better days." desc = "A match. This one has seen better days."
attack_verb = list("flicked") attack_verb = list("flicked")
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return TRUE return TRUE
/obj/item/match/dropped(mob/user) /obj/item/match/dropped(mob/user)

View File

@@ -89,14 +89,14 @@
/obj/item/mop/advanced/New() /obj/item/mop/advanced/New()
..() ..()
processing_objects.Add(src) START_PROCESSING(SSobj, src)
/obj/item/mop/advanced/attack_self(mob/user) /obj/item/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled refill_enabled = !refill_enabled
if(refill_enabled) if(refill_enabled)
processing_objects.Add(src) START_PROCESSING(SSobj, src)
else else
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>") to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
playsound(user, 'sound/machines/click.ogg', 30, 1) playsound(user, 'sound/machines/click.ogg', 30, 1)
@@ -111,7 +111,7 @@
/obj/item/mop/advanced/Destroy() /obj/item/mop/advanced/Destroy()
if(refill_enabled) if(refill_enabled)
processing_objects.Remove(src) STOP_PROCESSING(SSobj, src)
return ..() return ..()

Some files were not shown because too many files have changed in this diff Show More