mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
Sideports a couple of init unit tests from Neb.
This commit is contained in:
@@ -0,0 +1,388 @@
|
||||
// Process
|
||||
|
||||
/datum/controller/process
|
||||
/**
|
||||
* State vars
|
||||
*/
|
||||
// Main controller ref
|
||||
var/tmp/datum/controller/processScheduler/main
|
||||
|
||||
// 1 if process is not running or queued
|
||||
var/tmp/idle = 1
|
||||
|
||||
// 1 if process is queued
|
||||
var/tmp/queued = 0
|
||||
|
||||
// 1 if process is running
|
||||
var/tmp/running = 0
|
||||
|
||||
// 1 if process is blocked up
|
||||
var/tmp/hung = 0
|
||||
|
||||
// 1 if process was killed
|
||||
var/tmp/killed = 0
|
||||
|
||||
// Status text var
|
||||
var/tmp/status
|
||||
|
||||
// Previous status text var
|
||||
var/tmp/previousStatus
|
||||
|
||||
// 1 if process is disabled
|
||||
var/tmp/disabled = 0
|
||||
|
||||
/**
|
||||
* Config vars
|
||||
*/
|
||||
// Process name
|
||||
|
||||
// Process schedule interval
|
||||
// This controls how often the process would run under ideal conditions.
|
||||
// If the process scheduler sees that the process has finished, it will wait until
|
||||
// this amount of time has elapsed from the start of the previous run to start the
|
||||
// process running again.
|
||||
var/tmp/schedule_interval = PROCESS_DEFAULT_SCHEDULE_INTERVAL // run every 50 ticks
|
||||
|
||||
// Process sleep interval
|
||||
// This controls how often the process will yield (call sleep(0)) while it is running.
|
||||
// Every concurrent process should sleep periodically while running in order to allow other
|
||||
// processes to execute concurrently.
|
||||
var/tmp/sleep_interval = PROCESS_DEFAULT_SLEEP_INTERVAL
|
||||
|
||||
// Defer usage; the tick usage at which this process will defer until the next tick
|
||||
var/tmp/defer_usage = PROCESS_DEFAULT_DEFER_USAGE
|
||||
|
||||
// hang_warning_time - this is the time (in 1/10 seconds) after which the server will begin to show "maybe hung" in the context window
|
||||
var/tmp/hang_warning_time = PROCESS_DEFAULT_HANG_WARNING_TIME
|
||||
|
||||
// hang_alert_time - After this much time(in 1/10 seconds), the server will send an admin debug message saying the process may be hung
|
||||
var/tmp/hang_alert_time = PROCESS_DEFAULT_HANG_ALERT_TIME
|
||||
|
||||
// hang_restart_time - After this much time(in 1/10 seconds), the server will automatically kill and restart the process.
|
||||
var/tmp/hang_restart_time = PROCESS_DEFAULT_HANG_RESTART_TIME
|
||||
|
||||
// Number of deciseconds to delay before starting the process
|
||||
var/start_delay = 0
|
||||
|
||||
/**
|
||||
* recordkeeping vars
|
||||
*/
|
||||
|
||||
// Records the time (1/10s timeofgame) at which the process last began running
|
||||
var/tmp/run_start = 0
|
||||
|
||||
// Records the number of times this process has been killed and restarted
|
||||
var/tmp/times_killed
|
||||
|
||||
// Tick count
|
||||
var/tmp/ticks = 0
|
||||
|
||||
var/tmp/last_task = ""
|
||||
|
||||
var/tmp/last_object
|
||||
|
||||
// How many times in the current run has the process deferred work till the next tick?
|
||||
var/tmp/cpu_defer_count = 0
|
||||
|
||||
// Counts the number of times an exception has occurred; gets reset after 10
|
||||
var/tmp/list/exceptions = list()
|
||||
|
||||
// The next tick_usage the process will sleep at
|
||||
var/tmp/next_sleep_usage
|
||||
|
||||
// Last run duration, in seconds
|
||||
var/tmp/last_run_time = 0
|
||||
|
||||
// Last 20 run durations
|
||||
var/tmp/list/last_twenty_run_times = list()
|
||||
|
||||
// Highest run duration, in seconds
|
||||
var/tmp/highest_run_time = 0
|
||||
|
||||
// Tick usage at start of current run (updates upon deferring)
|
||||
var/tmp/tick_usage_start
|
||||
|
||||
// Accumulated tick usage from before each deferral
|
||||
var/tmp/tick_usage_accumulated = 0
|
||||
|
||||
/datum/controller/process/New(var/datum/controller/processScheduler/scheduler)
|
||||
..()
|
||||
main = scheduler
|
||||
previousStatus = "idle"
|
||||
idle()
|
||||
name = "process"
|
||||
run_start = 0
|
||||
ticks = 0
|
||||
last_task = 0
|
||||
last_object = null
|
||||
|
||||
/datum/controller/process/proc/started()
|
||||
// Initialize run_start so we can detect hung processes.
|
||||
run_start = TimeOfGame
|
||||
|
||||
// Initialize defer count
|
||||
cpu_defer_count = 0
|
||||
|
||||
// Prepare usage tracking (defer() updates these)
|
||||
tick_usage_start = TICK_USAGE
|
||||
tick_usage_accumulated = 0
|
||||
|
||||
running()
|
||||
main.processStarted(src)
|
||||
|
||||
onStart()
|
||||
|
||||
/datum/controller/process/proc/finished()
|
||||
ticks++
|
||||
recordRunTime()
|
||||
idle()
|
||||
main.processFinished(src)
|
||||
|
||||
onFinish()
|
||||
|
||||
/datum/controller/process/proc/recordRunTime()
|
||||
// Convert from tick usage (100/tick) to seconds of CPU time used
|
||||
var/total_usage = (tick_usage_accumulated + (TICK_USAGE - tick_usage_start)) / 1000 * world.tick_lag
|
||||
|
||||
last_run_time = total_usage
|
||||
if(total_usage > highest_run_time)
|
||||
highest_run_time = total_usage
|
||||
if(last_twenty_run_times.len == 20)
|
||||
last_twenty_run_times.Cut(1, 2)
|
||||
last_twenty_run_times += total_usage
|
||||
|
||||
/datum/controller/process/proc/doWork()
|
||||
|
||||
/datum/controller/process/proc/setup()
|
||||
|
||||
/datum/controller/process/process()
|
||||
started()
|
||||
doWork()
|
||||
finished()
|
||||
|
||||
/datum/controller/process/proc/running()
|
||||
idle = 0
|
||||
queued = 0
|
||||
running = 1
|
||||
hung = 0
|
||||
setStatus(PROCESS_STATUS_RUNNING)
|
||||
|
||||
/datum/controller/process/proc/idle()
|
||||
queued = 0
|
||||
running = 0
|
||||
idle = 1
|
||||
hung = 0
|
||||
setStatus(PROCESS_STATUS_IDLE)
|
||||
|
||||
/datum/controller/process/proc/queued()
|
||||
idle = 0
|
||||
running = 0
|
||||
queued = 1
|
||||
hung = 0
|
||||
setStatus(PROCESS_STATUS_QUEUED)
|
||||
|
||||
/datum/controller/process/proc/hung()
|
||||
hung = 1
|
||||
setStatus(PROCESS_STATUS_HUNG)
|
||||
|
||||
/datum/controller/process/proc/handleHung()
|
||||
var/datum/lastObj = last_object
|
||||
var/lastObjType = "null"
|
||||
if(istype(lastObj))
|
||||
lastObjType = lastObj.type
|
||||
|
||||
var/msg = "[name] process hung at tick #[ticks]. Process was unresponsive for [(TimeOfGame - run_start) / 10] seconds and was restarted. Last task: [last_task]. Last Object Type: [lastObjType]"
|
||||
log_debug(msg)
|
||||
message_admins(msg)
|
||||
|
||||
main.restartProcess(src.name)
|
||||
|
||||
/datum/controller/process/proc/kill()
|
||||
if (!killed)
|
||||
var/msg = "[name] process was killed at tick #[ticks]."
|
||||
log_debug(msg)
|
||||
message_admins(msg)
|
||||
// Allow inheritors to clean up if needed
|
||||
onKill()
|
||||
qdel(src)
|
||||
|
||||
// Do not call this directly - use SHECK
|
||||
/datum/controller/process/proc/defer()
|
||||
if(killed)
|
||||
// The kill proc is the only place where killed is set.
|
||||
// The kill proc should have deleted this datum, and all sleeping procs that are
|
||||
// owned by it.
|
||||
CRASH("A killed process is still running somehow...")
|
||||
if (hung)
|
||||
// This will only really help if the doWork proc ends up in an infinite loop.
|
||||
handleHung()
|
||||
CRASH("Process [name] hung and was restarted.")
|
||||
|
||||
tick_usage_accumulated += (TICK_USAGE - tick_usage_start)
|
||||
if(TICK_USAGE < defer_usage)
|
||||
sleep(0)
|
||||
else
|
||||
sleep(world.tick_lag)
|
||||
cpu_defer_count++
|
||||
tick_usage_start = TICK_USAGE
|
||||
next_sleep_usage = min(TICK_USAGE + sleep_interval, defer_usage)
|
||||
|
||||
/datum/controller/process/proc/update()
|
||||
// Clear delta
|
||||
if(previousStatus != status)
|
||||
setStatus(status)
|
||||
|
||||
var/elapsedTime = getElapsedTime()
|
||||
|
||||
if (hung)
|
||||
handleHung()
|
||||
return
|
||||
else if (elapsedTime > hang_restart_time)
|
||||
hung()
|
||||
else if (elapsedTime > hang_alert_time)
|
||||
setStatus(PROCESS_STATUS_PROBABLY_HUNG)
|
||||
else if (elapsedTime > hang_warning_time)
|
||||
setStatus(PROCESS_STATUS_MAYBE_HUNG)
|
||||
|
||||
|
||||
/datum/controller/process/proc/getElapsedTime()
|
||||
return TimeOfGame - run_start
|
||||
|
||||
/datum/controller/process/proc/tickDetail()
|
||||
return
|
||||
|
||||
/datum/controller/process/proc/getContext()
|
||||
return "<tr><td>[name]</td><td>[getAverageRunTime()]</td><td>[last_run_time]</td><td>[highest_run_time]</td><td>[ticks]</td></tr>\n"
|
||||
|
||||
/datum/controller/process/proc/getContextData()
|
||||
return list(
|
||||
"name" = name,
|
||||
"averageRunTime" = getAverageRunTime(),
|
||||
"lastRunTime" = last_run_time,
|
||||
"highestRunTime" = highest_run_time,
|
||||
"ticks" = ticks,
|
||||
"schedule" = schedule_interval,
|
||||
"status" = getStatusText(),
|
||||
"disabled" = disabled
|
||||
)
|
||||
|
||||
/datum/controller/process/proc/getStatus()
|
||||
return status
|
||||
|
||||
/datum/controller/process/proc/getStatusText(var/s = 0)
|
||||
if(!s)
|
||||
s = status
|
||||
switch(s)
|
||||
if(PROCESS_STATUS_IDLE)
|
||||
return "idle"
|
||||
if(PROCESS_STATUS_QUEUED)
|
||||
return "queued"
|
||||
if(PROCESS_STATUS_RUNNING)
|
||||
return "running"
|
||||
if(PROCESS_STATUS_MAYBE_HUNG)
|
||||
return "maybe hung"
|
||||
if(PROCESS_STATUS_PROBABLY_HUNG)
|
||||
return "probably hung"
|
||||
if(PROCESS_STATUS_HUNG)
|
||||
return "HUNG"
|
||||
else
|
||||
return "UNKNOWN"
|
||||
|
||||
/datum/controller/process/proc/getPreviousStatus()
|
||||
return previousStatus
|
||||
|
||||
/datum/controller/process/proc/getPreviousStatusText()
|
||||
return getStatusText(previousStatus)
|
||||
|
||||
/datum/controller/process/proc/setStatus(var/newStatus)
|
||||
previousStatus = status
|
||||
status = newStatus
|
||||
|
||||
/datum/controller/process/proc/setLastTask(var/task, var/object)
|
||||
last_task = task
|
||||
last_object = object
|
||||
|
||||
/datum/controller/process/proc/_copyStateFrom(var/datum/controller/process/target)
|
||||
main = target.main
|
||||
name = target.name
|
||||
schedule_interval = target.schedule_interval
|
||||
sleep_interval = target.sleep_interval
|
||||
run_start = 0
|
||||
times_killed = target.times_killed
|
||||
ticks = target.ticks
|
||||
last_task = target.last_task
|
||||
last_object = target.last_object
|
||||
copyStateFrom(target)
|
||||
|
||||
/datum/controller/process/proc/copyStateFrom(var/datum/controller/process/target)
|
||||
|
||||
/datum/controller/process/proc/onKill()
|
||||
|
||||
/datum/controller/process/proc/onStart()
|
||||
|
||||
/datum/controller/process/proc/onFinish()
|
||||
|
||||
/datum/controller/process/proc/disable()
|
||||
disabled = 1
|
||||
|
||||
/datum/controller/process/proc/enable()
|
||||
disabled = 0
|
||||
|
||||
/datum/controller/process/proc/getAverageRunTime()
|
||||
var/t = 0
|
||||
var/c = 0
|
||||
for(var/time in last_twenty_run_times)
|
||||
t += time
|
||||
c++
|
||||
|
||||
if(c > 0)
|
||||
return t / c
|
||||
return c
|
||||
|
||||
/datum/controller/process/proc/getLastRunTime()
|
||||
return last_run_time
|
||||
|
||||
/datum/controller/process/proc/getHighestRunTime()
|
||||
return highest_run_time
|
||||
|
||||
/datum/controller/process/proc/getTicks()
|
||||
return ticks
|
||||
|
||||
/datum/controller/process/proc/statProcess()
|
||||
var/averageRunTime = round(getAverageRunTime(), 0.001)
|
||||
var/lastRunTime = round(last_run_time, 0.001)
|
||||
var/highestRunTime = round(highest_run_time, 0.001)
|
||||
var/deferTime = round(cpu_defer_count / 10 * world.tick_lag, 0.01)
|
||||
stat("[name]", "T#[getTicks()] | AR [averageRunTime] | LR [lastRunTime] | HR [highestRunTime] | D [deferTime]")
|
||||
|
||||
/datum/controller/process/proc/catchException(var/exception/e, var/thrower)
|
||||
if(istype(e)) // Real runtimes go to the real error handler
|
||||
log_runtime(e, thrower, "Caught by process: [name]")
|
||||
return
|
||||
var/etext = "[e]"
|
||||
var/eid = "[e]" // Exception ID, for tracking repeated exceptions
|
||||
var/ptext = "" // "processing..." text, for what was being processed (if known)
|
||||
if(istype(e))
|
||||
etext += " in [e.file], line [e.line]"
|
||||
eid = "[e.file]:[e.line]"
|
||||
if(eid in exceptions)
|
||||
if(exceptions[eid]++ >= 10)
|
||||
return
|
||||
else
|
||||
exceptions[eid] = 1
|
||||
if(istype(thrower, /datum))
|
||||
var/datum/D = thrower
|
||||
ptext = " processing [D.type]"
|
||||
if(istype(thrower, /atom))
|
||||
var/atom/A = thrower
|
||||
ptext += " ([A]) ([A.x],[A.y],[A.z])"
|
||||
log_to_dd("\[[time_stamp()]\] Process [name] caught exception[ptext]: [etext]")
|
||||
if(exceptions[eid] >= 10)
|
||||
log_to_dd("This exception will now be ignored for ten minutes.")
|
||||
spawn(6000)
|
||||
exceptions[eid] = 0
|
||||
|
||||
/datum/controller/process/proc/catchBadType(var/datum/caught)
|
||||
if(isnull(caught) || !istype(caught) || QDELETED(caught))
|
||||
return // Only bother with types we can identify and that don't belong
|
||||
catchException("Type [caught.type] does not belong in process' queue")
|
||||
@@ -0,0 +1,234 @@
|
||||
// Singleton instance of game_controller_new, setup in world.New()
|
||||
var/global/datum/controller/processScheduler/processScheduler
|
||||
|
||||
/datum/controller/processScheduler
|
||||
// Processes known by the scheduler
|
||||
var/tmp/datum/controller/process/list/processes = new
|
||||
|
||||
// Processes that are currently running
|
||||
var/tmp/datum/controller/process/list/running = new
|
||||
|
||||
// Processes that are idle
|
||||
var/tmp/datum/controller/process/list/idle = new
|
||||
|
||||
// Processes that are queued to run
|
||||
var/tmp/datum/controller/process/list/queued = new
|
||||
|
||||
// Process name -> process object map
|
||||
var/tmp/datum/controller/process/list/nameToProcessMap = new
|
||||
|
||||
// Process last queued times (world time)
|
||||
var/tmp/datum/controller/process/list/last_queued = new
|
||||
|
||||
// How long to sleep between runs (set to tick_lag in New)
|
||||
var/tmp/scheduler_sleep_interval
|
||||
|
||||
// Controls whether the scheduler is running or not
|
||||
var/tmp/isRunning = 0
|
||||
|
||||
// Setup for these processes will be deferred until all the other processes are set up.
|
||||
var/tmp/list/deferredSetupList = new
|
||||
|
||||
/datum/controller/processScheduler/New()
|
||||
..()
|
||||
// When the process scheduler is first new'd, tick_lag may be wrong, so these
|
||||
// get re-initialized when the process scheduler is started.
|
||||
// (These are kept here for any processes that decide to process before round start)
|
||||
scheduler_sleep_interval = world.tick_lag
|
||||
|
||||
/**
|
||||
* deferSetupFor
|
||||
* @param path processPath
|
||||
* If a process needs to be initialized after everything else, add it to
|
||||
* the deferred setup list. On goonstation, only the ticker needs to have
|
||||
* this treatment.
|
||||
*/
|
||||
/datum/controller/processScheduler/proc/deferSetupFor(var/processPath)
|
||||
if (!(processPath in deferredSetupList))
|
||||
deferredSetupList += processPath
|
||||
|
||||
/datum/controller/processScheduler/proc/setup()
|
||||
// There can be only one
|
||||
if(processScheduler && (processScheduler != src))
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
var/process
|
||||
// Add all the processes we can find, except for the ticker
|
||||
for (process in subtypesof(/datum/controller/process))
|
||||
if (!(process in deferredSetupList))
|
||||
addProcess(new process(src))
|
||||
|
||||
for (process in deferredSetupList)
|
||||
addProcess(new process(src))
|
||||
|
||||
/datum/controller/processScheduler/proc/start()
|
||||
isRunning = 1
|
||||
// tick_lag will have been set by now, so re-initialize these
|
||||
scheduler_sleep_interval = world.tick_lag
|
||||
updateStartDelays()
|
||||
spawn(0)
|
||||
process()
|
||||
|
||||
/datum/controller/processScheduler/process()
|
||||
while(isRunning)
|
||||
checkRunningProcesses()
|
||||
queueProcesses()
|
||||
runQueuedProcesses()
|
||||
sleep(scheduler_sleep_interval)
|
||||
|
||||
/datum/controller/processScheduler/proc/stop()
|
||||
isRunning = 0
|
||||
|
||||
/datum/controller/processScheduler/proc/checkRunningProcesses()
|
||||
for(var/datum/controller/process/p in running)
|
||||
p.update()
|
||||
|
||||
if (isnull(p)) // Process was killed
|
||||
continue
|
||||
|
||||
var/status = p.getStatus()
|
||||
var/previousStatus = p.getPreviousStatus()
|
||||
|
||||
// Check status changes
|
||||
if(status != previousStatus)
|
||||
//Status changed.
|
||||
switch(status)
|
||||
if(PROCESS_STATUS_PROBABLY_HUNG)
|
||||
message_admins("Process '[p.name]' may be hung.")
|
||||
if(PROCESS_STATUS_HUNG)
|
||||
message_admins("Process '[p.name]' is hung and will be restarted.")
|
||||
|
||||
/datum/controller/processScheduler/proc/queueProcesses()
|
||||
for(var/datum/controller/process/p in processes)
|
||||
// Don't double-queue, don't queue running processes
|
||||
if (p.disabled || p.running || p.queued || !p.idle)
|
||||
continue
|
||||
|
||||
// If the process should be running by now, go ahead and queue it
|
||||
if (world.time >= last_queued[p] + p.schedule_interval)
|
||||
setQueuedProcessState(p)
|
||||
|
||||
/datum/controller/processScheduler/proc/runQueuedProcesses()
|
||||
for(var/datum/controller/process/p in queued)
|
||||
runProcess(p)
|
||||
|
||||
/datum/controller/processScheduler/proc/addProcess(var/datum/controller/process/process)
|
||||
processes.Add(process)
|
||||
process.idle()
|
||||
idle.Add(process)
|
||||
|
||||
// Set up process
|
||||
process.setup()
|
||||
|
||||
// Save process in the name -> process map
|
||||
nameToProcessMap[process.name] = process
|
||||
|
||||
/datum/controller/processScheduler/proc/replaceProcess(var/datum/controller/process/oldProcess, var/datum/controller/process/newProcess)
|
||||
processes.Remove(oldProcess)
|
||||
processes.Add(newProcess)
|
||||
|
||||
newProcess.idle()
|
||||
idle.Remove(oldProcess)
|
||||
running.Remove(oldProcess)
|
||||
queued.Remove(oldProcess)
|
||||
idle.Add(newProcess)
|
||||
|
||||
newProcess.last_run_time = oldProcess.last_run_time
|
||||
newProcess.last_twenty_run_times = oldProcess.last_twenty_run_times
|
||||
newProcess.highest_run_time = oldProcess.highest_run_time
|
||||
|
||||
nameToProcessMap[newProcess.name] = newProcess
|
||||
|
||||
/datum/controller/processScheduler/proc/updateStartDelays()
|
||||
for(var/datum/controller/process/p in processes)
|
||||
if(p.start_delay)
|
||||
last_queued[p] = world.time - p.start_delay
|
||||
|
||||
/datum/controller/processScheduler/proc/runProcess(var/datum/controller/process/process)
|
||||
spawn(0)
|
||||
process.process()
|
||||
|
||||
/datum/controller/processScheduler/proc/processStarted(var/datum/controller/process/process)
|
||||
setRunningProcessState(process)
|
||||
last_queued[process] = world.time
|
||||
|
||||
/datum/controller/processScheduler/proc/processFinished(var/datum/controller/process/process)
|
||||
setIdleProcessState(process)
|
||||
|
||||
/datum/controller/processScheduler/proc/setIdleProcessState(var/datum/controller/process/process)
|
||||
if (process in running)
|
||||
running -= process
|
||||
if (process in queued)
|
||||
queued -= process
|
||||
if (!(process in idle))
|
||||
idle += process
|
||||
|
||||
/datum/controller/processScheduler/proc/setQueuedProcessState(var/datum/controller/process/process)
|
||||
if (process in running)
|
||||
running -= process
|
||||
if (process in idle)
|
||||
idle -= process
|
||||
if (!(process in queued))
|
||||
queued += process
|
||||
|
||||
// The other state transitions are handled internally by the process.
|
||||
process.queued()
|
||||
|
||||
/datum/controller/processScheduler/proc/setRunningProcessState(var/datum/controller/process/process)
|
||||
if (process in queued)
|
||||
queued -= process
|
||||
if (process in idle)
|
||||
idle -= process
|
||||
if (!(process in running))
|
||||
running += process
|
||||
|
||||
|
||||
/datum/controller/processScheduler/proc/getStatusData()
|
||||
var/list/data = new
|
||||
|
||||
for (var/datum/controller/process/p in processes)
|
||||
data.len++
|
||||
data[data.len] = p.getContextData()
|
||||
|
||||
return data
|
||||
|
||||
/datum/controller/processScheduler/proc/getProcessCount()
|
||||
return processes.len
|
||||
|
||||
/datum/controller/processScheduler/proc/hasProcess(var/processName as text)
|
||||
if (nameToProcessMap[processName])
|
||||
return 1
|
||||
|
||||
/datum/controller/processScheduler/proc/killProcess(var/processName as text)
|
||||
restartProcess(processName)
|
||||
|
||||
/datum/controller/processScheduler/proc/restartProcess(var/processName as text)
|
||||
if (hasProcess(processName))
|
||||
var/datum/controller/process/oldInstance = nameToProcessMap[processName]
|
||||
var/datum/controller/process/newInstance = new oldInstance.type(src)
|
||||
newInstance._copyStateFrom(oldInstance)
|
||||
replaceProcess(oldInstance, newInstance)
|
||||
oldInstance.kill()
|
||||
|
||||
/datum/controller/processScheduler/proc/enableProcess(var/processName as text)
|
||||
if (hasProcess(processName))
|
||||
var/datum/controller/process/process = nameToProcessMap[processName]
|
||||
process.enable()
|
||||
|
||||
/datum/controller/processScheduler/proc/disableProcess(var/processName as text)
|
||||
if (hasProcess(processName))
|
||||
var/datum/controller/process/process = nameToProcessMap[processName]
|
||||
process.disable()
|
||||
|
||||
|
||||
/datum/controller/processScheduler/proc/statProcesses()
|
||||
if(!isRunning)
|
||||
stat("Processes", "Scheduler not running")
|
||||
return
|
||||
stat("Processes", "[processes.len] (R [running.len] / Q [queued.len] / I [idle.len])")
|
||||
for(var/datum/controller/process/p in processes)
|
||||
p.statProcess()
|
||||
|
||||
/datum/controller/processScheduler/proc/getProcess(var/process_name)
|
||||
return nameToProcessMap[process_name]
|
||||
@@ -5,7 +5,6 @@ SUBSYSTEM_DEF(overlays)
|
||||
priority = FIRE_PRIORITY_OVERLAYS
|
||||
init_order = INIT_ORDER_OVERLAY
|
||||
|
||||
var/initialized = FALSE
|
||||
var/list/queue // Queue of atoms needing overlay compiling (TODO-VERIFY!)
|
||||
var/list/stats
|
||||
var/list/overlay_icon_state_caches // Cache thing
|
||||
@@ -22,7 +21,6 @@ var/global/image/appearance_bro = new() // Temporarily super-global because of B
|
||||
stats = list()
|
||||
|
||||
/datum/controller/subsystem/overlays/Initialize()
|
||||
initialized = TRUE
|
||||
fire(mc_check = FALSE)
|
||||
..()
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ PROCESSING_SUBSYSTEM_DEF(chemistry)
|
||||
/datum/controller/subsystem/processing/chemistry/Initialize()
|
||||
initialize_chemical_reactions()
|
||||
initialize_chemical_reagents()
|
||||
..()
|
||||
|
||||
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
|
||||
// It is filtered into multiple lists within a list.
|
||||
|
||||
@@ -513,8 +513,14 @@
|
||||
|
||||
//HUMAN
|
||||
/mob/living/carbon/human/mind_initialize()
|
||||
<<<<<<< HEAD
|
||||
..()
|
||||
if(!mind.assigned_role) mind.assigned_role = USELESS_JOB //defualt //VOREStation Edit - Visitor not Assistant
|
||||
=======
|
||||
. = ..()
|
||||
if(!mind.assigned_role)
|
||||
mind.assigned_role = "Assistant" //defualt
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
|
||||
//slime
|
||||
/mob/living/simple_mob/slime/mind_initialize()
|
||||
|
||||
@@ -35,6 +35,7 @@ GLOBAL_LIST(active_department_goals)
|
||||
cat_goals -= G
|
||||
|
||||
GLOB.active_department_goals[category] |= G
|
||||
return 1
|
||||
|
||||
/hook/roundend/proc/checkDepartmentGoals()
|
||||
for(var/category in GLOB.active_department_goals)
|
||||
@@ -50,6 +51,7 @@ GLOBAL_LIST(active_department_goals)
|
||||
var/success = G.check_completion()
|
||||
to_world("<span class='filter_system'>[success ? "<span class='notice'>[G.name]</span>" : "<span class='warning'>[G.name]</span>"]</span>")
|
||||
to_world("<span class='filter_system'>[G.goal_text]</span>")
|
||||
return 1
|
||||
|
||||
/datum/goal
|
||||
var/name = "goal"
|
||||
|
||||
@@ -54,10 +54,8 @@
|
||||
|
||||
/area/Initialize()
|
||||
. = ..()
|
||||
|
||||
luminosity = !(dynamic_lighting)
|
||||
icon_state = ""
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD // Areas tradiationally are initialized AFTER other atoms.
|
||||
|
||||
/area/LateInitialize()
|
||||
@@ -68,7 +66,6 @@
|
||||
power_change() // all machines set to current power level, also updates lighting icon
|
||||
if(no_spoilers)
|
||||
set_spoiler_obfuscation(TRUE)
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
// Changes the area of T to A. Do not do this manually.
|
||||
// Area is expected to be a non-null instance.
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/last_activation = 0
|
||||
|
||||
/obj/structure/cult/pylon/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/cult/pylon/attack_hand(mob/M as mob)
|
||||
|
||||
@@ -529,5 +529,5 @@
|
||||
stasis_level = 100 //Just one setting
|
||||
|
||||
/obj/machinery/sleeper/survival_pod/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
RefreshParts(1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/machinery/computer/arcade/
|
||||
/obj/machinery/computer/arcade
|
||||
name = "random arcade"
|
||||
desc = "random arcade machine"
|
||||
icon_state = "arcade"
|
||||
@@ -25,15 +25,15 @@
|
||||
/obj/item/toy/stickhorse = 2
|
||||
)
|
||||
|
||||
/obj/machinery/computer/arcade/New()
|
||||
..()
|
||||
/obj/machinery/computer/arcade/Initialize()
|
||||
. = ..()
|
||||
// If it's a generic arcade machine, pick a random arcade
|
||||
// circuit board for it and make the new machine
|
||||
if(!circuit)
|
||||
var/choice = pick(subtypesof(/obj/item/weapon/circuitboard/arcade) - /obj/item/weapon/circuitboard/arcade/clawmachine)
|
||||
var/obj/item/weapon/circuitboard/CB = new choice()
|
||||
new CB.build_path(loc, CB)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/machinery/computer/arcade/proc/prizevend()
|
||||
if(!(contents-circuit).len)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
light_color = "#315ab4"
|
||||
|
||||
/obj/machinery/computer/cloning/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
pods = list()
|
||||
records = list()
|
||||
set_scan_temp("Scanner ready.", "good")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/med_data/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
field_edit_questions = list(
|
||||
// General
|
||||
"sex" = "Please select new sex:",
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
name = "Monitor Decryption Key"
|
||||
|
||||
/obj/item/weapon/paper/monitorkey/Initialize()
|
||||
..() //Late init
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/item/weapon/paper/monitorkey/LateInitialize()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/title = "Mass Driver Controls"
|
||||
|
||||
/obj/machinery/computer/pod/Initialize()
|
||||
..() //Not returning parent because lateload
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/computer/pod/LateInitialize()
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/static/list/field_edit_choices
|
||||
|
||||
/obj/machinery/computer/secure_data/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
field_edit_questions = list(
|
||||
// General
|
||||
"name" = "Please enter new name:",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/static/list/field_edit_choices
|
||||
|
||||
/obj/machinery/computer/skills/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
field_edit_questions = list(
|
||||
// General
|
||||
"name" = "Please input new name:",
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
|
||||
/obj/machinery/door_timer/Initialize()
|
||||
..()
|
||||
//Doors need to go first, and can't rely on init order, so come back to me.
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/door_timer/LateInitialize()
|
||||
|
||||
@@ -164,7 +164,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
|
||||
securityCaster = 1
|
||||
|
||||
/obj/machinery/newscaster/Initialize()
|
||||
..() //Not returning . because lateload below
|
||||
..()
|
||||
allCasters += src
|
||||
unit_no = ++unit_no_cur
|
||||
paper_remaining = 15
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
sleep(2)
|
||||
go_out()
|
||||
sleep(2)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/transportpod/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
thrusters_possible = 1
|
||||
|
||||
/obj/mecha/combat/gorilla/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src) // This thing basically cannot function without an external power supply.
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/cannon(src)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
switch_dmg_type_possible = TRUE
|
||||
|
||||
/obj/mecha/combat/phazon/equipped/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
starting_equipment = list(
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/rcd,
|
||||
/obj/item/mecha_parts/mecha_equipment/gravcatapult
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
. += "<span class='warning'><b>It is completely destroyed.</b></span>"
|
||||
|
||||
/obj/item/mecha_parts/component/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
integrity = max_integrity
|
||||
|
||||
if(start_damaged)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/obj/item/weapon/inflatable_dispenser/my_deployer = null
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/powertool/inflatables/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
my_deployer = my_tool
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/powertool/inflatables/Topic(href, href_list)
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
equip_type = EQUIP_HULL
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/crisis_drone/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
drone_overlay = new(src.icon, icon_state = droid_state)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/crisis_drone/Destroy()
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
var/weapons_only_cycle = FALSE //So combat mechs don't switch to their equipment at times.
|
||||
|
||||
/obj/mecha/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
for(var/path in starting_components)
|
||||
var/obj/item/mecha_parts/component/C = new path(src)
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
C.images += holder
|
||||
*/
|
||||
/obj/mecha/medical/odysseus/loaded/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
max_special_equip = 1
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/safety
|
||||
ME.attach(src)
|
||||
return
|
||||
@@ -80,7 +80,7 @@
|
||||
name = "APLU \"Miner\""
|
||||
|
||||
/obj/mecha/working/ripley/mining/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
//Attach drill
|
||||
if(prob(25)) //Possible diamond drill... Feeling lucky?
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
create_reagents(100)
|
||||
|
||||
/obj/effect/decal/cleanable/chemcoating/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
for(var/obj/O in get_turf(src))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/obj/effect/decal/warning_stripes
|
||||
icon = 'icons/effects/warning_stripes.dmi'
|
||||
|
||||
/obj/effect/decal/warning_stripes/New()
|
||||
/obj/effect/decal/warning_stripes/Initialize()
|
||||
. = ..()
|
||||
var/turf/T=get_turf(src)
|
||||
var/image/I=image(icon, icon_state = icon_state, dir = dir)
|
||||
I.color=color
|
||||
T.overlays += I
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -10,32 +10,37 @@
|
||||
var/obj/item/weapon/mine/mineitemtype = /obj/item/weapon/mine
|
||||
var/panel_open = 0
|
||||
var/datum/wires/mines/wires = null
|
||||
register_as_dangerous_object = TRUE
|
||||
|
||||
var/camo_net = FALSE // Will the mine 'cloak' on deployment?
|
||||
|
||||
// The trap item will be triggered in some manner when detonating. Default only checks for grenades.
|
||||
var/obj/item/trap = null
|
||||
|
||||
/obj/effect/mine/New()
|
||||
/obj/effect/mine/Initialize()
|
||||
icon_state = "uglyminearmed"
|
||||
wires = new(src)
|
||||
|
||||
. = ..()
|
||||
if(ispath(trap))
|
||||
trap = new trap(src)
|
||||
|
||||
/obj/effect/mine/Initialize()
|
||||
..()
|
||||
|
||||
register_dangerous_to_step()
|
||||
if(camo_net)
|
||||
alpha = 50
|
||||
|
||||
/obj/effect/mine/Destroy()
|
||||
unregister_dangerous_to_step()
|
||||
if(trap)
|
||||
QDEL_NULL(trap)
|
||||
qdel_null(wires)
|
||||
return ..()
|
||||
|
||||
/obj/effect/mine/Moved(atom/oldloc)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/turf/old_turf = get_turf(oldloc)
|
||||
var/turf/new_turf = get_turf(src)
|
||||
if(old_turf != new_turf)
|
||||
old_turf.unregister_dangerous_object(src)
|
||||
new_turf.register_dangerous_object(src)
|
||||
|
||||
/obj/effect/mine/proc/explode(var/mob/living/M)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
|
||||
triggered = 1
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
..()
|
||||
|
||||
/obj/effect/temporary_effect/eruption/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
flick("[icon_state]_create",src)
|
||||
|
||||
/obj/effect/temporary_effect/eruption/Destroy()
|
||||
|
||||
@@ -159,7 +159,6 @@
|
||||
|
||||
/obj/effect/spawner/newbomb/Initialize(newloc)
|
||||
..(newloc)
|
||||
|
||||
var/obj/item/device/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/weapon/tank/phoron/PT = new(V)
|
||||
var/obj/item/weapon/tank/oxygen/OT = new(V)
|
||||
@@ -183,19 +182,14 @@
|
||||
OT.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE+1
|
||||
OT.air_contents.update_values()
|
||||
|
||||
|
||||
var/obj/item/device/assembly/S = new assembly_type(V)
|
||||
|
||||
|
||||
V.attached_device = S
|
||||
|
||||
S.holder = V
|
||||
S.toggle_secure()
|
||||
|
||||
V.update_icon()
|
||||
|
||||
qdel(src)
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
///////////////////////
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
var/cell_type = /obj/item/weapon/cell/device
|
||||
|
||||
/obj/item/device/flash/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
power_supply = new cell_type(src)
|
||||
|
||||
/obj/item/device/flash/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
@@ -7,15 +7,12 @@
|
||||
var/obj/item/stack/type_to_spawn = null
|
||||
|
||||
/obj/fiftyspawner/Initialize()
|
||||
..() //We're not returning . because we're going to ask to be deleted.
|
||||
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/stack/M = new type_to_spawn(T)
|
||||
var/obj/structure/closet/C = locate() in T
|
||||
var/obj/item/stack/M = new type_to_spawn(C || T)
|
||||
M.amount = M.max_amount //some stuff spawns with 60, we're still calling it fifty
|
||||
M.update_icon() // Some stacks have different sprites depending on how full they are.
|
||||
var/obj/structure/closet/C = locate() in T
|
||||
if(C)
|
||||
C.contents += M
|
||||
return INITIALIZE_HINT_QDEL //Bye!
|
||||
|
||||
/obj/fiftyspawner/rods
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
stacktype = /obj/item/stack/rods
|
||||
no_variants = TRUE
|
||||
|
||||
/obj/item/stack/rods/New()
|
||||
..()
|
||||
/obj/item/stack/rods/Initialize()
|
||||
. = ..()
|
||||
recipes = rods_recipes
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -32,19 +32,15 @@
|
||||
|
||||
bag_material = MAT_SYNCLOTH
|
||||
|
||||
/obj/item/stack/sandbags/New(var/newloc, var/amt, var/bag_mat)
|
||||
..()
|
||||
/obj/item/stack/sandbags/Initialize(var/ml, var/amt, var/bag_mat)
|
||||
. = ..(ml, amt)
|
||||
recipes = sandbag_recipes
|
||||
update_icon()
|
||||
|
||||
if(bag_mat)
|
||||
bag_material = bag_mat
|
||||
|
||||
var/datum/material/M = get_material_by_name("[bag_material]")
|
||||
if(!M)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
color = M.icon_colour
|
||||
|
||||
/obj/item/stack/sandbags/update_icon()
|
||||
@@ -136,17 +132,13 @@ var/global/list/datum/stack_recipe/sandbag_recipes = list( \
|
||||
|
||||
var/bag_material = "cloth"
|
||||
|
||||
/obj/item/stack/emptysandbag/New(var/newloc, var/amt, var/bag_mat)
|
||||
..(newloc, amt)
|
||||
|
||||
/obj/item/stack/emptysandbag/Initialize(var/ml, var/amt, var/bag_mat)
|
||||
. = ..(ml, amt)
|
||||
if(bag_mat)
|
||||
bag_material = bag_mat
|
||||
|
||||
var/datum/material/M = get_material_by_name("[bag_material]")
|
||||
if(!M)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
color = M.icon_colour
|
||||
|
||||
/obj/item/stack/emptysandbag/attack_self(var/mob/user)
|
||||
|
||||
@@ -29,14 +29,13 @@
|
||||
var/pass_color = FALSE // Will the item pass its own color var to the created item? Dyed cloth, wood, etc.
|
||||
var/strict_color_stacking = FALSE // Will the stack merge with other stacks that are different colors? (Dyed cloth, wood, etc)
|
||||
|
||||
/obj/item/stack/New(var/loc, var/amount=null)
|
||||
..()
|
||||
if (!stacktype)
|
||||
/obj/item/stack/Initialize(var/ml, var/amount)
|
||||
. = ..()
|
||||
if(!stacktype)
|
||||
stacktype = type
|
||||
if (amount)
|
||||
if(amount)
|
||||
src.amount = amount
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/stack/Destroy()
|
||||
if(uses_charge)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
w_class = ITEMSIZE_TINY
|
||||
max_amount = 30
|
||||
|
||||
/obj/item/stack/arcadeticket/New(loc, amount = null)
|
||||
/obj/item/stack/arcadeticket/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/obj/item/stack/tile/New()
|
||||
..()
|
||||
/obj/item/stack/tile/Initialize()
|
||||
. = ..()
|
||||
randpixel_xy()
|
||||
|
||||
/*
|
||||
|
||||
@@ -77,14 +77,14 @@
|
||||
//visible_message("[user] has smashed the snowball in their hand!", "You smash the snowball in your hand.")
|
||||
to_chat(user, "<span class='notice'>You smash the snowball in your hand.</span>")
|
||||
var/atom/S = new /obj/item/stack/material/snow(user.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
else
|
||||
//visible_message("[user] starts compacting the snowball.", "You start compacting the snowball.")
|
||||
to_chat(user, "<span class='notice'>You start compacting the snowball.</span>")
|
||||
if(do_after(user, 2 SECONDS))
|
||||
var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
|
||||
/obj/item/weapon/material/snow/snowball/reinforced
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
gauge_icon = "indicator_emergency"
|
||||
|
||||
/obj/item/weapon/tank/emergency/nitrogen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas("nitrogen", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
/obj/item/weapon/tank/emergency/nitrogen/double
|
||||
|
||||
@@ -671,7 +671,7 @@
|
||||
always_process = TRUE
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/mounted/exosuit/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(istype(loc, /obj/item/mecha_parts/mecha_equipment))
|
||||
equip_mount = loc
|
||||
|
||||
@@ -19,19 +19,12 @@
|
||||
var/can_speak = 0 //For MMIs and admin trickery. If an object has a brainmob in its contents, set this to 1 to allow it to speak.
|
||||
|
||||
var/show_examine = TRUE // Does this pop up on a mob when the mob is examined?
|
||||
var/register_as_dangerous_object = FALSE // Should this tell its turf that it is dangerous automatically?
|
||||
|
||||
/obj/Initialize()
|
||||
if(register_as_dangerous_object)
|
||||
register_dangerous_to_step()
|
||||
return ..()
|
||||
|
||||
/obj/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(register_as_dangerous_object)
|
||||
unregister_dangerous_to_step()
|
||||
return ..()
|
||||
|
||||
<<<<<<< HEAD
|
||||
/obj/Moved(atom/oldloc)
|
||||
. = ..()
|
||||
if(register_as_dangerous_object)
|
||||
@@ -43,6 +36,9 @@
|
||||
new_turf.register_dangerous_object(src)
|
||||
|
||||
/obj/Topic(href, href_list, var/datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
=======
|
||||
/obj/Topic(href, href_list, var/datum/topic_state/state = default_state)
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
if(usr && ..())
|
||||
return 1
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// creates a new object and deletes itself
|
||||
/obj/random/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
if (!prob(spawn_nothing_percentage))
|
||||
spawn_item()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
GLOBAL_LIST_EMPTY(cliff_icon_cache)
|
||||
|
||||
/*
|
||||
@@ -234,3 +235,257 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
||||
if(should_fall(L))
|
||||
return FALSE
|
||||
return ..()
|
||||
=======
|
||||
GLOBAL_LIST_EMPTY(cliff_icon_cache)
|
||||
|
||||
/*
|
||||
Cliffs give a visual illusion of depth by seperating two places while presenting a 'top' and 'bottom' side.
|
||||
|
||||
Mobs moving into a cliff from the bottom side will simply bump into it and be denied moving into the tile,
|
||||
where as mobs moving into a cliff from the top side will 'fall' off the cliff, forcing them to the bottom, causing significant damage and stunning them.
|
||||
|
||||
Mobs can climb this while wearing climbing equipment by clickdragging themselves onto a cliff, as if it were a table.
|
||||
|
||||
Flying mobs can pass over all cliffs with no risk of falling.
|
||||
|
||||
Projectiles and thrown objects can pass, however if moving upwards, there is a chance for it to be stopped by the cliff.
|
||||
This makes fighting something that is on top of a cliff more challenging.
|
||||
|
||||
As a note, dir points upwards, e.g. pointing WEST means the left side is 'up', and the right side is 'down'.
|
||||
|
||||
When mapping these in, be sure to give at least a one tile clearance, as NORTH facing cliffs expand to
|
||||
two tiles on initialization, and which way a cliff is facing may change during maploading.
|
||||
*/
|
||||
|
||||
/obj/structure/cliff
|
||||
name = "cliff"
|
||||
desc = "A steep rock ledge. You might be able to climb it if you feel bold enough."
|
||||
description_info = "Walking off the edge of a cliff while on top will cause you to fall off, causing severe injury.<br>\
|
||||
You can climb this cliff if wearing special climbing equipment, by click-dragging yourself onto the cliff.<br>\
|
||||
Projectiles traveling up a cliff may hit the cliff instead, making it more difficult to fight something \
|
||||
on top."
|
||||
icon = 'icons/obj/flora/rocks.dmi'
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
opacity = FALSE
|
||||
climbable = TRUE
|
||||
climb_delay = 10 SECONDS
|
||||
block_turf_edges = TRUE // Don't want turf edges popping up from the cliff edge.
|
||||
|
||||
var/icon_variant = null // Used to make cliffs less repeative by having a selection of sprites to display.
|
||||
var/corner = FALSE // Used for icon things.
|
||||
var/ramp = FALSE // Ditto.
|
||||
var/bottom = FALSE // Used for 'bottom' typed cliffs, to avoid infinite cliffs, and for icons.
|
||||
|
||||
var/is_double_cliff = FALSE // Set to true when making the two-tile cliffs, used for projectile checks.
|
||||
var/uphill_penalty = 30 // Odds of a projectile not making it up the cliff.
|
||||
|
||||
/obj/structure/cliff/Initialize()
|
||||
. = ..()
|
||||
register_dangerous_to_step()
|
||||
|
||||
/obj/structure/cliff/Destroy()
|
||||
unregister_dangerous_to_step()
|
||||
. = ..()
|
||||
|
||||
/obj/structure/cliff/Moved(atom/oldloc)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/turf/old_turf = get_turf(oldloc)
|
||||
var/turf/new_turf = get_turf(src)
|
||||
if(old_turf != new_turf)
|
||||
old_turf.unregister_dangerous_object(src)
|
||||
new_turf.register_dangerous_object(src)
|
||||
|
||||
// These arrange their sprites at runtime, as opposed to being statically placed in the map file.
|
||||
/obj/structure/cliff/automatic
|
||||
icon_state = "cliffbuilder"
|
||||
dir = NORTH
|
||||
|
||||
/obj/structure/cliff/automatic/corner
|
||||
icon_state = "cliffbuilder-corner"
|
||||
dir = NORTHEAST
|
||||
corner = TRUE
|
||||
|
||||
// Tiny part that doesn't block, used for making 'ramps'.
|
||||
/obj/structure/cliff/automatic/ramp
|
||||
icon_state = "cliffbuilder-ramp"
|
||||
dir = NORTHEAST
|
||||
density = FALSE
|
||||
ramp = TRUE
|
||||
|
||||
// Made automatically as needed by automatic cliffs.
|
||||
/obj/structure/cliff/bottom
|
||||
bottom = TRUE
|
||||
|
||||
/obj/structure/cliff/automatic/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
// Paranoid about the maploader, direction is very important to cliffs, since they may get bigger if initialized while facing NORTH.
|
||||
/obj/structure/cliff/automatic/LateInitialize()
|
||||
if(dir in GLOB.cardinal)
|
||||
icon_variant = pick("a", "b", "c")
|
||||
|
||||
if(dir & NORTH && !bottom) // North-facing cliffs require more cliffs to be made.
|
||||
make_bottom()
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/cliff/proc/make_bottom()
|
||||
// First, make sure there's room to put the bottom side.
|
||||
var/turf/T = locate(x, y - 1, z)
|
||||
if(!istype(T))
|
||||
return FALSE
|
||||
|
||||
// Now make the bottom cliff have mostly the same variables.
|
||||
var/obj/structure/cliff/bottom/bottom = new(T)
|
||||
is_double_cliff = TRUE
|
||||
climb_delay /= 2 // Since there are two cliffs to climb when going north, both take half the time.
|
||||
|
||||
bottom.dir = dir
|
||||
bottom.is_double_cliff = TRUE
|
||||
bottom.climb_delay = climb_delay
|
||||
bottom.icon_variant = icon_variant
|
||||
bottom.corner = corner
|
||||
bottom.ramp = ramp
|
||||
bottom.layer = layer - 0.1
|
||||
bottom.density = density
|
||||
bottom.update_icon()
|
||||
|
||||
/obj/structure/cliff/set_dir(new_dir)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/cliff/update_icon()
|
||||
icon_state = "cliff-[dir][icon_variant][bottom ? "-bottom" : ""][corner ? "-corner" : ""][ramp ? "-ramp" : ""]"
|
||||
|
||||
// Now for making the top-side look like a different turf.
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
var/subtraction_icon_state = "[icon_state]-subtract"
|
||||
var/cache_string = "[icon_state]_[T.icon]_[T.icon_state]"
|
||||
if(T && subtraction_icon_state in cached_icon_states(icon))
|
||||
cut_overlays()
|
||||
// If we've made the same icon before, just recycle it.
|
||||
if(cache_string in GLOB.cliff_icon_cache)
|
||||
add_overlay(GLOB.cliff_icon_cache[cache_string])
|
||||
|
||||
else // Otherwise make a new one, but only once.
|
||||
var/icon/underlying_ground = icon(T.icon, T.icon_state, T.dir)
|
||||
var/icon/subtract = icon(icon, subtraction_icon_state)
|
||||
underlying_ground.Blend(subtract, ICON_SUBTRACT)
|
||||
var/image/final = image(underlying_ground)
|
||||
final.layer = src.layer - 0.2
|
||||
GLOB.cliff_icon_cache[cache_string] = final
|
||||
add_overlay(final)
|
||||
|
||||
|
||||
// Movement-related code.
|
||||
|
||||
/obj/structure/cliff/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover))
|
||||
var/mob/living/L = mover
|
||||
if(L.hovering) // Flying mobs can always pass.
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
// Projectiles and objects flying 'upward' have a chance to hit the cliff instead, wasting the shot.
|
||||
else if(istype(mover, /obj))
|
||||
var/obj/O = mover
|
||||
if(check_shield_arc(src, dir, O)) // This is actually for mobs but it will work for our purposes as well.
|
||||
if(prob(uphill_penalty / (1 + is_double_cliff) )) // Firing upwards facing NORTH means it will likely have to pass through two cliffs, so the chance is halved.
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/cliff/Bumped(atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(should_fall(L))
|
||||
fall_off_cliff(L)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/cliff/proc/should_fall(mob/living/L)
|
||||
if(L.hovering)
|
||||
return FALSE
|
||||
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && get_dir(T, loc) & reverse_dir[dir]) // dir points 'up' the cliff, e.g. cliff pointing NORTH will cause someone to fall if moving SOUTH into it.
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/cliff/proc/fall_off_cliff(mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
var/turf/T = get_step(src, reverse_dir[dir])
|
||||
var/displaced = FALSE
|
||||
|
||||
if(dir in list(EAST, WEST)) // Apply an offset if flying sideways, to help maintain the illusion of depth.
|
||||
for(var/i = 1 to 2)
|
||||
var/turf/new_T = locate(T.x, T.y - i, T.z)
|
||||
if(!new_T || locate(/obj/structure/cliff) in new_T)
|
||||
break
|
||||
T = new_T
|
||||
displaced = TRUE
|
||||
|
||||
if(istype(T))
|
||||
visible_message(span("danger", "\The [L] falls off \the [src]!"))
|
||||
L.forceMove(T)
|
||||
|
||||
// Do the actual hurting. Double cliffs do halved damage due to them most likely hitting twice.
|
||||
var/harm = !is_double_cliff ? 1 : 0.5
|
||||
if(istype(L.buckled, /obj/vehicle)) // People falling off in vehicles will take less damage, but will damage the vehicle severely.
|
||||
var/obj/vehicle/vehicle = L.buckled
|
||||
vehicle.adjust_health(40 * harm)
|
||||
to_chat(L, span("warning", "\The [vehicle] absorbs some of the impact, damaging it."))
|
||||
harm /= 2
|
||||
|
||||
playsound(L, 'sound/effects/break_stone.ogg', 70, 1)
|
||||
L.Weaken(5 * harm)
|
||||
var/fall_time = 3
|
||||
if(displaced) // Make the fall look more natural when falling sideways.
|
||||
L.pixel_z = 32 * 2
|
||||
animate(L, pixel_z = 0, time = fall_time)
|
||||
sleep(fall_time) // A brief delay inbetween the two sounds helps sell the 'ouch' effect.
|
||||
playsound(L, "punch", 70, 1)
|
||||
shake_camera(L, 1, 1)
|
||||
visible_message(span("danger", "\The [L] hits the ground!"))
|
||||
|
||||
// The bigger they are, the harder they fall.
|
||||
// They will take at least 20 damage at the minimum, and tries to scale up to 40% of their max health.
|
||||
// This scaling is capped at 100 total damage, which occurs if the thing that fell has more than 250 health.
|
||||
var/damage = between(20, L.getMaxHealth() * 0.4, 100)
|
||||
var/target_zone = ran_zone()
|
||||
var/blocked = L.run_armor_check(target_zone, "melee") * harm
|
||||
var/soaked = L.get_armor_soak(target_zone, "melee") * harm
|
||||
|
||||
L.apply_damage(damage * harm, BRUTE, target_zone, blocked, soaked, used_weapon=src)
|
||||
|
||||
// Now fall off more cliffs below this one if they exist.
|
||||
var/obj/structure/cliff/bottom_cliff = locate() in T
|
||||
if(bottom_cliff)
|
||||
visible_message(span("danger", "\The [L] rolls down towards \the [bottom_cliff]!"))
|
||||
sleep(5)
|
||||
bottom_cliff.fall_off_cliff(L)
|
||||
|
||||
/obj/structure/cliff/can_climb(mob/living/user, post_climb_check = FALSE)
|
||||
// Cliff climbing requires climbing gear.
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/clothing/shoes/shoes = H.shoes
|
||||
if(shoes && shoes.rock_climbing)
|
||||
return ..() // Do the other checks too.
|
||||
|
||||
to_chat(user, span("warning", "\The [src] is too steep to climb unassisted."))
|
||||
return FALSE
|
||||
|
||||
// This tells AI mobs to not be dumb and step off cliffs willingly.
|
||||
/obj/structure/cliff/is_safe_to_step(mob/living/L)
|
||||
if(should_fall(L))
|
||||
return FALSE
|
||||
return ..()
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
/obj/structure/closet/Initialize()
|
||||
..()
|
||||
// Closets need to come later because of spawners potentially creating objects during init.
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/closet/LateInitialize()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
var/smashed = 0
|
||||
|
||||
/obj/structure/fireaxecabinet/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/list/harvest_loot = null // Should be an associative list for things to spawn, and their weights. An example would be a branch from a tree.
|
||||
|
||||
/obj/structure/flora/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(randomize_size)
|
||||
icon_scale_x = rand(min_x_scale * 100, max_x_scale * 100) / 100
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
icon_state = icon_state_opened
|
||||
if(needscharger)
|
||||
new /obj/machinery/recharge_station/ghost_pod_recharger(src.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
var/list/clothing_possibilities
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/human/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
handle_clothing_setup()
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
var/list/clothing_possibilities
|
||||
|
||||
/obj/structure/ghost_pod/manual/human/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
handle_clothing_setup()
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/ghost_pod/ghost_activated/swarm_drone/event/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
say_dead_object("A <span class='notice'>[drone_class] swarm drone</span> shell is now available in \the [T.loc].", src)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/total_creature_max //If set, it can spawn this many creatures, total, ever.
|
||||
|
||||
/obj/structure/prop/nest/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
den_mobs = list()
|
||||
START_PROCESSING(SSobj, src)
|
||||
last_spawn = world.time
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/cult/pylon/swarm/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
active_beams = list()
|
||||
|
||||
/obj/structure/cult/pylon/swarm/Destroy()
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
return FALSE
|
||||
|
||||
/obj/effect/wingrille_spawn/Initialize()
|
||||
. = ..()
|
||||
if(!win_path)
|
||||
return
|
||||
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
|
||||
if(win_path && ticker && ticker.current_state < GAME_STATE_PLAYING)
|
||||
activate()
|
||||
..()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/wingrille_spawn/proc/activate()
|
||||
if(activated) return
|
||||
@@ -58,7 +57,8 @@
|
||||
activated = 1
|
||||
for(var/obj/effect/wingrille_spawn/other in neighbours)
|
||||
if(!other.activated) other.activate()
|
||||
qdel(src)
|
||||
if(initialized && !QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
|
||||
return
|
||||
|
||||
@@ -12,9 +12,13 @@ var/list/floor_decals = list()
|
||||
|
||||
/obj/effect/floor_decal/New(var/newloc, var/newdir, var/newcolour)
|
||||
supplied_dir = newdir
|
||||
if(newcolour) color = newcolour
|
||||
if(newcolour)
|
||||
color = newcolour
|
||||
..(newloc)
|
||||
|
||||
// TODO: identify what is causing these atoms to be qdeleted in New()/Initialize()
|
||||
// somewhere in this chain. Alternatively repath to /obj/floor_decal or some other
|
||||
// abstract handler that explicitly doesn't invoke any obj behavior.
|
||||
/obj/effect/floor_decal/Initialize()
|
||||
add_to_turf_decals()
|
||||
initialized = TRUE
|
||||
@@ -42,11 +46,11 @@ var/list/floor_decals = list()
|
||||
name = "reset marker"
|
||||
|
||||
/obj/effect/floor_decal/reset/Initialize()
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.decals && T.decals.len)
|
||||
T.decals.Cut()
|
||||
T.update_icon()
|
||||
initialized = TRUE
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/floor_decal/corner
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
var/static/list/antilight_cache
|
||||
|
||||
/turf/simulated/shuttle/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
if(!antilight_cache)
|
||||
antilight_cache = list()
|
||||
for(var/diag in cornerdirs)
|
||||
|
||||
@@ -1014,10 +1014,3 @@
|
||||
oxygen = 0
|
||||
nitrogen = 0
|
||||
temperature = TCMB
|
||||
|
||||
/*
|
||||
/turf/simulated/floor/hull/New()
|
||||
if(icon_state != "hullcenter0")
|
||||
overrided_icon_state = icon_state
|
||||
..()
|
||||
*/
|
||||
@@ -11,9 +11,3 @@
|
||||
|
||||
/turf/space/cracked_asteroid/is_space() // So people don't start floating when standing on it.
|
||||
return FALSE
|
||||
|
||||
// u wot m8? ~Leshana
|
||||
// /turf/space/cracked_asteroid/New()
|
||||
// ..()
|
||||
// spawn(2 SECONDS)
|
||||
// overlays.Cut()
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
name = "command"
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
initialized = TRUE // Don't call init on unsimulated turfs (at least not yet)
|
||||
var/skip_init = TRUE // Don't call down the chain, apparently for performance when loading maps at runtime.
|
||||
|
||||
/turf/unsimulated/Initialize(mapload)
|
||||
if(skip_init)
|
||||
initialized = TRUE
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
. = ..()
|
||||
|
||||
//VOREStation Add
|
||||
/turf/unsimulated/fake_space
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/turf/unsimulated/beach/water
|
||||
name = "Water"
|
||||
icon_state = "water"
|
||||
initialized = FALSE
|
||||
skip_init = FALSE
|
||||
movement_cost = 4 // Water should slow you down, just like simulated turf.
|
||||
|
||||
/turf/unsimulated/beach/water/Initialize()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
density = 1
|
||||
alpha = 0
|
||||
blocks_air = 0
|
||||
initialized = FALSE
|
||||
|
||||
// Set these to get your desired planetary atmosphere.
|
||||
oxygen = 0
|
||||
@@ -17,6 +16,7 @@
|
||||
carbon_dioxide = 0
|
||||
phoron = 0
|
||||
temperature = T20C
|
||||
skip_init = FALSE
|
||||
|
||||
/turf/unsimulated/wall/planetary/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Form - Inventory Requisition r10.7.1E"
|
||||
|
||||
/obj/item/weapon/paper/carbon/cursedform/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
info = {"<font face="Comic Sans MS" color=#DA0000><b><center></center><BR><center><I><B>Form - Inventory Requisition r10.7.1E</I></B></center><BR><center><font size="4">General Request Form</font></center><BR><BR><center><B>General</B></center><BR><BR>Name: <span class="paper_field"></span><BR>Department: <span class="paper_field"></span><BR>Departmental Rank: <span class="paper_field"></span><BR>Organization(If not Nanotrasen): <span class="paper_field"></span><BR>Date: <span class="paper_field"></span><BR><BR><BR><BR>Requested Item(s): <span class="paper_field"></span><BR>Quantity: <span class="paper_field"></span><BR>Reason for request: <span class="paper_field"></span><BR>Is this replacement equipment?: <span class="paper_field"></span><BR>If `Yes`; above, specify equiment and reason for replacement: <span class="paper_field"></span><BR><BR><BR><center><B>Authorization</B></center><BR><BR>Authorizing Department: <span class="paper_field"></span><BR>Authorizing Dept. Head: <span class="paper_field"></span><BR><BR><BR><center><B>Contact and Delivery</B></center><BR><BR>EPv2 Address of requesting party(Do not leave blank): <span class="paper_field"></span><BR>Delivery location or department: <span class="paper_field"></span><BR><BR><BR>Nanotrasen Employee Identification Number: <span class="paper_field"></span><BR><U>Signature of Requester and Date</U><BR><BR><span class="paper_field"></span><BR><BR><BR><BR>Authorizor`s Nanotrasen Employee Identification Number: <span class="paper_field"></span><BR><U>Authorizing Signature and Date(Include authorizing department`s stamp below)</U><BR><BR><span class="paper_field"></span><BR><BR><BR><center><B>Shipping Department Only</B></center><BR><center><I>(Do not write below this line)</I></center><BR>Nanotrasen Purchasing Approval Code: <span class="paper_field"></span><BR>Nanotrasen Employee Identification Number: <span class="paper_field"></span><BR>Receiving Shipping Employee: <span class="paper_field"></span><BR><U>Signature and Date</U><BR><BR><span class="paper_field"></span><BR></b></font>"}
|
||||
info_links = {"<font face="Comic Sans MS" color=#FF9300><b><center></center><BR><center><I><B>Form - Inventory Requisition r10.7.1E</I></B></center><BR><center><font size="4">General Request Form</font></center><BR><BR><center><B>General</B></center><BR><BR>Name: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=1'>write</A></font></span><BR>Department: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=2'>write</A></font></span><BR>Departmental Rank: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=3'>write</A></font></span><BR>Organization(If not Nanotrasen): <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=4'>write</A></font></span><BR>Date: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=5'>write</A></font></span><BR><BR><BR><BR>Requested Item(s): <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=6'>write</A></font></span><BR>Quantity: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=7'>write</A></font></span><BR>Reason for request: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=8'>write</A></font></span><BR>Is this replacement equipment?: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=9'>write</A></font></span><BR>If `Yes` above, specify equiment and reason for replacement: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=10'>write</A></font></span><BR><BR><BR><center><B>Authorization</B></center><BR><BR>Authorizing Department: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=11'>write</A></font></span><BR>Authorizing Dept. Head: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=12'>write</A></font></span><BR><BR><BR><center><B>Contact and Delivery</B></center><BR><BR>EPv2 Address of requesting party(Do not leave blank): <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=13'>write</A></font></span><BR>Delivery location or department: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=14'>write</A></font></span><BR><BR><BR>Nanotrasen Employee Identification Number: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=15'>write</A></font></span><BR><U>Signature of Requester and Date</U><BR><BR><span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=16'>write</A></font></span><BR><BR><BR><BR>Authorizor`s Nanotrasen Employee Identification Number: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=17'>write</A></font></span><BR><U>Authorizing Signature and Date(Include authorizing department`s stamp below)</U><BR><BR><span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=18'>write</A></font></span><BR><BR><BR><center><B>Shipping Department Only</B></center><BR><center><I>(Do not write below this line)</I></center><BR>Nanotrasen Purchasing Approval Code: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=19'>write</A></font></span><BR>Nanotrasen Employee Identification Number: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=20'>write</A></font></span><BR>Receiving Shipping Employee: <span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=21'>write</A></font></span><BR><U>Signature and Date</U><BR><BR><span class="paper_field"><font face="Verdana"><A href='?src=[0x2057e0c];write=22'>write</A></font></span><BR></b></font><font face="Verdana"><A href='?src=[0x2057e0c];write=end'>write</A></font>"}
|
||||
|
||||
|
||||
@@ -8,18 +8,14 @@
|
||||
/obj/effect/spawner/lootdrop/Initialize()
|
||||
..()
|
||||
var/list/things = params2list(loot)
|
||||
|
||||
if(things && things.len)
|
||||
for(var/i = lootcount, i > 0, i--)
|
||||
if(!things.len)
|
||||
return
|
||||
|
||||
var/loot_spawn = pick(things)
|
||||
var/loot_path = text2path(loot_spawn)
|
||||
|
||||
if(!loot_path || !lootdoubles)
|
||||
things.Remove(loot_spawn)
|
||||
continue
|
||||
|
||||
new loot_path(get_turf(src))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
if( findtext(href,"<script",1,0) )
|
||||
to_world_log("Attempted use of scripts within a topic call, by [src]")
|
||||
message_admins("Attempted use of scripts within a topic call, by [src]")
|
||||
//del(usr)
|
||||
return
|
||||
|
||||
// Tgui Topic middleware
|
||||
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
// Physical traits are what they sound like, and involve the character's physical body, as opposed to their mental state.
|
||||
/datum/trait/modifier/physical
|
||||
<<<<<<< HEAD
|
||||
category = "Physical Quirks" //VOREStation Edit
|
||||
=======
|
||||
name = "Physical"
|
||||
category = "Physical"
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
|
||||
|
||||
/datum/trait/modifier/physical/flimsy
|
||||
@@ -194,6 +199,7 @@
|
||||
// 'Mental' traits are just those that only sapients can have, for now, and generally involves fears.
|
||||
// So far, all of them are just for fluff/don't have mechanical effects.
|
||||
/datum/trait/modifier/mental
|
||||
name = "Mental"
|
||||
category = "Mental"
|
||||
|
||||
/datum/trait/modifier/mental/test_for_invalidity(var/datum/category_item/player_setup_item/traits/setup)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
return battery
|
||||
|
||||
/obj/item/clothing/gloves/ring/buzzer/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!battery)
|
||||
battery = new battery_type(src)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/hide_on_roll = FALSE
|
||||
|
||||
/obj/item/clothing/accessory/storage/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
hold = new/obj/item/weapon/storage/internal(src)
|
||||
hold.max_storage_space = slots * 2
|
||||
hold.max_w_class = ITEMSIZE_SMALL
|
||||
@@ -95,7 +95,7 @@
|
||||
slots = 2
|
||||
|
||||
/obj/item/clothing/accessory/storage/knifeharness/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
hold.max_storage_space = ITEMSIZE_COST_SMALL * 2
|
||||
hold.can_hold = list(/obj/item/weapon/material/knife/machete/hatchet/unathiknife,\
|
||||
/obj/item/weapon/material/knife,\
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
slots = 3
|
||||
|
||||
/obj/item/clothing/accessory/storage/vox/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
hold.max_storage_space = slots * ITEMSIZE_COST_NORMAL
|
||||
hold.max_w_class = ITEMSIZE_NORMAL
|
||||
@@ -23,7 +23,7 @@
|
||||
var/list/accepted_mobs = list(/mob/living/simple_mob/animal/passive/fish)
|
||||
|
||||
/obj/item/weapon/material/fishing_net/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/fishing_net/afterattack(var/atom/A, var/mob/user, var/proximity)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/fishing_rod/attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
icon_state = base_icon
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/glass2/on_reagent_change()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("spacemountainwind", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko
|
||||
@@ -92,7 +92,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/space_up/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("space_up", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime
|
||||
@@ -103,7 +103,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("lemon_lime", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea
|
||||
@@ -114,7 +114,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("icetea", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice
|
||||
@@ -125,7 +125,7 @@
|
||||
center_of_mass = list("x"=16, "y"=8)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("grapejuice", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/tonic
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
pickup_sound = 'sound/items/pickup/papercup.ogg'
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/h_chocolate/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("hot_coco", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/greentea
|
||||
@@ -298,7 +298,7 @@
|
||||
pickup_sound = 'sound/items/pickup/papercup.ogg'
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/dry_ramen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("dry_ramen", 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/sillycup
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("space_up", 100)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind
|
||||
@@ -398,7 +398,7 @@
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("spacemountainwind", 100)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine
|
||||
|
||||
@@ -3720,26 +3720,32 @@
|
||||
/obj/item/pizzabox/margherita/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src)
|
||||
boxtag = "Margherita Deluxe"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/vegetable/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src)
|
||||
boxtag = "Gourmet Vegatable"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/mushroom/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src)
|
||||
boxtag = "Mushroom Special"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/meat/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src)
|
||||
boxtag = "Meatlover's Supreme"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/pineapple/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/pineapple(src)
|
||||
boxtag = "Hawaiian Sunrise"
|
||||
. = ..()
|
||||
|
||||
/obj/item/pizzabox/old/Initialize()
|
||||
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza(src)
|
||||
boxtag = "Deluxe Gourmet"
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dionaroast
|
||||
name = "roast diona"
|
||||
@@ -4547,7 +4553,7 @@
|
||||
icon_state = "bagelplain"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/bageltwo/Initialize()
|
||||
..() //Not returning . because asking to be qdel'd below.
|
||||
..()
|
||||
spawn_bagels()
|
||||
spawn_bagels()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -6261,7 +6267,7 @@
|
||||
nutriment_desc = list("tomato" = 4, "meat" = 2)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/lasagna/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.add_reagent("protein", 2) //For meaty things.
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/gigapuddi
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
volume = 80
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chaoscakeslice/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/i = rand(1,6)
|
||||
icon_state = "chaoscake_slice-[i]"
|
||||
switch(i)
|
||||
|
||||
@@ -586,7 +586,7 @@
|
||||
item_level = 1
|
||||
|
||||
/obj/machinery/microwave/advanced/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
reagents.maximum_volume = 1000
|
||||
|
||||
/datum/recipe/splat // We use this to handle cooking micros (or mice, etc) in a microwave. Janky but it works better than snowflake code to handle the same thing.
|
||||
|
||||
@@ -244,8 +244,8 @@
|
||||
pass_color = TRUE
|
||||
strict_color_stacking = TRUE
|
||||
|
||||
/obj/item/stack/material/wax/New()
|
||||
..()
|
||||
/obj/item/stack/material/wax/Initialize()
|
||||
. = ..()
|
||||
recipes = wax_recipes
|
||||
|
||||
/datum/material/wax
|
||||
|
||||
@@ -175,9 +175,13 @@
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/Initialize()
|
||||
<<<<<<< HEAD
|
||||
. = ..()
|
||||
if(!ov_lowhealth)
|
||||
setup_overlays()
|
||||
=======
|
||||
..()
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
temp_chem_holder = new()
|
||||
temp_chem_holder.create_reagents(10)
|
||||
create_reagents(200)
|
||||
|
||||
@@ -289,7 +289,6 @@
|
||||
new /obj/item/weapon/storage/bag/circuits/mini/transfer(src)
|
||||
new /obj/item/weapon/storage/bag/circuits/mini/converter(src)
|
||||
new /obj/item/weapon/storage/bag/circuits/mini/power(src)
|
||||
|
||||
new /obj/item/device/electronic_assembly(src)
|
||||
new /obj/item/device/assembly/electronic_assembly(src)
|
||||
new /obj/item/device/assembly/electronic_assembly(src)
|
||||
|
||||
@@ -356,11 +356,9 @@
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
// Set the pins so when someone sees them, they won't show as null
|
||||
set_pin_data(IC_INPUT, 1, frequency)
|
||||
set_pin_data(IC_INPUT, 2, code)
|
||||
push_data()
|
||||
addtimer(CALLBACK(src, .proc/set_frequency, frequency), 40)
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
@@ -574,7 +572,7 @@
|
||||
)
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/sign/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
for(var/lang in readable_langs)
|
||||
var/datum/language/newlang = GLOB.all_languages[lang]
|
||||
my_langs |= newlang
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
var/mob/living/voice/my_voice
|
||||
|
||||
/obj/item/integrated_circuit/output/text_to_speech/advanced/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
my_voice = new (src)
|
||||
mob_list -= my_voice // no life() ticks
|
||||
my_voice.name = "TTS Circuit"
|
||||
|
||||
@@ -139,7 +139,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
var/static/list/base_genre_books
|
||||
|
||||
/obj/machinery/librarycomp/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!base_genre_books || !base_genre_books.len)
|
||||
base_genre_books = list(
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
var/annihilate = FALSE // If true, all (movable) atoms at the location where the map is loaded will be deleted before the map is loaded in.
|
||||
var/fixed_orientation = FALSE // If true, the submap will not be rotated randomly when loaded.
|
||||
|
||||
var/cost = null // The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until \
|
||||
it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc. \
|
||||
Set to -1 to force the submap to always be made.
|
||||
var/cost = null /* The map generator has a set 'budget' it spends to place down different submaps. It will pick available submaps randomly until
|
||||
it runs out. The cost of a submap should roughly corrispond with several factors such as size, loot, difficulty, desired scarcity, etc.
|
||||
Set to -1 to force the submap to always be made. */
|
||||
var/allow_duplicates = FALSE // If false, only one map template will be spawned by the game. Doesn't affect admins spawning then manually.
|
||||
var/discard_prob = 0 // If non-zero, there is a chance that the map seeding algorithm will skip this template when selecting potential templates to use.
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/obj/item/stack/material/New()
|
||||
..()
|
||||
/obj/item/stack/material/Initialize()
|
||||
. = ..()
|
||||
|
||||
randpixel_xy()
|
||||
|
||||
if(!default_type)
|
||||
default_type = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name("[default_type]")
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return 0
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
recipes = material.get_recipes()
|
||||
stacktype = material.stack_type
|
||||
@@ -44,7 +44,6 @@
|
||||
|
||||
matter = material.get_matter()
|
||||
update_strings()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/material/get_material()
|
||||
return material
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
gender = NEUTER
|
||||
matter = null // Don't shove it in the autholathe.
|
||||
|
||||
/obj/item/stack/material/cyborg/New()
|
||||
if(..())
|
||||
name = "[material.display_name] synthesiser"
|
||||
desc = "A device that synthesises [material.display_name]."
|
||||
matter = null
|
||||
/obj/item/stack/material/cyborg/Initialize()
|
||||
. = ..()
|
||||
name = "[material.display_name] synthesiser"
|
||||
desc = "A device that synthesises [material.display_name]."
|
||||
matter = null
|
||||
|
||||
/obj/item/stack/material/cyborg/update_strings()
|
||||
return
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
|
||||
for(var/stacktype in typesof(/obj/item/stack/material)-/obj/item/stack/material)
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
stack_storage[S.name] = 0
|
||||
stack_paths[S.name] = stacktype
|
||||
qdel(S)
|
||||
for(var/stacktype in subtypesof(/obj/item/stack/material))
|
||||
var/obj/item/stack/S = stacktype
|
||||
var/s_name = initial(S.name)
|
||||
stack_storage[s_name] = 0
|
||||
stack_paths[s_name] = stacktype
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/material/glass
|
||||
|
||||
@@ -158,9 +158,10 @@
|
||||
var/upright = 0
|
||||
var/base_state
|
||||
|
||||
/obj/item/stack/flag/New()
|
||||
..()
|
||||
/obj/item/stack/flag/Initialize()
|
||||
. = ..()
|
||||
base_state = icon_state
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/flag/blue
|
||||
name = "blue flags"
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
randpixel_xy()
|
||||
|
||||
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
visualnet = cameranet
|
||||
|
||||
/mob/observer/eye/aiEye/Destroy()
|
||||
if(owner)
|
||||
var/mob/living/silicon/ai/ai = owner
|
||||
ai.all_eyes -= src
|
||||
owner = null
|
||||
. = ..()
|
||||
if(owner)
|
||||
var/mob/living/silicon/ai/ai = owner
|
||||
ai.all_eyes -= src
|
||||
owner = null
|
||||
. = ..()
|
||||
|
||||
/mob/observer/eye/aiEye/setLoc(var/T, var/cancel_tracking = 1)
|
||||
if(owner)
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
updateVisibility(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/New()
|
||||
..()
|
||||
/obj/effect/Initialize()
|
||||
. = ..()
|
||||
updateVisibility(src)
|
||||
|
||||
// DOORS
|
||||
|
||||
@@ -140,6 +140,6 @@
|
||||
to_wear_r_hand = null
|
||||
|
||||
/mob/living/carbon/human/ai_controlled/replicant/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
name = species.get_random_name(gender)
|
||||
add_modifier(/datum/modifier/homeothermic, 0, null)
|
||||
|
||||
@@ -978,7 +978,7 @@ var/list/ai_verbs_default = list(
|
||||
drop_new_multicam()
|
||||
|
||||
//Special subtype kept around for global announcements
|
||||
/mob/living/silicon/ai/announcer/
|
||||
/mob/living/silicon/ai/announcer
|
||||
is_dummy = 1
|
||||
|
||||
/mob/living/silicon/ai/announcer/Initialize()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
)
|
||||
|
||||
/mob/living/silicon/robot/drone/swarm/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
add_language(LANGUAGE_SWARMBOT, 1)
|
||||
|
||||
|
||||
@@ -158,5 +158,5 @@
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/energy/xray/swarm/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(-1, 1)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
var/dummy_card_type = /obj/item/weapon/card/id/science/roboticist/dummy_cyborg
|
||||
|
||||
/obj/item/weapon/card/robot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
dummy_card = new dummy_card_type(src)
|
||||
|
||||
/obj/item/weapon/card/robot/Destroy()
|
||||
@@ -149,7 +149,7 @@
|
||||
access = list(access_robotics)
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/dummy_cyborg/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
access |= access_robotics
|
||||
|
||||
//A harvest item for serviceborgs.
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
catalogue_data = list(/datum/category_item/catalogue/fauna/sif_crab)
|
||||
|
||||
/mob/living/simple_mob/animal/passive/crab/sif/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(rand(5,12) / 10)
|
||||
|
||||
// Meat!
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/randomize_location = TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!default_pixel_x && randomize_location)
|
||||
default_pixel_x = rand(-12, 12)
|
||||
@@ -174,7 +174,7 @@
|
||||
var/image/belly_image
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/icebass/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
dorsal_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
belly_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
update_icon()
|
||||
@@ -248,7 +248,7 @@
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/sif
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/rockfish/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
head_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
attack_sharp = TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/passive/lizard/large/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
adjust_scale(rand(12, 20) / 10)
|
||||
|
||||
/mob/living/simple_mob/animal/passive/lizard/large/defensive
|
||||
|
||||
@@ -81,7 +81,11 @@
|
||||
return 1 // It literally produces a cryogenic mist inside itself. Cold doesn't bother it.
|
||||
|
||||
/mob/living/simple_mob/animal/sif/frostfly/Initialize()
|
||||
<<<<<<< HEAD
|
||||
. = ..() //VOREStation Edit
|
||||
=======
|
||||
. = ..()
|
||||
>>>>>>> b22a056... Sideports a couple of init unit tests from Neb. (#7893)
|
||||
smoke_special = new
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user