Merge branch 'master' into custom_roundstart_items

This commit is contained in:
kevinz000
2017-08-31 18:23:56 -07:00
407 changed files with 7081 additions and 152390 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
#define MC_TICK_CHECK ( ( world.tick_usage > Master.current_ticklimit || src.state != SS_RUNNING ) ? pause() : 0 )
#define MC_TICK_CHECK ( ( TICK_USAGE > Master.current_ticklimit || src.state != SS_RUNNING ) ? pause() : 0 )
#define MC_SPLIT_TICK_INIT(phase_count) var/original_tick_limit = Master.current_ticklimit; var/split_tick_phases = ##phase_count
#define MC_SPLIT_TICK \
if(split_tick_phases > 1){\
Master.current_ticklimit = ((original_tick_limit - world.tick_usage) / split_tick_phases) + world.tick_usage;\
Master.current_ticklimit = ((original_tick_limit - TICK_USAGE) / split_tick_phases) + TICK_USAGE;\
--split_tick_phases;\
} else {\
Master.current_ticklimit = original_tick_limit;\
@@ -22,7 +22,7 @@
#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
//SubSystem flags_1 (Please design any new flags_1 so that the default is off, to make adding flags_1 to subsystems easier)
//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
//subsystem does not initialize.
#define SS_NO_INIT 1
+10
View File
@@ -0,0 +1,10 @@
#define TICK_LIMIT_RUNNING 80
#define TICK_LIMIT_TO_RUN 78
#define TICK_LIMIT_MC 70
#define TICK_LIMIT_MC_INIT_DEFAULT 98
#define TICK_USAGE world.tick_usage //for general usage
#define TICK_USAGE_REAL world.tick_usage //to be used where the result isn't checked
#define TICK_CHECK ( TICK_USAGE > Master.current_ticklimit )
#define CHECK_TICK if TICK_CHECK stoplag()
-9
View File
@@ -1,9 +0,0 @@
diff a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm (rejected hunks)
@@ -9,6 +9,7 @@
#define INVESTIGATE_SUPERMATTER "supermatter"
#define INVESTIGATE_TELESCI "telesci"
#define INVESTIGATE_WIRES "wires"
+#define INVESTIGATE_HALLUCINATIONS "hallucinations"
//Individual logging defines
#define INDIVIDUAL_ATTACK_LOG "Attack log"
+25 -25
View File
@@ -1,25 +1,25 @@
#define PI 3.1415
#define SPEED_OF_LIGHT 3e8 //not exact but hey!
#define SPEED_OF_LIGHT_SQ 9e+16
#define INFINITY 1e31 //closer then enough
//atmos
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
#define ONE_ATMOSPHERE 101.325 //kPa
#define T0C 273.15 // 0degC
#define T20C 293.15 // 20degC
#define TCMB 2.7 // -270.3degC
//"fancy" math for calculating time in ms from tick_usage percentage and the length of ticks
//percent_of_tick_used * (ticklag * 100(to convert to ms)) / 100(percent ratio)
//collapsed to percent_of_tick_used * tick_lag
#define TICK_DELTA_TO_MS(percent_of_tick_used) ((percent_of_tick_used) * world.tick_lag)
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(world.tick_usage-starting_tickusage))
#define PERCENT(val) (round(val*100, 0.1))
#define CLAMP01(x) (Clamp(x, 0, 1))
//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
#define PI 3.1415
#define SPEED_OF_LIGHT 3e8 //not exact but hey!
#define SPEED_OF_LIGHT_SQ 9e+16
#define INFINITY 1e31 //closer then enough
//atmos
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
#define ONE_ATMOSPHERE 101.325 //kPa
#define T0C 273.15 // 0degC
#define T20C 293.15 // 20degC
#define TCMB 2.7 // -270.3degC
//"fancy" math for calculating time in ms from tick_usage percentage and the length of ticks
//percent_of_tick_used * (ticklag * 100(to convert to ms)) / 100(percent ratio)
//collapsed to percent_of_tick_used * tick_lag
#define TICK_DELTA_TO_MS(percent_of_tick_used) ((percent_of_tick_used) * world.tick_lag)
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE_REAL - starting_tickusage))
#define PERCENT(val) (round(val*100, 0.1))
#define CLAMP01(x) (Clamp(x, 0, 1))
//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
-7
View File
@@ -1,7 +0,0 @@
#define TICK_LIMIT_RUNNING 80
#define TICK_LIMIT_TO_RUN 78
#define TICK_LIMIT_MC 70
#define TICK_LIMIT_MC_INIT_DEFAULT 98
#define TICK_CHECK ( world.tick_usage > Master.current_ticklimit )
#define CHECK_TICK if TICK_CHECK stoplag()
+18 -2
View File
@@ -357,6 +357,17 @@ Turf and target are separate in case you want to teleport some distance from a t
var/M = E/(SPEED_OF_LIGHT_SQ)
return M
//Takes the value of energy used/produced/ect.
//Returns a text value of that number in W, kW, MW, or GW.
/proc/DisplayPower(var/powerused)
if(powerused < 1000) //Less than a kW
return "[powerused] W"
else if(powerused < 1000000) //Less than a MW
return "[round((powerused * 0.001),0.01)] kW"
else if(powerused < 1000000000) //Less than a GW
return "[round((powerused * 0.000001),0.001)] MW"
return "[round((powerused * 0.000000001),0.0001)] GW"
/proc/key_name(whom, include_link = null, include_name = 1)
var/mob/M
var/client/C
@@ -1230,7 +1241,7 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
//Increases delay as the server gets more overloaded,
//as sleeps aren't cheap and sleeping only to wake up and sleep again is wasteful
#define DELTA_CALC max(((max(world.tick_usage, world.cpu) / 100) * max(Master.sleep_delta,1)), 1)
#define DELTA_CALC max(((max(TICK_USAGE, world.cpu) / 100) * max(Master.sleep_delta,1)), 1)
/proc/stoplag()
if (!Master || !(Master.current_runlevel & RUNLEVELS_DEFAULT))
@@ -1242,7 +1253,7 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
. += round(i*DELTA_CALC)
sleep(i*world.tick_lag*DELTA_CALC)
i *= 2
while (world.tick_usage > min(TICK_LIMIT_TO_RUN, Master.current_ticklimit))
while (TICK_USAGE > min(TICK_LIMIT_TO_RUN, Master.current_ticklimit))
#undef DELTA_CALC
@@ -1266,6 +1277,7 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
#define RANDOM_COLOUR (rgb(rand(0,255),rand(0,255),rand(0,255)))
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) qdel(item); item = null
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
@@ -1453,3 +1465,7 @@ GLOBAL_PROTECT(valid_HTTPSGet)
var/temp = bitfield - ((bitfield>>1)&46811) - ((bitfield>>2)&37449) //0133333 and 0111111 respectively
temp = ((temp + (temp>>3))&29127) % 63 //070707
return temp
//checks if a turf is in the planet z list.
/proc/turf_z_is_planet(turf/T)
return GLOB.z_is_planet["[T.z]"]
+2
View File
@@ -35,3 +35,5 @@ GLOBAL_LIST_EMPTY(wire_color_directory)
GLOBAL_LIST_EMPTY(wire_name_directory)
GLOBAL_LIST_EMPTY(ai_status_displays)
GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects
+1 -1
View File
@@ -355,7 +355,7 @@
else
user.listed_turf = T
user.client.statpanel = T.name
return
user.Stat() //responsive ui pls
/mob/proc/TurfAdjacent(turf/T)
return T.Adjacent(src)
+20 -19
View File
@@ -1,19 +1,20 @@
/*
MouseDrop:
Called on the atom you're dragging. In a lot of circumstances we want to use the
recieving object instead, so that's the default action. This allows you to drag
almost anything into a trash can.
*/
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
if(!usr || !over) return
if(over == src)
return usr.client.Click(src, src_location, src_control, params)
if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows
over.MouseDrop_T(src,usr)
return
// recieve a mousedrop
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
return
/*
MouseDrop:
Called on the atom you're dragging. In a lot of circumstances we want to use the
recieving object instead, so that's the default action. This allows you to drag
almost anything into a trash can.
*/
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
if(!usr || !over)
return
if(over == src)
return usr.client.Click(src, src_location, src_control, params)
if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows
over.MouseDrop_T(src,usr)
return
// recieve a mousedrop
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
return
+25 -17
View File
@@ -288,6 +288,7 @@
/datum/configuration/proc/Reload()
load("config/config.txt")
load("config/comms.txt", "comms")
load("config/game_options.txt","game_options")
load("config/policies.txt", "policies")
loadsql("config/dbconfig.txt")
@@ -444,27 +445,12 @@
fps = text2num(value)
if("automute_on")
automute_on = 1
if("comms_key")
global.comms_key = value
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
global.comms_allowed = 1
if("cross_server_address")
cross_address = value
if(value != "byond:\\address:port")
cross_allowed = 1
if("cross_comms_name")
cross_name = value
if("panic_server_name")
if (value != "\[Put the name here\]")
panic_server_name = value
if("panic_server_address")
if(value != "byond://address:port")
panic_address = value
if("medal_hub_address")
global.medal_hub = value
if("medal_hub_password")
global.medal_pass = value
if("show_irc_name")
showircname = 1
if("see_own_notes")
@@ -549,8 +535,12 @@
if("irc_announce_new_game")
irc_announce_new_game = TRUE
else
WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
#if DM_VERSION > 511
#error Replace the line below with WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
#endif
HandleCommsConfig(name, value) //TODO: Deprecate this eventually
else if(type == "comms")
HandleCommsConfig(name, value)
else if(type == "game_options")
switch(name)
if("damage_multiplier")
@@ -790,6 +780,24 @@
if(fps <= 0)
fps = initial(fps)
/datum/configuration/proc/HandleCommsConfig(name, value)
switch(name)
if("comms_key")
global.comms_key = value
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
global.comms_allowed = TRUE
if("cross_server_address")
cross_address = value
if(value != "byond:\\address:port")
cross_allowed = TRUE
if("cross_comms_name")
cross_name = value
if("medal_hub_address")
global.medal_hub = value
if("medal_hub_password")
global.medal_pass = value
else
WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
/datum/configuration/proc/loadmaplist(filename)
var/list/Lines = world.file2list(filename)
+22 -18
View File
@@ -53,20 +53,24 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/static/restart_clear = 0
var/static/restart_timeout = 0
var/static/restart_count = 0
//current tick limit, assigned before running a subsystem.
//used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
var/static/current_ticklimit = TICK_LIMIT_RUNNING
/datum/controller/master/New()
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
subsystems = list()
var/list/_subsystems = list()
subsystems = _subsystems
if (Master != src)
if (istype(Master))
Recover()
qdel(Master)
else
init_subtypes(/datum/controller/subsystem, subsystems)
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
sortTim(subsytem_types, /proc/cmp_subsystem_init)
for(var/I in subsytem_types)
_subsystems += new I
Master = src
if(!GLOB)
@@ -131,7 +135,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
FireHim = TRUE
if(3)
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined."
BadBoy.flags_1 |= SS_NO_FIRE
BadBoy.flags |= SS_NO_FIRE
if(msg)
to_chat(GLOB.admins, "<span class='boldannounce'>[msg]</span>")
log_world(msg)
@@ -167,7 +171,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// Initialize subsystems.
current_ticklimit = config.tick_limit_mc_init
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags_1 & SS_NO_INIT)
if (SS.flags & SS_NO_INIT)
continue
SS.Initialize(REALTIMEOFDAY)
CHECK_TICK
@@ -232,13 +236,13 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/timer = world.time
for (var/thing in subsystems)
var/datum/controller/subsystem/SS = thing
if (SS.flags_1 & SS_NO_FIRE)
if (SS.flags & SS_NO_FIRE)
continue
SS.queued_time = 0
SS.queue_next = null
SS.queue_prev = null
SS.state = SS_IDLE
if (SS.flags_1 & SS_TICKER)
if (SS.flags & SS_TICKER)
tickersubsystems += SS
timer += world.tick_lag * rand(1, 5)
SS.next_fire = timer
@@ -284,7 +288,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//if there are mutiple sleeping procs running before us hogging the cpu, we have to run later
// because sleeps are processed in the order received, so longer sleeps are more likely to run first
if (world.tick_usage > TICK_LIMIT_MC)
if (TICK_USAGE > TICK_LIMIT_MC)
sleep_delta += 2
current_ticklimit = TICK_LIMIT_RUNNING * 0.5
sleep(world.tick_lag * (processing + sleep_delta))
@@ -293,7 +297,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
sleep_delta = MC_AVERAGE_FAST(sleep_delta, 0)
if (last_run + (world.tick_lag * processing) > world.time)
sleep_delta += 1
if (world.tick_usage > (TICK_LIMIT_MC*0.5))
if (TICK_USAGE > (TICK_LIMIT_MC*0.5))
sleep_delta += 1
if (make_runtime)
@@ -371,7 +375,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
continue
if (SS.next_fire > world.time)
continue
SS_flags = SS.flags_1
SS_flags = SS.flags
if (SS_flags & SS_NO_FIRE)
subsystemstocheck -= SS
continue
@@ -399,16 +403,16 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//keep running while we have stuff to run and we haven't gone over a tick
// this is so subsystems paused eariler can use tick time that later subsystems never used
while (ran && queue_head && world.tick_usage < TICK_LIMIT_MC)
while (ran && queue_head && TICK_USAGE < TICK_LIMIT_MC)
ran = FALSE
bg_calc = FALSE
current_tick_budget = queue_priority_count
queue_node = queue_head
while (queue_node)
if (ran && world.tick_usage > TICK_LIMIT_RUNNING)
if (ran && TICK_USAGE > TICK_LIMIT_RUNNING)
break
queue_node_flags = queue_node.flags_1
queue_node_flags = queue_node.flags
queue_node_priority = queue_node.queued_priority
//super special case, subsystems where we can't make them pause mid way through
@@ -417,7 +421,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//(unless we haven't even ran anything this tick, since its unlikely they will ever be able run
// in those cases, so we just let them run)
if (queue_node_flags & SS_NO_TICK_CHECK)
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - world.tick_usage && ran_non_ticker)
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker)
queue_node.queued_priority += queue_priority_count * 0.10
queue_priority_count -= queue_node_priority
queue_priority_count += queue_node.queued_priority
@@ -429,7 +433,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
current_tick_budget = queue_priority_count_bg
bg_calc = TRUE
tick_remaining = TICK_LIMIT_RUNNING - world.tick_usage
tick_remaining = TICK_LIMIT_RUNNING - TICK_USAGE
if (current_tick_budget > 0 && queue_node_priority > 0)
tick_precentage = tick_remaining / (current_tick_budget / queue_node_priority)
@@ -438,7 +442,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
tick_precentage = max(tick_precentage*0.5, tick_precentage-queue_node.tick_overrun)
current_ticklimit = round(world.tick_usage + tick_precentage)
current_ticklimit = round(TICK_USAGE + tick_precentage)
if (!(queue_node_flags & SS_TICKER))
ran_non_ticker = TRUE
@@ -449,9 +453,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
queue_node.state = SS_RUNNING
tick_usage = world.tick_usage
tick_usage = TICK_USAGE
var/state = queue_node.ignite(queue_node_paused)
tick_usage = world.tick_usage - tick_usage
tick_usage = TICK_USAGE - tick_usage
if (state == SS_RUNNING)
state = SS_IDLE
+6 -6
View File
@@ -6,7 +6,7 @@
var/wait = 20 //time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
var/priority = 50 //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep
var/flags_1 = 0 //see MC.dm in __DEFINES Most flags_1 must be set on world start to take full effect. (You can also restart the mc to force them to process again)
var/flags = 0 //see MC.dm in __DEFINES Most flags must be set on world start to take full effect. (You can also restart the mc to force them to process again)
//set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
// use the SS_NO_FIRE flag instead for systems that never fire to keep it from even being added to the list
@@ -61,13 +61,13 @@
//fire() seems more suitable. This is the procedure that gets called every 'wait' deciseconds.
//Sleeping in here prevents future fires until returned.
/datum/controller/subsystem/proc/fire(resumed = 0)
flags_1 |= SS_NO_FIRE
flags |= SS_NO_FIRE
throw EXCEPTION("Subsystem [src]([type]) does not fire() but did not set the SS_NO_FIRE flag. Please add the SS_NO_FIRE flag to any subsystem that doesn't fire so it doesn't get added to the processing list and waste cpu.")
/datum/controller/subsystem/Destroy()
dequeue()
can_fire = 0
flags_1 |= SS_NO_FIRE
flags |= SS_NO_FIRE
Master.subsystems -= src
@@ -76,14 +76,14 @@
// (this lets us sort our run order correctly without having to re-sort the entire already sorted list)
/datum/controller/subsystem/proc/enqueue()
var/SS_priority = priority
var/SS_flags = flags_1
var/SS_flags = flags
var/datum/controller/subsystem/queue_node
var/queue_node_priority
var/queue_node_flags
for (queue_node = Master.queue_head; queue_node; queue_node = queue_node.queue_next)
queue_node_priority = queue_node.queued_priority
queue_node_flags = queue_node.flags_1
queue_node_flags = queue_node.flags
if (queue_node_flags & SS_TICKER)
if (!(SS_flags & SS_TICKER))
@@ -170,7 +170,7 @@
if(can_fire && !(SS_NO_FIRE in flags_1))
if(can_fire && !(SS_NO_FIRE in flags))
msg = "[round(cost,1)]ms|[round(tick_usage,1)]%([round(tick_overrun,1)]%)|[round(ticks,0.1)]\t[msg]"
else
msg = "OFFLINE\t[msg]"
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(acid)
name = "Acid"
priority = 40
flags_1 = SS_NO_INIT|SS_BACKGROUND
flags = SS_NO_INIT|SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+15 -15
View File
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(air)
init_order = INIT_ORDER_AIR
priority = 20
wait = 5
flags_1 = SS_BACKGROUND
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/cost_turfs = 0
@@ -71,65 +71,65 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/fire(resumed = 0)
var/timer = world.tick_usage
var/timer = TICK_USAGE_REAL
if(currentpart == SSAIR_PIPENETS || !resumed)
process_pipenets(resumed)
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_ATMOSMACHINERY
if(currentpart == SSAIR_ATMOSMACHINERY)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_atmos_machinery(resumed)
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_ACTIVETURFS
if(currentpart == SSAIR_ACTIVETURFS)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_active_turfs(resumed)
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_EXCITEDGROUPS
if(currentpart == SSAIR_EXCITEDGROUPS)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_excited_groups(resumed)
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_HIGHPRESSURE
if(currentpart == SSAIR_HIGHPRESSURE)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_high_pressure_delta(resumed)
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_HOTSPOTS
if(currentpart == SSAIR_HOTSPOTS)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_hotspots(resumed)
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_SUPERCONDUCTIVITY
if(currentpart == SSAIR_SUPERCONDUCTIVITY)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_super_conductivity(resumed)
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(assets)
name = "Assets"
init_order = INIT_ORDER_ASSETS
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/cache = list()
var/list/preload = list()
+1 -1
View File
@@ -6,7 +6,7 @@
SUBSYSTEM_DEF(atoms)
name = "Atoms"
init_order = INIT_ORDER_ATOMS
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/initialized = INITIALIZATION_INSSATOMS
var/old_initialized
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(augury)
name = "Augury"
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/watchers = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(blackbox)
name = "Blackbox"
wait = 6000
flags_1 = SS_NO_TICK_CHECK | SS_NO_INIT
flags = SS_NO_TICK_CHECK | SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
init_order = INIT_ORDER_BLACKBOX
+1 -1
View File
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(communications)
name = "Communications"
flags_1 = SS_NO_INIT | SS_NO_FIRE
flags = SS_NO_INIT | SS_NO_FIRE
var/silicon_message_cooldown
var/nonsilicon_message_cooldown
+3 -3
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(dbcore)
name = "Database"
flags_1 = SS_NO_INIT|SS_NO_FIRE
flags = SS_NO_INIT|SS_NO_FIRE
init_order = INIT_ORDER_DBCORE
var/const/FAILED_DB_CONNECTION_CUTOFF = 5
@@ -251,7 +251,7 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
var/table
var/position //1-based index into item data
var/sql_type
var/flags_1
var/flags
var/length
var/max_length
//types
@@ -275,7 +275,7 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
table = table_handler
position = position_handler
sql_type = type_handler
flags_1 = flag_handler
flags = flag_handler
length = length_handler
max_length = max_length_handler
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(disease)
name = "Disease"
flags_1 = SS_NO_FIRE | SS_NO_INIT
flags = SS_NO_FIRE | SS_NO_INIT
var/list/active_diseases = list() //List of Active disease in all mobs; purely for quick referencing.
var/list/diseases
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(explosion)
priority = 99
wait = 1
flags_1 = SS_TICKER|SS_NO_INIT
flags = SS_TICKER|SS_NO_INIT
var/list/explosions
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(fire_burning)
name = "Fire Burning"
priority = 40
flags_1 = SS_NO_INIT|SS_BACKGROUND
flags = SS_NO_INIT|SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+10 -10
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(garbage)
name = "Garbage"
priority = 15
wait = 20
flags_1 = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/collection_timeout = 3000// deciseconds to wait to let running procs finish before we just say fuck it and force del() the object
@@ -67,9 +67,9 @@ SUBSYSTEM_DEF(garbage)
HandleToBeQueued()
if(state == SS_RUNNING)
HandleQueue()
if (state == SS_PAUSED) //make us wait again before the next run.
state = SS_RUNNING
state = SS_RUNNING
//If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond.
//Don't attempt to optimize, not worth the effort.
@@ -114,7 +114,7 @@ SUBSYSTEM_DEF(garbage)
var/type = A.type
testing("GC: -- \ref[A] | [type] was unable to be GC'd and was deleted --")
didntgc["[type]"]++
HardDelete(A)
++delslasttick
@@ -147,15 +147,15 @@ SUBSYSTEM_DEF(garbage)
//this is purely to separate things profile wise.
/datum/controller/subsystem/garbage/proc/HardDelete(datum/A)
var/time = world.timeofday
var/tick = world.tick_usage
var/tick = TICK_USAGE
var/ticktime = world.time
var/type = A.type
var/refID = "\ref[A]"
del(A)
tick = (world.tick_usage-tick+((world.time-ticktime)/world.tick_lag*100))
tick = (TICK_USAGE-tick+((world.time-ticktime)/world.tick_lag*100))
if (tick > highest_del_tickusage)
highest_del_tickusage = tick
time = world.timeofday - time
@@ -167,7 +167,7 @@ SUBSYSTEM_DEF(garbage)
log_game("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete)")
message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete).")
postpone(time/5)
/datum/controller/subsystem/garbage/proc/HardQueue(datum/A)
if (istype(A) && A.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
tobequeued += A
+1 -1
View File
@@ -3,7 +3,7 @@ SUBSYSTEM_DEF(icon_smooth)
init_order = INIT_ORDER_ICON_SMOOTHING
wait = 1
priority = 35
flags_1 = SS_TICKER
flags = SS_TICKER
var/list/smooth_queue = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(inbounds)
name = "Inbounds"
priority = 40
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
runlevels = RUNLEVEL_GAME
var/list/processing = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(ipintel)
name = "XKeyScore"
init_order = INIT_ORDER_XKEYSCORE
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/enabled = 0 //disable at round start to avoid checking reconnects
var/throttle = 0
var/errors = 0
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(job)
name = "Jobs"
init_order = INIT_ORDER_JOBS
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/occupations = list() //List of all jobs
var/list/name_occupations = list() //Dict of all jobs, keys are titles
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(language)
name = "Language"
init_order = INIT_ORDER_LANGUAGE
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
/datum/controller/subsystem/language/Initialize(timeofday)
for(var/L in subtypesof(/datum/language))
+1 -1
View File
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(lighting)
name = "Lighting"
wait = 2
init_order = INIT_ORDER_LIGHTING
flags_1 = SS_TICKER
flags = SS_TICKER
var/initialized = FALSE
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(machines)
name = "Machines"
init_order = INIT_ORDER_MACHINES
flags_1 = SS_KEEP_TIMING
flags = SS_KEEP_TIMING
var/list/processing = list()
var/list/currentrun = list()
var/list/powernets = list()
+2 -2
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(mapping)
name = "Mapping"
init_order = INIT_ORDER_MAPPING
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/nuke_tiles = list()
var/list/nuke_threats = list()
@@ -84,7 +84,7 @@ SUBSYSTEM_DEF(mapping)
C.update_icon()
/datum/controller/subsystem/mapping/Recover()
flags_1 |= SS_NO_INIT
flags |= SS_NO_INIT
map_templates = SSmapping.map_templates
ruins_templates = SSmapping.ruins_templates
space_ruins_templates = SSmapping.space_ruins_templates
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(minimap)
name = "Minimap"
init_order = INIT_ORDER_MINIMAP
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/const/MINIMAP_SIZE = 2048
var/const/TILE_SIZE = 8
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(mobs)
name = "Mobs"
priority = 100
flags_1 = SS_KEEP_TIMING|SS_NO_INIT
flags = SS_KEEP_TIMING|SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+1 -1
View File
@@ -5,7 +5,7 @@
SUBSYSTEM_DEF(npcpool)
name = "NPC Pool"
flags_1 = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = 20
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
+1 -1
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(orbit)
name = "Orbits"
priority = 35
wait = 2
flags_1 = SS_NO_INIT|SS_TICKER
flags = SS_NO_INIT|SS_TICKER
var/list/currentrun = list()
var/list/processing = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(pai)
name = "pAI"
flags_1 = SS_NO_INIT|SS_NO_FIRE
flags = SS_NO_INIT|SS_NO_FIRE
var/list/candidates = list()
var/ghost_spam = FALSE
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(parallax)
name = "Parallax"
wait = 2
flags_1 = SS_POST_FIRE_TIMING | SS_BACKGROUND | SS_NO_INIT
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND | SS_NO_INIT
priority = 65
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/list/currentrun
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(persistence)
name = "Persistence"
init_order = INIT_ORDER_PERSISTENCE
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/savefile/secret_satchels
var/list/satchel_blacklist = list() //this is a typecache
var/list/new_secret_satchels = list() //these are objects
+1 -1
View File
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(ping)
name = "Ping"
wait = 6
flags_1 = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
priority = 10
var/list/currentrun
@@ -2,5 +2,5 @@ PROCESSING_SUBSYSTEM_DEF(fields)
name = "Fields"
wait = 2
priority = 40
flags_1 = SS_KEEP_TIMING | SS_NO_INIT
flags = SS_KEEP_TIMING | SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
@@ -3,7 +3,7 @@ PROCESSING_SUBSYSTEM_DEF(flightpacks)
priority = 30
wait = 2
stat_tag = "FM"
flags_1 = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(obj)
name = "Objects"
priority = 40
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
var/list/processing = list()
var/list/currentrun = list()
@@ -1,6 +1,6 @@
PROCESSING_SUBSYSTEM_DEF(overlays)
name = "Overlay"
flags_1 = SS_TICKER
flags = SS_TICKER
wait = 1
priority = 500
init_order = INIT_ORDER_OVERLAY
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(processing)
name = "Processing"
priority = 25
flags_1 = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
wait = 10
var/stat_tag = "P" //Used for logging
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(radio)
name = "Radio"
flags_1 = SS_NO_FIRE|SS_NO_INIT
flags = SS_NO_FIRE|SS_NO_INIT
var/list/datum/radio_frequency/frequencies = list()
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(religion)
name = "Religion"
flags_1 = SS_NO_FIRE|SS_NO_INIT
flags = SS_NO_FIRE|SS_NO_INIT
var/religion
var/deity
+2 -2
View File
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(server_maint)
name = "Server Tasks"
wait = 6
flags_1 = SS_POST_FIRE_TIMING
flags = SS_POST_FIRE_TIMING
priority = 10
init_order = INIT_ORDER_SERVER_MAINT
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(server_maint)
qdel(C)
if (!(!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1)))
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*world.tick_usage/100]")
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")
if (MC_TICK_CHECK) //one day, when ss13 has 1000 people per server, you guys are gonna be glad I added this tick check
return
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(shuttle)
name = "Shuttle"
wait = 10
init_order = INIT_ORDER_SHUTTLE
flags_1 = SS_KEEP_TIMING|SS_NO_TICK_CHECK
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME
var/list/mobile = list()
+1 -1
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(spacedrift)
name = "Space Drift"
priority = 30
wait = 5
flags_1 = SS_NO_INIT|SS_KEEP_TIMING
flags = SS_NO_INIT|SS_KEEP_TIMING
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+1 -1
View File
@@ -5,7 +5,7 @@
SUBSYSTEM_DEF(squeak)
name = "Squeak"
init_order = INIT_ORDER_SQUEAK
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/exposed_wires = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(stickyban)
name = "Sticky Ban"
init_order = INIT_ORDER_STICKY_BAN
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/cache = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(sun)
name = "Sun"
wait = 600
flags_1 = SS_NO_TICK_CHECK|SS_NO_INIT
flags = SS_NO_TICK_CHECK|SS_NO_INIT
var/angle
var/dx
var/dy
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(tgui)
name = "tgui"
wait = 9
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
priority = 110
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(throwing)
name = "Throwing"
priority = 25
wait = 1
flags_1 = SS_NO_INIT|SS_KEEP_TIMING|SS_TICKER
flags = SS_NO_INIT|SS_KEEP_TIMING|SS_TICKER
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(ticker)
init_order = INIT_ORDER_TICKER
priority = 200
flags_1 = SS_KEEP_TIMING
flags = SS_KEEP_TIMING
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME
var/current_state = GAME_STATE_STARTUP //state of current round (used by process()) Use the defines GAME_STATE_* !
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(time_track)
name = "Time Tracking"
wait = 600
flags_1 = SS_NO_INIT|SS_NO_TICK_CHECK
flags = SS_NO_INIT|SS_NO_TICK_CHECK
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/time_dilation_current = 0
+20 -20
View File
@@ -7,7 +7,7 @@ SUBSYSTEM_DEF(timer)
wait = 1 //SS_TICKER subsystem, so wait is in ticks
init_order = INIT_ORDER_TIMER
flags_1 = SS_TICKER|SS_NO_INIT
flags = SS_TICKER|SS_NO_INIT
var/list/datum/timedevent/processing = list()
var/list/hashes = list()
@@ -215,7 +215,7 @@ SUBSYSTEM_DEF(timer)
var/datum/callback/callBack
var/timeToRun
var/hash
var/list/flags_1
var/list/flags
var/spent = FALSE //set to true right before running.
var/name //for easy debugging.
//cicular doublely linked list
@@ -224,16 +224,16 @@ SUBSYSTEM_DEF(timer)
var/static/nextid = 1
/datum/timedevent/New(datum/callback/callBack, timeToRun, flags_1, hash)
/datum/timedevent/New(datum/callback/callBack, timeToRun, flags, hash)
id = TIMER_ID_NULL
src.callBack = callBack
src.timeToRun = timeToRun
src.flags_1 = flags_1
src.flags = flags
src.hash = hash
if (flags_1 & TIMER_UNIQUE)
if (flags & TIMER_UNIQUE)
SStimer.hashes[hash] = src
if (flags_1 & TIMER_STOPPABLE)
if (flags & TIMER_STOPPABLE)
do
if (nextid >= TIMER_ID_MAX)
nextid = 1
@@ -241,12 +241,12 @@ SUBSYSTEM_DEF(timer)
while(SStimer.timer_id_dict["timerid" + num2text(id, 8)])
SStimer.timer_id_dict["timerid" + num2text(id, 8)] = src
name = "Timer: " + num2text(id, 8) + ", TTR: [timeToRun], Flags: [jointext(bitfield2list(flags_1, list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT")), ", ")], callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""])"
name = "Timer: " + num2text(id, 8) + ", TTR: [timeToRun], Flags: [jointext(bitfield2list(flags, list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT")), ", ")], callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""])"
if (callBack.object != GLOBAL_PROC)
LAZYADD(callBack.object.active_timers, src)
if (flags_1 & TIMER_CLIENT_TIME)
if (flags & TIMER_CLIENT_TIME)
//sorted insert
var/list/ctts = SStimer.clienttime_timers
var/cttl = length(ctts)
@@ -291,7 +291,7 @@ SUBSYSTEM_DEF(timer)
/datum/timedevent/Destroy()
..()
if (flags_1 & TIMER_UNIQUE)
if (flags & TIMER_UNIQUE)
SStimer.hashes -= hash
@@ -301,10 +301,10 @@ SUBSYSTEM_DEF(timer)
callBack = null
if (flags_1 & TIMER_STOPPABLE)
if (flags & TIMER_STOPPABLE)
SStimer.timer_id_dict -= "timerid" + num2text(id, 8)
if (flags_1 & TIMER_CLIENT_TIME)
if (flags & TIMER_CLIENT_TIME)
SStimer.clienttime_timers -= src
return QDEL_HINT_IWILLGC
@@ -346,7 +346,7 @@ SUBSYSTEM_DEF(timer)
else
. = "[callBack.object.type]"
/proc/addtimer(datum/callback/callback, wait, flags_1)
/proc/addtimer(datum/callback/callback, wait, flags)
if (!callback)
return
@@ -354,12 +354,12 @@ SUBSYSTEM_DEF(timer)
var/hash
if (flags_1 & TIMER_UNIQUE)
if (flags & TIMER_UNIQUE)
var/list/hashlist
if(flags_1 & TIMER_NO_HASH_WAIT)
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags_1 & TIMER_CLIENT_TIME)
if(flags & TIMER_NO_HASH_WAIT)
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags & TIMER_CLIENT_TIME)
else
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags_1 & TIMER_CLIENT_TIME)
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags & TIMER_CLIENT_TIME)
hashlist += callback.arguments
hash = hashlist.Join("|||||||")
@@ -370,19 +370,19 @@ SUBSYSTEM_DEF(timer)
SStimer.hashes -= hash
else
if (flags_1 & TIMER_OVERRIDE)
if (flags & TIMER_OVERRIDE)
qdel(hash_timer)
else
if (hash_timer.flags_1 & TIMER_STOPPABLE)
if (hash_timer.flags & TIMER_STOPPABLE)
. = hash_timer.id
return
var/timeToRun = world.time + wait
if (flags_1 & TIMER_CLIENT_TIME)
if (flags & TIMER_CLIENT_TIME)
timeToRun = REALTIMEOFDAY + wait
var/datum/timedevent/timer = new(callback, timeToRun, flags_1, hash)
var/datum/timedevent/timer = new(callback, timeToRun, flags, hash)
return timer.id
/proc/deltimer(id)
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(title)
name = "Title Screen"
flags_1 = SS_NO_FIRE|SS_NO_INIT
flags = SS_NO_FIRE|SS_NO_INIT
var/file_path
var/icon/icon
+1 -1
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(vote)
name = "Vote"
wait = 10
flags_1 = SS_KEEP_TIMING|SS_NO_INIT
flags = SS_KEEP_TIMING|SS_NO_INIT
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
+1 -1
View File
@@ -1,7 +1,7 @@
//Used for all kinds of weather, ex. lavaland ash storms.
SUBSYSTEM_DEF(weather)
name = "Weather"
flags_1 = SS_BACKGROUND
flags = SS_BACKGROUND
wait = 10
runlevels = RUNLEVEL_GAME
var/list/processing = list()
-62
View File
@@ -1,62 +0,0 @@
diff a/code/datums/callback.dm b/code/datums/callback.dm (rejected hunks)
@@ -100,60 +100,3 @@
if (object == GLOBAL_PROC)
return call(delegate)(arglist(calling_arguments))
return call(object, delegate)(arglist(calling_arguments))
-
-
-/datum/callback_select
- var/list/finished
- var/pendingcount
- var/total
-
-/datum/callback_select/New(count, savereturns)
- total = count
- if (savereturns)
- finished = new(count)
-
-
-/datum/callback_select/proc/invoke_callback(index, datum/callback/callback, list/callback_args, savereturn = TRUE)
- set waitfor = FALSE
- if (!callback || !istype(callback))
- //This check only exists because the alternative is callback_select would block forever if given invalid data
- CRASH("invalid callback passed to invoke_callback")
- if (!length(callback_args))
- callback_args = list()
- pendingcount++
- debug_usr("calling callback")
- var/rtn = callback.Invoke(arglist(callback_args))
- debug_usr("callback returned")
- pendingcount--
- if (savereturn)
- finished[index] = rtn
-
-
-
-
-//runs a list of callbacks asynchronously, returning once all of them return.
-//callbacks can be repeated.
-//callbacks-args is a optional list of argument lists, in the same order as the callbacks,
-// the inner lists will be sent to the callbacks when invoked() as additional args.
-//can optionly save and return a list of return values, in the same order as the original list of callbacks
-//resolution is the number of byond ticks between checks.
-/proc/callback_select(list/callbacks, list/callback_args, savereturns = TRUE, resolution = 1)
- if (!callbacks)
- return
- var/count = length(callbacks)
- if (!count)
- return
- if (!callback_args)
- callback_args = list()
-
- callback_args.len = count
-
- var/datum/callback_select/CS = new(count, savereturns)
- for (var/i in 1 to count)
- CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
- debug_usr("starting callbacks: [CS.pendingcount]")
- while(CS.pendingcount)
- debug_usr("callbacks: [CS.pendingcount]")
- sleep(resolution*world.tick_lag)
- return CS.finished
-
+1 -1
View File
@@ -56,7 +56,7 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo
1. `GET_COMPONENT(varname, component_type)` OR `GET_COMPONENT_FROM(varname, component_type, src)`
* Shorthand for `var/component_type/varname = src.GetComponent(component_type)`
1. `/datum/proc/AddComponent(component_type(type), ...) -> datum/component` (public, final)
* Creates an instance of `component_type` in the datum and passes `...` to it's `New()` call
* Creates an instance of `component_type` in the datum and passes `...` to its `Initialize()` call
* Sends the `COMSIG_COMPONENT_ADDED` signal to the datum
* All components a datum owns are deleted with the datum
* Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set
-1
View File
@@ -1 +0,0 @@
-
-10
View File
@@ -1,10 +0,0 @@
diff a/code/datums/riding.dm b/code/datums/riding.dm (rejected hunks)
@@ -419,7 +419,7 @@
icon = 'icons/obj/items_and_weapons.dmi.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
- flags = ABSTRACT | DROPDEL | NOBLUDGEON
+ flags_1 = ABSTRACT_1 | DROPDEL_1 | NOBLUDGEON_1
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/mob/living/carbon/rider
var/mob/living/ridden
+48
View File
@@ -0,0 +1,48 @@
/datum/spawners_menu
var/mob/dead/observer/owner
/datum/spawners_menu/New(mob/dead/observer/new_owner)
if(!istype(new_owner))
qdel(src)
owner = new_owner
/datum/spawners_menu/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.observer_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "spawners_menu", "Spawners Menu", 700, 600, master_ui, state)
ui.open()
/datum/spawners_menu/ui_data(mob/user)
var/list/data = list()
data["spawners"] = list()
for(var/spawner in GLOB.mob_spawners)
var/list/this = list()
this["name"] = spawner
this["desc"] = ""
this["refs"] = list()
for(var/spawner_obj in GLOB.mob_spawners[spawner])
this["refs"] += "\ref[spawner_obj]"
if(!this["desc"])
var/obj/effect/mob_spawn/MS = spawner_obj
this["desc"] = MS.flavour_text
this["amount_left"] = LAZYLEN(GLOB.mob_spawners[spawner])
data["spawners"] += list(this)
return data
/datum/spawners_menu/ui_act(action, params)
if(..())
return
var/spawner_ref = pick(GLOB.mob_spawners[params["name"]])
var/obj/effect/mob_spawn/MS = locate(spawner_ref) in GLOB.poi_list
switch(action)
if("jump")
if(MS)
owner.forceMove(get_turf(MS))
. = TRUE
if("spawn")
if(MS)
MS.attack_ghost(owner)
. = TRUE
+4
View File
@@ -251,6 +251,10 @@
duration = -1
alert_type = null
/datum/status_effect/cultghost/tick()
if(owner.reagents)
owner.reagents.del_reagent("holywater") //can't be deconverted
/datum/status_effect/crusher_mark
id = "crusher_mark"
duration = 300 //if you leave for 30 seconds you lose the mark, deal with it
@@ -1,29 +0,0 @@
diff a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm (rejected hunks)
@@ -535,15 +535,15 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/crew_quarters/toilet/fitness
name = "Fitness Toilets"
icon_state = "toilet"
-
+
/area/crew_quarters/toilet/female
name = "Female Toilets"
icon_state = "toilet"
-
+
/area/crew_quarters/toilet/male
name = "Male Toilets"
icon_state = "toilet"
-
+
/area/crew_quarters/toilet/restrooms
name = "Restrooms"
icon_state = "toilet"
@@ -1009,7 +1009,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/security/execution/transfer
name = "Transfer Centre"
-
+
/area/security/execution/education
name = "Prisoner Education Chamber"
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/area/areas.dm b/code/game/area/areas.dm (rejected hunks)
@@ -432,7 +432,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
if(L.client && !L.client.ambience_playing && L.client.prefs.toggles & SOUND_SHIP_AMBIENCE)
L.client.ambience_playing = 1
- L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ)
+ SEND_SOUND(L, sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_BUZZ))
if(!(L.client && (L.client.prefs.toggles & SOUND_AMBIENCE)))
return //General ambience check is below the ship ambience so one can play without the other
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm (rejected hunks)
@@ -175,7 +175,7 @@
SEND_SOUND(blobber, sound('sound/effects/attackblob.ogg'))
to_chat(blobber, "<b>You are a blobbernaut!</b>")
to_chat(blobber, "You are powerful, hard to kill, and slowly regenerate near nodes and cores, but will slowly die if not near the blob or if the factory that made you is killed.")
- to_chat(blobber, "You can communicate with other blobbernauts and GLOB.overminds via <b>:b</b>")
+ to_chat(blobber, "You can communicate with other blobbernauts and overminds via <b>:b</b>")
to_chat(blobber, "Your overmind's blob reagent is: <b><font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</b></font>!")
to_chat(blobber, "The <b><font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</b></font> reagent [blob_reagent_datum.shortdesc ? "[blob_reagent_datum.shortdesc]" : "[blob_reagent_datum.description]"]")
if(blobber)
@@ -1,19 +0,0 @@
diff a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm (rejected hunks)
@@ -395,7 +395,7 @@
/obj/item/shield/changeling
name = "shield-like mass"
desc = "A mass of tough, boney tissue. You can still see the fingers as a twisted pattern in the shield."
- flags = ABSTRACT | NODROP | DROPDEL
+ flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "ling_shield"
lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi'
@@ -443,7 +443,7 @@
name = "flesh mass"
icon_state = "lingspacesuit"
desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel."
- flags = STOPSPRESSUREDMAGE | NODROP | DROPDEL //Not THICKMATERIAL because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
+ flags_1 = STOPSPRESSUREDMAGE_1 | NODROP_1 | DROPDEL_1 //Not THICKMATERIAL_1 because it's organic tissue, so if somebody tries to inject something into it, it still ends up in your blood. (also balance but muh fluff)
allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) //No armor at all.
@@ -140,7 +140,7 @@
playsound(targetturf, 'sound/magic/staff_healing.ogg', 50, 1)
if(has_holy_water)
L.reagents.remove_reagent("holywater", 1000)
L.reagents.del_reagent("holywater")
remove_ranged_ability()
@@ -1,10 +0,0 @@
diff a/code/game/gamemodes/clock_cult/clock_items/ratvarian_spear.dm b/code/game/gamemodes/clock_cult/clock_items/ratvarian_spear.dm (rejected hunks)
@@ -6,6 +6,8 @@
icon = 'icons/obj/clockwork_objects.dmi'
icon_state = "ratvarian_spear"
item_state = "ratvarian_spear"
+ lefthand_file = 'icons/mob/inhands/antag/clockwork_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/antag/clockwork_righthand.dmi'
force = 15 //Extra damage is dealt to targets in attack()
throwforce = 25
armour_penetration = 10
+9 -2
View File
@@ -3,8 +3,10 @@
desc = "A sword humming with unholy energy. It glows with a dim red light."
icon_state = "cultblade"
item_state = "cultblade"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
inhand_x_dimension = 64
inhand_y_dimension = 64
flags_1 = CONDUCT_1
sharpness = IS_SHARP
w_class = WEIGHT_CLASS_BULKY
@@ -52,6 +54,11 @@
desc = "A strange dagger said to be used by sinister groups for \"preparing\" a corpse before sacrificing it to their dark gods."
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
item_state = "knife"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
inhand_x_dimension = 32
inhand_y_dimension = 32
w_class = WEIGHT_CLASS_SMALL
force = 15
throwforce = 25
@@ -1,10 +0,0 @@
diff a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm (rejected hunks)
@@ -31,7 +31,7 @@
/obj/item/melee/cultblade/ghost
name = "eldritch sword"
force = 19 //can't break normal airlocks
- flags = NODROP|DROPDEL
+ flags_1 = NODROP_1|DROPDEL_1
/obj/item/melee/cultblade/pickup(mob/living/user)
..()
+12 -3
View File
@@ -913,7 +913,7 @@ structure_check() searches for nearby cultist structures required for the invoca
var/list/ghosts_on_rune = list()
for(var/mob/dead/observer/O in get_turf(src))
if(O.client && !jobban_isbanned(O, ROLE_CULTIST))
ghosts_on_rune |= O
ghosts_on_rune += O
if(!ghosts_on_rune.len)
to_chat(user, "<span class='cultitalic'>There are no spirits near [src]!</span>")
fail_invoke()
@@ -926,9 +926,9 @@ structure_check() searches for nearby cultist structures required for the invoca
var/list/ghosts_on_rune = list()
for(var/mob/dead/observer/O in get_turf(src))
if(O.client && !jobban_isbanned(O, ROLE_CULTIST))
ghosts_on_rune |= O
ghosts_on_rune += O
var/mob/dead/observer/ghost_to_spawn = pick(ghosts_on_rune)
var/mob/living/carbon/human/new_human = new(get_turf(src))
var/mob/living/carbon/human/cult_ghost/new_human = new(get_turf(src))
new_human.real_name = ghost_to_spawn.real_name
new_human.alpha = 150 //Makes them translucent
new_human.equipOutfit(/datum/outfit/ghost_cultist) //give them armor
@@ -959,3 +959,12 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/obj/I in new_human)
new_human.dropItemToGround(I, TRUE)
new_human.dust()
/mob/living/carbon/human/cult_ghost/spill_organs(no_brain, no_organs, no_bodyparts) //cult ghosts never drop a brain
no_brain = TRUE
. = ..()
/mob/living/carbon/human/cult_ghost/getorganszone(zone, subzones = 0)
. = ..()
for(var/obj/item/organ/brain/B in .) //they're not that smart, really
. -= B
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm (rejected hunks)
@@ -343,7 +343,7 @@
desc = "Shackles that bind the wrists with sinister magic."
trashtype = /obj/item/restraints/handcuffs/energy/used
origin_tech = "materials=2;magnets=5"
- flags = DROPDEL
+ flags_1 = DROPDEL_1
/obj/item/restraints/handcuffs/energy/cult/used/dropped(mob/user)
user.visible_message("<span class='danger'>[user]'s shackles shatter in a discharge of dark magic!</span>", \
@@ -1,10 +0,0 @@
diff a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm (rejected hunks)
@@ -499,7 +499,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/restraints/handcuffs/energy/used
desc = "energy discharge"
- flags = DROPDEL
+ flags_1 = DROPDEL_1
/obj/item/restraints/handcuffs/energy/used/dropped(mob/user)
user.visible_message("<span class='danger'>[user]'s [src] break in a discharge of energy!</span>", \
@@ -1,10 +0,0 @@
diff a/code/game/gamemodes/miniantags/abduction/abduction_outfits.dm b/code/game/gamemodes/miniantags/abduction/abduction_outfits.dm (rejected hunks)
@@ -23,7 +23,7 @@
var/obj/item/clothing/suit/armor/abductor/vest/V = locate() in H
if(V)
console.AddVest(V)
- V.flags |= NODROP
+ V.flags_1 |= NODROP_1
var/obj/item/storage/backpack/B = locate() in H
if(B)
@@ -32,7 +32,7 @@
attack_sound = 'sound/effects/blobattack.ogg'
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 2)
var/morphed = 0
var/morphed = FALSE
var/atom/movable/form = null
var/morph_time = 0
var/static/list/blacklist_typecache = typecacheof(list(
@@ -93,7 +93,10 @@
..()
/mob/living/simple_animal/hostile/morph/proc/assume(atom/movable/target)
morphed = 1
if(morphed)
to_chat(src, "<span class='warning'>You must restore to your original form first!</span>")
return
morphed = TRUE
form = target
visible_message("<span class='warning'>[src] suddenly twists and changes shape, becoming a copy of [target]!</span>", \
@@ -117,8 +120,9 @@
/mob/living/simple_animal/hostile/morph/proc/restore()
if(!morphed)
to_chat(src, "<span class='warning'>You're already in your normal form!</span>")
return
morphed = 0
morphed = FALSE
form = null
alpha = initial(alpha)
color = initial(color)
+4 -4
View File
@@ -58,12 +58,12 @@
human = 1
var/name = M.name
if (name in track.names)
while(name in track.names)
track.namecounts[name]++
name = text("[] ([])", name, track.namecounts[name])
else
track.names.Add(name)
track.namecounts[name] = 1
track.names.Add(name)
track.namecounts[name] = 1
if(human)
track.humans[name] = M
else
@@ -1,10 +0,0 @@
diff a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm (rejected hunks)
@@ -136,7 +136,7 @@
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
- if(!(flags & NODECONSTRUCT))
+ if(!(flags_1 & NODECONSTRUCT_1))
if(state == 4)
new /obj/item/shard(loc)
new /obj/item/shard(loc)
+352 -352
View File
@@ -1,352 +1,352 @@
/obj/machinery/door
name = "door"
desc = "It opens and closes."
icon = 'icons/obj/doors/Doorint.dmi'
icon_state = "door1"
anchored = TRUE
opacity = 1
density = TRUE
layer = OPEN_DOOR_LAYER
power_channel = ENVIRON
max_integrity = 350
armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1
var/secondsElectrified = 0
var/shockedby = list()
var/visible = TRUE
var/operating = FALSE
var/glass = FALSE
var/welded = FALSE
var/normalspeed = 1
var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors
var/emergency = FALSE // Emergency access override
var/sub_door = FALSE // true if it's meant to go under another door.
var/closingLayer = CLOSED_DOOR_LAYER
var/autoclose = FALSE //does it automatically close after some time
var/safe = TRUE //whether the door detects things and mobs in its way and reopen or crushes them.
var/locked = FALSE //whether the door is bolted or not.
var/assemblytype //the type of door frame to drop during deconstruction
var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit.
var/datum/effect_system/spark_spread/spark_system
var/damage_deflection = 10
var/real_explosion_block //ignore this, just use explosion_block
/obj/machinery/door/New()
..()
if(density)
layer = CLOSED_DOOR_LAYER //Above most items if closed
else
layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
update_freelook_sight()
air_update_turf(1)
GLOB.airlocks += src
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(2, 1, src)
//doors only block while dense though so we have to use the proc
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
/obj/machinery/door/Destroy()
density = FALSE
air_update_turf(1)
update_freelook_sight()
GLOB.airlocks -= src
if(spark_system)
qdel(spark_system)
spark_system = null
return ..()
//process()
//return
/obj/machinery/door/CollidedWith(atom/movable/AM)
if(operating || emagged)
return
if(ismob(AM))
var/mob/B = AM
if((isdrone(B) || iscyborg(B)) && B.stat)
return
if(isliving(AM))
var/mob/living/M = AM
if(world.time - M.last_bumped <= 10)
return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time
if(M.restrained() && !check_access(null))
return
bumpopen(M)
return
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant)
if(world.time - mecha.occupant.last_bumped <= 10)
return
mecha.occupant.last_bumped = world.time
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
do_animate("deny")
return
return
/obj/machinery/door/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
/obj/machinery/door/proc/bumpopen(mob/user)
if(operating)
return
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(density && !emagged)
if(allowed(user))
open()
else
do_animate("deny")
return
/obj/machinery/door/attack_ai(mob/user)
return src.attack_hand(user)
/obj/machinery/door/attack_hand(mob/user)
return try_to_activate_door(user)
/obj/machinery/door/attack_tk(mob/user)
if(requiresID() && !allowed(null))
return
..()
/obj/machinery/door/proc/try_to_activate_door(mob/user)
add_fingerprint(user)
if(operating || emagged)
return
if(!requiresID())
user = null //so allowed(user) always succeeds
if(allowed(user))
if(density)
open()
else
close()
return
if(density)
do_animate("deny")
/obj/machinery/door/allowed(mob/M)
if(emergency)
return TRUE
return ..()
/obj/machinery/door/proc/try_to_weld(obj/item/weldingtool/W, mob/user)
return
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
return
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/twohanded/fireaxe)))
try_to_crowbar(I, user)
return 1
else if(istype(I, /obj/item/weldingtool))
try_to_weld(I, user)
return 1
else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM)
try_to_activate_door(user)
return 1
return ..()
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < damage_deflection)
return 0
. = ..()
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(. && obj_integrity > 0)
if(damage_amount >= 10 && prob(30))
spark_system.start()
/obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(glass)
playsound(loc, 'sound/effects/glasshit.ogg', 90, 1)
else if(damage_amount)
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/machinery/door/emp_act(severity)
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
INVOKE_ASYNC(src, .proc/open)
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
shockedby += "\[[time_stamp()]\]EM Pulse"
addtimer(CALLBACK(src, .proc/unelectrify), 300)
..()
/obj/machinery/door/proc/unelectrify()
secondsElectrified = 0
/obj/machinery/door/update_icon()
if(density)
icon_state = "door1"
else
icon_state = "door0"
/obj/machinery/door/proc/do_animate(animation)
switch(animation)
if("opening")
if(panel_open)
flick("o_doorc0", src)
else
flick("doorc0", src)
if("closing")
if(panel_open)
flick("o_doorc1", src)
else
flick("doorc1", src)
if("deny")
if(!stat)
flick("door_deny", src)
/obj/machinery/door/proc/open()
if(!density)
return 1
if(operating)
return
operating = TRUE
do_animate("opening")
set_opacity(0)
sleep(5)
density = FALSE
sleep(5)
layer = OPEN_DOOR_LAYER
update_icon()
set_opacity(0)
operating = FALSE
air_update_turf(1)
update_freelook_sight()
if(autoclose)
spawn(autoclose)
close()
return 1
/obj/machinery/door/proc/close()
if(density)
return 1
if(operating)
return
if(safe)
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
if(autoclose)
addtimer(CALLBACK(src, .proc/autoclose), 60)
return
operating = TRUE
do_animate("closing")
layer = closingLayer
sleep(5)
density = TRUE
sleep(5)
update_icon()
if(visible && !glass)
set_opacity(1)
operating = FALSE
air_update_turf(1)
update_freelook_sight()
if(safe)
CheckForMobs()
else
crush()
return 1
/obj/machinery/door/proc/CheckForMobs()
if(locate(/mob/living) in get_turf(src))
sleep(1)
open()
/obj/machinery/door/proc/crush()
for(var/mob/living/L in get_turf(src))
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
if(isalien(L)) //For xenos
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
L.emote("roar")
else if(ishuman(L)) //For humans
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
L.emote("scream")
L.Knockdown(100)
else if(ismonkey(L)) //For monkeys
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
L.Knockdown(100)
else //for simple_animals & borgs
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
var/turf/location = get_turf(src)
//add_blood doesn't work for borgs/xenos, but add_blood_floor does.
L.add_splatter_floor(location)
for(var/obj/mecha/M in get_turf(src))
M.take_damage(DOOR_CRUSH_DAMAGE)
/obj/machinery/door/proc/autoclose()
if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose)
close()
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/proc/hasPower()
return !(stat & NOPOWER)
/obj/machinery/door/proc/update_freelook_sight()
if(!glass && GLOB.cameranet)
GLOB.cameranet.updateVisibility(src, 0)
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
if(opacity || heat_proof)
return 1
return 0
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
/obj/machinery/door/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
return 0
/obj/machinery/door/proc/lock()
return
/obj/machinery/door/proc/unlock()
return
/obj/machinery/door/proc/hostile_lockdown(mob/origin)
if(!stat) //So that only powered doors are closed.
close() //Close ALL the doors!
/obj/machinery/door/proc/disable_lockdown()
if(!stat) //Opens only powered doors.
open() //Open everything!
/obj/machinery/door/ex_act(severity, target)
//if it blows up a wall it should blow up a door
..(severity ? max(1, severity - 1) : 0, target)
/obj/machinery/door/GetExplosionBlock()
return density ? real_explosion_block : 0
/obj/machinery/door
name = "door"
desc = "It opens and closes."
icon = 'icons/obj/doors/Doorint.dmi'
icon_state = "door1"
anchored = TRUE
opacity = 1
density = TRUE
layer = OPEN_DOOR_LAYER
power_channel = ENVIRON
max_integrity = 350
armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1
var/secondsElectrified = 0
var/shockedby = list()
var/visible = TRUE
var/operating = FALSE
var/glass = FALSE
var/welded = FALSE
var/normalspeed = 1
var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors
var/emergency = FALSE // Emergency access override
var/sub_door = FALSE // true if it's meant to go under another door.
var/closingLayer = CLOSED_DOOR_LAYER
var/autoclose = FALSE //does it automatically close after some time
var/safe = TRUE //whether the door detects things and mobs in its way and reopen or crushes them.
var/locked = FALSE //whether the door is bolted or not.
var/assemblytype //the type of door frame to drop during deconstruction
var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit.
var/datum/effect_system/spark_spread/spark_system
var/damage_deflection = 10
var/real_explosion_block //ignore this, just use explosion_block
/obj/machinery/door/New()
..()
if(density)
layer = CLOSED_DOOR_LAYER //Above most items if closed
else
layer = OPEN_DOOR_LAYER //Under all objects if opened. 2.7 due to tables being at 2.6
update_freelook_sight()
air_update_turf(1)
GLOB.airlocks += src
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(2, 1, src)
//doors only block while dense though so we have to use the proc
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
/obj/machinery/door/Destroy()
density = FALSE
air_update_turf(1)
update_freelook_sight()
GLOB.airlocks -= src
if(spark_system)
qdel(spark_system)
spark_system = null
return ..()
//process()
//return
/obj/machinery/door/CollidedWith(atom/movable/AM)
if(operating || emagged)
return
if(ismob(AM))
var/mob/B = AM
if((isdrone(B) || iscyborg(B)) && B.stat)
return
if(isliving(AM))
var/mob/living/M = AM
if(world.time - M.last_bumped <= 10)
return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time
if(M.restrained() && !check_access(null))
return
bumpopen(M)
return
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant)
if(world.time - mecha.occupant.last_bumped <= 10)
return
mecha.occupant.last_bumped = world.time
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
do_animate("deny")
return
return
/obj/machinery/door/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
/obj/machinery/door/proc/bumpopen(mob/user)
if(operating)
return
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(density && !emagged)
if(allowed(user))
open()
else
do_animate("deny")
return
/obj/machinery/door/attack_ai(mob/user)
return src.attack_hand(user)
/obj/machinery/door/attack_hand(mob/user)
return try_to_activate_door(user)
/obj/machinery/door/attack_tk(mob/user)
if(requiresID() && !allowed(null))
return
..()
/obj/machinery/door/proc/try_to_activate_door(mob/user)
add_fingerprint(user)
if(operating || emagged)
return
if(!requiresID())
user = null //so allowed(user) always succeeds
if(allowed(user))
if(density)
open()
else
close()
return
if(density)
do_animate("deny")
/obj/machinery/door/allowed(mob/M)
if(emergency)
return TRUE
return ..()
/obj/machinery/door/proc/try_to_weld(obj/item/weldingtool/W, mob/user)
return
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
return
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/twohanded/fireaxe)))
try_to_crowbar(I, user)
return 1
else if(istype(I, /obj/item/weldingtool))
try_to_weld(I, user)
return 1
else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM)
try_to_activate_door(user)
return 1
return ..()
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < damage_deflection)
return 0
. = ..()
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(. && obj_integrity > 0)
if(damage_amount >= 10 && prob(30))
spark_system.start()
/obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
if(glass)
playsound(loc, 'sound/effects/glasshit.ogg', 90, 1)
else if(damage_amount)
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BURN)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/machinery/door/emp_act(severity)
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
INVOKE_ASYNC(src, .proc/open)
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
shockedby += "\[[time_stamp()]\]EM Pulse"
addtimer(CALLBACK(src, .proc/unelectrify), 300)
..()
/obj/machinery/door/proc/unelectrify()
secondsElectrified = 0
/obj/machinery/door/update_icon()
if(density)
icon_state = "door1"
else
icon_state = "door0"
/obj/machinery/door/proc/do_animate(animation)
switch(animation)
if("opening")
if(panel_open)
flick("o_doorc0", src)
else
flick("doorc0", src)
if("closing")
if(panel_open)
flick("o_doorc1", src)
else
flick("doorc1", src)
if("deny")
if(!stat)
flick("door_deny", src)
/obj/machinery/door/proc/open()
if(!density)
return 1
if(operating)
return
operating = TRUE
do_animate("opening")
set_opacity(0)
sleep(5)
density = FALSE
sleep(5)
layer = OPEN_DOOR_LAYER
update_icon()
set_opacity(0)
operating = FALSE
air_update_turf(1)
update_freelook_sight()
if(autoclose)
spawn(autoclose)
close()
return 1
/obj/machinery/door/proc/close()
if(density)
return 1
if(operating)
return
if(safe)
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
if(autoclose)
addtimer(CALLBACK(src, .proc/autoclose), 60)
return
operating = TRUE
do_animate("closing")
layer = closingLayer
sleep(5)
density = TRUE
sleep(5)
update_icon()
if(visible && !glass)
set_opacity(1)
operating = FALSE
air_update_turf(1)
update_freelook_sight()
if(safe)
CheckForMobs()
else
crush()
return 1
/obj/machinery/door/proc/CheckForMobs()
if(locate(/mob/living) in get_turf(src))
sleep(1)
open()
/obj/machinery/door/proc/crush()
for(var/mob/living/L in get_turf(src))
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
if(isalien(L)) //For xenos
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
L.emote("roar")
else if(ishuman(L)) //For humans
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
L.emote("scream")
L.Knockdown(100)
else if(ismonkey(L)) //For monkeys
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
L.Knockdown(100)
else //for simple_animals & borgs
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
var/turf/location = get_turf(src)
//add_blood doesn't work for borgs/xenos, but add_blood_floor does.
L.add_splatter_floor(location)
for(var/obj/mecha/M in get_turf(src))
M.take_damage(DOOR_CRUSH_DAMAGE)
/obj/machinery/door/proc/autoclose()
if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose)
close()
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/proc/hasPower()
return !(stat & NOPOWER)
/obj/machinery/door/proc/update_freelook_sight()
if(!glass && GLOB.cameranet)
GLOB.cameranet.updateVisibility(src, 0)
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
if(opacity || heat_proof)
return 1
return 0
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
/obj/machinery/door/get_dumping_location(obj/item/storage/source,mob/user)
return null
/obj/machinery/door/proc/lock()
return
/obj/machinery/door/proc/unlock()
return
/obj/machinery/door/proc/hostile_lockdown(mob/origin)
if(!stat) //So that only powered doors are closed.
close() //Close ALL the doors!
/obj/machinery/door/proc/disable_lockdown()
if(!stat) //Opens only powered doors.
open() //Open everything!
/obj/machinery/door/ex_act(severity, target)
//if it blows up a wall it should blow up a door
..(severity ? max(1, severity - 1) : 0, target)
/obj/machinery/door/GetExplosionBlock()
return density ? real_explosion_block : 0
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm (rejected hunks)
@@ -163,7 +163,7 @@
else if(istype(I, /obj/item/weldingtool))
try_to_weld(I, user)
return 1
- else if(!(I.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
+ else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM)
try_to_activate_door(user)
return 1
return ..()
@@ -1,19 +0,0 @@
diff a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm (rejected hunks)
@@ -11,7 +11,7 @@
integrity_failure = 0
armor = list(melee = 20, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 70, acid = 100)
visible = FALSE
- flags = ON_BORDER
+ flags_1 = ON_BORDER_1
opacity = 0
CanAtmosPass = ATMOS_PASS_PROC
var/obj/item/electronics/airlock/electronics = null
@@ -221,7 +221,7 @@
return
add_fingerprint(user)
- if(!(flags&NODECONSTRUCT))
+ if(!(flags_1&NODECONSTRUCT_1))
if(istype(I, /obj/item/screwdriver))
if(density || operating)
to_chat(user, "<span class='warning'>You need to open the door to access the maintenance panel!</span>")
-16
View File
@@ -1,16 +0,0 @@
diff a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm (rejected hunks)
@@ -239,12 +239,12 @@
alarm()
/obj/machinery/firealarm/obj_break(damage_flag)
- if(!(stat & BROKEN) && !(flags & NODECONSTRUCT) && buildstage != 0) //can't break the electronics if there isn't any inside.
+ if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1) && buildstage != 0) //can't break the electronics if there isn't any inside.
stat |= BROKEN
update_icon()
/obj/machinery/firealarm/deconstruct(disassembled = TRUE)
- if(!(flags & NODECONSTRUCT))
+ if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal(loc, 1)
if(!(stat & BROKEN))
var/obj/item/I = new /obj/item/electronics/firealarm(loc)
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm (rejected hunks)
@@ -15,7 +15,7 @@
/obj/item/reagent_containers/glass)
/obj/machinery/iv_drip/Initialize()
- ..()
+ . = ..()
update_icon()
drip_containers = typecacheof(drip_containers)
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm (rejected hunks)
@@ -10,7 +10,7 @@
icon = 'icons/obj/machines/limbgrower.dmi'
icon_state = "limbgrower_idleoff"
density = TRUE
- container_type = OPENCONTAINER
+ container_type = OPENCONTAINER_1
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
-18
View File
@@ -1,18 +0,0 @@
diff a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm (rejected hunks)
@@ -758,14 +758,14 @@ GLOBAL_LIST_EMPTY(allCasters)
/obj/machinery/newscaster/deconstruct(disassembled = TRUE)
- if(!(flags & NODECONSTRUCT))
+ if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal(loc, 2)
new /obj/item/shard(loc)
new /obj/item/shard(loc)
qdel(src)
/obj/machinery/newscaster/obj_break()
- if(!(stat & BROKEN) && !(flags & NODECONSTRUCT))
+ if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN
playsound(loc, 'sound/effects/glassbr3.ogg', 100, 1)
update_icon()
@@ -1,10 +0,0 @@
diff a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm (rejected hunks)
@@ -664,7 +659,7 @@
return ..()
/obj/machinery/turretid/Initialize(mapload) //map-placed turrets autolink turrets
- ..()
+ . = ..()
if(!mapload)
return
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm (rejected hunks)
@@ -187,7 +187,7 @@
name = "dangerous old crusher"
emagged = TRUE
crush_damage = 120
- flags = NODECONSTRUCT
+ flags_1 = NODECONSTRUCT_1
/obj/item/paper/guides/recycler
name = "paper - 'garbage duty instructions'"
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm (rejected hunks)
@@ -12,7 +12,7 @@
/obj/structure/emergency_shield/Initialize()
. = ..()
- setDir(pick(1,2,3,4))
+ setDir(pick(GLOB.cardinals))
air_update_turf(1)
/obj/structure/emergency_shield/Destroy()
@@ -12,7 +12,7 @@
use_power = NO_POWER_USE
idle_power_usage = 0
machinetype = 6
var/intercept = FALSE // if TRUE, broadcasts all (non-syndie) messages to syndicate channel
var/intercept = FALSE // if TRUE, broadcasts all syndie messages to syndicate channel
/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
@@ -32,17 +32,11 @@
if(signal.data["slow"] > 0)
sleep(signal.data["slow"]) // simulate the network lag if necessary
/* ###### Broadcast a message using signal.data ###### */
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
signal.data["name"], signal.data["job"],
signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
signal.data["language"])
/* ###### Copy all non-syndie communications to the Syndicate Frequency ###### */
if(intercept && signal.frequency != GLOB.SYND_FREQ)
/* ###### Copy all syndie communications to the Syndicate Frequency ###### */
if(intercept && signal.frequency == GLOB.SYND_FREQ)
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
@@ -50,6 +44,15 @@
signal.data["realname"],, signal.data["compression"], list(0, z), GLOB.SYND_FREQ, signal.data["spans"],
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
signal.data["language"])
/* ###### Broadcast a message using signal.data ###### */
else if(!intercept)
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
signal.data["name"], signal.data["job"],
signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
signal.data["language"])
/obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params)
+2 -2
View File
@@ -1067,9 +1067,9 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access_txt = "11" //Engineering Equipment access
products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
products = list(/obj/item/clothing/glasses/meson/engine = 2, /obj/item/device/multitool = 4, /obj/item/electronics/airlock = 10, /obj/item/electronics/apc = 10, /obj/item/electronics/airalarm = 10, /obj/item/stock_parts/cell/high = 10, /obj/item/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5, /obj/item/grenade/chem_grenade/smart_metal_foam = 10)
contraband = list(/obj/item/stock_parts/cell/potato = 3)
premium = list(/obj/item/storage/belt/utility = 3)
premium = list(/obj/item/storage/belt/utility = 3, /obj/item/storage/box/smart_metal_foam = 1)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
resistance_flags = FIRE_PROOF
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm (rejected hunks)
@@ -130,7 +130,7 @@
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
- chainsaw.flags |= NODROP
+ chainsaw.flags_1 |= NODROP_1
victim.drop_all_held_items()
victim.put_in_hands(chainsaw)
chainsaw.attack_self(victim)
-10
View File
@@ -1,10 +0,0 @@
diff a/code/game/objects/items.dm b/code/game/objects/items.dm (rejected hunks)
@@ -135,7 +135,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
hitsound = "swing_hit"
/obj/item/Destroy()
- flags &= ~DROPDEL //prevent reqdels
+ flags_1 &= ~DROPDEL_1 //prevent reqdels
if(ismob(loc))
var/mob/m = loc
m.temporarilyRemoveItemFromInventory(src, TRUE)
+3 -1
View File
@@ -19,11 +19,13 @@
var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white")
var/current_color_index = 1
var/ghetto = FALSE
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(!loaded)
if(!user.transferItemToLoc(W, src))
to_chat(user, "<span class='warning'>[src] is stuck to your hand!</span>")
@@ -75,14 +75,16 @@ effective or pretty fucking useless.
var/intensity = 10 // how much damage the radiation does
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
var/used = 0 // is it cooling down?
var/stealth = FALSE
/obj/item/device/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
..()
if(!stealth || !irradiate)
..()
if(!irradiate)
return
if(!used)
add_logs(user, M, "irradiated", src)
var/cooldown = round(max(10, (intensity*5 - wavelength/4))) * 10
var/cooldown = GetCooldown()
used = 1
icon_state = "health1"
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
@@ -103,11 +105,15 @@ effective or pretty fucking useless.
/obj/item/device/healthanalyzer/rad_laser/attack_self(mob/user)
interact(user)
/obj/item/device/healthanalyzer/rad_laser/proc/GetCooldown()
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
/obj/item/device/healthanalyzer/rad_laser/interact(mob/user)
user.set_machine(src)
var/cooldown = round(max(10, (intensity*5 - wavelength/4)))
var/cooldown = GetCooldown()
var/dat = "Irradiation: <A href='?src=\ref[src];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=\ref[src];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
dat += "Scan Mode: <a href='?src=\ref[src];mode=1'>"
if(!scanmode)
dat += "Scan Health"
@@ -141,6 +147,9 @@ effective or pretty fucking useless.
usr.set_machine(src)
if(href_list["rad"])
irradiate = !irradiate
else if(href_list["stealthy"])
stealth = !stealth
else if(href_list["mode"])
scanmode += 1
File diff suppressed because it is too large Load Diff
+1 -12
View File
@@ -47,19 +47,8 @@
if(!active)
if(clown_check(user))
to_chat(user, "<span class='warning'>You light the [name]!</span>")
active = TRUE
cut_overlay("improvised_grenade_filled")
icon_state = initial(icon_state) + "_active"
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[ADMIN_LOOKUPFLW(user)] has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)].")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
if(iscarbon(user))
var/mob/living/carbon/C = user
C.throw_mode_on()
addtimer(CALLBACK(src, .proc/prime), det_time)
preprime(user, null, FALSE)
/obj/item/grenade/iedcasing/prime() //Blowing that can up
update_mob()

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