Merge branch 'VOREStation:master' into New_Hardhats

This commit is contained in:
Youtubeboy139
2023-06-09 23:37:26 -04:00
committed by GitHub
200 changed files with 2054 additions and 1412 deletions
+3 -3
View File
@@ -37,13 +37,13 @@
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
//Qdel helper macros.
#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_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) if(item) {qdel(item); item = null}
#define QDEL_NULL_LIST QDEL_LIST_NULL
#define QDEL_LIST_NULL(x) if(x) { for(var/y in x) { qdel(y) } ; x = 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)
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
+25 -25
View File
@@ -42,26 +42,26 @@
#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
#define RUSTG_JOB_ERROR "JOB PANICKED"
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data)
#define rustg_dmi_strip_metadata(fname) LIBCALL(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) LIBCALL(RUST_G, "dmi_create_png")(path, width, height, data)
#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y)
#define rustg_noise_get_at_coordinates(seed, x, y) LIBCALL(RUST_G, "noise_get_at_coordinates")(seed, x, y)
#define rustg_file_read(fname) call(RUST_G, "file_read")(fname)
#define rustg_file_exists(fname) call(RUST_G, "file_exists")(fname)
#define rustg_file_write(text, fname) call(RUST_G, "file_write")(text, fname)
#define rustg_file_append(text, fname) call(RUST_G, "file_append")(text, fname)
#define rustg_file_read(fname) LIBCALL(RUST_G, "file_read")(fname)
#define rustg_file_exists(fname) LIBCALL(RUST_G, "file_exists")(fname)
#define rustg_file_write(text, fname) LIBCALL(RUST_G, "file_write")(text, fname)
#define rustg_file_append(text, fname) LIBCALL(RUST_G, "file_append")(text, fname)
#ifdef RUSTG_OVERRIDE_BUILTINS
#define file2text(fname) rustg_file_read("[fname]")
#define text2file(text, fname) rustg_file_append(text, "[fname]")
#endif
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)
#define rustg_git_revparse(rev) LIBCALL(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) LIBCALL(RUST_G, "rg_git_commit_date")(rev)
#define rustg_hash_string(algorithm, text) call(RUST_G, "hash_string")(algorithm, text)
#define rustg_hash_file(algorithm, fname) call(RUST_G, "hash_file")(algorithm, fname)
#define rustg_hash_string(algorithm, text) LIBCALL(RUST_G, "hash_string")(algorithm, text)
#define rustg_hash_file(algorithm, fname) LIBCALL(RUST_G, "hash_file")(algorithm, fname)
#define RUSTG_HASH_MD5 "md5"
#define RUSTG_HASH_SHA1 "sha1"
@@ -72,13 +72,13 @@
#define md5(thing) (isfile(thing) ? rustg_hash_file(RUSTG_HASH_MD5, "[thing]") : rustg_hash_string(RUSTG_HASH_MD5, thing))
#endif
#define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true")
#define rustg_json_is_valid(text) (LIBCALL(RUST_G, "json_is_valid")(text) == "true")
#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format)
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
#define rustg_log_write(fname, text, format) LIBCALL(RUST_G, "log_write")(fname, text, format)
/proc/rustg_log_close_all() return LIBCALL(RUST_G, "log_close_all")()
#define rustg_url_encode(text) call(RUST_G, "url_encode")(text)
#define rustg_url_decode(text) call(RUST_G, "url_decode")(text)
#define rustg_url_encode(text) LIBCALL(RUST_G, "url_encode")(text)
#define rustg_url_decode(text) LIBCALL(RUST_G, "url_decode")(text)
#ifdef RUSTG_OVERRIDE_BUILTINS
#define url_encode(text) rustg_url_encode(text)
@@ -91,13 +91,13 @@
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
#define RUSTG_HTTP_METHOD_POST "post"
#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
#define rustg_http_request_blocking(method, url, body, headers) LIBCALL(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) LIBCALL(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) LIBCALL(RUST_G, "http_check_request")(req_id)
#define rustg_sql_connect_pool(options) call(RUST_G, "sql_connect_pool")(options)
#define rustg_sql_query_async(handle, query, params) call(RUST_G, "sql_query_async")(handle, query, params)
#define rustg_sql_query_blocking(handle, query, params) call(RUST_G, "sql_query_blocking")(handle, query, params)
#define rustg_sql_connected(handle) call(RUST_G, "sql_connected")(handle)
#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")
#define rustg_sql_connect_pool(options) LIBCALL(RUST_G, "sql_connect_pool")(options)
#define rustg_sql_query_async(handle, query, params) LIBCALL(RUST_G, "sql_query_async")(handle, query, params)
#define rustg_sql_query_blocking(handle, query, params) LIBCALL(RUST_G, "sql_query_blocking")(handle, query, params)
#define rustg_sql_connected(handle) LIBCALL(RUST_G, "sql_connected")(handle)
#define rustg_sql_disconnect_pool(handle) LIBCALL(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) LIBCALL(RUST_G, "sql_check_query")("[job_id]")
+33
View File
@@ -0,0 +1,33 @@
/// Define that just has the current in-universe year for use in whatever context you might want to display that in. (For example, 2022 -> 2562 given a 540 year offset)
#define CURRENT_STATION_YEAR (GLOB.year_integer + STATION_YEAR_OFFSET)
/// In-universe, SS13 is set 300 years in the future from the real-world day, hence this number for determining the year-offset for the in-game year.
#define STATION_YEAR_OFFSET 300
#define MILISECOND * 0.01
#define MILLISECONDS * 0.01
#define DECISECONDS *1 //the base unit all of these defines are scaled by, because byond uses that as a unit of measurement for some reason
#define SECOND *10
#define SECONDS *10
#define MINUTE *600
#define MINUTES *600
#define HOUR *36000
#define HOURS *36000
#define DAY *864000
#define DAYS *864000
#define TICK *world.tick_lag
#define TICKS *world.tick_lag
#define DS2TICKS(DS) ((DS)/world.tick_lag)
#define TICKS2DS(T) ((T) TICKS)
#define MS2DS(T) ((T) MILLISECONDS)
#define DS2MS(T) ((T) * 100)
+2
View File
@@ -0,0 +1,2 @@
GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
+3 -3
View File
@@ -206,7 +206,7 @@ GLOBAL_LIST_EMPTY(mannequins)
GLOB.all_species[S.name] = S
//Shakey shakey shake
sortTim(GLOB.all_species, /proc/cmp_species, associative = TRUE)
sortTim(GLOB.all_species, GLOBAL_PROC_REF(cmp_species), associative = TRUE)
//Split up the rest
for(var/speciesname in GLOB.all_species)
@@ -238,7 +238,7 @@ GLOBAL_LIST_EMPTY(mannequins)
for(var/oretype in paths)
var/ore/OD = new oretype()
GLOB.ore_data[OD.name] = OD
paths = subtypesof(/datum/alloy)
for(var/alloytype in paths)
GLOB.alloy_data += new alloytype()
@@ -310,7 +310,7 @@ GLOBAL_LIST_EMPTY(mannequins)
/proc/init_crafting_recipes(list/crafting_recipes)
for(var/path in subtypesof(/datum/crafting_recipe))
var/datum/crafting_recipe/recipe = new path()
recipe.reqs = sortList(recipe.reqs, /proc/cmp_crafting_req_priority)
recipe.reqs = sortList(recipe.reqs, GLOBAL_PROC_REF(cmp_crafting_req_priority))
crafting_recipes += recipe
return crafting_recipes
/* // Uncomment to debug chemical reaction list.
+1 -1
View File
@@ -540,7 +540,7 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
all_traits[path] = instance
// Shakey shakey shake
sortTim(all_traits, /proc/cmp_trait_datums_name, associative = TRUE)
sortTim(all_traits, GLOBAL_PROC_REF(cmp_trait_datums_name), associative = TRUE)
// Split 'em up
for(var/traitpath in all_traits)
+2 -2
View File
@@ -215,7 +215,7 @@
break
layers[current] = current_layer
//sortTim(layers, /proc/cmp_image_layer_asc)
//sortTim(layers, GLOBAL_PROC_REF(cmp_image_layer_asc))
var/icon/add // Icon of overlay being added
@@ -386,7 +386,7 @@ GLOBAL_LIST_EMPTY(cached_examine_icons)
/proc/set_cached_examine_icon(var/atom/A, var/icon/I, var/expiry = 12000)
GLOB.cached_examine_icons[WEAKREF(A)] = I
if(expiry)
addtimer(CALLBACK(GLOBAL_PROC, .proc/uncache_examine_icon, WEAKREF(A)), expiry, TIMER_UNIQUE)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(uncache_examine_icon), WEAKREF(A)), expiry, TIMER_UNIQUE)
/proc/get_cached_examine_icon(var/atom/A)
var/datum/weakref/WR = WEAKREF(A)
-24
View File
@@ -1,32 +1,8 @@
#define MILISECOND * 0.01
#define MILLISECONDS * 0.01
#define SECOND *10
#define SECONDS *10
#define MINUTE *600
#define MINUTES *600
#define HOUR *36000
#define HOURS *36000
#define DAY *864000
#define DAYS *864000
#define TimeOfGame (get_game_time())
#define TimeOfTick (TICK_USAGE*0.01*world.tick_lag)
#define TICK *world.tick_lag
#define TICKS *world.tick_lag
#define DS2TICKS(DS) ((DS)/world.tick_lag) // Convert deciseconds to ticks
#define TICKS2DS(T) ((T) TICKS) // Convert ticks to deciseconds
#define DS2NEARESTTICK(DS) TICKS2DS(-round(-(DS2TICKS(DS))))
#define MS2DS(T) ((T) MILLISECONDS)
#define DS2MS(T) ((T) * 100)
var/world_startup_time
/proc/get_game_time()
+3 -3
View File
@@ -626,7 +626,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Returns: all the areas in the world, sorted.
/proc/return_sorted_areas()
return sortTim(return_areas(), /proc/cmp_text_asc)
return sortTim(return_areas(), GLOBAL_PROC_REF(cmp_text_asc))
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all turfs in areas of that type of that type in the world.
@@ -1350,9 +1350,9 @@ var/mob/dview/dview_mob = new
//datum may be null, but it does need to be a typed var
#define NAMEOF(datum, X) (#X || ##datum.##X)
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, /proc/___callbackvarset, ##target, ##var_name, ##var_value)
#define VARSET_LIST_CALLBACK(target, var_name, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##target, ##var_name, ##var_value)
//dupe code because dm can't handle 3 level deep macros
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, /proc/___callbackvarset, ##datum, NAMEOF(##datum, ##var), ##var_value)
#define VARSET_CALLBACK(datum, var, var_value) CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(___callbackvarset), ##datum, NAMEOF(##datum, ##var), ##var_value)
//we'll see about those 3-level deep macros
#define VARSET_IN(datum, var, var_value, time) addtimer(VARSET_CALLBACK(datum, var, var_value), time)
+1 -1
View File
@@ -302,7 +302,7 @@ GLOBAL_LIST_INIT(master_filter_info, list(
/atom/proc/update_filters()
filters = null
filter_data = sortTim(filter_data, /proc/cmp_filter_data_priority, TRUE)
filter_data = sortTim(filter_data, GLOBAL_PROC_REF(cmp_filter_data_priority), TRUE)
for(var/f in filter_data)
var/list/data = filter_data[f]
var/list/arguments = data.Copy()
+2 -2
View File
@@ -21,7 +21,7 @@
if(!Adjacent(usr) || !over.Adjacent(usr))
return // should stop you from dragging through windows
INVOKE_ASYNC(over, /atom/.proc/MouseDrop_T, src, usr, src_location, over_location, src_control, over_control, params)
INVOKE_ASYNC(over, TYPE_PROC_REF(/atom, MouseDrop_T), src, usr, src_location, over_location, src_control, over_control, params)
/atom/proc/MouseDrop_T(atom/dropping, mob/user, src_location, over_location, src_control, over_control, params)
return
return
+2 -2
View File
@@ -53,7 +53,7 @@
animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING)
if(alert.timeout)
addtimer(CALLBACK(src, .proc/alert_timeout, alert, category), alert.timeout)
addtimer(CALLBACK(src, PROC_REF(alert_timeout), alert, category), alert.timeout)
alert.timeout = world.time + alert.timeout - world.tick_lag
return alert
@@ -436,7 +436,7 @@ so as to remain in compliance with the most up-to-date laws."
if(alert.icon_state in cached_icon_states(ui_style))
alert.icon = ui_style
else if(!alert.no_underlay)
var/image/I = image(icon = ui_style, icon_state = "template")
I.color = ui_color
+6 -6
View File
@@ -68,7 +68,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
qdel(Master)
else
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
sortTim(subsytem_types, /proc/cmp_subsystem_init)
sortTim(subsytem_types, GLOBAL_PROC_REF(cmp_subsystem_init))
for(var/I in subsytem_types)
_subsystems += new I
Master = src
@@ -83,7 +83,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/datum/controller/master/Shutdown()
processing = FALSE
sortTim(subsystems, /proc/cmp_subsystem_init)
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
reverseRange(subsystems)
for(var/datum/controller/subsystem/ss in subsystems)
log_world("Shutting down [ss.name] subsystem...")
@@ -173,7 +173,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
to_chat(world, "<span class='boldannounce'>MC: Initializing subsystems...</span>")
// Sort subsystems by init_order, so they initialize in the correct order.
sortTim(subsystems, /proc/cmp_subsystem_init)
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_init))
var/start_timeofday = REALTIMEOFDAY
// Initialize subsystems.
@@ -196,7 +196,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
GLOB.revdata = new // It can load revdata now, from tgs or .git or whatever
// Sort subsystems by display setting for easy access.
sortTim(subsystems, /proc/cmp_subsystem_display)
sortTim(subsystems, GLOBAL_PROC_REF(cmp_subsystem_display))
// Set world options.
#ifdef UNIT_TEST
world.sleep_offline = 0
@@ -276,9 +276,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
queue_tail = null
//these sort by lower priorities first to reduce the number of loops needed to add subsequent SS's to the queue
//(higher subsystems will be sooner in the queue, adding them later in the loop means we don't have to loop thru them next queue add)
sortTim(tickersubsystems, /proc/cmp_subsystem_priority)
sortTim(tickersubsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
for(var/I in runlevel_sorted_subsystems)
sortTim(runlevel_sorted_subsystems, /proc/cmp_subsystem_priority)
sortTim(runlevel_sorted_subsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
I += tickersubsystems
var/cached_runlevel = current_runlevel
+2 -2
View File
@@ -14,5 +14,5 @@ SUBSYSTEM_DEF(assets)
preload = cache.Copy() //don't preload assets generated during the round
for(var/client/C in GLOB.clients)
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10)
return ..()
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(getFilesSlow), C, preload, FALSE), 10)
return ..()
+5 -5
View File
@@ -37,11 +37,11 @@ SUBSYSTEM_DEF(job)
if(LAZYLEN(job.departments))
add_to_departments(job)
sortTim(occupations, /proc/cmp_job_datums)
sortTim(occupations, GLOBAL_PROC_REF(cmp_job_datums))
for(var/D in department_datums)
var/datum/department/dept = department_datums[D]
sortTim(dept.jobs, /proc/cmp_job_datums, TRUE)
sortTim(dept.primary_jobs, /proc/cmp_job_datums, TRUE)
sortTim(dept.jobs, GLOBAL_PROC_REF(cmp_job_datums), TRUE)
sortTim(dept.primary_jobs, GLOBAL_PROC_REF(cmp_job_datums), TRUE)
return TRUE
@@ -69,7 +69,7 @@ SUBSYSTEM_DEF(job)
var/datum/department/D = new t()
department_datums[D.name] = D
sortTim(department_datums, /proc/cmp_department_datums, TRUE)
sortTim(department_datums, GLOBAL_PROC_REF(cmp_department_datums), TRUE)
/datum/controller/subsystem/job/proc/get_all_department_datums()
var/list/dept_datums = list()
@@ -140,4 +140,4 @@ SUBSYSTEM_DEF(job)
/datum/controller/subsystem/job/proc/job_debug_message(message)
if(debug_messages)
log_debug("JOB DEBUG: [message]")
log_debug("JOB DEBUG: [message]")
+42 -16
View File
@@ -30,60 +30,86 @@ SUBSYSTEM_DEF(lighting)
MC_SPLIT_TICK_INIT(3)
if(!init_tick_checks)
MC_SPLIT_TICK
var/list/queue = sources_queue
var/i = 0
for (i in 1 to length(queue))
var/datum/light_source/L = queue[i]
// UPDATE SOURCE QUEUE
queue = sources_queue
while(i < length(queue)) //we don't use for loop here because i cannot be changed during an iteration
i += 1
var/datum/light_source/L = queue[i]
L.update_corners()
L.needs_update = LIGHTING_NO_UPDATE
if(!QDELETED(L))
L.needs_update = LIGHTING_NO_UPDATE
else
i -= 1 // update_corners() has removed L from the list, move back so we don't overflow or skip the next element
// We unroll TICK_CHECK here so we can clear out the queue to ensure any removals/additions when sleeping don't fuck us
if(init_tick_checks)
CHECK_TICK
if(!TICK_CHECK)
continue
queue.Cut(1, i + 1)
i = 0
stoplag()
else if (MC_TICK_CHECK)
break
if (i)
queue.Cut(1, i+1)
queue.Cut(1, i + 1)
i = 0
if(!init_tick_checks)
MC_SPLIT_TICK
// UPDATE CORNERS QUEUE
queue = corners_queue
for (i in 1 to length(queue))
var/datum/lighting_corner/C = queue[i]
while(i < length(queue)) //we don't use for loop here because i cannot be changed during an iteration
i += 1
var/datum/lighting_corner/C = queue[i]
C.needs_update = FALSE //update_objects() can call qdel if the corner is storing no data
C.update_objects()
// We unroll TICK_CHECK here so we can clear out the queue to ensure any removals/additions when sleeping don't fuck us
if(init_tick_checks)
CHECK_TICK
if(!TICK_CHECK)
continue
queue.Cut(1, i + 1)
i = 0
stoplag()
else if (MC_TICK_CHECK)
break
if (i)
queue.Cut(1, i+1)
queue.Cut(1, i + 1)
i = 0
if(!init_tick_checks)
MC_SPLIT_TICK
// UPDATE OBJECTS QUEUE
queue = objects_queue
for (i in 1 to length(queue))
var/datum/lighting_object/O = queue[i]
while(i < length(queue)) //we don't use for loop here because i cannot be changed during an iteration
i += 1
var/datum/lighting_object/O = queue[i]
if (QDELETED(O))
continue
O.update()
O.needs_update = FALSE
// We unroll TICK_CHECK here so we can clear out the queue to ensure any removals/additions when sleeping don't fuck us
if(init_tick_checks)
CHECK_TICK
if(!TICK_CHECK)
continue
queue.Cut(1, i + 1)
i = 0
stoplag()
else if (MC_TICK_CHECK)
break
if (i)
queue.Cut(1, i+1)
queue.Cut(1, i + 1)
/datum/controller/subsystem/lighting/Recover()
+26 -26
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(media_tracks)
name = "Media Tracks"
flags = SS_NO_FIRE
init_order = INIT_ORDER_MEDIA_TRACKS
/// Every track, including secret
var/list/all_tracks = list()
/// Non-secret jukebox tracks
@@ -18,19 +18,19 @@ SUBSYSTEM_DEF(media_tracks)
/datum/controller/subsystem/media_tracks/proc/load_tracks()
for(var/filename in config.jukebox_track_files)
report_progress("Loading jukebox track: [filename]")
if(!fexists(filename))
error("File not found: [filename]")
continue
var/list/jsonData = json_decode(file2text(filename))
if(!istype(jsonData))
error("Failed to read tracks from [filename], json_decode failed.")
continue
for(var/entry in jsonData)
// Critical problems that will prevent the track from working
if(!istext(entry["url"]))
error("Jukebox entry in [filename]: bad or missing 'url'. Tracks must have a URL.")
@@ -47,21 +47,21 @@ SUBSYSTEM_DEF(media_tracks)
warning("Jukebox entry in [filename], [entry["title"]]: bad or missing 'artist'. Please consider crediting the artist.")
if(!istext(entry["genre"]))
warning("Jukebox entry in [filename], [entry["title"]]: bad or missing 'genre'. Please consider adding a genre.")
var/datum/track/T = new(entry["url"], entry["title"], entry["duration"], entry["artist"], entry["genre"])
T.secret = entry["secret"] ? 1 : 0
T.lobby = entry["lobby"] ? 1 : 0
all_tracks += T
/datum/controller/subsystem/media_tracks/proc/sort_tracks()
report_progress("Sorting media tracks...")
sortTim(all_tracks, /proc/cmp_media_track_asc)
sortTim(all_tracks, GLOBAL_PROC_REF(cmp_media_track_asc))
jukebox_tracks.Cut()
lobby_tracks.Cut()
for(var/datum/track/T in all_tracks)
if(!T.secret)
jukebox_tracks += T
@@ -72,7 +72,7 @@ SUBSYSTEM_DEF(media_tracks)
var/client/C = usr.client
if(!check_rights(R_DEBUG|R_FUN))
return
// Required
var/url = tgui_input_text(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL", multiline = TRUE)
if(!url)
@@ -95,7 +95,7 @@ SUBSYSTEM_DEF(media_tracks)
* "secret": only on hacked jukeboxes (true/false)
* "lobby": plays in the lobby (true/false)
*/
if(islist(json))
for(var/song in json)
if(!islist(song))
@@ -104,18 +104,18 @@ SUBSYSTEM_DEF(media_tracks)
var/list/songdata = song
if(!songdata["url"] || !songdata["title"] || !songdata["duration"])
to_chat(C, "<span class='warning'>URL, Title, or Duration was missing from a song. Skipping.</span>")
continue
continue
var/datum/track/T = new(songdata["url"], songdata["title"], songdata["duration"], songdata["artist"], songdata["genre"], songdata["secret"], songdata["lobby"])
all_tracks += T
report_progress("New media track added by [C]: [T.title]")
sort_tracks()
return
var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
@@ -124,11 +124,11 @@ SUBSYSTEM_DEF(media_tracks)
var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
var/genre = tgui_input_text(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre")
if(isnull(genre)) // Cancel rather than empty string
return
var/secret = tgui_alert(C, "Optional: Mark track as secret?", "Track Secret", list("Yes", "Cancel", "No"))
if(secret == "Cancel")
return
@@ -136,7 +136,7 @@ SUBSYSTEM_DEF(media_tracks)
secret = TRUE
else
secret = FALSE
var/lobby = tgui_alert(C, "Optional: Mark track as lobby music?", "Track Lobby", list("Yes", "Cancel", "No"))
if(lobby == "Cancel")
return
@@ -146,12 +146,12 @@ SUBSYSTEM_DEF(media_tracks)
secret = FALSE
var/datum/track/T = new(url, title, duration, artist, genre)
T.secret = secret
T.lobby = lobby
all_tracks += T
report_progress("New media track added by [C]: [title]")
sort_tracks()
@@ -163,7 +163,7 @@ SUBSYSTEM_DEF(media_tracks)
var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
for(var/datum/track/T in all_tracks)
if(T.title == track || T.url == track)
all_tracks -= T
@@ -171,7 +171,7 @@ SUBSYSTEM_DEF(media_tracks)
report_progress("Media track removed by [C]: [track]")
sort_tracks()
return
to_chat(C, "<span class='warning>Couldn't find a track matching the specified parameters.</span>")
/datum/controller/subsystem/media_tracks/vv_get_dropdown()
+2 -1
View File
@@ -27,6 +27,7 @@ SUBSYSTEM_DEF(tgui)
var/polyfill = file2text('tgui/public/tgui-polyfill.min.js')
polyfill = "<script>\n[polyfill]\n</script>"
basehtml = replacetextEx(basehtml, "<!-- tgui:inline-polyfill -->", polyfill)
basehtml = replacetextEx(basehtml, "<!-- tgui:nt-copyright -->", "Nanotrasen (c) 2284-[CURRENT_STATION_YEAR]")
/datum/controller/subsystem/tgui/Shutdown()
close_all_uis()
@@ -344,4 +345,4 @@ SUBSYSTEM_DEF(tgui)
target.tgui_open_uis.Add(ui)
// Clear the old list.
source.tgui_open_uis.Cut()
return TRUE
return TRUE
+1 -1
View File
@@ -220,7 +220,7 @@ var/global/datum/controller/subsystem/ticker/ticker
end_game_state = END_GAME_READY_TO_END
current_state = GAME_STATE_FINISHED
Master.SetRunLevel(RUNLEVEL_POSTGAME)
INVOKE_ASYNC(src, .proc/declare_completion)
INVOKE_ASYNC(src, PROC_REF(declare_completion))
else if (mode_finished && (end_game_state < END_GAME_MODE_FINISHED))
end_game_state = END_GAME_MODE_FINISHED // Only do this cleanup once!
mode.cleanup()
+2 -2
View File
@@ -256,7 +256,7 @@ SUBSYSTEM_DEF(timer)
if (!length(alltimers))
return
sortTim(alltimers, /proc/cmp_timer)
sortTim(alltimers, GLOBAL_PROC_REF(cmp_timer))
var/datum/timedevent/head = alltimers[1]
@@ -516,4 +516,4 @@ SUBSYSTEM_DEF(timer)
#undef BUCKET_LEN
#undef BUCKET_POS
#undef TIMER_MAX
#undef TIMER_ID_MAX
#undef TIMER_ID_MAX
+1 -1
View File
@@ -290,7 +290,7 @@
winset(user, "mapwindow", "focus=true")
break
if (timeout)
addtimer(CALLBACK(src, .proc/close), timeout)
addtimer(CALLBACK(src, PROC_REF(close)), timeout)
/datum/browser/modal/proc/wait()
while (opentime && selectedbutton <= 0 && (!timeout || opentime+timeout > world.time))
+7 -7
View File
@@ -34,7 +34,7 @@ var/list/runechat_image_cache = list()
var/image/emote_image = image('icons/UI_Icons/chat/chat_icons.dmi', icon_state = "emote")
runechat_image_cache["emote"] = emote_image
return TRUE
/datum/chatmessage
@@ -99,10 +99,10 @@ var/list/runechat_image_cache = list()
if(!target || !owner)
qdel(src)
return
// Register client who owns this message
owned_by = owner.client
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/qdel_self)
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, PROC_REF(qdel_self))
var/extra_length = owned_by.is_preference_enabled(/datum/client_preference/runechat_long_messages)
var/maxlen = extra_length ? CHAT_MESSAGE_EXT_LENGTH : CHAT_MESSAGE_LENGTH
@@ -147,10 +147,10 @@ var/list/runechat_image_cache = list()
// Icon on both ends?
//var/image/I = runechat_image_cache["emote"]
//text = "\icon[I][text]\icon[I]"
// Icon on one end?
//LAZYADD(prefixes, "\icon[runechat_image_cache["emote"]]")
// Asterisks instead?
text = "*&nbsp;[text]&nbsp;*"
@@ -168,7 +168,7 @@ var/list/runechat_image_cache = list()
// Translate any existing messages upwards, apply exponential decay factors to timers
message_loc = target.runechat_holder(src)
RegisterSignal(message_loc, COMSIG_PARENT_QDELETING, .proc/qdel_self)
RegisterSignal(message_loc, COMSIG_PARENT_QDELETING, PROC_REF(qdel_self))
if(owned_by.seen_messages)
var/idx = 1
var/combined_height = approx_lines
@@ -255,7 +255,7 @@ var/list/runechat_image_cache = list()
if(!message)
return
*/
var/list/extra_classes = list()
extra_classes += existing_extra_classes
+16 -16
View File
@@ -1,6 +1,6 @@
/datum/component/personal_crafting/Initialize()
if(ismob(parent))
RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, .proc/create_mob_button)
RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, PROC_REF(create_mob_button))
/datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL)
// SIGNAL_HANDLER
@@ -12,7 +12,7 @@
C.alpha = H.ui_alpha
LAZYADD(H.other_important, C)
CL.screen += C
RegisterSignal(C, COMSIG_CLICK, .proc/component_ui_interact)
RegisterSignal(C, COMSIG_CLICK, PROC_REF(component_ui_interact))
/datum/component/personal_crafting
var/busy
@@ -279,28 +279,28 @@
if(amt <= 0)//since machinery can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
continue
// If the path is in R.parts, we want to grab those to stuff into the product
// If the path is in R.parts, we want to grab those to stuff into the product
var/amt_to_transfer = 0
if(is_path_in_list(path_key, R.parts))
amt_to_transfer = R.parts[path_key]
// Reagent: gotta go sniffing in all the beakers
if(ispath(path_key, /datum/reagent))
var/datum/reagent/reagent = path_key
var/id = initial(reagent.id)
for(var/obj/item/weapon/reagent_containers/RC in surroundings)
for(var/obj/item/weapon/reagent_containers/RC in surroundings)
// Found everything we need
if(amt <= 0 && amt_to_transfer <= 0)
break
break
// If we need to keep any to put in the new object, pull it out
if(amt_to_transfer > 0)
var/A = RC.reagents.trans_id_to(parts["reagents"], id, amt_to_transfer)
amt_to_transfer -= A
amt -= A
// If we need to consume some amount of it
if(amt > 0)
var/datum/reagent/RG = RC.reagents.get_reagent(id)
@@ -322,27 +322,27 @@
parts["items"] += split
amt_to_transfer -= split.get_amount()
amt -= split.get_amount()
if(amt > 0)
var/A = min(amt, S.get_amount())
if(S.use(A))
amt -= A
else // Just a regular item. Find them all and delete them
for(var/atom/movable/I in surroundings)
if(amt <= 0 && amt_to_transfer <= 0)
break
if(!istype(I, path_key))
continue
// Special case: the reagents may be needed for other recipes
if(istype(I, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RC = I
if(RC.reagents.total_volume > 0)
continue
// We're using it for something
amt--
@@ -351,7 +351,7 @@
parts["items"] += I
amt_to_transfer--
continue
// Snowflake handling of reagent containers and storage atoms.
// If we consumed them in our crafting, we should dump their contents out before qdeling them.
if(istype(I, /obj/item/weapon/reagent_containers))
@@ -369,7 +369,7 @@
// SIGNAL_HANDLER
if(user == parent)
INVOKE_ASYNC(src, .proc/tgui_interact, user)
INVOKE_ASYNC(src, PROC_REF(tgui_interact), user)
/datum/component/personal_crafting/tgui_state(mob/user)
return GLOB.tgui_not_incapacitated_turf_state
@@ -499,7 +499,7 @@
//Also these are typepaths so sadly we can't just do "[a]"
L += "[req[req_atom]] [initial(req_atom.name)]"
req_text += L.Join(" OR ")
for(var/obj/machinery/content as anything in R.machinery)
req_text += "[R.reqs[content]] [initial(content.name)]"
if(R.additional_req_text)
@@ -530,4 +530,4 @@
name = "crafting menu"
icon = 'icons/mob/screen/midnight.dmi'
icon_state = "craft"
screen_loc = ui_smallquad
screen_loc = ui_smallquad
+4 -4
View File
@@ -76,9 +76,9 @@
. = ..()
if(!(mat_container_flags & MATCONTAINER_NO_INSERT))
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/on_attackby)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_attackby))
if(mat_container_flags & MATCONTAINER_EXAMINE)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
/datum/component/material_container/vv_edit_var(var_name, var_value)
@@ -86,12 +86,12 @@
. = ..()
if(var_name == NAMEOF(src, mat_container_flags) && parent)
if(!(old_flags & MATCONTAINER_EXAMINE) && mat_container_flags & MATCONTAINER_EXAMINE)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
else if(old_flags & MATCONTAINER_EXAMINE && !(mat_container_flags & MATCONTAINER_EXAMINE))
UnregisterSignal(parent, COMSIG_PARENT_EXAMINE)
if(old_flags & MATCONTAINER_NO_INSERT && !(mat_container_flags & MATCONTAINER_NO_INSERT))
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/on_attackby)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_attackby))
else if(!(old_flags & MATCONTAINER_NO_INSERT) && mat_container_flags & MATCONTAINER_NO_INSERT)
UnregisterSignal(parent, COMSIG_PARENT_ATTACKBY)
+31 -31
View File
@@ -111,15 +111,15 @@
/datum/component/overlay_lighting/RegisterWithParent()
. = ..()
if(directional)
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/on_parent_dir_change)
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/on_parent_moved)
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_RANGE, .proc/set_range)
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_POWER, .proc/set_power)
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_COLOR, .proc/set_color)
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_ON, .proc/on_toggle)
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_FLAGS, .proc/on_light_flags_change)
RegisterSignal(parent, COMSIG_ATOM_USED_IN_CRAFT, .proc/on_parent_crafted)
RegisterSignal(parent, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_parent_dir_change))
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_parent_moved))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_RANGE, PROC_REF(set_range))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_POWER, PROC_REF(set_power))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_COLOR, PROC_REF(set_color))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_ON, PROC_REF(on_toggle))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_LIGHT_FLAGS, PROC_REF(on_light_flags_change))
RegisterSignal(parent, COMSIG_ATOM_USED_IN_CRAFT, PROC_REF(on_parent_crafted))
RegisterSignal(parent, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
var/atom/movable/movable_parent = parent
if(movable_parent.light_flags & LIGHT_ATTACHED)
overlay_lighting_flags |= LIGHTING_ATTACHED
@@ -155,17 +155,17 @@
set_parent_attached_to(null)
set_holder(null)
clean_old_turfs()
qdel(visible_mask, TRUE)
visible_mask = null
if(directional)
qdel(directional_atom, TRUE)
directional_atom = null
qdel(cone, TRUE)
cone = null
return ..()
@@ -229,15 +229,15 @@
var/atom/movable/old_parent_attached_to = .
UnregisterSignal(old_parent_attached_to, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED, COMSIG_LIGHT_EATER_QUEUE))
if(old_parent_attached_to == current_holder)
RegisterSignal(old_parent_attached_to, COMSIG_PARENT_QDELETING, .proc/on_holder_qdel)
RegisterSignal(old_parent_attached_to, COMSIG_MOVABLE_MOVED, .proc/on_holder_moved)
RegisterSignal(old_parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
RegisterSignal(old_parent_attached_to, COMSIG_PARENT_QDELETING, PROC_REF(on_holder_qdel))
RegisterSignal(old_parent_attached_to, COMSIG_MOVABLE_MOVED, PROC_REF(on_holder_moved))
RegisterSignal(old_parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
if(parent_attached_to)
if(parent_attached_to == current_holder)
UnregisterSignal(current_holder, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED, COMSIG_LIGHT_EATER_QUEUE))
RegisterSignal(parent_attached_to, COMSIG_PARENT_QDELETING, .proc/on_parent_attached_to_qdel)
RegisterSignal(parent_attached_to, COMSIG_MOVABLE_MOVED, .proc/on_parent_attached_to_moved)
RegisterSignal(parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
RegisterSignal(parent_attached_to, COMSIG_PARENT_QDELETING, PROC_REF(on_parent_attached_to_qdel))
RegisterSignal(parent_attached_to, COMSIG_MOVABLE_MOVED, PROC_REF(on_parent_attached_to_moved))
RegisterSignal(parent_attached_to, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
check_holder()
@@ -257,11 +257,11 @@
clean_old_turfs()
return
if(new_holder != parent && new_holder != parent_attached_to)
RegisterSignal(new_holder, COMSIG_PARENT_QDELETING, .proc/on_holder_qdel)
RegisterSignal(new_holder, COMSIG_MOVABLE_MOVED, .proc/on_holder_moved)
RegisterSignal(new_holder, COMSIG_LIGHT_EATER_QUEUE, .proc/on_light_eater)
RegisterSignal(new_holder, COMSIG_PARENT_QDELETING, PROC_REF(on_holder_qdel))
RegisterSignal(new_holder, COMSIG_MOVABLE_MOVED, PROC_REF(on_holder_moved))
RegisterSignal(new_holder, COMSIG_LIGHT_EATER_QUEUE, PROC_REF(on_light_eater))
if(directional)
RegisterSignal(new_holder, COMSIG_ATOM_DIR_CHANGE, .proc/on_holder_dir_change)
RegisterSignal(new_holder, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_holder_dir_change))
if(overlay_lighting_flags & LIGHTING_ON)
make_luminosity_update()
add_dynamic_lumi()
@@ -444,7 +444,7 @@
if(final_distance > SHORT_CAST && !(ALL_CARDINALS & current_direction))
final_distance -= 1
var/turf/scanning = get_turf(current_holder)
. = 0
for(var/i in 1 to final_distance)
var/turf/next_turf = get_step(scanning, current_direction)
@@ -464,7 +464,7 @@
if(final_distance > SHORT_CAST && !(ALL_CARDINALS & get_dir(GET_PARENT, target)))
final_distance -= 1
var/turf/scanning = get_turf(GET_PARENT)
. = 0
for(var/i in 1 to final_distance)
var/next_dir = get_dir(scanning, target)
@@ -477,9 +477,9 @@
directional_atom.forceMove(scanning)
var/turf/Ts = get_turf(GET_PARENT)
var/turf/To = get_turf(GET_LIGHT_SOURCE)
var/angle = Get_Angle(Ts, To)
directional_atom.face_light(GET_PARENT, angle, .)
set_cone_direction(NORTH, angle)
@@ -510,7 +510,7 @@
return
current_direction = newdir
set_cone_direction(newdir)
if(newdir & NORTH)
cone.pixel_y = 16
else if(newdir & SOUTH)
@@ -522,7 +522,7 @@
else
cone.pixel_y = 0
directional_atom.pixel_y = 0
if(newdir & EAST)
cone.pixel_x = 16
else if(newdir & WEST)
@@ -538,7 +538,7 @@
else
cone.pixel_x = 0
directional_atom.pixel_x = 0
if(!skip_update && (overlay_lighting_flags & LIGHTING_ON))
make_luminosity_update()
@@ -549,7 +549,7 @@
return
UnregisterSignal(parent, COMSIG_ATOM_USED_IN_CRAFT)
RegisterSignal(new_craft, COMSIG_ATOM_USED_IN_CRAFT, .proc/on_parent_crafted)
RegisterSignal(new_craft, COMSIG_ATOM_USED_IN_CRAFT, PROC_REF(on_parent_crafted))
set_parent_attached_to(new_craft)
/// Handles putting the source for overlay lights into the light eater queue since we aren't tracked by [/atom/var/light_sources]
+2 -2
View File
@@ -6,7 +6,7 @@
/datum/component/resize_guard/RegisterWithParent()
// When our parent mob enters any atom, we check resize
RegisterSignal(parent, COMSIG_ATOM_ENTERING, .proc/check_resize)
RegisterSignal(parent, COMSIG_ATOM_ENTERING, PROC_REF(check_resize))
/datum/component/resize_guard/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_ATOM_ENTERING)
@@ -16,4 +16,4 @@
if(A?.limit_mob_size)
var/mob/living/L = parent
L.resize(L.size_multiplier)
qdel(src)
qdel(src)
+2 -2
View File
@@ -63,11 +63,11 @@
if(!check_rights(NONE))
return
var/list/names = list()
var/list/componentsubtypes = sortTim(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
var/list/componentsubtypes = sortTim(subtypesof(/datum/component), GLOBAL_PROC_REF(cmp_typepaths_asc))
names += "---Components---"
names += componentsubtypes
names += "---Elements---"
names += sortTim(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
names += sortTim(subtypesof(/datum/element), GLOBAL_PROC_REF(cmp_typepaths_asc))
var/result = tgui_input_list(usr, "Choose a component/element to add:", "Add Component/Element", names)
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
+1 -1
View File
@@ -23,7 +23,7 @@
return ELEMENT_INCOMPATIBLE
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
if(element_flags & ELEMENT_DETACH)
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/OnTargetDelete, override = TRUE)
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(OnTargetDelete), override = TRUE)
/datum/element/proc/OnTargetDelete(datum/source, force)
SIGNAL_HANDLER
+2 -2
View File
@@ -18,7 +18,7 @@
CRASH("Invalid ID in conflict checking element.")
if(isnull(src.id))
src.id = id
RegisterSignal(target, COMSIG_CONFLICT_ELEMENT_CHECK, .proc/check)
RegisterSignal(target, COMSIG_CONFLICT_ELEMENT_CHECK, PROC_REF(check))
/datum/element/conflict_checking/proc/check(datum/source, id_to_check)
if(id == id_to_check)
@@ -32,4 +32,4 @@
for(var/i in GetAllContents())
var/atom/movable/AM = i
if(SEND_SIGNAL(AM, COMSIG_CONFLICT_ELEMENT_CHECK, id) & ELEMENT_CONFLICT_FOUND)
++.
++.
+1 -1
View File
@@ -9,7 +9,7 @@
. = ..()
if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/on_target_move)
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(on_target_move))
var/atom/movable/movable_target = target
if(isturf(movable_target.loc))
var/turf/turf_loc = movable_target.loc
+6 -6
View File
@@ -14,8 +14,8 @@
our_turf.plane = OPENSPACE_PLANE
our_turf.layer = OPENSPACE_LAYER
RegisterSignal(target, COMSIG_TURF_MULTIZ_DEL, .proc/on_multiz_turf_del, override = TRUE)
RegisterSignal(target, COMSIG_TURF_MULTIZ_NEW, .proc/on_multiz_turf_new, override = TRUE)
RegisterSignal(target, COMSIG_TURF_MULTIZ_DEL, PROC_REF(on_multiz_turf_del), override = TRUE)
RegisterSignal(target, COMSIG_TURF_MULTIZ_NEW, PROC_REF(on_multiz_turf_new), override = TRUE)
update_multiz(our_turf, TRUE, TRUE)
@@ -75,12 +75,12 @@
if(!ispath(path))
warning("Z-level [our_turf] has invalid baseturf '[get_base_turf_by_area(our_turf)]' in area '[get_area(our_turf)]'")
path = /turf/space
var/do_plane = ispath(path, /turf/space) ? SPACE_PLANE : null
var/do_state = ispath(path, /turf/space) ? "white" : initial(path.icon_state)
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), do_state, layer = TURF_LAYER-0.02, plane = do_plane)
underlay_appearance.appearance_flags = RESET_ALPHA | RESET_COLOR
our_turf.underlays += underlay_appearance
return TRUE
return TRUE
+3 -2
View File
@@ -63,7 +63,7 @@
if(query_sound)
SEND_SOUND(C, sound(query_sound))
tgui_alert_async(D, question, "[role_name] request", list("Yes", "No", "Never for this round"), CALLBACK(src, .proc/get_reply), wait_time SECONDS)
tgui_alert_async(D, question, "[role_name] request", list("Yes", "No", "Never for this round"), CALLBACK(src, PROC_REF(get_reply)), wait_time SECONDS)
/// Process an async alert response
/datum/ghost_query/proc/get_reply(response)
@@ -87,7 +87,7 @@
else if(finished) // Already finished candidate list
to_chat(D, "<span class='warning'>Unfortunately, you were not fast enough, and there are no more available roles. Sorry.</span>")
else // Prompt a second time
tgui_alert_async(D, "Are you sure you want to play as a [role_name]?", "[role_name] request", list("I'm Sure", "Nevermind"), CALLBACK(src, .proc/get_reply), wait_time SECONDS)
tgui_alert_async(D, "Are you sure you want to play as a [role_name]?", "[role_name] request", list("I'm Sure", "Nevermind"), CALLBACK(src, PROC_REF(get_reply)), wait_time SECONDS)
if("I'm Sure")
if(!evaluate_candidate(D)) // Failed revalidation
@@ -214,4 +214,5 @@
and they are attempting to open the cryopod.\n \
Would you like to play as the occupant? \n \
You MUST NOT use your station character!!!"
be_special_flag = BE_SURVIVOR
cutoff_number = 1
+2 -2
View File
@@ -87,7 +87,7 @@
if(!chance || prob(chance))
play(get_sound(starttime))
if(!timerid)
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
/datum/looping_sound/proc/play(soundfile)
var/list/atoms_cache = output_atoms
@@ -119,7 +119,7 @@
if(start_sound)
play(start_sound)
start_wait = start_length
addtimer(CALLBACK(src, .proc/sound_loop), start_wait)
addtimer(CALLBACK(src, PROC_REF(sound_loop)), start_wait)
/datum/looping_sound/proc/on_stop()
if(end_sound)
+2 -2
View File
@@ -54,7 +54,7 @@
/datum/looping_sound/sequence/sound_loop(starttime)
iterate_on_sequence()
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), next_iteration_delay, TIMER_STOPPABLE)
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), next_iteration_delay, TIMER_STOPPABLE)
#define MORSE_DOT "*" // Yes this is an asterisk but its easier to see on a computer compared to a period.
#define MORSE_DASH "-"
@@ -172,4 +172,4 @@
return spaces_between_letters
#undef MORSE_DOT
#undef MORSE_DASH
#undef MORSE_DASH
+1 -1
View File
@@ -112,7 +112,7 @@
to_chat(user, "<span class='warning'>You'll need [key_name] in one of your hands to move \the [ridden].</span>")
/datum/riding/proc/Unbuckle(atom/movable/M)
// addtimer(CALLBACK(ridden, /atom/movable/.proc/unbuckle_mob, M), 0, TIMER_UNIQUE)
// addtimer(CALLBACK(ridden, TYPE_PROC_REF(/atom/movable, unbuckle_mob), M), 0, TIMER_UNIQUE)
spawn(0)
// On /tg/ this uses the fancy CALLBACK system. Not entirely sure why they needed to do so with a duration of 0,
// so if there is a reason, this should replicate it close enough. Hopefully.
+1 -1
View File
@@ -698,7 +698,7 @@
if(length(speech_bubble_hearers))
var/image/I = generate_speech_bubble(src, "[bubble_icon][say_test(message)]", FLY_LAYER)
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_hearers, 30)
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(flick_overlay), I, speech_bubble_hearers, 30)
/atom/proc/speech_bubble(bubble_state = "", bubble_loc = src, list/bubble_recipients = list())
return
+2 -2
View File
@@ -741,7 +741,7 @@
// Cooldown
injector_ready = FALSE
addtimer(CALLBACK(src, .proc/injector_cooldown_finish), 30 SECONDS)
addtimer(CALLBACK(src, PROC_REF(injector_cooldown_finish)), 30 SECONDS)
// Create it
var/datum/dna2/record/buf = buffers[buffer_id]
@@ -798,4 +798,4 @@
#undef PAGE_BUFFER
#undef PAGE_REJUVENATORS
/////////////////////////// DNA MACHINES
/////////////////////////// DNA MACHINES
+1 -1
View File
@@ -154,7 +154,7 @@
return
/obj/effect/gateway/active/Initialize()
addtimer(CALLBACK(src, .proc/spawn_and_qdel), rand(30, 60) SECONDS)
addtimer(CALLBACK(src, PROC_REF(spawn_and_qdel)), rand(30, 60) SECONDS)
/obj/effect/gateway/active/proc/spawn_and_qdel()
if(LAZYLEN(spawnable))
+2 -2
View File
@@ -34,7 +34,7 @@
if(!B || !I)
return
INVOKE_ASYNC(src, .proc/religion_prompts, H, B, I)
INVOKE_ASYNC(src, PROC_REF(religion_prompts), H, B, I)
/datum/job/chaplain/proc/religion_prompts(mob/living/carbon/human/H, obj/item/weapon/storage/bible/B, obj/item/weapon/card/id/I)
var/religion_name = "Unitarianism"
@@ -121,4 +121,4 @@
bible_name = bn
bible_icon_state = bis
bible_item_state = bits
title = t
title = t
+1 -1
View File
@@ -26,7 +26,7 @@ var/global/datum/controller/occupations/job_master
if(!job) continue
if(job.faction != faction) continue
occupations += job
sortTim(occupations, /proc/cmp_job_datums)
sortTim(occupations, GLOBAL_PROC_REF(cmp_job_datums))
return 1
@@ -48,13 +48,13 @@
"load" = scrubber.last_power_draw,
"area" = get_area(scrubber),
)))
return list("scrubbers" = working)
/obj/machinery/computer/area_atmos/tgui_act(action, params)
if(..())
return TRUE
switch(action)
if("toggle")
var/scrub_id = params["id"]
@@ -66,10 +66,10 @@
S.update_icon()
. = TRUE
if("allon")
INVOKE_ASYNC(src, .proc/toggle_all, TRUE)
INVOKE_ASYNC(src, PROC_REF(toggle_all), TRUE)
. = TRUE
if("alloff")
INVOKE_ASYNC(src, .proc/toggle_all, FALSE)
INVOKE_ASYNC(src, PROC_REF(toggle_all), FALSE)
. = TRUE
if("scan")
scanscrubbers()
@@ -78,7 +78,7 @@
add_fingerprint(usr)
/obj/machinery/computer/area_atmos/proc/toggle_all(on)
for(var/id in connectedscrubbers)
for(var/id in connectedscrubbers)
var/obj/machinery/portable_atmospherics/powered/scrubber/huge/S = connectedscrubbers["[id]"]
if(!validscrubber(S))
connectedscrubbers -= S
+1 -1
View File
@@ -30,7 +30,7 @@
var/filtertext
/obj/machinery/autolathe/Initialize()
AddComponent(/datum/component/material_container, subtypesof(/datum/material), 0, MATCONTAINER_EXAMINE, _after_insert = CALLBACK(src, .proc/AfterMaterialInsert))
AddComponent(/datum/component/material_container, subtypesof(/datum/material), 0, MATCONTAINER_EXAMINE, _after_insert = CALLBACK(src, PROC_REF(AfterMaterialInsert)))
. = ..()
if(!autolathe_recipes)
autolathe_recipes = new()
+1 -1
View File
@@ -142,7 +142,7 @@
. = TRUE
switch(action)
if("activate")
INVOKE_ASYNC(src, .proc/activate)
INVOKE_ASYNC(src, PROC_REF(activate))
return TRUE
if("detach")
if(beaker)
+1 -1
View File
@@ -348,7 +348,7 @@
printing = TRUE
// playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, TRUE)
SStgui.update_uis(src)
addtimer(CALLBACK(src, .proc/print_finish), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(print_finish)), 5 SECONDS)
else
return FALSE
+1 -1
View File
@@ -336,7 +336,7 @@
printing = TRUE
// playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, TRUE)
SStgui.update_uis(src)
addtimer(CALLBACK(src, .proc/print_finish), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(print_finish)), 5 SECONDS)
if("photo_front")
var/icon/photo = get_photo(usr)
if(photo && active1)
+1 -1
View File
@@ -251,7 +251,7 @@
printing = TRUE
// playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, TRUE)
SStgui.update_uis(src)
addtimer(CALLBACK(src, .proc/print_finish), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(print_finish)), 5 SECONDS)
else
return FALSE
+2 -2
View File
@@ -273,7 +273,7 @@
force_open()
if(autoclose && src.operating && !(stat & BROKEN || stat & NOPOWER))
addtimer(CALLBACK(src, .proc/close, 15 SECONDS))
addtimer(CALLBACK(src, PROC_REF(close), 15 SECONDS))
return 1
// Proc: close()
@@ -473,4 +473,4 @@
#undef BLAST_DOOR_CRUSH_DAMAGE
#undef SHUTTER_CRUSH_DAMAGE
#undef SHUTTER_CRUSH_DAMAGE
+2 -2
View File
@@ -94,7 +94,7 @@
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(door.density)
continue
INVOKE_ASYNC(door, /obj/machinery/door/window/brigdoor.proc/close)
INVOKE_ASYNC(door, TYPE_PROC_REF(/obj/machinery/door/window/brigdoor, close))
for(var/obj/structure/closet/secure_closet/brig/C in targets)
if(C.broken)
@@ -118,7 +118,7 @@
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(!door.density)
continue
INVOKE_ASYNC(door, /obj/machinery/door/window/brigdoor.proc/open)
INVOKE_ASYNC(door, TYPE_PROC_REF(/obj/machinery/door/window/brigdoor, open))
for(var/obj/structure/closet/secure_closet/brig/C in targets)
if(C.broken)
+1 -1
View File
@@ -10,7 +10,7 @@
/obj/machinery/door/airlock/multi_tile/Initialize(mapload)
. = ..()
SetBounds()
RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/SetBounds)
RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(SetBounds))
apply_opacity_to_my_turfs(opacity)
/obj/machinery/door/airlock/multi_tile/set_opacity()
+3 -3
View File
@@ -67,13 +67,13 @@
if(istype(bot))
if(density && src.check_access(bot.botcard))
open()
addtimer(CALLBACK(src, .proc/close), 50)
addtimer(CALLBACK(src, PROC_REF(close)), 50)
else if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant && src.allowed(mecha.occupant))
open()
addtimer(CALLBACK(src, .proc/close), 50)
addtimer(CALLBACK(src, PROC_REF(close)), 50)
return
if (!( ticker ))
return
@@ -81,7 +81,7 @@
return
if (density && allowed(AM))
open()
addtimer(CALLBACK(src, .proc/close), check_access(null)? 50 : 20)
addtimer(CALLBACK(src, PROC_REF(close)), check_access(null)? 50 : 20)
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
+2 -3
View File
@@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(holoposters)
. = ..()
set_rand_sprite()
GLOB.holoposters += src
mytimer = addtimer(CALLBACK(src, .proc/set_rand_sprite), 30 MINUTES + rand(0, 5 MINUTES), TIMER_STOPPABLE | TIMER_LOOP)
mytimer = addtimer(CALLBACK(src, PROC_REF(set_rand_sprite)), 30 MINUTES + rand(0, 5 MINUTES), TIMER_STOPPABLE | TIMER_LOOP)
/obj/machinery/holoposter/Destroy()
GLOB.holoposters -= src
@@ -92,7 +92,7 @@ GLOBAL_LIST_EMPTY(holoposters)
stat &= ~BROKEN
icon_forced = FALSE
if(!mytimer)
mytimer = addtimer(CALLBACK(src, .proc/set_rand_sprite), 30 MINUTES + rand(0, 5 MINUTES), TIMER_STOPPABLE | TIMER_LOOP)
mytimer = addtimer(CALLBACK(src, PROC_REF(set_rand_sprite)), 30 MINUTES + rand(0, 5 MINUTES), TIMER_STOPPABLE | TIMER_LOOP)
set_rand_sprite()
return
icon_forced = TRUE
@@ -114,4 +114,3 @@ GLOBAL_LIST_EMPTY(holoposters)
/obj/machinery/holoposter/emp_act()
stat |= BROKEN
update_icon()
+3 -3
View File
@@ -80,7 +80,7 @@
// Or in Destroy at all, but especially after the ..().
/obj/machinery/Destroy()
if(ismovable(loc))
GLOB.moved_event.unregister(loc, src, .proc/update_power_on_move) // Unregister just in case
GLOB.moved_event.unregister(loc, src, PROC_REF(update_power_on_move)) // Unregister just in case
var/power = POWER_CONSUMPTION
REPORT_POWER_CONSUMPTION_CHANGE(power, 0)
. = ..()
@@ -91,9 +91,9 @@
. = ..()
update_power_on_move(src, old_loc, loc)
if(ismovable(loc)) // Register for recursive movement (if the thing we're inside moves)
GLOB.moved_event.register(loc, src, .proc/update_power_on_move)
GLOB.moved_event.register(loc, src, PROC_REF(update_power_on_move))
if(ismovable(old_loc)) // Unregister recursive movement.
GLOB.moved_event.unregister(old_loc, src, .proc/update_power_on_move)
GLOB.moved_event.unregister(old_loc, src, PROC_REF(update_power_on_move))
/obj/machinery/proc/update_power_on_move(atom/movable/mover, atom/old_loc, atom/new_loc)
var/area/old_area = get_area(old_loc)
+1 -1
View File
@@ -244,7 +244,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
var/Angle = round(Get_Angle(src,M))
var/matrix/rot_matrix = matrix()
rot_matrix.Turn(Angle)
addtimer(CALLBACK(src, .proc/finish_shot, target), rotation_speed)
addtimer(CALLBACK(src, PROC_REF(finish_shot), target), rotation_speed)
animate(src, transform = rot_matrix, rotation_speed, easing = SINE_EASING)
set_dir(ATAN2(transform.b, transform.a) > 0 ? NORTH : SOUTH)
+1 -1
View File
@@ -566,7 +566,7 @@
"View Stats" = radial_image_statpanel
)
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_occupant_radial, user), require_near = TRUE, tooltips = TRUE)
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, PROC_REF(check_occupant_radial), user), require_near = TRUE, tooltips = TRUE)
if(!check_occupant_radial(user))
return
if(!choice)
+3 -3
View File
@@ -23,9 +23,9 @@
metal = ismetal
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
if(dries) //VOREStation Add
addtimer(CALLBACK(src, .proc/post_spread), 3 + metal * 3)
addtimer(CALLBACK(src, .proc/pre_harden), 12 SECONDS)
addtimer(CALLBACK(src, .proc/harden), 15 SECONDS)
addtimer(CALLBACK(src, PROC_REF(post_spread)), 3 + metal * 3)
addtimer(CALLBACK(src, PROC_REF(pre_harden)), 12 SECONDS)
addtimer(CALLBACK(src, PROC_REF(harden)), 15 SECONDS)
/obj/effect/effect/foam/proc/post_spread()
process()
@@ -49,7 +49,7 @@ var/global/list/image/splatter_cache=list()
if (B.blood_DNA)
blood_DNA |= B.blood_DNA.Copy()
qdel(B)
addtimer(CALLBACK(src, .proc/dry), DRYING_TIME * (amount+1))
addtimer(CALLBACK(src, PROC_REF(dry)), DRYING_TIME * (amount+1))
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = get_random_colour(1)
@@ -36,7 +36,7 @@ GLOBAL_LIST_EMPTY(all_beam_points)
if(make_beams_on_init)
create_beams()
if(use_timer)
addtimer(CALLBACK(src, .proc/handle_beam_timer), initial_delay)
addtimer(CALLBACK(src, PROC_REF(handle_beam_timer)), initial_delay)
return ..()
/obj/effect/map_effect/beam_point/Destroy()
+3 -3
View File
@@ -728,7 +728,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
H.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
H.set_viewsize(viewsize)
zoom = 1
GLOB.moved_event.register(H, src, .proc/zoom)
GLOB.moved_event.register(H, src, PROC_REF(zoom))
var/tilesize = 32
var/viewoffset = tilesize * tileoffset
@@ -757,7 +757,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
if(!H.hud_used.hud_shown)
H.toggle_zoom_hud()
zoom = 0
GLOB.moved_event.unregister(H, src, .proc/zoom)
GLOB.moved_event.unregister(H, src, PROC_REF(zoom))
H.client.pixel_x = 0
H.client.pixel_y = 0
@@ -938,7 +938,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
. = ..()
if(usr.is_preference_enabled(/datum/client_preference/inv_tooltips) && ((src in usr) || isstorage(loc))) // If in inventory or in storage we're looking at
var/user = usr
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), 5, TIMER_STOPPABLE)
tip_timer = addtimer(CALLBACK(src, PROC_REF(openTip), location, control, params, user), 5, TIMER_STOPPABLE)
/obj/item/MouseExited()
. = ..()
-12
View File
@@ -92,18 +92,6 @@
to_chat(user, "You unwrap the package.")
qdel(src)
/obj/item/weapon/storage/fancy/cigar/havana // Putting this here 'cuz fuck it. -Spades
name = "\improper Havana cigar case"
desc = "Save these for the fancy-pantses at the next CentCom black tie reception. You can't blow the smoke from such majestic stogies in just anyone's face."
icon_state = "cigarcase"
icon = 'icons/obj/cigarettes.dmi'
w_class = ITEMSIZE_TINY
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 7
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar/havana)
icon_type = "cigar"
/obj/item/weapon/miscdisc
name = "strange artefact"
desc = "A large disc-shaped item, with a red, opaque crystal embedded in the center. It is some what heavy. There are indentations along the ring of the disc. Alien scripture lines the disc."
+3 -3
View File
@@ -71,7 +71,7 @@
if("wipe")
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
add_attack_logs(user,carded_ai,"Purged from AI Card")
INVOKE_ASYNC(src, .proc/wipe_ai)
INVOKE_ASYNC(src, PROC_REF(wipe_ai))
if("radio")
carded_ai.aiRadio.disabledAi = !carded_ai.aiRadio.disabledAi
to_chat(carded_ai, "<span class='warning'>Your Subspace Transceiver has been [carded_ai.aiRadio.disabledAi ? "disabled" : "enabled"]!</span>")
@@ -83,7 +83,7 @@
if(carded_ai.control_disabled && carded_ai.deployed_shell)
carded_ai.disconnect_shell("Disconnecting from remote shell due to [src] wireless access interface being disabled.")
update_icon()
return TRUE
/obj/item/device/aicard/update_icon()
@@ -182,4 +182,4 @@
AI.adjustOxyLoss(2)
AI.updatehealth()
sleep(10)
flush = FALSE
flush = FALSE
@@ -106,7 +106,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
setup_tgui_camera()
//This is a pretty terrible way of doing this.
addtimer(CALLBACK(src, .proc/register_to_holder), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(register_to_holder)), 5 SECONDS)
// Proc: register_to_holder()
// Parameters: None
@@ -376,4 +376,3 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
return
icon_state = initial(icon_state)
@@ -349,14 +349,14 @@
video_source = comm.camera
comm.visible_message("<span class='danger'>\icon[src][bicon(src)] New video connection from [comm].</span>")
update_active_camera_screen()
GLOB.moved_event.register(video_source, src, .proc/update_active_camera_screen)
GLOB.moved_event.register(video_source, src, PROC_REF(update_active_camera_screen))
update_icon()
// Proc: end_video()
// Parameters: reason - the text reason to print for why it ended
// Description: Ends the video call by clearing video_source
/obj/item/device/communicator/proc/end_video(var/reason)
GLOB.moved_event.unregister(video_source, src, .proc/update_active_camera_screen)
GLOB.moved_event.unregister(video_source, src, PROC_REF(update_active_camera_screen))
show_static()
video_source = null
@@ -364,4 +364,3 @@
visible_message(.)
update_icon()
@@ -49,7 +49,7 @@
if(!evaluate_ghost_join(user))
return ..()
tgui_alert_async(usr, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, .proc/reply_ghost_join), 20 SECONDS)
tgui_alert_async(usr, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS)
/// A reply to an async alert request was received
/mob/living/simple_mob/proc/reply_ghost_join(response)
@@ -64,7 +64,7 @@
/mob/living/simple_mob/proc/ghost_join(mob/observer/dead/D)
log_and_message_admins("[key_name_admin(D)] joined [src] as a ghost [ADMIN_FLW(src)]")
active_ghost_pods -= src
// Move the ghost in
if(D.mind)
D.mind.active = TRUE
@@ -72,7 +72,7 @@
else
src.ckey = D.ckey
qdel(D)
// Clean up the simplemob
ghostjoin = FALSE
ghostjoin_icon()
@@ -91,14 +91,14 @@
return FALSE
// At this point we can at least send them messages as to why they can't join, since they are a mob with a client
if(!ghostjoin)
if(!ghostjoin)
to_chat(D, "<span class='notice'>Sorry, [src] is no longer ghost-joinable.</span>")
return FALSE
if(ckey)
to_chat(D, "<span class='notice'>Sorry, someone else has already inhabited [src].</span>")
return FALSE
if(capture_caught && !D.client.prefs.capture_crystal)
to_chat(D, "<span class='notice'>Sorry, [src] is participating in capture mechanics, and your preferences do not allow for that.</span>")
return FALSE
@@ -128,7 +128,7 @@
else
. += "<span class='notice'>The screen indicates that this device can be used again in [cooldowntime] seconds, and that it has enough energy for [charges] uses.</span>"
/obj/item/device/denecrotizer/proc/check_target(mob/living/simple_mob/target, mob/living/user)
/obj/item/device/denecrotizer/proc/check_target(mob/living/simple_mob/target, mob/living/user)
if(!target.Adjacent(user))
return FALSE
if(user.a_intent != I_HELP) //be gentle
@@ -150,10 +150,10 @@
if(!advanced)
to_chat(user, "<span class='notice'>[src] doesn't seem to work on that.</span>")
return FALSE
if(target.ai_holder.retaliate || target.ai_holder.hostile) // You can be friends with still living mobs if they are passive I GUESS
if(target.ai_holder.retaliate || target.ai_holder.hostile) // You can be friends with still living mobs if they are passive I GUESS
to_chat(user, "<span class='notice'>[src] doesn't seem to work on that.</span>")
return FALSE
if(!target.mind)
if(!target.mind)
user.visible_message("[user] gently presses [src] to [target]...", runemessage = "presses [src] to [target]")
if(do_after(user, revive_time, exclusive = TASK_USER_EXCLUSIVE, target = target))
target.faction = user.faction
@@ -197,7 +197,7 @@
icon_state = "[initial(icon_state)]-o"
update_icon()
return
/obj/item/device/denecrotizer/proc/basic_rez(mob/living/simple_mob/target, mob/living/user) //so medical can have a way to bring back people's pets or whatever, does not change any settings about the mob or offer it to ghosts.
user.visible_message("[user] presses [src] to [target]...", runemessage = "presses [src] to [target]")
if(do_after(user, revive_time, exclusive = TASK_ALL_EXCLUSIVE, target = target))
@@ -235,9 +235,9 @@
I.invisibility = INVISIBILITY_OBSERVER
I.plane = PLANE_GHOSTS
I.appearance_flags = KEEP_APART|RESET_TRANSFORM
cut_overlay(I)
if(ghostjoin)
add_overlay(I)
@@ -247,4 +247,4 @@
icon_state = "m-denecrotizer"
advanced = 0 //This one isn't as fancy
cooldown = 5 MINUTES //not as long
charges = 20 //in case spiders merc Ian
charges = 20 //in case spiders merc Ian
+2 -2
View File
@@ -45,8 +45,8 @@ var/list/GPS_list = list()
if(istype(loc, /mob))
holder = loc
GLOB.moved_event.register(holder, src, .proc/update_compass)
GLOB.dir_set_event.register(holder, src, .proc/update_compass)
GLOB.moved_event.register(holder, src, PROC_REF(update_compass))
GLOB.dir_set_event.register(holder, src, PROC_REF(update_compass))
if(holder && tracking)
if(!is_in_processing_list)
@@ -2,8 +2,9 @@
name = "portable suit cooling unit"
desc = "A portable heat sink and liquid cooled radiator that can be hooked up to a space suit's existing temperature controls to provide industrial levels of cooling."
w_class = ITEMSIZE_LARGE
icon = 'icons/obj/device.dmi'
icon = 'icons/obj/suit_cooler.dmi'
icon_state = "suitcooler0"
item_state = "coolingpack"
slot_flags = SLOT_BACK
//copied from tank.dm
@@ -171,13 +172,32 @@
return ..()
/obj/item/device/suit_cooling_unit/proc/updateicon()
if (cover_open)
if (cell)
cut_overlays()
if(cover_open)
if(cell)
icon_state = "suitcooler1"
else
icon_state = "suitcooler2"
else
icon_state = "suitcooler0"
return
icon_state = "suitcooler0"
if(!cell || !on)
return
switch(round(cell.percent()))
if(86 to INFINITY)
add_overlay("battery-0")
if(69 to 85)
add_overlay("battery-1")
if(52 to 68)
add_overlay("battery-2")
if(35 to 51)
add_overlay("battery-3")
if(18 to 34)
add_overlay("battery-4")
if(-INFINITY to 17)
add_overlay("battery-5")
/obj/item/device/suit_cooling_unit/examine(mob/user)
. = ..()
@@ -218,7 +238,7 @@
/obj/item/device/suit_cooling_unit/emergency/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (W.is_screwdriver())
to_chat(user, "<span class='warning'>This model has the cell permanently installed!</span>")
to_chat(user, "<span class='warning'>This cooler's cell is permanently installed!</span>")
return
return ..()
@@ -125,7 +125,7 @@ This device can be easily used to break ERP preferences due to the nature of tel
Make sure you carefully examine someone's OOC prefs before teleporting them if you are going to use this device for ERP purposes.
This device records all warnings given and teleport events for admin review in case of pref-breaking, so just don't do it.
"},"OOC Warning")
var/choice = show_radial_menu(user, radial_menu_anchor, radial_images, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
var/choice = show_radial_menu(user, radial_menu_anchor, radial_images, custom_check = CALLBACK(src, PROC_REF(check_menu), user), require_near = TRUE, tooltips = TRUE)
if(!choice)
return
+2 -2
View File
@@ -25,7 +25,7 @@
/obj/item/device/uplink/Initialize(var/mapload)
. = ..()
addtimer(CALLBACK(src, .proc/next_offer), offer_time) //It seems like only the /hidden type actually makes use of this...
addtimer(CALLBACK(src, PROC_REF(next_offer)), offer_time) //It seems like only the /hidden type actually makes use of this...
/obj/item/device/uplink/get_item_cost(var/item_type, var/item_cost)
return (discount_item && (item_type == discount_item)) ? max(1, round(item_cost*discount_amount)) : item_cost
@@ -63,7 +63,7 @@
discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1)
next_offer_time = world.time + offer_time
SStgui.update_uis(src)
addtimer(CALLBACK(src, .proc/next_offer), offer_time)
addtimer(CALLBACK(src, PROC_REF(next_offer)), offer_time)
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
+2 -2
View File
@@ -170,7 +170,7 @@
to_chat(user, "<span class='notice'>You offer battle to [target.name]!</span>")
to_chat(target, "<span class='notice'><b>[user.name] wants to battle with [T.His] [name]!</b> <i>Attack them with a toy mech to initiate combat.</i></span>")
wants_to_battle = TRUE
addtimer(CALLBACK(src, .proc/withdraw_offer, user), 6 SECONDS)
addtimer(CALLBACK(src, PROC_REF(withdraw_offer), user), 6 SECONDS)
return
..()
@@ -602,4 +602,4 @@
#undef SPECIAL_ATTACK_DAMAGE
#undef SPECIAL_ATTACK_UTILITY
#undef SPECIAL_ATTACK_OTHER
#undef MAX_BATTLE_LENGTH
#undef MAX_BATTLE_LENGTH
+10 -10
View File
@@ -174,7 +174,7 @@
playsound(user, 'sound/voice/shriek1.ogg', 10, 0)
src.visible_message("<span class='danger'>Skreee!</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/vox/proc/cooldownreset()
@@ -224,7 +224,7 @@
playsound(user, 'sound/machines/ping.ogg', 10, 0)
src.visible_message("<span class='danger'>Ping!</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/ipc/proc/cooldownreset()
@@ -241,7 +241,7 @@
playsound(user, 'sound/machines/ding.ogg', 10, 0)
src.visible_message("<span class='danger'>Ding!</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/snakeplushie
@@ -274,14 +274,14 @@
atom_say(pick(responses))
playsound(user, 'sound/effects/whistle.ogg', 10, 0)
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/marketable_pip/attack_self(mob/user as mob)
if(!cooldown)
playsound(user, 'sound/effects/whistle.ogg', 10, 0)
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/marketable_pip/proc/cooldownreset()
@@ -299,7 +299,7 @@
playsound(user, 'sound/voice/moth/scream_moth.ogg', 10, 0)
src.visible_message("<span class='danger'>Aaaaaaa.</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/moth/proc/cooldownreset()
@@ -344,7 +344,7 @@
playsound(user, 'sound/weapons/slice.ogg', 10, 0)
src.visible_message("<span class='danger'>Stab!</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/plushie/susblue
@@ -470,7 +470,7 @@
flick("[initial(icon_state)]2", src)
user.visible_message("<span class='disarm'>[user] doesn't blind [M] with the toy flash!</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/flash/proc/cooldownreset()
@@ -539,7 +539,7 @@
user.visible_message("<span class='notice'>[user] asks the AI core to state laws.</span>")
user.visible_message("<span class='notice'>[src] says \"[answer]\"</span>")
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/AI/proc/cooldownreset()
@@ -819,7 +819,7 @@
if(!cooldown)
playsound(user, 'sound/weapons/chainsaw_startup.ogg', 10, 0)
cooldown = 1
addtimer(CALLBACK(src, .proc/cooldownreset), 50)
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
return ..()
/obj/item/toy/chainsaw/proc/cooldownreset()
+9 -9
View File
@@ -36,20 +36,20 @@
/obj/item/weapon/rcd/update_icon()
var/nearest_ten = round((stored_matter/max_stored_matter)*10, 1)
//Just to prevent updates every use
if(ammostate == nearest_ten)
return //No change
ammostate = nearest_ten
cut_overlays()
//Main sprite update
if(!nearest_ten)
icon_state = "[initial(icon_state)]_empty"
else
icon_state = "[initial(icon_state)]"
add_overlay("[initial(icon_state)]_charge[nearest_ten]")
/obj/item/weapon/rcd/proc/perform_effect(var/atom/A, var/time_taken)
@@ -98,12 +98,12 @@
if(user.incapacitated())
world.log << "Two"
return FALSE
var/obj/item/rig_module/device/D = loc
if(!istype(D) || !D?.holder?.wearer == user)
world.log << "Three"
return FALSE
return TRUE
/obj/item/weapon/rcd/attack_self(mob/living/user)
@@ -134,7 +134,7 @@
"Change Window Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype")
)
*/
var/choice = show_radial_menu(user, user, choices, custom_check = CALLBACK(src, .proc/check_menu, user), tooltips = TRUE)
var/choice = show_radial_menu(user, user, choices, custom_check = CALLBACK(src, PROC_REF(check_menu), user), tooltips = TRUE)
if(!check_menu(user))
return
switch(choice)
@@ -206,7 +206,7 @@
status = rcd_status
delay = rcd_delay
if (status == RCD_DECONSTRUCT)
addtimer(CALLBACK(src, /atom/.proc/update_icon), 11)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon)), 11)
delay -= 11
icon_state = "rcd_end_reverse"
else
@@ -228,7 +228,7 @@
qdel(src)
else
icon_state = "rcd_end"
addtimer(CALLBACK(src, .proc/end), 15)
addtimer(CALLBACK(src, PROC_REF(end)), 15)
/obj/effect/constructing_effect/proc/end()
qdel(src)
+1 -1
View File
@@ -219,7 +219,7 @@
"Random" = radial_image_random
)
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, PROC_REF(check_menu), user), require_near = TRUE, tooltips = TRUE)
if(!check_menu(user))
return
switch(choice)
@@ -249,8 +249,8 @@
//Make it so the crystal knows if its mob references get deleted to make sure things get cleaned up
/obj/item/capture_crystal/proc/knowyoursignals(mob/living/M, mob/living/U)
RegisterSignal(M, COMSIG_PARENT_QDELETING, .proc/mob_was_deleted, TRUE)
RegisterSignal(U, COMSIG_PARENT_QDELETING, .proc/owner_was_deleted, TRUE)
RegisterSignal(M, COMSIG_PARENT_QDELETING, PROC_REF(mob_was_deleted), TRUE)
RegisterSignal(U, COMSIG_PARENT_QDELETING, PROC_REF(owner_was_deleted), TRUE)
//The basic capture command does most of the registration work.
/obj/item/capture_crystal/proc/capture(mob/living/M, mob/living/U)
@@ -856,4 +856,4 @@
/mob/living
var/capture_crystal = TRUE //If TRUE, the mob is capturable. Otherwise it isn't.
var/capture_caught = FALSE //If TRUE, the mob has already been caught, and so cannot be caught again.
var/capture_caught = FALSE //If TRUE, the mob has already been caught, and so cannot be caught again.
+113 -48
View File
@@ -335,7 +335,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/cigarette/cigar
name = "premium cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
description_fluff = "While the label does say that this is a 'premium cigar', it really cannot match other types of cigars on the market. Is it a quality cigarette? Perhaps. Was it hand-made with care? No."
description_fluff = "While the label does say that this is a 'premium cigar', it \
really cannot match other types of cigars on the market. Is it a quality \
cigarette? Perhaps. Was it hand-made with care? No."
icon_state = "cigar2"
type_butt = /obj/item/trash/cigbutt/cigarbutt
throw_speed = 0.5
@@ -353,14 +355,22 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba
name = "\improper Cohiba Robusto cigar"
desc = "There's little more you could want from a cigar."
description_fluff = "Cohiba has been a popular cigar company for centuries. They are still based out of Cuba and refuse to expand and therefore have a very limited quantity, making their cigars coveted all through known space. Robusto is one of their most popular shapes of cigars."
description_fluff = "Cohiba has been a popular cigar company for centuries. \
They are still based out of Cuba and refuse to expand and therefore have a very \
limited quantity, making their cigars coveted all through known space. Robusto \
is one of their most popular shapes of cigars."
icon_state = "cigar2"
nicotine_amt = 7
/obj/item/clothing/mask/smokable/cigarette/cigar/havana
name = "premium Havanian cigar"
desc = "A cigar fit for only the best of the best."
description_fluff = "'Havanian' is an umbrella term for any cigar made in the typical handmade style of Cuba. This particular cigar is from Gilthari's cigar manufacturers and produced galaxy-wide. While this way of making quality cigars has become slightly bastardized over the years, overall quality has remained relatively the same, even if there is a large quantity of 'Havanian' cigars."
desc = "Save these for the fancy-pantses at the next CentCom black tie reception. \
You can't blow the smoke from such majestic stogies in just anyone's face."
description_fluff = "'Havanian' is an umbrella term for any cigar made in the \
typical handmade style of Cuba. This particular cigar is from Gilthari's cigar \
manufacturers and produced galaxy-wide. While this way of making quality cigars \
has become slightly bastardized over the years, overall quality has remained \
relatively the same, even if there is a large quantity of 'Havanian' cigars."
icon_state = "cigar2"
max_smoketime = 7200
smoketime = 7200
@@ -400,7 +410,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/pipe
name = "smoking pipe"
desc = "A pipe, for smoking. Made of fine, stained cherry wood."
description_fluff = "ClassiCo Accessories and Haberdashers, originating out of Mars, claim to produce products 'for the modern gentlefolk'. Most of their items are high-end and expensive, but they pledge to back their prices up with quality, and usually do."
description_fluff = "ClassiCo Accessories and Haberdashers, originating out of Mars, \
claim to produce products 'for the modern gentlefolk'. Most of their items are high-end \
and expensive, but they pledge to back their prices up with quality, and usually do."
icon_state = "pipe"
item_state = "pipe"
smoketime = 0
@@ -507,7 +519,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/reagent_containers/rollingpaper
name = "rolling paper"
desc = "A small, thin piece of easily flammable paper, commonly used for rolling and smoking various dried plants."
description_fluff = "The legalization of certain substances propelled the sale of rolling papers through the roof. Now almost every Trans-stellar produces a variety, often of questionable quality."
description_fluff = "The legalization of certain substances propelled the sale of rolling \
papers through the roof. Now almost every Trans-stellar produces a variety, often of questionable quality."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig paper"
volume = 25
@@ -555,77 +568,85 @@ CIGARETTE PACKETS ARE IN FANCY.DM
qdel(src)
/////////
//ZIPPO//
//CHEAP//
/////////
/obj/item/weapon/flame/lighter
name = "cheap lighter"
desc = "A cheap-as-free lighter."
description_fluff = "The 'hand-made in Altair' sticker underneath is a charming way of saying 'Made with prison labour'. It's no wonder the company can sell these things so cheap."
icon = 'icons/obj/items.dmi'
icon_state = "lighter-g"
item_state = "lighter-g"
description_fluff = "The 'hand-made in Altair' sticker underneath is a charming way of \
saying 'Made with prison labour'. It's no wonder the company can sell these things so cheap."
icon = 'icons/obj/lighters.dmi'
icon_state = "lighter"
item_state = "lighter"
w_class = ITEMSIZE_TINY
throwforce = 4
slot_flags = SLOT_BELT
attack_verb = list("burnt", "singed")
var/base_state
/// Sounds
var/activation_sound = 'sound/items/lighter_on.ogg'
var/deactivation_sound = 'sound/items/lighter_off.ogg'
/// Color of the flame and how big the flame is (pulled from Welder code)
var/flame_color = "#FF9933"
var/flame_intensity = 2
/// Color List
var/random_color = FALSE
var/available_colors = list(COLOR_ASSEMBLY_BLACK,
COLOR_ASSEMBLY_BGRAY,
COLOR_ASSEMBLY_WHITE,
COLOR_ASSEMBLY_RED,
COLOR_ASSEMBLY_ORANGE,
COLOR_ASSEMBLY_BEIGE,
COLOR_ASSEMBLY_BROWN,
COLOR_ASSEMBLY_GOLD,
COLOR_ASSEMBLY_YELLOW,
COLOR_ASSEMBLY_GURKHA,
COLOR_ASSEMBLY_LGREEN,
COLOR_ASSEMBLY_GREEN,
COLOR_ASSEMBLY_LBLUE,
COLOR_ASSEMBLY_BLUE,
COLOR_ASSEMBLY_PURPLE,
COLOR_ASSEMBLY_HOT_PINK)
/obj/item/weapon/flame/lighter/zippo
name = "\improper Zippo lighter"
desc = "The zippo."
description_fluff = "Still going after all these years."
icon = 'icons/obj/zippo.dmi'
icon_state = "zippo"
item_state = "zippo"
activation_sound = 'sound/items/zippo_on.ogg'
deactivation_sound = 'sound/items/zippo_off.ogg'
// TODO: Remove this path from POIs and loose maps (it's no longer needed)
/obj/item/weapon/flame/lighter/random
/obj/item/weapon/flame/lighter/random/New()
icon_state = "lighter-[pick("r","c","y","g")]"
item_state = icon_state
base_state = icon_state
// Randomizes Cheap Lighters on Spawn
/obj/item/weapon/flame/lighter/Initialize()
. = ..()
var/image/I = image(icon, "lighter-[pick("trans","tall","matte")]")
I.color = pick(available_colors)
add_overlay(I)
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
if(!base_state)
base_state = icon_state
if(!lit)
lit = 1
icon_state = "[base_state]on"
item_state = "[base_state]on"
icon_state = "lighteron"
playsound(src, activation_sound, 75, 1)
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
if(prob(95))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
if(prob(95))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
to_chat(user, "<span class='warning'>You burn yourself while lighting the lighter.</span>")
if (user.get_left_hand() == src)
user.apply_damage(2,BURN,"l_hand")
else
to_chat(user, "<span class='warning'>You burn yourself while lighting the lighter.</span>")
if (user.get_left_hand() == src)
user.apply_damage(2,BURN,"l_hand")
else
user.apply_damage(2,BURN,"r_hand")
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
user.apply_damage(2,BURN,"r_hand")
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
set_light(2)
set_light(2, 0.5, "#FF9933")
START_PROCESSING(SSobj, src)
update_icon()
else
lit = 0
icon_state = "[base_state]"
item_state = "[base_state]"
icon_state = "lighter"
playsound(src, deactivation_sound, 75, 1)
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.</span>")
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].</span>")
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].</span>")
set_light(0)
STOP_PROCESSING(SSobj, src)
update_icon()
return
/obj/item/weapon/flame/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
return
@@ -652,6 +673,45 @@ CIGARETTE PACKETS ARE IN FANCY.DM
location.hotspot_expose(700, 5)
return
/////////
//ZIPPO//
/////////
/obj/item/weapon/flame/lighter/zippo
name = "\improper Zippo lighter"
desc = "The zippo."
description_fluff = "Still going after all these years."
icon_state = "zippo"
item_state = "zippo"
activation_sound = 'sound/items/zippo_on.ogg'
deactivation_sound = 'sound/items/zippo_off.ogg'
/obj/item/weapon/flame/lighter/zippo/Initialize()
. = ..()
cut_overlays() //Prevents the Cheap Lighter overlay from appearing on this
/obj/item/weapon/flame/lighter/zippo/attack_self(mob/living/user)
if(!base_state)
base_state = icon_state
if(!lit)
lit = 1
icon_state = "[base_state]on"
item_state = "[base_state]on"
playsound(src, activation_sound, 75, 1)
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
set_light(2, 0.5, "#FF9933")
START_PROCESSING(SSobj, src)
else
lit = 0
icon_state = "[base_state]"
item_state = "[base_state]"
playsound(src, deactivation_sound, 75, 1)
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.</span>")
set_light(0)
STOP_PROCESSING(SSobj, src)
return
//Here we add Zippo skins.
/obj/item/weapon/flame/lighter/zippo/black
@@ -708,4 +768,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/zippo/rainbow
name = "\improper rainbow Zippo lighter"
icon_state = "rainbowzippo"
icon_state = "rainbowzippo"
/obj/item/weapon/flame/lighter/zippo/skull
name = "\improper badass Zippo lighter"
desc = "An absolutely badass zippo lighter. Just look at that skull!"
icon_state = "skullzippo"
@@ -33,6 +33,7 @@
var/blanket_type = CENTER
layer = HIDING_LAYER - 0.01 //Stuff shouldn't be able to hide under the blanket on the ground
var/list/attached_blankets = list()
anchored = TRUE
/obj/structure/picnic_blanket_deployed/verb/fold_up()
set name = "Fold up"
@@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
var/image/bible_image = image(icon = 'icons/obj/storage.dmi', icon_state = GLOB.biblestates[i])
skins += list("[GLOB.biblenames[i]]" = bible_image)
var/choice = show_radial_menu(user, src, skins, custom_check = CALLBACK(src, .proc/check_menu, user), radius = 40, require_near = TRUE)
var/choice = show_radial_menu(user, src, skins, custom_check = CALLBACK(src, PROC_REF(check_menu), user), radius = 40, require_near = TRUE)
if(!choice)
return FALSE
var/bible_index = GLOB.biblenames.Find(choice)
@@ -112,4 +112,4 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (src.use_sound)
playsound(src, src.use_sound, 50, 1, -5)
..()
..()
@@ -385,16 +385,18 @@
/obj/item/weapon/storage/fancy/cigar
name = "cigar case"
desc = "A case for holding your cigars when you are not smoking them."
description_fluff = "The tastefully engraved palm tree tells you that these 'Palma Grande' premium cigars are only sold on the luxury cruises and resorts of Oasis, though ten separate companies produce them for that purpose galaxy-wide. The standard is however very high."
description_fluff = "The tasteful stained palm case tells you that these 'Palma Grande' premium \
cigars are only sold on the luxury cruises and resorts of Oasis, though ten separate companies \
produce them for that purpose galaxy-wide. The standard is however very high."
icon_state = "cigarcase"
icon = 'icons/obj/cigarettes.dmi'
w_class = ITEMSIZE_TINY
throwforce = 2
slot_flags = SLOT_BELT
storage_slots = 7
storage_slots = 5
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar, /obj/item/trash/cigbutt/cigarbutt)
icon_type = "cigar"
starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar = 8)
starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar = 5)
/obj/item/weapon/storage/fancy/cigar/Initialize()
. = ..()
@@ -419,7 +421,7 @@
if(open)
icon_state = open_state
if(contents.len >= 1)
add_overlay("cigarcase[contents.len]")
add_overlay("[initial(icon_state)][contents.len]")
else
icon_state = closed_state
@@ -435,6 +437,27 @@
update_icon()
..()
/obj/item/weapon/storage/fancy/cigar/choiba
name = "/improper Choiba cigar case"
desc = "A fancy case for holding your cigars when you are not smoking them."
description_fluff = "The exquisite wooden case bears the markings of the \
Choiba cigar company based out of Cuba. The perfectly humidized case keeps \
the companies signature Cigars in premium condidtion even when traveling \
long distances within a vacuume. The custom case itself can sell for quite \
a lot in some places."
icon_state = "cohibacase"
icon = 'icons/obj/cigarettes.dmi'
icon_type = "cigar"
starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba = 5)
/obj/item/weapon/storage/fancy/cigar/havana
name = "\improper Havana cigar case"
desc = "A fancy case for holding your cigars when you are not smoking them."
icon_state = "havanacase"
icon = 'icons/obj/cigarettes.dmi'
icon_type = "cigar"
starts_with = list(/obj/item/clothing/mask/smokable/cigarette/cigar/havana = 5)
/*
* Tobacco Bits
*/
+1 -1
View File
@@ -189,7 +189,7 @@
prob(1);/obj/random/thermalponcho,
prob(5);/obj/random/contraband,
prob(5);/obj/random/cargopod,
prob(1);/obj/item/weapon/flame/lighter/random,
prob(1);/obj/item/weapon/flame/lighter,
prob(1);/obj/item/weapon/storage/wallet/random,
prob(1);/obj/random/cutout)
@@ -526,7 +526,7 @@
animate(door_obj, transform = M, icon_state = door_state, layer = door_layer, time = world.tick_lag, flags = ANIMATION_END_NOW)
else
animate(transform = M, icon_state = door_state, layer = door_layer, time = world.tick_lag)
addtimer(CALLBACK(src, .proc/end_door_animation,closing), closet_appearance.door_anim_time, TIMER_UNIQUE|TIMER_OVERRIDE)
addtimer(CALLBACK(src, PROC_REF(end_door_animation), closing), closet_appearance.door_anim_time, TIMER_UNIQUE|TIMER_OVERRIDE)
/obj/structure/closet/proc/end_door_animation(closing = FALSE)
is_animating_door = FALSE
@@ -73,13 +73,13 @@
/obj/structure/ghost_pod/automatic/Initialize()
. = ..()
addtimer(CALLBACK(src, .proc/trigger), delay_to_self_open)
addtimer(CALLBACK(src, PROC_REF(trigger)), delay_to_self_open)
/obj/structure/ghost_pod/automatic/trigger()
. = ..()
if(. == FALSE) // If we failed to get a volunteer, try again later if allowed to.
if(delay_to_try_again)
addtimer(CALLBACK(src, .proc/trigger), delay_to_try_again)
addtimer(CALLBACK(src, PROC_REF(trigger)), delay_to_try_again)
// This type is triggered by a ghost clicking on it, as opposed to a living player. A ghost query type isn't needed.
/obj/structure/ghost_pod/ghost_activated
+3 -3
View File
@@ -8,15 +8,15 @@
src.enabled = config.socket_talk
if(enabled)
call("DLLSocket.so","establish_connection")("127.0.0.1","8019")
LIBCALL("DLLSocket.so","establish_connection")("127.0.0.1","8019")
proc
send_raw(message)
if(enabled)
return call("DLLSocket.so","send_message")(message)
return LIBCALL("DLLSocket.so","send_message")(message)
receive_raw()
if(enabled)
return call("DLLSocket.so","recv_message")()
return LIBCALL("DLLSocket.so","recv_message")()
send_log(var/log, var/message)
return send_raw("type=log&log=[log]&message=[message]")
send_keepalive()
+1 -1
View File
@@ -445,7 +445,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
ENABLE_BITFIELD(options, SDQL2_OPTION_DO_NOT_AUTOGC)
/datum/SDQL2_query/proc/ARun()
INVOKE_ASYNC(src, .proc/Run)
INVOKE_ASYNC(src, PROC_REF(Run))
/datum/SDQL2_query/proc/Run()
if(SDQL2_IS_RUNNING)
+164 -15
View File
@@ -7,6 +7,20 @@
var/list/entity_refs = list()
//TGUI Helper Vars
var/tgui_id = "EntityNarrate"
var/tgui_selection_mode = 0 //0 for single entity, 1 for multi entity
var/tgui_selected_name = "" //String for single selection in-game name
var/tgui_selected_type = "" //String for single selection type
var/tgui_selected_id = "" //String to retrieve ref from entity_refs
var/tgui_selected_refs //object references
var/list/tgui_selected_id_multi = list() //List of strings containing mob ids for multi selection
var/tgui_narrate_mode = 0 //0 for speak, 1 for emote
var/tgui_narrate_privacy = 0 //0 for loud, 1 for subtle
var/tgui_last_message = 0 // int to avoid spam
//Appears as a right click verb on any obj and mob within view range.
//when not right clicking we get a list to pick from in aforementioned view range.
@@ -32,11 +46,16 @@
if(istype(E, /mob/living))
var/mob/living/L = E
if(L.client)
to_chat(usr, "You may not speak for players!")
log_and_message_admins("attempted to speak for [L.ckey]'s mob", usr)
to_chat(usr, SPAN_NOTICE("[L.name] is a player. All attempts to speak through them \
gets logged in case of abuse."))
log_and_message_admins("has added [L.ckey]'s mob to their entity narrate list", usr)
return
var/unique_name = sanitize(tgui_input_text(usr, "Please give the entity a unique name to track internally. \
This doesn't override how it appears in game", "tracker", L.name))
if(unique_name in holder.entity_names)
to_chat(usr, SPAN_NOTICE("[unique_name] is not unique! Pick another!"))
add_mob_for_narration(L) //Recursively calling ourselves until cancelled or a unique name is given.
return
holder.entity_names += unique_name
holder.entity_refs[unique_name] = L
log_and_message_admins("added [L.name] for their personal list to narrate", usr) //Logging here to avoid spam, while still safeguarding abuse
@@ -46,6 +65,10 @@
var/atom/A = E
var/unique_name = sanitize(tgui_input_text(usr, "Please give the entity a unique name to track internally. \
This doesn't override how it appears in game", "tracker", A.name))
if(unique_name in holder.entity_names)
to_chat(usr, SPAN_NOTICE("[unique_name] is not unique! Pick another!"))
add_mob_for_narration(A)
return
holder.entity_names += unique_name
holder.entity_refs[unique_name] = A
log_and_message_admins("added [A.name] for their personal list to narrate", usr) //Logging here to avoid spam, while still safeguarding abuse
@@ -98,13 +121,18 @@
//Obtaining and sanitizing arguments for the actual proc
var/which_entity = tgui_input_list(usr, "Choose which mob to narrate", "Narrate mob", holder.entity_names, null)
var/choices = holder.entity_names + "Open TGUI"
var/which_entity = tgui_input_list(usr, "Choose which mob to narrate", "Narrate mob", choices, null)
if(!which_entity) return
var/mode = tgui_alert(usr, "Speak or emote?", "mode", list("Speak", "Emote", "Cancel"))
if(mode == "Cancel") return
var/message = sanitize(tgui_input_text(usr, "Input what you want [which_entity] to say or do", "narrate", null, multiline = TRUE, prevent_enter = TRUE))
if(message)
narrate_mob_args(which_entity, mode, message)
if(which_entity == "Open TGUI")
holder.tgui_interact(usr)
else
var/mode = tgui_alert(usr, "Speak or emote?", "mode", list("Speak", "Emote", "Cancel"))
if(mode == "Cancel") return
var/message = tgui_input_text(usr, "Input what you want [which_entity] to [mode]", "narrate",
null, multiline = TRUE, prevent_enter = TRUE)
if(message)
narrate_mob_args(which_entity, mode, message)
//The actual logic of the verb. Called by narrate_mob() when used.
/client/proc/narrate_mob_args(name as text, mode as text, message as text)
@@ -127,8 +155,6 @@
//Sanitizing args
name = sanitize(name)
mode = sanitize(mode)
if(message)
message = sanitize(message)
if(!(mode in list("Speak", "Emote")))
to_chat(usr, SPAN_NOTICE("Valid modes are 'Speak' and 'Emote'."))
@@ -141,11 +167,9 @@
if(istype(holder.entity_refs[name], /mob/living))
var/mob/living/our_entity = holder.entity_refs[name]
if(our_entity.client) //Making sure we can't speak for players
to_chat(usr, SPAN_NOTICE("Cannot narrate mobs with active clients!"))
log_and_message_admins("attempted to speak for [our_entity.ckey]'s mob", usr)
return
log_and_message_admins("used entity-narrate to speak through [our_entity.ckey]'s mob", usr)
if(!message)
message = sanitize(tgui_input_text(usr, "Input what you want [our_entity] to [mode]", "narrate", null))
message = tgui_input_text(usr, "Input what you want [our_entity] to [mode]", "narrate", null) //say/emote sanitize already
if(message && mode == "Speak")
our_entity.say(message)
else if(message && mode == "Emote")
@@ -158,10 +182,135 @@
else if(istype(holder.entity_refs[name], /atom))
var/atom/our_entity = holder.entity_refs[name]
if(!message)
message = sanitize(tgui_input_text(usr, "Input what you want [our_entity] to [mode]", "narrate", null))
message = tgui_input_text(usr, "Input what you want [our_entity] to [mode]", "narrate", null)
message = sanitize(message)
if(message && mode == "Speak")
our_entity.audible_message("<b>[our_entity.name]</b> [message]")
else if(message && mode == "Emote")
our_entity.visible_message("<b>[our_entity.name]</b> [message]")
else
return
/datum/entity_narrate/tgui_state(mob/user)
return GLOB.tgui_admin_state
/datum/entity_narrate/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, tgui_id, "Entity Narration")
ui.open()
/datum/entity_narrate/tgui_data(mob/user)
var/list/data = list()
data["mode_select"] = tgui_narrate_mode
data["privacy_select"] = tgui_narrate_privacy
data["selected_id"] = tgui_selected_id
data["selected_name"] = tgui_selected_name
data["selected_type"] = tgui_selected_type
data["selection_mode"] = tgui_selection_mode
data["multi_id_selection"] = tgui_selected_id_multi
data["number_mob_selected"] = LAZYLEN(tgui_selected_id_multi)
data["entity_names"] = entity_names
return data
/datum/entity_narrate/tgui_act(action, list/params)
. = ..()
if(.) return
if(!check_rights_for(usr.client, R_FUN)) return
switch(action)
if("change_mode_multi")
tgui_selection_mode = !tgui_selection_mode
//Clearing selections after switching mode
tgui_selected_id_multi = list()
tgui_selected_id = ""
tgui_selected_type = ""
tgui_selected_name = ""
tgui_selected_refs = null
if("change_mode_privacy")
tgui_narrate_privacy = !tgui_narrate_privacy
if("change_mode_narration")
tgui_narrate_mode = !tgui_narrate_mode
if("select_entity")
if(tgui_selection_mode)
if(params["id_selected"] in tgui_selected_id_multi)
tgui_selected_id_multi -= params["id_selected"]
else
tgui_selected_id_multi += params["id_selected"]
else
if(params["id_selected"] in tgui_selected_id_multi)
tgui_selected_id_multi -= params["id_selected"]
tgui_selected_id = ""
tgui_selected_type = ""
tgui_selected_name = ""
tgui_selected_refs = null
else
tgui_selected_id_multi = list() //Using the same var for ease of implementation. Thus, we must reset to empty each time.
tgui_selected_id_multi += params["id_selected"]
tgui_selected_id = params["id_selected"]
tgui_selected_refs = entity_refs[tgui_selected_id]
if(istype(tgui_selected_refs, /mob/living))
var/mob/living/L = tgui_selected_refs
if(L.client)
tgui_selected_type = "!!!!PLAYER!!!!"
tgui_selected_name = L.name
else
tgui_selected_type = L.type
tgui_selected_name = L.name
else if(istype(tgui_selected_refs, /atom))
var/atom/A = tgui_selected_refs
tgui_selected_type = A.type
tgui_selected_name = A.name
if("narrate")
if(world.time < (tgui_last_message + 0.5 SECONDS))
to_chat(usr, SPAN_NOTICE("You can't messages that quickly! Wait at least half a second"))
else
to_chat(usr, SPAN_NOTICE("Message successfully sent!"))
tgui_last_message = world.time
var/message = params["message"] //Sanitizing before speaking it
if(tgui_selection_mode)
for(var/entity in tgui_selected_id_multi)
var/ref = entity_refs[entity]
if(istype(ref, /mob/living))
var/mob/living/L = ref
if(L.client)
log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", usr)
narrate_tgui_mob(L, message)
else if(istype(ref, /atom))
var/atom/A = ref
narrate_tgui_atom(A, message)
else
var/ref = entity_refs[tgui_selected_id]
if(istype(ref, /mob/living))
var/mob/living/L = ref
if(L.client)
log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", usr)
narrate_tgui_mob(L, message)
else if(istype(ref, /atom))
var/atom/A = ref
narrate_tgui_atom(A, message)
/datum/entity_narrate/proc/narrate_tgui_mob(mob/living/L, message as text)
//say and custom_emote sanitize it themselves, not sanitizing here to avoid double encoding.
if(tgui_narrate_mode && tgui_narrate_privacy)
L.custom_emote_vr(m_type = VISIBLE_MESSAGE, message = message)
else if(tgui_narrate_mode && !tgui_narrate_privacy)
L.custom_emote(VISIBLE_MESSAGE, message)
else if(!tgui_narrate_mode && tgui_narrate_privacy)
L.say(message, whispering = 1)
else if(!tgui_narrate_mode && !tgui_narrate_privacy)
L.say(message)
/datum/entity_narrate/proc/narrate_tgui_atom(atom/A, message as text)
message = sanitize(message)
if(tgui_narrate_mode && tgui_narrate_privacy)
A.visible_message("<i><b>[A.name]</b> [message]</i>", range = 1)
else if(tgui_narrate_mode && !tgui_narrate_privacy)
A.visible_message("<b>[A.name]</b> [message]",)
else if(!tgui_narrate_mode && tgui_narrate_privacy)
A.audible_message("<i><b>[A.name]</b> [message]</i>", hearing_distance = 1)
else if(!tgui_narrate_mode && !tgui_narrate_privacy)
A.audible_message("<b>[A.name]</b> [message]")
+2 -2
View File
@@ -210,7 +210,7 @@
holder = new_holder
home_turf = get_turf(holder)
manage_processing(AI_PROCESSING)
GLOB.stat_set_event.register(holder, src, .proc/holder_stat_change)
GLOB.stat_set_event.register(holder, src, PROC_REF(holder_stat_change))
..()
/datum/ai_holder/Destroy()
@@ -516,4 +516,4 @@
#undef AI_NO_PROCESS
#undef AI_PROCESSING
#undef AI_FASTPROCESSING
#undef AI_FASTPROCESSING
+2 -2
View File
@@ -193,10 +193,10 @@
/obj/item/weapon/telecube/proc/cooldown(var/mate_too = FALSE)
if(!ready)
return
ready = FALSE
update_icon()
addtimer(CALLBACK(src, .proc/ready), cooldown_time)
addtimer(CALLBACK(src, PROC_REF(ready)), cooldown_time)
if(mate_too && mate)
mate.cooldown(mate_too = FALSE) //No infinite recursion pls
+1 -1
View File
@@ -50,7 +50,7 @@
switch(action)
if("signal")
INVOKE_ASYNC(src, .proc/signal)
INVOKE_ASYNC(src, PROC_REF(signal))
. = TRUE
if("freq")
frequency = unformat_frequency(params["freq"])
+160 -140
View File
@@ -60,7 +60,7 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
/datum/lore/atc_controller/proc/shift_ending(var/evac = 0)
msg("[using_map.shuttle_name], this is [using_map.dock_name] Control, you are cleared to complete routine transfer from [using_map.station_name] to [using_map.dock_name].")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[using_map.shuttle_name] departing [using_map.dock_name] for [using_map.station_name] on routine transfer route. Estimated time to arrival: ten minutes.","[using_map.shuttle_name]")
/datum/lore/atc_controller/proc/random_convo()
@@ -110,14 +110,14 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
var/chatter_type = "normal"
if(force_chatter_type)
chatter_type = force_chatter_type
else if((org_type == "government" || org_type == "neutral" || org_type == "military" || org_type == "corporate" || org_type == "system defense") && org_type2 == "pirate") //this is ugly but when I tried to do it with !='s it fired for pirate-v-pirate, still not sure why. might as well stick it up here so it takes priority over other combos.
else if((org_type == "government" || org_type == "neutral" || org_type == "military" || org_type == "corporate" || org_type == "system defense" || org_type == "spacer") && org_type2 == "pirate") //this is ugly but when I tried to do it with !='s it fired for pirate-v-pirate, still not sure why. might as well stick it up here so it takes priority over other combos.
chatter_type = "distress"
else if(org_type == "corporate") //corporate-specific subset for the slogan event. despite the relatively high weight it was still quite rare in tests.
chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",30;"dockingrequestgeneric",30;"dockingrequestdenied",30;"dockingrequestdelayed",30;"dockingrequestsupply",30;"dockingrequestrepair",30;"dockingrequestmedical",30;"dockingrequestsecurity",30;"undockingrequest","normal",30;"undockingdenied",30;"undockingdelayed",300;"slogan")
chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",180;"dockingrequestgeneric",30;"undockingrequest","normal",30;"undockingdenied",50;"slogan",25;"civvieleaks")
else if((org_type == "government" || org_type == "neutral" || org_type == "military"))
chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",30;"dockingrequestgeneric",30;"dockingrequestdenied",30;"dockingrequestdelayed",30;"dockingrequestsupply",30;"dockingrequestrepair",30;"dockingrequestmedical",30;"dockingrequestsecurity",30;"undockingrequest","normal",30;"undockingdenied",30;"undockingdelayed")
chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",180;"dockingrequestgeneric",30;"undockingrequest","normal",30;"undockingdenied",25;"civvieleaks")
else if(org_type == "spacer")
chatter_type = pick(5;"emerg",15;"policescan",15;"traveladvisory",5;"pathwarning",10;"dockingrequestgeneric",30;"dockingrequestdenied",10;"dockingrequestdelayed",30;"dockingrequestsupplly",10;"dockingrequestrepair",20;"dockingrequestmedical",20;"dockingrequestsecurity",30;"undockingrequest","normal",10;"undockingdenied",30;"undockingdelayed")
chatter_type = pick(5;"emerg",15;"policescan",15;"traveladvisory",5;"pathwarning",150;"dockingrequestgeneric",30;"undockingrequest","normal",10;"undockingdenied",25;"civvieleaks")
//the following filters *always* fire their 'unique' event when they're tripped, simply because the conditions behind them are quite rare to begin with
else if(org_type == "smuggler" && org_type2 != "system defense") //just straight up funnel smugglers into always being caught, otherwise we get them asking for traffic info and stuff
@@ -129,14 +129,14 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
else if((org_type == "smuggler" || org_type == "pirate") && org_type2 != "system defense") //but if we roll THIS combo, time to alert the SDF to get off their asses
chatter_type = "hostiledetected"
//SDF-specific events that need to filter based on the second party (basically just the following SDF-unique list with the soft-result ship scan thrown in)
else if(org_type == "system defense" && (org_type == "government" || org_type == "neutral" || org_type == "military" || org_type == "corporate")) //let's see if we can narrow this down, I didn't see many ship-to-ship scans
chatter_type = pick(75;"policeshipscan","sdfpatrolupdate",75;"sdfendingpatrol",30;"dockingrequestgeneric",30;"dockingrequestdelayed",30;"dockingrequestsupply",30;"dockingrequestrepair",30;"dockingrequestmedical",30;"dockingrequestsecurity",20;"undockingrequest",75;"sdfbeginpatrol",50;"normal")
else if(org_type == "system defense" && (org_type2 == "government" || org_type2 == "neutral" || org_type2 == "military" || org_type2 == "corporate" || org_type2 == "spacer")) //let's see if we can narrow this down, I didn't see many ship-to-ship scans
chatter_type = pick(75;"policeshipscan","sdfpatrolupdate",75;"sdfendingpatrol",180;"dockingrequestgeneric",20;"undockingrequest",75;"sdfbeginpatrol",50;"normal",10;"civvieleaks")
//SDF-specific events that don't require the secondary at all, in the event that we manage to roll SDF + hostile/smuggler or something
else if(org_type == "system defense")
chatter_type = pick("sdfpatrolupdate",60;"sdfendingpatrol",30;"dockingrequestgeneric",30;"dockingrequestdelayed",30;"dockingrequestsupply",30;"dockingrequestrepair",30;"dockingrequestmedical",30;"dockingrequestsecurity",20;"undockingrequest",80;"sdfbeginpatrol","normal")
chatter_type = pick("sdfpatrolupdate",60;"sdfendingpatrol",120;"dockingrequestgeneric",20;"undockingrequest",80;"sdfbeginpatrol","normal","sdfchatter")
//if we somehow don't match any of the other existing filters once we've run through all of them
else
chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",30;"dockingrequestgeneric",30;"dockingrequestdelayed",30;"dockingrequestdenied",30;"dockingrequestsupply",30;"dockingrequestrepair",30;"dockingrequestmedical",30;"dockingrequestsecurity",30;"undockingrequest",30;"undockingdenied",30;"undockingdelayed","normal")
chatter_type = pick(5;"emerg",25;"policescan",25;"traveladvisory",30;"pathwarning",90;"dockingrequestgeneric",30;"undockingrequest",30;"undockingdenied","normal",25;"civvieleaks")
//I probably should do some kind of pass here to work through all the possible combinations of major factors and see if the filtering list needs reordering or modifying, but I really can't be arsed
//DEBUG BLOCK
@@ -175,11 +175,11 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
switch(chatter_type)
//mayday call
if("emerg")
var/problem = pick("We have hull breaches on multiple decks","We have unknown hostile life forms on board","Our primary drive is failing","We have [pick("asteroids","space debris")] impacting the hull","We're experiencing a total loss of engine power","We have hostile ships closing fast","There's smoke in the cockpit","We have unidentified boarders","Our RCS are malfunctioning and we're losing stability","Our life support [pick("is failing","has failed")]")
var/problem = pick("We have hull breaches on multiple decks","We have unknown hostile life forms on board","Our primary drive is failing","We have [pick("asteroids","space debris")] impacting the hull","We're experiencing a total loss of engine power","We have hostile ships closing fast","There's smoke [pick("in the cockpit","on the bridge")]","We have unidentified boarders","Our RCS are malfunctioning and we're losing stability","Our life support [pick("is failing","has failed")]")
msg("+Mayday, mayday, mayday!+ This is [combined_first_name] declaring an emergency! [problem]!","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control, copy. Switch to emergency responder channel [ertchannel].")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("Understood [using_map.dock_name] Control, switching now.","[prefix] [shipname]")
//Control scan event: soft outcome
if("policescan")
@@ -187,21 +187,21 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
var/complain = pick("I hope this doesn't take too long.","Can we hurry this up?","Make it quick.","This better not take too long.","Is this really necessary?")
var/completed = pick("You're free to proceed.","Everything looks fine, carry on.","You're clear, move along.","Apologies for the delay, you're clear.","Switch to channel [sdfchannel] and await further instruction.")
msg("[combined_first_name], this is [using_map.dock_name] Control, your [pick("ship","vessel","starship")] has been flagged for routine inspection. Hold position and prepare to be scanned.")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[confirm] [using_map.dock_name] Control, holding position.","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("Your compliance is appreciated, [combined_first_name]. Scan commencing.")
sleep(10 SECONDS)
sleep(rand(3,6)*2 SECONDS)
msg(complain,"[prefix] [shipname]")
sleep(15 SECONDS)
sleep(rand(3,6)*3 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Scan complete. [completed]")
//Control scan event: hard outcome
if("policeflee")
var/uhoh = pick("No can do chief, we got places to be.","Sorry but we've got places to be.","Not happening.","Ah fuck, who ratted us out this time?!","You'll never take me alive!","Hey, I have a cloaking device! You can't see me!","I'm going to need to ask for a refund on that stealth drive...","I'm afraid I can't do that, Control.","Ah |hell|.","Fuck!","This isn't the ship you're looking for.","Well. This is awkward.","Uh oh.","I surrender!")
msg("Unknown [pick("ship","vessel","starship")], this is [using_map.dock_name] Control, identify yourself and submit to a full inspection. Flying without an active transponder is a violation of interstellar shipping regulations.")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[uhoh]","[shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("This is [using_map.starsys_name] Defense Control to all local assets: vector to interdict and detain [combined_first_name]. Control out.","[using_map.starsys_name] Defense Control")
//SDF scan event: soft outcome
if("policeshipscan")
@@ -209,160 +209,195 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
var/complain = pick("I hope this doesn't take too long.","Can we hurry this up?","Make it quick.","This better not take too long.","Is this really necessary?")
var/completed = pick("You're free to proceed.","Everything looks fine, carry on.","You're clear. Move along.","Apologies for the delay, you're clear.","Switch to channel [sdfchannel] and await further instruction.")
msg("[combined_second_name], this is [combined_first_name], your [pick("ship","vessel","starship")] has been flagged for routine inspection. Hold position and prepare to be scanned.","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[confirm] [combined_first_name], holding position.","[secondprefix] [secondshipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("Your compliance is appreciated, [combined_second_name]. Scan commencing.","[prefix] [shipname]")
sleep(10 SECONDS)
sleep(rand(3,6)*2 SECONDS)
msg(complain,"[secondprefix] [secondshipname]")
sleep(15 SECONDS)
sleep(rand(3,6)*3 SECONDS)
msg("[combined_second_name], this is [combined_first_name]. Scan complete. [completed]","[prefix] [shipname]")
//SDF scan event: hard outcome
if("policeshipflee")
var/uhoh = pick("No can do chief, we got places to be.","Sorry but we've got places to be.","Not happening.","Ah fuck, who ratted us out this time?!","You'll never take me alive!","Hey, I have a cloaking device! You can't see me!","I'm going to need to ask for a refund on that stealth drive...","I'm afraid I can't do that, |[shipname]|.","Ah |hell|.","Fuck!","This isn't the ship you're looking for.","Well. This is awkward.","Uh oh.","I surrender!")
msg("Unknown [pick("ship","vessel","starship")], this is [combined_second_name], identify yourself and submit to a full inspection. Flying without an active transponder is a violation of interstellar shipping regulations.","[secondprefix] [secondshipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[uhoh]","[shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[using_map.starsys_name] Defense Control, this is [combined_second_name]. We have a situation here, please advise.","[secondprefix] [secondshipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("Defense Control copies, [combined_second_name], reinforcements are en route. Switch further communications to encrypted band [sdfchannel].","[using_map.starsys_name] Defense Control")
//SDF scan event: engage primary in combat! fairly rare since it needs a pirate/vox + SDF roll
if("policeshipcombat")
var/battlestatus = pick("requesting reinforcements.","we need backup! Now!","holding steady.","we're holding our own for now.","we have them on the run.","they're trying to make a run for it!","we have them right where we want them.","we're badly outgunned!","we have them outgunned.","we're outnumbered here!","we have them outnumbered.","this'll be a cakewalk.",10;"notify their next of kin.")
msg("[using_map.starsys_name] Defense Control, this is [combined_second_name], engaging [combined_first_name] [pick("near route","in sector")] [rand(1,100)], [battlestatus]","[secondprefix] [secondshipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[using_map.starsys_name] Defense Control copies, [combined_second_name]. Keep us updated.","[using_map.starsys_name] Defense Control")
//SDF event: patrol update
if("sdfpatrolupdate")
var/statusupdate = pick("nothing unusual so far","nothing of note","everything looks clear so far","ran off some [pick("pirates","marauders")] near route [pick(1,100)], [pick("no","minor")] damage sustained, continuing patrol","situation normal, no suspicious activity yet","minor incident on route [pick(1,100)]","Code 7-X [pick("on route","in sector")] [pick(1,100)], situation is under control","seeing a lot of traffic on route [pick(1,100)]","caught a couple of smugglers [pick("on route","in sector")] [pick(1,100)]","sustained some damage in a skirmish just now, we're heading back for repairs")
msg("[using_map.starsys_name] Defense Control, this is [combined_first_name] reporting in, [statusupdate], over.","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[using_map.starsys_name] Defense Control copies, [combined_first_name]. Keep us updated, out.","[using_map.starsys_name] Defense Control")
//SDF event: end patrol
if("sdfendingpatrol")
var/appreciation = pick("Copy","Understood","Affirmative","10-4","Roger that")
var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name], returning from our system patrol route, requesting permission to [landing_short].","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//SDF event: general chatter
if("sdfchatter")
var/chain = pick("codecheck","commscheck")
switch(chain)
if("codecheck")
msg("Check. Check. |Check|. Uhhh... check? Wait. Wait! Hold on. Yeah, okay, I gotta call this one in.","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[using_map.dock_name] Control, confirm auth-code... [rand(1,9)][rand(1,9)][rand(1,9)]-[pick("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega")]?","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("One moment... yeah, that code checks out [combined_first_name].")
sleep(rand(3,6) SECONDS)
msg("|(sigh)| Copy that Control. You! Move along!","[prefix] [shipname]")
if("commscheck")
msg("Control this is [combined_first_name], we're getting some interference in our area. [pick("How's our line?","Do you read?","How copy, over?")]","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("Control reads you loud and clear [combined_first_name].","[using_map.starsys_name] Defense Control")
sleep(rand(3,6) SECONDS)
msg("[pick("Copy that","Thanks,","Roger that")] Control. [combined_first_name] out.","[prefix] [shipname]")
//Civil event: leaky chatter
if("civvieleaks")
var/commleak = pick("thatsmywife","missingkit","pipeleaks","weirdsmell","weirdsmell2")
switch(commleak)
if("thatsmywife")
msg("-so then I says to him, |that's no [pick("space carp","space shark","vox","garbage scow","freight liner","cargo hauler","superlifter")], that's my +wife!+| And he-","[prefix] [shipname]")
if("missingkit")
msg("-did you get the kit from down on deck [rand(1,4)]? I need th-","[prefix] [shipname]")
if("pipeleaks")
msg("I swear if these pipes keep leaking I'm going to-","[prefix] [shipname]")
if("weirdsmell")
msg("-and where the hell is that smell coming fr-","[prefix] [shipname]")
if("weirdsmell2")
msg("-hat in the [pick("three","five","seven","nine")] hells did you |eat| [pick("ensign","crewman")]? This compartment reeks of-","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], your internal comms are leaking[pick("."," again.",", again.",". |Again|.")]")
sleep(rand(3,6) SECONDS)
msg("Sorry Control, won't happen again.","[prefix] [shipname]")
//DefCon event: hostile found
if("hostiledetected")
var/orders = pick("Engage on sight","Engage with caution","Engage with extreme prejudice","Engage at will","Search and destroy","Bring them in alive, if possible","Interdict and detain","Keep your eyes peeled","Bring them in, dead or alive","Stay alert")
msg("This is [using_map.starsys_name] Defense Control to all SDF assets. Priority update follows.","[using_map.starsys_name] Defense Control")
sleep(5 SECONDS)
msg("Be on the lookout for [combined_first_name], last sighted near route [rand(1,100)]. [orders]. DefCon, out.","[using_map.starsys_name] Defense Control")
sleep(rand(3,6) SECONDS)
msg("Be on the lookout for [combined_first_name], last sighted [pick("near route","in sector","near sector")] [rand(1,100)]. [orders]. DefCon, out.","[using_map.starsys_name] Defense Control")
//Ship event: distress call, under attack
if("distress")
msg("+Mayday, mayday, mayday!+ This is [combined_first_name] declaring an emergency! We are under attack by [combined_second_name]! Requesting immediate assistance!","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.starsys_name] Defense Control, copy. SDF is en route, contact on [sdfchannel].")
sleep(5 SECONDS)
msg("Understood [using_map.starsys_name] Defense Control, switching now.","[prefix] [shipname]")
var/state = pick(66;"calm",34;"panic")
switch(state)
if("calm")
msg("[using_map.starsys_name] Defense Control, this is [combined_first_name].","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("We read you. Go ahead, [combined_first_name].","[using_map.starsys_name] Defense Control")
sleep(rand(3,6) SECONDS)
msg("Another vessel in our area is moving [pick("aggressively","suspiciously","erratically","unpredictably","with clear hostile intent")], please advise? Forwarding sensor data now.","[prefix] [shipname]","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], [using_map.starsys_name] Defense Control copies. Sensor data matches logged profile for [combined_second_name]. SDF units are en route to your location.","[using_map.starsys_name] Defense Control")
sleep(rand(3,6) SECONDS)
msg("[pick("Appreciated","Copy that","Understood")], Control. Switching to [sdfchannel] to coordinate.","[prefix] [shipname]")
if("panic")
msg("+Mayday, mayday, mayday!+ This is [combined_first_name] declaring an emergency! We are under attack by [combined_second_name]! Requesting immediate assistance!","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.starsys_name] Defense Control, copy. SDF is en route, contact on [sdfchannel].")
sleep(rand(3,6) SECONDS)
msg("[pick("Copy that","Understood")] [using_map.starsys_name] Defense Control, switching now!","[prefix] [shipname]")
//Control event: travel advisory
if("traveladvisory")
var/flightwarning = pick("Solar flare activity is spiking and expected to cause issues along main flight lanes [rand(1,33)], [rand(34,67)], and [rand(68,100)]","Pirate activity is on the rise, stay close to System Defense vessels","We're seeing a rise in illegal salvage operations, please report any unusual activity to the nearest SDF vessel via channel [sdfchannel]","Vox Marauder activity is higher than usual, report any unusual activity to the nearest System Defense vessel","A quarantined [pick("fleet","convoy")] is passing through the system along route [rand(1,100)], please observe minimum safe distance","A prison [pick("fleet","convoy")] is passing through the system along route [rand(1,100)], please observe minimum safe distance","Traffic volume is higher than normal, expect processing delays","Anomalous bluespace activity detected along route [rand(1,100)], exercise caution","Smugglers have been particularly active lately, expect increased security scans","Depots are currently experiencing a fuel shortage, expect delays and higher rates","Asteroid mining has displaced debris dangerously close to main flight lanes on route [rand(1,100)], watch for potential impactors","[pick("Pirate","Vox Marauder")] and System Defense forces are currently engaged in skirmishes throughout the system, please steer clear of any active combat zones","A [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship")] has collided with a [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship")] near route [rand(1,100)], watch for debris and do not impede emergency service vessels","A [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship")] on route [rand(1,100)] has experienced total engine failure. Emergency response teams are en route, please observe minimum safe distances and do not impede emergency service vessels","Transit routes have been recalculated to adjust for planetary drift. Please synch your astronav computers as soon as possible to avoid delays and difficulties","[pick("Bounty hunters","System Defense officers","Mercenaries")] are currently searching for a wanted fugitive, report any sightings of suspicious activity to System Defense via channel [sdfchannel]","Mercenary contractors are currently conducting aggressive [pick("piracy","marauder")] suppression operations",10;"It's space carp breeding season. [pick("Stars","Gods","God","Goddess")] have mercy on you all, because the carp won't")
var/flightwarning = pick("Solar flare activity is spiking and expected to cause issues along main flight lanes [rand(1,33)], [rand(34,67)], and [rand(68,100)]","Pirate activity is on the rise, stay close to System Defense vessels","We're seeing a rise in illegal salvage operations, please report any unusual activity to the nearest SDF vessel via channel [sdfchannel]","Vox Marauder activity is higher than usual, report any unusual activity to the nearest System Defense vessel","A quarantined [pick("fleet","convoy")] is passing through the system along route [rand(1,100)], please observe minimum safe distance","A prison [pick("fleet","convoy")] is passing through the system along route [rand(1,100)], please observe minimum safe distance","Traffic volume is higher than normal, expect processing delays","Anomalous bluespace activity detected [pick("along route [rand(1,100)]","in sector [rand(1,100)]")], exercise caution","Smugglers have been particularly active lately, expect increased security scans","Depots are currently experiencing a fuel shortage, expect delays and higher rates","Asteroid mining has displaced debris dangerously close to main flight lanes on route [rand(1,100)], watch for potential impactors","[pick("Pirate","Vox Marauder")] and System Defense forces are currently engaged in skirmishes throughout the system, please steer clear of any active combat zones","A [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship","mining barge","salvage trawler")] has collided with a [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship","mining barge","salvage trawler")] near route [rand(1,100)], watch for debris and do not impede emergency service vessels","A [pick("fuel tanker","cargo liner","passenger liner","freighter","transport ship","mining barge","salvage trawler")] on route [rand(1,100)] has experienced total engine failure. Emergency response teams are en route, please observe minimum safe distances and do not impede emergency service vessels","Transit routes have been recalculated to adjust for planetary drift. Please synch your astronav computers as soon as possible to avoid delays and difficulties","[pick("Bounty hunters","System Defense officers","Mercenaries")] are currently searching for a wanted fugitive, report any sightings of suspicious activity to System Defense via channel [sdfchannel]","Mercenary contractors are currently conducting aggressive [pick("piracy","marauder")] suppression operations",10;"It's space [pick("carp","shark")] breeding season. [pick("Stars","Skies","Gods","God","Goddess","Fates")] have mercy on you all")
msg("This is [using_map.dock_name] Control to all vessels in the [using_map.starsys_name] system. Priority travel advisory follows.")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[flightwarning]. Control out.")
//Control event: warning to a specific vessel
if("pathwarning")
var/navhazard = pick("a pocket of intense radiation","a pocket of unstable gas","a debris field","a secure installation","an active combat zone","a quarantined ship","a quarantined installation","a quarantined sector","a live-fire SDF training exercise","an ongoing Search & Rescue operation")
var/navhazard = pick("a pocket of intense radiation","a pocket of unstable gas","a debris field","a secure installation","an active combat zone","a quarantined ship","a quarantined installation","a quarantined sector","a live-fire SDF training exercise","an ongoing Search & Rescue operation","a hazardous derelict","an intense electrical storm","an intense ion storm","a shoal of space carp","a pack of space sharks","an asteroid infested with gnat hives","a protected space ray habitat","a region with anomalous bluespace activity","a rogue comet")
var/confirm = pick("Understood","Roger that","Affirmative","Our bad","Thanks for the heads up")
var/safetravels = pick("Fly safe out there","Good luck","Safe travels","Godspeed","Stars guide you","Don't let it happen again")
msg("[combined_first_name], this is [using_map.dock_name] Control, your [pick("ship","vessel","starship")] is approaching [navhazard], observe minimum safe distance and adjust your heading appropriately.")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[confirm] [using_map.dock_name] Control, adjusting course.","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("Your compliance is appreciated, [combined_first_name]. [safetravels].")
//Ship event: docking request (generic)
if("dockingrequestgeneric")
var/appreciation = pick("Much appreciated","Many thanks","Understood","Cheers")
var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
sleep(5 SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//Ship event: docking request (denied)
if("dockingrequestdenied")
var/reason = pick("we don't have any landing pads large enough for your vessel","we don't have the necessary facilities for your vessel type or class")
var/disappointed = pick("That's unfortunate. [combined_first_name], out.","Damn shame. We'll just have to keep moving. [combined_first_name], out.","[combined_first_name], out.")
msg("[callname], this is [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Request denied, [reason].")
sleep(5 SECONDS)
msg("Understood, [using_map.dock_name] Control. [disappointed]","[prefix] [shipname]")
//Ship event: docking request (delayed)
if("dockingrequestdelayed")
var/reason = pick("we don't have any free landing pads right now, please hold for three minutes","you're too far away, please close to ten thousand meters","we're seeing heavy traffic around the landing pads right now, please hold for three minutes","we're currently cleaning up a fuel spill on one of our free pads, please hold for three minutes","there are loose containers on our free pads, stand by for a couple of minutes whilst we secure them","another vessel has aerospace priority right now, please hold for three minutes")
var/request_type = pick(100;"generic",40;"delayed",40;"supply",20;"repair",20;"medical",20;"security")
var/appreciation = pick("Much appreciated","Many thanks","Understood","Perfect, thank you","Excellent, thanks","Great","Copy that")
var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Request denied, [reason] and resubmit your request.")
sleep(5 SECONDS)
msg("Understood, [using_map.dock_name] Control.","[prefix] [shipname]")
sleep(180 SECONDS)
msg("[callname], this is [combined_first_name], resubmitting [landing_move].","[prefix] [shipname]")
sleep (5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Everything appears to be in order now, permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
sleep(5 SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//Ship event: docking request (resupply)
if("dockingrequestsupply")
var/preintensifier = pick(75;"getting ",75;"running ","") //whitespace hack, sometimes they'll add a preintensifier, but not always
var/intensifier = pick("very","pretty","critically","extremely","dangerously","desperately","kinda","a little","a bit","rather","sorta")
var/low_thing = pick("ammunition","munitions","clean water","food","spare parts","medical supplies","reaction mass","gas","hydrogen fuel","phoron fuel","fuel",10;"tea",10;"coffee",10;"soda",10;"pizza",10;"beer",10;"booze",10;"vodka",10;"snacks") //low chance of a less serious shortage
var/appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name]. We're [preintensifier][intensifier] low on [low_thing]. Requesting permission to [landing_short] for resupply.","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
sleep(5 SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//Ship event: docking request (repair/maint)
if("dockingrequestrepair")
var/damagestate = pick("We've experienced some hull damage","We're suffering minor system malfunctions","We're having some technical issues","We're overdue maintenance","We have several minor space debris impacts","We've got some battle damage here","Our reactor output is fluctuating","We're hearing some weird noises from the [pick("engines","pipes","ducting","HVAC")]","Our artificial gravity generator has failed","Our life support is failing","Our environmental controls are busted","Our water recycling system has shorted out","Our navcomp is freaking out","Our systems are glitching out","We just got caught in a solar flare","We had a close call with an asteroid","We have a minor [pick("fuel","water","oxygen","gas")] leak","We have depressurized compartments","We have a hull breach","Our shield generator is on the fritz","Our RCS is acting up","One of our [pick("hydraulic","pneumatic")] systems has depressurized","Our repair bots are malfunctioning")
var/appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name]. [damagestate]. Requesting permission to [landing_short] for repairs and maintenance.","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Repair crews are standing by, contact them on channel [engchannel].")
sleep(5 SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//Ship event: docking request (medical)
if("dockingrequestmedical")
var/medicalstate = pick("multiple casualties","several cases of radiation sickness","an unknown virus","an unknown infection","a critically injured VIP","sick refugees","multiple cases of food poisoning","injured passengers","sick passengers","injured engineers","wounded marines","a delicate situation","a pregnant passenger","injured castaways","recovered escape pods","unknown escape pods")
var/appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
var/dockingplan = pick("Starting final approach now.","Commencing landing procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name]. We have [medicalstate] on board. Requesting permission to [landing_short] for medical assistance.","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Medtechs are standing by, contact them on channel [medchannel].")
sleep(5 SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//Ship event: docking request (security)
if("dockingrequestsecurity")
var/species = pick("human","unathi","lizard","tajaran","feline","skrell","akula","promethean","sergal","synthetic","robotic","teshari","avian","vulpkanin","canine","vox","zorren","hybrid","mixed-species","vox","grey","alien")
var/securitystate = pick("several [species] convicts","a captured pirate","a wanted criminal","[species] stowaways","incompetent [species] shipjackers","a delicate situation","a disorderly passenger","disorderly [species] passengers","ex-mutineers","a captured vox marauder","captured vox marauders","stolen goods","a container full of confiscated contraband","containers full of confiscated contraband",5;"a very lost shadekin",5;"a raging case of [pick("spiders","crabs")]") //gotta have a little something to lighten the mood now and then
var/appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","Perfect, thank you")
var/dockingplan = pick("Starting final approach now.","Commencing docking procedures.","Autopilot engaged.","Approach vector locked in.","In the pipe, five by five.")
msg("[callname], this is [combined_first_name]. We have [securitystate] on board and require security assistance. Requesting permission to [landing_short].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Security teams are standing by, contact them on channel [secchannel].")
sleep(5 SECONDS)
switch(request_type)
if("generic")
msg("[callname], this is [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
if("delayed")
var/reason = pick("we don't have any free landing pads right now, please hold for a few minutes","you're too far away, please close to ten thousand meters","we're seeing heavy traffic around the landing pads right now, please hold for a few minutes","we're currently cleaning up a fuel spill on one of our free pads, please hold for a few minutes","there are loose containers on our free pads, stand by for a couple of minutes whilst we secure them","another vessel has aerospace priority right now, please hold for a few minutes")
msg("[callname], this is [combined_first_name], [pick("stopping by","passing through")] on our way to [destname], requesting permission to [landing_short].","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Request denied, [reason] and resubmit your request.")
sleep(rand(3,6) SECONDS)
msg("Understood, [using_map.dock_name] Control.","[prefix] [shipname]")
sleep(rand(3,6)*60 SECONDS)
msg("[callname], this is [combined_first_name], resubmitting [landing_move].","[prefix] [shipname]")
sleep (5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Everything appears to be in order now, permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
if("supply")
var/preintensifier = pick(75;"getting ",75;"running ","",15;"like, ") //whitespace hack, sometimes they'll add a preintensifier, but not always
var/intensifier = pick("very","pretty","critically","extremely","dangerously","desperately","kinda","a little","a bit","rather","sorta")
var/low_thing = pick("ammunition","munitions","clean water","food","spare parts","medical supplies","reaction mass","gas","hydrogen fuel","phoron fuel","fuel",10;"tea",10;"coffee",10;"soda",10;"pizza",10;"beer",10;"booze",10;"vodka",10;"snacks") //low chance of a less serious shortage
appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
msg("[callname], this is [combined_first_name]. We're [preintensifier][intensifier] low on [low_thing]. Requesting permission to [landing_short] for resupply.","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in.")
if("repair")
var/damagestate = pick("We've experienced some hull damage","We're suffering minor system malfunctions","We're having some [pick("weird","strange","odd","unusual")] technical issues","We're overdue maintenance","We have several minor space debris impacts","We've got some battle damage here","Our reactor output is fluctuating","We're hearing some weird noises from the [pick("engines","pipes","ducting","HVAC")]","We just got caught in a solar flare","We had a close call with an asteroid","We have a minor [pick("fuel","water","oxygen","gas")] leak","We have depressurized compartments","We have a hull breach","One of our [pick("hydraulic","pneumatic")] systems has depressurized","Our [pick("life support","water recycling system","navcomp","shield generator","RCS","auto-repair system","artificial gravity generator","environmental control system")] is [pick("failing","acting up","on the fritz","shorting out","glitching out","freaking out","malfunctioning")]")
appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
msg("[callname], this is [combined_first_name]. [damagestate]. Requesting permission to [landing_short] for repairs and maintenance.","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Repair crews are standing by, contact them on channel [engchannel].")
if("medical")
var/species = pick("human","humanoid","unathi","lizard","tajaran","feline","skrell","akula","promethean","sergal","synthetic","robotic","teshari","avian","vulpkanin","canine","vox","zorren","hybrid","mixed-species","vox","grey","alien",5;"catslug")
var/medicalstate = pick("multiple casualties","several cases of radiation sickness","an unknown virus","an unknown infection","a critically injured VIP","sick refugees","multiple cases of food poisoning","injured [pick("","[species] ")]passengers","sick [pick("","[species] ")]passengers","injured engineers","wounded marines","a delicate situation","a pregnant passenger","injured [pick("","[species] ")]castaways","recovered escape pods","unknown escape pods")
appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","We owe you one","I owe you one","Perfect, thank you")
msg("[callname], this is [combined_first_name]. We have [medicalstate] on board. Requesting permission to [landing_short] for medical assistance.","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Medtechs are standing by, contact them on channel [medchannel].")
if("security")
var/species = pick("human","humanoid","unathi","lizard","tajaran","feline","skrell","akula","promethean","sergal","synthetic","robotic","teshari","avian","vulpkanin","canine","vox","zorren","hybrid","mixed-species","vox","grey","alien",5;"catslug")
var/securitystate = pick("several [species] convicts","a captured pirate","a wanted criminal","[species] stowaways","incompetent [species] shipjackers","a delicate situation","a disorderly passenger","disorderly [species] passengers","ex-mutineers","a captured vox marauder","captured vox marauders","stolen goods","[pick("a container","containers")] full of [pick("confiscated contraband","stolen goods")]",5;"a very lost shadekin",15;"a buncha lost-looking uh... cat... slug... |things?|",10;"a raging case of [pick("spiders","crabs","geese","gnats","sharks","carp")]") //gotta have a little something to lighten the mood now and then
appreciation = pick("Much appreciated","Many thanks","Understood","You're a lifesaver","Perfect, thank you")
msg("[callname], this is [combined_first_name]. We have [securitystate] on board and require security assistance. Requesting permission to [landing_short].","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted, proceed to [landing_zone]. Follow the green lights on your way in. Security teams are standing by, contact them on channel [secchannel].")
sleep(rand(3,6) SECONDS)
msg("[appreciation], [using_map.dock_name] Control. [dockingplan]","[prefix] [shipname]")
//Ship event: undocking request
if("undockingrequest")
var/request_type = pick(150;"generic",50;"delayed")
var/takeoff = pick("depart","launch")
var/safetravels = pick("Fly safe out there","Good luck","Safe travels","See you next week","Godspeed","Stars guide you")
var/thanks = pick("Appreciated","Thanks","Don't worry about us","We'll be fine","You too","So long")
var/takeoff = pick("depart","launch")
msg("[callname], this is [combined_first_name], requesting permission to [takeoff] from [landing_zone].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted. Docking clamps released. [safetravels].")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
switch(request_type)
if("generic")
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted. Docking clamps released. [safetravels].")
sleep(rand(3,6) SECONDS)
msg("[thanks], [using_map.dock_name] Control. This is [combined_first_name] setting course for [destname], out.","[prefix] [shipname]")
if("delayed")
var/denialreason = pick("Docking clamp malfunction, please hold","Fuel lines have not been secured","Ground crew are still on the pad","Loose containers are on the pad","Exhaust deflectors are not yet in position, please hold","There's heavy traffic right now, it's not safe for your vessel to launch","Another vessel has aerospace priority at this moment","Port officials are still aboard")
msg("Negative [combined_first_name], request denied. [denialreason]. Try again in a few minutes.")
sleep(rand(3,6)*60 SECONDS)
msg("[callname], this is [combined_first_name], re-requesting permission to depart from [landing_zone].","[prefix] [shipname]")
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Everything appears to be in order now, permission granted. Docking clamps released. [safetravels].")
sleep(rand(3,6) SECONDS)
msg("[thanks], [using_map.dock_name] Control. This is [combined_first_name] setting course for [destname], out.","[prefix] [shipname]")
//SDF event: starting patrol
if("sdfbeginpatrol")
@@ -370,51 +405,36 @@ var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller
var/thanks = pick("Appreciated","Thanks","Don't worry about us","We'll be fine","You too")
var/takeoff = pick("depart","launch","take off","dust off")
msg("[callname], this is [combined_first_name], requesting permission to [takeoff] from [landing_zone] to begin system patrol.","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Permission granted. Docking clamps released. [safetravels].")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[thanks], [using_map.dock_name] Control. This is [combined_first_name] beginning system patrol, out.","[prefix] [shipname]")
//Ship event: undocking request (denied)
if("undockingdenied")
var/takeoff = pick("depart","launch")
var/denialreason = pick("Security is requesting a full cargo inspection","Your ship has been impounded for multiple [pick("security","safety")] violations","Your ship is currently under quarantine lockdown","We have reason to believe there's an issue with your papers","Security personnel are currently searching for a fugitive and have ordered all outbound ships remain grounded until further notice")
msg("[callname], this is [combined_first_name], requesting permission to [takeoff] from [landing_zone].","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("Negative [combined_first_name], request denied. [denialreason].")
//Ship event: undocking request (delayed)
if("undockingdelayed")
var/denialreason = pick("Docking clamp malfunction, please hold","Fuel lines have not been secured","Ground crew are still on the pad","Loose containers are on the pad","Exhaust deflectors are not yet in position, please hold","There's heavy traffic right now, it's not safe for your vessel to launch","Another vessel has aerospace priority at this moment","Port officials are still aboard")
var/takeoff = pick("depart","launch")
var/safetravels = pick("Fly safe out there","Good luck","Safe travels","See you next week","Godspeed","Stars guide you")
var/thanks = pick("Appreciated","Thanks","Don't worry about us","We'll be fine","You too","So long")
msg("[callname], this is [combined_first_name], requesting permission to [takeoff] from [landing_zone].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("Negative [combined_first_name], request denied. [denialreason]. Try again in three minutes.")
sleep(180 SECONDS) //yes, three minutes
msg("[callname], this is [combined_first_name], re-requesting permission to depart from [landing_zone].","[prefix] [shipname]")
sleep(5 SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control. Everything appears to be in order now, permission granted. Docking clamps released. [safetravels].")
sleep(5 SECONDS)
msg("[thanks], [using_map.dock_name] Control. This is [combined_first_name] setting course for [destname], out.","[prefix] [shipname]")
if("slogan")
msg("The following is a sponsored message from [name].","Facility PA")
sleep (5 SECONDS)
sleep(5 SECONDS)
msg("[slogan]","Facility PA")
else //time for generic message
msg("[callname], this is [combined_first_name] on [mission] [pick(mission_noun)] to [destname], requesting [request].","[prefix] [shipname]")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[combined_first_name], this is [using_map.dock_name] Control, [response].")
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
msg("[using_map.dock_name] Control, [yes ? "thank you" : "understood"], out.","[prefix] [shipname]")
return //oops, forgot to restore this
/* //OLD BLOCK, for reference
//Ship sends request to ATC
msg(full_request,"[prefix] [shipname]"
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
//ATC sends response to ship
msg(full_response)
sleep(5 SECONDS)
sleep(rand(3,6) SECONDS)
//Ship sends response to ATC
msg(full_closure,"[prefix] [shipname]")
return
+102 -58
View File
@@ -11,12 +11,12 @@
var/list/ship_prefixes = list() //Some might have more than one! Like NanoTrasen. Value is the mission they perform, e.g. ("ABC" = "mission desc")
var/complex_tasks = FALSE //enables complex task generation
//how does it work? simple: if you have complex tasks enabled, it goes; PREFIX + TASK_TYPE + FLIGHT_TYPE
//e.g. NDV = Asset Protection + Patrol + Flight
//this overrides the standard PREFIX = TASK logic and allows you to use the ship prefix for subfactions (warbands, religions, whatever) within a faction, and define task_types at the faction level
//task_types are picked from completely at random in air_traffic.dm, much like flight_types, so be careful not to potentially create combos that make no sense!
var/list/task_types = list(
"logistics",
"patrol",
@@ -183,7 +183,8 @@
"Cwn Annwn",
"Morning Swan",
"Black Cat",
"Challenger"
"Challenger",
"Savage Chicken"
)
var/list/destination_names = list() //Names of static holdings that the organization's ships visit regularly.
@@ -192,7 +193,7 @@
var/org_type = "neutral" //Valid options are "neutral", "corporate", "government", "system defense", "military, "smuggler", & "pirate"
var/sysdef = FALSE //Are we the space cops?
var/autogenerate_destination_names = TRUE //Pad the destination lists with some extra random ones? see the proc below for info on that
var/slogans = list("This is a placeholder slogan, ding dong!") //Advertising slogans. Who doesn't want more obnoxiousness on the radio? Picked at random each time the slogan event fires. This has a placeholder so it doesn't runtime on trying to draw from a 0-length list in the event that new corps are added without full support.
/datum/lore/organization/New()
@@ -309,8 +310,8 @@
them being the foremost experts on the substance and its uses. In the modern day, NanoTrasen prides \
itself on being an early adopter to as many new technologies as possible, often offering the newest \
products to their employees. In an effort to combat complaints about being 'guinea pigs', Nanotrasen \
also offers one of the most comprehensive medical plans in Commonwealth space, up to and including cloning \
and therapy.\
also offers one of the most comprehensive medical plans in Commonwealth space, up to and including cloning, \
resleeving, and therapy.\
<br><br>\
NT's most well known products are its phoron based creations, especially those used in Cryotherapy. \
It also boasts a prosthetic line, which is provided to its employees as needed, and is used as an incentive \
@@ -403,9 +404,9 @@
org_type = "corporate"
slogans = list(
"Hephaestus Arms - When it comes to personal protection, nobody does it better.",
"Hephaestus Arms - Peace through Superior Firepower.",
"Hephaestus Arms - Don't be caught firing blanks."
"+Hephaestus Arms!+ - When it comes to +personal protection+, +nobody+ does it +better+.",
"+Hephaestus Arms!+ - Peace through +Superior Firepower+.",
"+Hephaestus Arms!+ - Don't be caught +firing blanks+."
)
ship_prefixes = list("HCV" = "a general operations", "HTV" = "a freight", "HLV" = "a munitions resupply", "HDV" = "an asset protection", "HDV" = "a preemptive deployment")
//War God Theme, updated
@@ -503,7 +504,7 @@
and everything in between. Their equipment tends to be top-of-the-line, most obviously shown by their incredibly \
human-like FBP designs. Vey's rise to stardom came from their introduction of resurrective cloning, although in \
recent years they've been forced to diversify as their patents expired and NanoTrasen-made medications became \
essential to modern cloning. \
essential to modern cloning and resleeving procedures. \
<br><br> \
For reasons known only to the board, Vey-Med's ship names seem to follow the same naming pattern as the Dionae use."
history = ""
@@ -719,7 +720,8 @@
slogans = list(
"Bishop Cybernetics - only the best in personal augmentation.",
"Bishop Cybernetics - why settle for flesh when you can have metal?",
"Bishop Cybernetics - make a statement."
"Bishop Cybernetics - make a statement.",
"Bishop Cybernetics - embrace the purity of the machine."
)
ship_prefixes = list("BCV" = "a general operations", "BCTV" = "a transportation", "BCSV" = "a research exchange")
//famous mechanical engineers
@@ -957,6 +959,7 @@
slogans = list(
"The FTU. We look out for the little guy.",
"There's no Trade like Free Trade.",
"There's no Union like the Free Trade Union.",
"Join the Free Trade Union. Because anything worth doing, is worth doing for money." //rule of acquisition #13
)
ship_prefixes = list("FTV" = "a general operations", "FTRP" = "a trade protection", "FTRR" = "a piracy suppression", "FTLV" = "a logistical support", "FTTV" = "a mercantile", "FTDV" = "a market establishment")
@@ -1333,6 +1336,7 @@
slogans = list(
"Oculum - All News, All The Time.",
"Oculum - We Keep An Eye Out.",
"Oculum - Nothing But The Truth.",
"Oculum - Your Eye On The Galaxy."
)
ship_prefixes = list("OBV" = "an investigation", "OBV" = "a distribution", "OBV" = "a journalism", "OBV" = "a general operations")
@@ -1354,7 +1358,9 @@
slogans = list(
"Centauri Provisions Bread Tubes - They're Not Just Edible, They're |Breadible!|",
"Centauri Provisions SkrellSnax - Not |Just| For Skrell!",
"Centauri Provisions Space Mountain Wind - It'll Take Your |Breath| Away!"
"Centauri Provisions Space Mountain Wind - It'll Take Your |Breath| Away!",
"Centauri Provisions Syndi-Cakes - A Taste So Good You'll Swear It's |Illegal|!",
"Centauri Provisions Tuna Snax - There's Nothing |Fishy| Going On Here!"
)
ship_prefixes = list("CPTV" = "a transport", "CPCV" = "a catering", "CPRV" = "a resupply", "CPV" = "a general operations")
destination_names = list(
@@ -1620,7 +1626,7 @@
"Vampir",
"Wendigo",
"Werewolf",
"Wraith"
"Wraith"
)
destination_names = list (
"Chimera HQ, Titan",
@@ -2186,23 +2192,40 @@
org_type = "pirate"
ship_prefixes = list("Ue-Katish pirate" = "a raiding", "Ue-Katish bandit" = "a raiding", "Ue-Katish raider" = "a raiding", "Ue-Katish enforcer" = "an enforcement")
ship_names = list(
"Keqxuer'xeu's Prize",
"Xaeker'qux' Bounty",
"Teq'ker'qerr's Mercy",
"Ke'teq's Thunder",
"Xumxerr's Compass",
"Xue'qux' Greed",
"Xaexuer's Slave",
"Xue'taq's Dagger",
"Teqxae's Madness",
"Taeqtaq'kea's Pride",
"Keqxae'xeu's Saber",
"Xueaeq's Disgrace",
"Xum'taq'qux' Star",
"Ke'xae'xe's Scream",
"Keq'keax' Blade"
ship_names = list()
/datum/lore/organization/other/uekatish/New()
..()
var/i = 20 //give us twenty random names
var/list/first_names = file2list('config/names/first_name_skrell.txt')
var/list/words = list(
"Prize",
"Bounty",
"Treasure",
"Pearl",
"Star",
"Mercy",
"Compass",
"Greed",
"Slave",
"Madness",
"Pride",
"Disgrace",
"Judgement",
"Wrath",
"Hatred",
"Vengeance",
"Fury",
"Thunder",
"Scream",
"Dagger",
"Saber",
"Lance",
"Blade"
)
while(i)
ship_names.Add("[pick(first_names)] [pick(words)]")
i--
/datum/lore/organization/other/marauders
name = "Vox Marauders"
@@ -2222,12 +2245,7 @@
org_type = "pirate"
ship_prefixes = list("vox marauder" = "a marauding", "vox raider" = "a raiding", "vox ravager" = "a raiding", "vox corsair" = "a raiding") //as assigned by control, second part shouldn't even come up
//blank out our shipnames for redesignation
ship_names = list(
)
/*
destination_names = list(
)
*/
ship_names = list()
/datum/lore/organization/other/marauders/New()
..()
@@ -2635,26 +2653,7 @@
//the tesh expeditionary fleet's closest analogue in modern terms would be the US Army Corps of Engineers, just with added combat personnel as well
ship_prefixes = list("TEF" = "a diplomatic", "TEF" = "a peacekeeping", "TEF" = "an escort", "TEF" = "an exploration", "TEF" = "a survey", "TEF" = "an expeditionary", "TEF" = "a pioneering")
//TODO: better ship names? I just took a bunch of random teshnames from the Random Name button and added a word.
ship_names = list(
"Leniri's Hope",
"Tatani's Venture",
"Ninai's Voyage",
"Miiescha's Claw",
"Ishena's Talons",
"Lili's Fang",
"Taalische's Wing",
"Cami's Pride",
"Schemisa's Glory",
"Shilirashi's Wit",
"Sanene's Insight",
"Aeimi's Wisdom",
"Ischica's Mind",
"Recite's Cry",
"Leseca's Howl",
"Iisi's Fury",
"Simascha's Revenge",
"Lisascheca's Vengeance"
)
ship_names = list()
destination_names = list(
"an Expeditionary Fleet RV point",
"an Expeditionary Fleet Resupply Ship",
@@ -2665,14 +2664,59 @@
"Expeditionary Fleet HQ"
)
/datum/lore/organization/gov/teshari/New()
..()
var/i = 20 //give us twenty random names
var/list/first_names = list(
"Leniri's",
"Tatani's",
"Ninai's",
"Miiescha's",
"Ishena's",
"Taalische's",
"Cami's",
"Schemisa's",
"Shilirashi's",
"Sanene's",
"Aeimi's",
"Ischica's",
"Shasche's",
"Leseca's",
"Iisi's",
"Simascha's",
"Lisascheca's"
)
var/list/words = list(
"Hope",
"Venture",
"Voyage",
"Talons",
"Fang",
"Wing",
"Pride",
"Glory",
"Wit",
"Insight",
"Wisdom",
"Mind",
"Cry",
"Howl",
"Fury",
"Revenge",
"Vengeance"
)
while(i)
ship_names.Add("[pick(first_names)] [pick(words)]")
i--
/datum/lore/organization/gov/altevian_hegemony
name = "The Altevian Hegemony"
name = "The Altevian Hegemony"
short_name = "Altevian Hegemony "
acronym = "AH"
desc = "The Altevians are a space-faring race of rodents that resemble Earth-like rats. \
They do not have a place they call home in terms of a planet, and instead have massive multiple-kilometer-long colony-ships \
that are constantly on the move and typically keep operations outside of known populated systems to not eat the resources from others. \
Their primary focus is trade and slavage operations and can be expected to be seen around both densely populated and empty systems for their work."
that are constantly on the move and typically keep operations outside of known populated systems to minimize potential conflicts over resources. \
Their primary focus is trade and salvage operations, and their ships can be expected to be seen around both densely populated and empty systems for their work."
history = ""
work = "salvage and trade operators"
headquarters = "AH-CV Migrant"
+1 -1
View File
@@ -448,7 +448,7 @@
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
//Precache the client with all other assets slowly, so as to not block other browse() calls
addtimer(CALLBACK(GLOBAL_PROC, /proc/getFilesSlow, src, SSassets.preload, FALSE), 5 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(getFilesSlow), src, SSassets.preload, FALSE), 5 SECONDS)
/mob/proc/MayRespawn()
return 0
@@ -68,11 +68,11 @@
for(var/gaiter in typesof(/obj/item/clothing/accessory/gaiter))
var/obj/item/clothing/accessory/gaiter_type = gaiter
gaiters[initial(gaiter_type.name)] = gaiter_type
gear_tweaks += new/datum/gear_tweak/path(sortTim(gaiters, /proc/cmp_text_asc))
gear_tweaks += new/datum/gear_tweak/path(sortTim(gaiters, GLOBAL_PROC_REF(cmp_text_asc)))
/datum/gear/mask/lace
display_name = "lace veil"
path = /obj/item/clothing/mask/lacemask
/datum/gear/mask/lace/New()
gear_tweaks += gear_tweak_free_color_choice
gear_tweaks += gear_tweak_free_color_choice
@@ -127,7 +127,7 @@
usr.audible_message("[usr] jingles the [src]'s bell.", runemessage = "jingle")
playsound(src, 'sound/items/pickup/ring.ogg', 50, 1)
jingled = 1
addtimer(CALLBACK(src, .proc/jingledreset), 50)
addtimer(CALLBACK(src, PROC_REF(jingledreset)), 50)
return
/obj/item/clothing/accessory/collar/bell/proc/jingledreset()
@@ -721,4 +721,4 @@
name = "drab crop jacket"
desc = "A cut down jacket that looks like it's light enough to wear on top of some other clothes. This one's a sort of olive-drab kind of colour."
icon_state = "cropjacket_drab"
item_state = "cropjacket_drab"
item_state = "cropjacket_drab"
+2 -2
View File
@@ -619,7 +619,7 @@ GLOBAL_LIST_EMPTY(vending_products)
use_power(vend_power_usage) //actuators and stuff
flick("[icon_state]-vend",src)
addtimer(CALLBACK(src, .proc/delayed_vend, R, user), vend_delay)
addtimer(CALLBACK(src, PROC_REF(delayed_vend), R, user), vend_delay)
/obj/machinery/vending/proc/delayed_vend(datum/stored_item/vending_product/R, mob/user)
R.get_product(get_turf(src))
@@ -777,7 +777,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(!throw_item)
return FALSE
throw_item.vendor_action(src)
INVOKE_ASYNC(throw_item, /atom/movable.proc/throw_at, target, rand(3, 10), rand(1, 3), src)
INVOKE_ASYNC(throw_item, TYPE_PROC_REF(/atom/movable, throw_at), target, rand(3, 10), rand(1, 3), src)
visible_message("<span class='warning'>\The [src] launches \a [throw_item] at \the [target]!</span>")
return 1
+2 -2
View File
@@ -334,7 +334,7 @@
/obj/item/weapon/storage/chewables/tobacco = 5,
/obj/item/weapon/storage/chewables/tobacco/fine = 5,
/obj/item/weapon/storage/box/matches = 10,
/obj/item/weapon/flame/lighter/random = 4,
/obj/item/weapon/flame/lighter = 4,
/obj/item/clothing/mask/smokable/ecig/util = 2,
///obj/item/clothing/mask/smokable/ecig/deluxe = 2,
/obj/item/clothing/mask/smokable/ecig/simple = 2,
@@ -363,7 +363,7 @@
/obj/item/weapon/storage/chewables/tobacco = 10,
/obj/item/weapon/storage/chewables/tobacco/fine = 20,
/obj/item/weapon/storage/box/matches = 1,
/obj/item/weapon/flame/lighter/random = 2,
/obj/item/weapon/flame/lighter/ = 2,
/obj/item/clothing/mask/smokable/ecig/util = 100,
///obj/item/clothing/mask/smokable/ecig/deluxe = 300,
/obj/item/clothing/mask/smokable/ecig/simple = 150,
@@ -3519,6 +3519,8 @@
/obj/item/weapon/reagent_containers/food/snacks/ratfruitcake = 15,
/obj/item/weapon/reagent_containers/food/snacks/ratpackburger = 8,
/obj/item/weapon/reagent_containers/food/snacks/ratpackcheese = 8,
/obj/item/weapon/reagent_containers/food/snacks/ratpackramen = 8,
/obj/item/weapon/reagent_containers/food/snacks/ratpacktaco = 8,
/obj/item/weapon/reagent_containers/food/snacks/ratpackturkey = 2)
prices = list(/obj/item/weapon/reagent_containers/food/snacks/ratprotein = 8,
@@ -3527,4 +3529,6 @@
/obj/item/weapon/reagent_containers/food/snacks/ratfruitcake = 8,
/obj/item/weapon/reagent_containers/food/snacks/ratpackburger = 10,
/obj/item/weapon/reagent_containers/food/snacks/ratpackcheese = 10,
/obj/item/weapon/reagent_containers/food/snacks/ratpackramen = 10,
/obj/item/weapon/reagent_containers/food/snacks/ratpacktaco = 10,
/obj/item/weapon/reagent_containers/food/snacks/ratpackturkey = 200)
@@ -24,8 +24,6 @@
/datum/eventkit/mob_spawner/tgui_static_data(mob/user)
var/list/data = list()
data["mob_paths"] = typesof(/mob);
data["initial_x"] = usr.x;
data["initial_y"] = usr.y;
data["initial_z"] = usr.z;
@@ -43,12 +41,13 @@
data["path"] = path;
var/mob/M = new path();
if(M)
data["default_path_name"] = M.name;
data["default_desc"] = M.desc;
data["default_flavor_text"] = M.flavor_text;
qdel(M);
if(path)
var/mob/M = new path();
if(M)
data["default_path_name"] = M.name;
data["default_desc"] = M.desc;
data["default_flavor_text"] = M.flavor_text;
qdel(M);
return data
@@ -60,7 +59,11 @@
return
switch(action)
if("select_path")
path = params["path"]
var/list/choices = typesof(/mob)
var/newPath = tgui_input_list(usr, "Please select the new path of the mob you want to spawn.", items = choices)
path = newPath
return TRUE
if("loc_lock")
loc_lock = !loc_lock
@@ -77,6 +80,10 @@
var/y = params["y"]
var/z = params["z"]
if(!name)
to_chat(usr, "<span class='warning'>Name cannot be empty.</span>")
return FALSE
var/turf/T = locate(x, y, z)
if(!T)
to_chat(usr, "<span class='warning'>Those coordinates are outside the boundaries of the map.</span>")
+2 -2
View File
@@ -69,7 +69,7 @@
// Spawn a single carp at given location.
/datum/event/carp_migration/proc/spawn_one_carp(var/loc)
var/mob/living/simple_mob/animal/M = new /mob/living/simple_mob/animal/space/carp/event(loc)
GLOB.destroyed_event.register(M, src, .proc/on_carp_destruction)
GLOB.destroyed_event.register(M, src, PROC_REF(on_carp_destruction))
spawned_carp.Add(M)
return M
@@ -83,7 +83,7 @@
// If carp is bomphed, remove it from the list.
/datum/event/carp_migration/proc/on_carp_destruction(var/mob/M)
spawned_carp -= M
GLOB.destroyed_event.unregister(M, src, .proc/on_carp_destruction)
GLOB.destroyed_event.unregister(M, src, PROC_REF(on_carp_destruction))
/datum/event/carp_migration/end()
. = ..()
+2 -2
View File
@@ -69,7 +69,7 @@
// Spawn a single gnat at given location.
/datum/event/gnat_migration/proc/spawn_one_gnat(var/loc)
var/mob/living/simple_mob/animal/M = new /mob/living/simple_mob/animal/space/gnat(loc)
GLOB.destroyed_event.register(M, src, .proc/on_gnat_destruction)
GLOB.destroyed_event.register(M, src, PROC_REF(on_gnat_destruction))
spawned_gnat.Add(M)
return M
@@ -83,7 +83,7 @@
// If gnat is bomphed, remove it from the list.
/datum/event/gnat_migration/proc/on_gnat_destruction(var/mob/M)
spawned_gnat -= M
GLOB.destroyed_event.unregister(M, src, .proc/on_gnat_destruction)
GLOB.destroyed_event.unregister(M, src, PROC_REF(on_gnat_destruction))
/datum/event/gnat_migration/end()
. = ..()
+3 -3
View File
@@ -53,7 +53,7 @@
// Spawn a single vermin at given location.
/datum/event/infestation/proc/spawn_one_vermin(var/loc)
var/mob/living/simple_mob/animal/M = new spawn_types(loc)
GLOB.destroyed_event.register(M, src, .proc/on_vermin_destruction)
GLOB.destroyed_event.register(M, src, PROC_REF(on_vermin_destruction))
spawned_vermin.Add(M)
return M
@@ -67,7 +67,7 @@
// If vermin is kill, remove it from the list.
/datum/event/infestation/proc/on_vermin_destruction(var/mob/M)
spawned_vermin -= M
GLOB.destroyed_event.unregister(M, src, .proc/on_vermin_destruction)
GLOB.destroyed_event.unregister(M, src, PROC_REF(on_vermin_destruction))
@@ -75,4 +75,4 @@
command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding all over the facility. Clear them out, before this starts to affect productivity.", "Vermin infestation")
#undef VERM_MICE
#undef VERM_LIZARDS
#undef VERM_LIZARDS
+2 -2
View File
@@ -69,7 +69,7 @@
// Spawn a single jellyfish at given location.
/datum/event/jellyfish_migration/proc/spawn_one_jellyfish(var/loc)
var/mob/living/simple_mob/animal/M = new /mob/living/simple_mob/vore/alienanimals/space_jellyfish(loc)
GLOB.destroyed_event.register(M, src, .proc/on_jellyfish_destruction)
GLOB.destroyed_event.register(M, src, PROC_REF(on_jellyfish_destruction))
spawned_jellyfish.Add(M)
return M
@@ -83,7 +83,7 @@
// If jellyfish is bomphed, remove it from the list.
/datum/event/jellyfish_migration/proc/on_jellyfish_destruction(var/mob/M)
spawned_jellyfish -= M
GLOB.destroyed_event.unregister(M, src, .proc/on_jellyfish_destruction)
GLOB.destroyed_event.unregister(M, src, PROC_REF(on_jellyfish_destruction))
/datum/event/jellyfish_migration/end()
. = ..()
+2 -2
View File
@@ -69,7 +69,7 @@
// Spawn a single ray at given location.
/datum/event/ray_migration/proc/spawn_one_ray(var/loc)
var/mob/living/simple_mob/animal/M = new /mob/living/simple_mob/animal/space/ray(loc)
GLOB.destroyed_event.register(M, src, .proc/on_ray_destruction)
GLOB.destroyed_event.register(M, src, PROC_REF(on_ray_destruction))
spawned_ray.Add(M)
return M
@@ -83,7 +83,7 @@
// If ray is bomphed, remove it from the list.
/datum/event/ray_migration/proc/on_ray_destruction(var/mob/M)
spawned_ray -= M
GLOB.destroyed_event.unregister(M, src, .proc/on_ray_destruction)
GLOB.destroyed_event.unregister(M, src, PROC_REF(on_ray_destruction))
/datum/event/ray_migration/end()
. = ..()
+2 -2
View File
@@ -69,7 +69,7 @@
// Spawn a single shark at given location.
/datum/event/shark_migration/proc/spawn_one_shark(var/loc)
var/mob/living/simple_mob/animal/M = new /mob/living/simple_mob/animal/space/shark/event(loc)
GLOB.destroyed_event.register(M, src, .proc/on_shark_destruction)
GLOB.destroyed_event.register(M, src, PROC_REF(on_shark_destruction))
spawned_shark.Add(M)
return M
@@ -83,7 +83,7 @@
// If shark is bomphed, remove it from the list.
/datum/event/shark_migration/proc/on_shark_destruction(var/mob/M)
spawned_shark -= M
GLOB.destroyed_event.unregister(M, src, .proc/on_shark_destruction)
GLOB.destroyed_event.unregister(M, src, PROC_REF(on_shark_destruction))
/datum/event/shark_migration/end()
. = ..()

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