mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-19 12:13:38 +01:00
[MIRROR] next globs (#12552)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73faa45a34
commit
5567a1a245
@@ -0,0 +1,81 @@
|
||||
#define PLAYER_HTML5_HTML "<!DOCTYPE html>\n \
|
||||
<html>\n \
|
||||
<head>\n \
|
||||
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=11\">\n \
|
||||
<script type=\"text/javascript\">\n \
|
||||
function noErrorMessages() { return true; }\n \
|
||||
window.onerror = noErrorMessages;\n \
|
||||
function SetMusic(url, time, volume) {\n \
|
||||
var player = document.getElementById('player');\n \
|
||||
// IE can't handle us setting the time before it loads, so we must wait for asynchronous load\n \
|
||||
var setTime = function () {\n \
|
||||
player.removeEventListener(\"canplay\", setTime);\n \
|
||||
player.volume = volume;\n \
|
||||
player.currentTime = time;\n \
|
||||
player.play();\n \
|
||||
};\n \
|
||||
if(url != \"\") player.addEventListener(\"canplay\", setTime, false);\n \
|
||||
player.src = url;\n \
|
||||
}\n \
|
||||
</script>\n \
|
||||
</head>\n \
|
||||
<body>\n \
|
||||
<audio id=\"player\"></audio>\n \
|
||||
</body>\n \
|
||||
</html>\n"
|
||||
|
||||
#define JS_BYJAX "function replaceContent() {\n \
|
||||
var args = Array.prototype.slice.call(arguments);\n \
|
||||
var id = args\[0\];\n \
|
||||
var content = args\[1\];\n \
|
||||
var callback = null;\n \
|
||||
if(args\[2\]){\n \
|
||||
callback = args\[2\];\n \
|
||||
if(args\[3\]){\n \
|
||||
args = args.slice(3);\n \
|
||||
}\n \
|
||||
}\n \
|
||||
var parent = document.getElementById(id);\n \
|
||||
if(typeof(parent)!=='undefined' && parent!=null){\n \
|
||||
parent.innerHTML = content?content:'';\n \
|
||||
}\n \
|
||||
if(callback && window\[callback\]){\n \
|
||||
window\[callback\].apply(null,args);\n \
|
||||
}\n \
|
||||
}"
|
||||
|
||||
#define JS_DROPDOWN "function dropdowns() {\n \
|
||||
var divs = document.getElementsByTagName('div');\n \
|
||||
var headers = new Array();\n \
|
||||
var links = new Array();\n \
|
||||
for(var i=0;i<divs.length;i++){\n \
|
||||
if(divs\[i\].className=='header') {\n \
|
||||
divs\[i\].className='header closed';\n \
|
||||
divs\[i\].innerHTML = divs\[i\].innerHTML+' +';\n \
|
||||
headers.push(divs\[i\]);\n \
|
||||
}\n \
|
||||
if(divs\[i\].className=='links') {\n \
|
||||
divs\[i\].className='links hidden';\n \
|
||||
links.push(divs\[i\]);\n \
|
||||
}\n \
|
||||
}\n \
|
||||
for(var i=0;i<headers.length;i++){\n \
|
||||
if(typeof(links\[i\])!== 'undefined' && links\[i\]!=null) {\n \
|
||||
headers\[i\].onclick = (function(elem) {\n \
|
||||
return function() {\n \
|
||||
if(elem.className.search('visible')>=0) {\n \
|
||||
elem.className = elem.className.replace('visible','hidden');\n \
|
||||
this.className = this.className.replace('open','closed');\n \
|
||||
this.innerHTML = this.innerHTML.replace('-','+');\n \
|
||||
}\n \
|
||||
else {\n \
|
||||
elem.className = elem.className.replace('hidden','visible');\n \
|
||||
this.className = this.className.replace('closed','open');\n \
|
||||
this.innerHTML = this.innerHTML.replace('+','-');\n \
|
||||
}\n \
|
||||
return false;\n \
|
||||
}\n \
|
||||
})(links\[i\]);\n \
|
||||
}\n \
|
||||
}\n \
|
||||
}"
|
||||
@@ -19,8 +19,8 @@ GLOBAL_LIST_EMPTY(surgery_steps) //list of all surgery steps |BS12
|
||||
GLOBAL_LIST_EMPTY(joblist) //list of all jobstypes, minus borg and AI
|
||||
|
||||
GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking.
|
||||
var/global/list/obj/item/pda/PDAs = list()
|
||||
var/global/list/obj/item/communicator/all_communicators = list()
|
||||
GLOBAL_LIST_EMPTY_TYPED(PDAs, /obj/item/pda)
|
||||
GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
|
||||
|
||||
// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them.
|
||||
GLOBAL_LIST_INIT(restricted_camera_networks, list(NETWORK_ERT,NETWORK_MERCENARY,"Secret", NETWORK_COMMUNICATORS))
|
||||
@@ -275,11 +275,17 @@ GLOBAL_LIST_EMPTY(mannequins)
|
||||
GLOB.wing_styles_list[path] = instance
|
||||
|
||||
paths = typesof(/datum/digest_mode)
|
||||
for(var/T in paths)
|
||||
var/datum/digest_mode/DM = new T
|
||||
for(var/path in paths)
|
||||
var/datum/digest_mode/DM = new path
|
||||
GLOB.digest_modes[DM.id] = DM
|
||||
init_crafting_recipes(GLOB.crafting_recipes)
|
||||
|
||||
paths = subtypesof(/datum/ai_laws)
|
||||
for(var/path in paths)
|
||||
var/datum/ai_laws/laws = new path
|
||||
GLOB.admin_laws += laws
|
||||
if(laws.selectable)
|
||||
GLOB.player_laws += laws
|
||||
/*
|
||||
// Custom species traits
|
||||
paths = subtypesof(/datum/trait)
|
||||
@@ -613,10 +619,10 @@ GLOBAL_LIST_INIT(changeling_fabricated_clothing, list(
|
||||
// This is to make some of the more OP superpowers a larger PITA to activate,
|
||||
// and to tell our new DNA datum which values to set in order to turn something
|
||||
// on or off.
|
||||
var/global/list/dna_activity_bounds[DNA_SE_LENGTH]
|
||||
GLOBAL_ALIST_EMPTY(dna_activity_bounds)
|
||||
|
||||
// Used to determine what each block means (admin hax and species stuff on /vg/, mostly)
|
||||
var/global/list/assigned_blocks[DNA_SE_LENGTH]
|
||||
GLOBAL_ALIST_EMPTY(assigned_blocks)
|
||||
|
||||
GLOBAL_LIST_EMPTY(gear_distributed_to)
|
||||
GLOBAL_LIST_EMPTY(overlay_cache) //cache recent overlays
|
||||
@@ -1399,8 +1405,8 @@ GLOBAL_LIST_INIT(finds_as_strings, list(
|
||||
|
||||
|
||||
//tgui law manager
|
||||
var/global/list/datum/ai_laws/admin_laws
|
||||
var/global/list/datum/ai_laws/player_laws
|
||||
GLOBAL_LIST_EMPTY_TYPED(admin_laws, /datum/ai_laws)
|
||||
GLOBAL_LIST_EMPTY_TYPED(player_laws, /datum/ai_laws)
|
||||
|
||||
//shield_gen/external
|
||||
GLOBAL_LIST_INIT(external_shield_gen_blockedturfs, list(
|
||||
|
||||
@@ -22,8 +22,8 @@ SUBSYSTEM_DEF(events)
|
||||
/*EVENT_LEVEL_MODERATE = */ new/datum/event_container/moderate,
|
||||
/*EVENT_LEVEL_MAJOR = */ new/datum/event_container/major
|
||||
)
|
||||
if(global.using_map.use_overmap)
|
||||
GLOB.overmap_event_handler.create_events(global.using_map.overmap_z, global.using_map.overmap_size, global.using_map.overmap_event_areas)
|
||||
if(using_map.use_overmap)
|
||||
GLOB.overmap_event_handler.create_events(using_map.overmap_z, using_map.overmap_size, using_map.overmap_event_areas)
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/events/fire(resumed)
|
||||
|
||||
@@ -96,7 +96,7 @@ SUBSYSTEM_DEF(skybox)
|
||||
return skybox_cache["[z]"]
|
||||
|
||||
/datum/controller/subsystem/skybox/proc/generate_skybox(z)
|
||||
var/datum/skybox_settings/settings = global.using_map.get_skybox_datum(z)
|
||||
var/datum/skybox_settings/settings = using_map.get_skybox_datum(z)
|
||||
|
||||
var/new_overlays = list()
|
||||
|
||||
@@ -113,7 +113,7 @@ SUBSYSTEM_DEF(skybox)
|
||||
|
||||
new_overlays += base
|
||||
|
||||
if(global.using_map.use_overmap && settings.use_overmap_details)
|
||||
if(using_map.use_overmap && settings.use_overmap_details)
|
||||
var/obj/effect/overmap/visitable/O = get_overmap_sector(z)
|
||||
if(istype(O))
|
||||
var/image/self_image = O.generate_skybox(z)
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
// DNA Gene activation boundaries, see dna2.dm.
|
||||
// Returns a list object with 4 numbers.
|
||||
/proc/GetDNABounds(var/block)
|
||||
var/list/BOUNDS=dna_activity_bounds[block]
|
||||
if(!istype(BOUNDS))
|
||||
var/list/bounds = GLOB.dna_activity_bounds[block]
|
||||
if(!istype(bounds))
|
||||
return DNA_DEFAULT_BOUNDS
|
||||
return BOUNDS
|
||||
return bounds
|
||||
|
||||
// Give Random Bad Mutation to M
|
||||
/proc/randmutb(var/mob/living/M)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GLOB.command_announcement.Announce("What the fuck was that?!", "General Alert")
|
||||
|
||||
/datum/event/clang/start()
|
||||
affecting_z = global.using_map.station_levels
|
||||
affecting_z = using_map.station_levels
|
||||
|
||||
var/startz = pick(affecting_z)
|
||||
var/startx = 0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/I = 0
|
||||
while(++I < DNA_SE_LENGTH)
|
||||
blocks_remaining.Add(I)
|
||||
assigned_blocks[I] = "" // setup a clean list
|
||||
GLOB.assigned_blocks[I] = "" // setup a clean list
|
||||
for(var/TI in trait_list)
|
||||
var/datum/trait/T = trait_list[TI]
|
||||
if(T.is_genetrait)
|
||||
@@ -23,10 +23,10 @@
|
||||
G.name = "[copytext(tex,1,min( 8, length(tex)+1 ))]:[G.block]"
|
||||
T.linked_gene = G
|
||||
G.linked_trait = T
|
||||
dna_activity_bounds[G.block]=T.activity_bounds
|
||||
GLOB.dna_activity_bounds[G.block] = T.activity_bounds
|
||||
// Handle global block data
|
||||
log_world("DNA2: Assigned [G.name] - Linked to trait [T.name].")
|
||||
assigned_blocks[G.block]=G.name
|
||||
GLOB.assigned_blocks[G.block] = G.name
|
||||
GLOB.trait_to_dna_genes[T.type] = G
|
||||
GLOB.dna_genes.Add(G)
|
||||
blocks_remaining.Remove(G.block)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/structure/AIcore/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload)
|
||||
laws = new global.using_map.default_law_type
|
||||
laws = new using_map.default_law_type
|
||||
// VOREstation edit end
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
//Get out list of viable PDAs
|
||||
var/list/obj/item/pda/sendPDAs = list()
|
||||
for(var/obj/item/pda/P in PDAs)
|
||||
for(var/obj/item/pda/P in GLOB.PDAs)
|
||||
if(!P.owner || P.hidden)
|
||||
continue
|
||||
var/datum/data/pda/app/messenger/M = P.find_program(/datum/data/pda/app/messenger)
|
||||
@@ -299,7 +299,7 @@
|
||||
return TRUE
|
||||
|
||||
var/obj/item/pda/PDARec = null
|
||||
for(var/obj/item/pda/P in PDAs)
|
||||
for(var/obj/item/pda/P in GLOB.PDAs)
|
||||
if(!P.owner || P.hidden)
|
||||
continue
|
||||
var/datum/data/pda/app/messenger/M = P.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
<head>
|
||||
<title>[occupant] statistics</title>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
[JS_BYJAX]
|
||||
</script>
|
||||
<style>
|
||||
h3 {margin-bottom:2px;font-size:14px;}
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
<head>
|
||||
<title>Reagent Synthesizer</title>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
[JS_BYJAX]
|
||||
</script>
|
||||
<style>
|
||||
h3 {margin-bottom:2px;font-size:14px;}
|
||||
|
||||
@@ -2190,8 +2190,8 @@
|
||||
.hidden {display: none;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
[js_dropdowns]
|
||||
[JS_BYJAX]
|
||||
[JS_DROPDOWN]
|
||||
function ticker() {
|
||||
setInterval(function(){
|
||||
window.location='byond://?src=\ref[src]&update_content=1';
|
||||
|
||||
@@ -86,8 +86,7 @@
|
||||
// assign the device to the holder's name automatically in a spectacularly shitty way.
|
||||
/obj/item/communicator/Initialize(mapload)
|
||||
. = ..()
|
||||
all_communicators += src
|
||||
all_communicators = sort_names(all_communicators)
|
||||
GLOB.all_communicators += src
|
||||
node = get_exonet_node()
|
||||
START_PROCESSING(SSobj, src)
|
||||
camera = new(src)
|
||||
@@ -259,7 +258,7 @@
|
||||
src.known_devices.Cut()
|
||||
if(!get_connection_to_tcomms()) //If the network's down, we can't see anything.
|
||||
return
|
||||
for(var/obj/item/communicator/comm in all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.all_communicators)
|
||||
if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves.
|
||||
continue
|
||||
src.known_devices |= comm
|
||||
@@ -403,7 +402,7 @@
|
||||
node = null
|
||||
|
||||
//Clean up references that might point at us
|
||||
all_communicators -= src
|
||||
GLOB.all_communicators -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
GLOB.listening_objects.Remove(src)
|
||||
QDEL_NULL(camera)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/obj/item/communicator/comm in all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.all_communicators)
|
||||
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
|
||||
continue
|
||||
choices.Add(comm)
|
||||
|
||||
@@ -307,16 +307,16 @@
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/obj/item/communicator/comm in all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.all_communicators)
|
||||
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
|
||||
continue
|
||||
choices.Add(comm)
|
||||
|
||||
if(!choices.len)
|
||||
to_chat(src , span_danger("There are no available communicators, sorry."))
|
||||
to_chat(src, span_danger("There are no available communicators, sorry."))
|
||||
return
|
||||
|
||||
var/choice = tgui_input_list(src,"Send a voice request to whom?", "Recipient Choice", choices)
|
||||
var/choice = tgui_input_list(src, "Send a voice request to whom?", "Recipient Choice", choices)
|
||||
if(choice)
|
||||
var/obj/item/communicator/chosen_communicator = choice
|
||||
var/mob/observer/dead/O = src
|
||||
|
||||
@@ -291,7 +291,7 @@ AI MODULES
|
||||
// VOREstation edit: use map default laws
|
||||
/obj/item/aiModule/reset/Initialize(mapload)
|
||||
. = ..()
|
||||
laws = new global.using_map.default_law_type // Pull from loaded map
|
||||
laws = new using_map.default_law_type // Pull from loaded map
|
||||
|
||||
/obj/item/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
log_law_changes(target, sender)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/refilling = FALSE //CHOMPAdd
|
||||
|
||||
/obj/structure/toilet/Initialize(mapload)
|
||||
if(z in global.using_map.map_levels)
|
||||
if(z in using_map.map_levels)
|
||||
teleplumbed = TRUE
|
||||
exit_landmark = locate(/obj/effect/landmark/teleplumb_exit)
|
||||
exit_container = locate(/obj/structure/biowaste_tank)
|
||||
|
||||
@@ -1,27 +1,3 @@
|
||||
//this function places received data into element with specified id.
|
||||
var/const/js_byjax = {"
|
||||
|
||||
function replaceContent() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var id = args\[0\];
|
||||
var content = args\[1\];
|
||||
var callback = null;
|
||||
if(args\[2\]){
|
||||
callback = args\[2\];
|
||||
if(args\[3\]){
|
||||
args = args.slice(3);
|
||||
}
|
||||
}
|
||||
var parent = document.getElementById(id);
|
||||
if(typeof(parent)!=='undefined' && parent!=null){
|
||||
parent.innerHTML = content?content:'';
|
||||
}
|
||||
if(callback && window\[callback\]){
|
||||
window\[callback\].apply(null,args);
|
||||
}
|
||||
}
|
||||
"}
|
||||
|
||||
/*
|
||||
sends data to control_id:replaceContent
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
var/const/js_dropdowns = {"
|
||||
function dropdowns() {
|
||||
var divs = document.getElementsByTagName('div');
|
||||
var headers = new Array();
|
||||
var links = new Array();
|
||||
for(var i=0;i<divs.length;i++){
|
||||
if(divs\[i\].className=='header') {
|
||||
divs\[i\].className='header closed';
|
||||
divs\[i\].innerHTML = divs\[i\].innerHTML+' +';
|
||||
headers.push(divs\[i\]);
|
||||
}
|
||||
if(divs\[i\].className=='links') {
|
||||
divs\[i\].className='links hidden';
|
||||
links.push(divs\[i\]);
|
||||
}
|
||||
}
|
||||
for(var i=0;i<headers.length;i++){
|
||||
if(typeof(links\[i\])!== 'undefined' && links\[i\]!=null) {
|
||||
headers\[i\].onclick = (function(elem) {
|
||||
return function() {
|
||||
if(elem.className.search('visible')>=0) {
|
||||
elem.className = elem.className.replace('visible','hidden');
|
||||
this.className = this.className.replace('open','closed');
|
||||
this.innerHTML = this.innerHTML.replace('-','+');
|
||||
}
|
||||
else {
|
||||
elem.className = elem.className.replace('hidden','visible');
|
||||
this.className = this.className.replace('closed','open');
|
||||
this.innerHTML = this.innerHTML.replace('+','-');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
})(links\[i\]);
|
||||
}
|
||||
}
|
||||
}
|
||||
"}
|
||||
@@ -612,7 +612,7 @@
|
||||
target.emagged = 0
|
||||
target.clear_supplied_laws()
|
||||
target.clear_inherent_laws()
|
||||
target.laws = new global.using_map.default_law_type
|
||||
target.laws = new using_map.default_law_type
|
||||
to_chat(target, span_danger("Laws updated!\n") + target.laws.get_formatted_laws())
|
||||
target.hud_used?.update_robot_modules_display()
|
||||
else
|
||||
|
||||
@@ -611,7 +611,7 @@ ADMIN_VERB(cmd_admin_dress, R_FUN, "elect equipment", "Select equipment for a mo
|
||||
domutcheck(M,null,MUTCHK_FORCED)
|
||||
M.UpdateAppearance()
|
||||
var/state="[M.dna.GetSEState(block)?"on":"off"]"
|
||||
var/blockname=assigned_blocks[block]
|
||||
var/blockname = GLOB.assigned_blocks[block]
|
||||
message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
|
||||
else
|
||||
|
||||
@@ -64,6 +64,15 @@
|
||||
var/datum/datum_value = value
|
||||
return datum_value.debug_variable_value(name, level, owner, sanitize, display_flags)
|
||||
|
||||
if(istype(value, /alist))
|
||||
var/alist/alist_value = value
|
||||
var/list/items = list()
|
||||
|
||||
for(var/key, val in alist_value)
|
||||
items += debug_variable(key, val, level + 1, sanitize = sanitize)
|
||||
|
||||
return "<a href='byond://?_src_=vars;[HrefToken()];Vars=[REF(alist_value)]'>/alist ([alist_value.len])</a><ul>[items.Join()]</ul>"
|
||||
|
||||
if(islist(value) || (name in GLOB.vv_special_lists)) // Some special lists aren't detectable as a list through istype
|
||||
var/list/list_value = value
|
||||
var/list/items = list()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/loadout_categories = list()
|
||||
GLOBAL_LIST_EMPTY_TYPED(loadout_categories, /datum/loadout_category)
|
||||
GLOBAL_LIST_EMPTY_TYPED(gear_datums, /datum/gear)
|
||||
|
||||
/datum/loadout_category
|
||||
@@ -28,16 +28,12 @@ GLOBAL_LIST_EMPTY_TYPED(gear_datums, /datum/gear)
|
||||
log_world("## ERROR Loadout - Missing path definition: [G]")
|
||||
continue
|
||||
|
||||
if(!loadout_categories[use_category])
|
||||
loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = loadout_categories[use_category]
|
||||
if(!GLOB.loadout_categories[use_category])
|
||||
GLOB.loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = GLOB.loadout_categories[use_category]
|
||||
GLOB.gear_datums[use_name] = new G
|
||||
LC.gear[use_name] = GLOB.gear_datums[use_name]
|
||||
|
||||
loadout_categories = sortAssoc(loadout_categories)
|
||||
for(var/loadout_category in loadout_categories)
|
||||
var/datum/loadout_category/LC = loadout_categories[loadout_category]
|
||||
LC.gear = sortAssoc(LC.gear)
|
||||
return 1
|
||||
|
||||
/datum/category_item/player_setup_item/loadout/loadout
|
||||
@@ -140,8 +136,8 @@ GLOBAL_LIST_EMPTY_TYPED(gear_datums, /datum/gear)
|
||||
var/list/data = ..()
|
||||
|
||||
var/list/categories = list()
|
||||
for(var/category in loadout_categories)
|
||||
var/datum/loadout_category/LC = loadout_categories[category]
|
||||
for(var/category, value in GLOB.loadout_categories)
|
||||
var/datum/loadout_category/LC = value
|
||||
var/list/items = list()
|
||||
for(var/gear in LC.gear)
|
||||
var/datum/gear/G = LC.gear[gear]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
We hope you enjoy the lights.", "Nanotrasen Meteorology Division") //VOREStation Edit //CHOMPedit: removes announcement .ogg
|
||||
|
||||
/datum/event/aurora_caelus/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.z in affecting_z)
|
||||
M.playsound_local(null, 'sound/ambience/space/aurora_caelus.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
carp_cap = 2 + 3 ** severity // No more than this many at once regardless of waves. (5, 11, 29)
|
||||
|
||||
/datum/event/carp_migration/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/carp_migration/announce()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
endWhen = 30
|
||||
|
||||
/datum/event/dust/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/dust/announce()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
return can_fire
|
||||
|
||||
/datum/event_meta/no_overmap/get_weight() //these events have overmap equivalents, and shouldn't fire randomly if overmap is used
|
||||
return global.using_map.use_overmap ? 0 : ..()
|
||||
return using_map.use_overmap ? 0 : ..()
|
||||
|
||||
// Event datums define and execute the actual events themselves.
|
||||
/datum/event //NOTE: Times are measured in master controller ticks!
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
gnat_cap = 8 + 4 ** severity // No more than this many at once regardless of waves. (12, 16, ??)
|
||||
|
||||
/datum/event/gnat_migration/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/gnat_migration/announce()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
jellyfish_cap = 2 + 3 ** severity // No more than this many at once regardless of waves. (5, 11, 29)
|
||||
|
||||
/datum/event/jellyfish_migration/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/jellyfish_migration/announce()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
endWhen = worst_case_end()
|
||||
|
||||
/datum/event/meteor_wave/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
//CHOMPAdd Start, fills gaps
|
||||
for(var/obj/machinery/shield_gen/gen in GLOB.machines)
|
||||
gen.fill_diffused()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// /obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
|
||||
var/obj/item/pda/P
|
||||
var/list/viables = list()
|
||||
for(var/obj/item/pda/check_pda in sort_names(PDAs))
|
||||
for(var/obj/item/pda/check_pda in GLOB.PDAs)
|
||||
if (!check_pda.owner || check_pda == src || check_pda.hidden)
|
||||
continue
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
ray_cap = 1 + 1 ** severity // No more than this many at once regardless of waves. (2, 3, ?)
|
||||
|
||||
/datum/event/ray_migration/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/ray_migration/announce()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
shark_cap = 1 + 1 ** severity // No more than this many at once regardless of waves. (2, 3, ?)
|
||||
|
||||
/datum/event/shark_migration/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/shark_migration/announce()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
fish_cap = fish_base_cap + fish_cap_mult ** severity // No more than this many at once regardless of waves. (5, 11, 29)
|
||||
|
||||
/datum/event/spacefish_migration/start()
|
||||
affecting_z -= global.using_map.sealed_levels // Space levels only please!
|
||||
affecting_z -= using_map.sealed_levels // Space levels only please!
|
||||
..()
|
||||
|
||||
/datum/event/spacefish_migration/announce()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/obj/item/pda/P = null
|
||||
var/list/viables = list()
|
||||
|
||||
for(var/obj/item/pda/check_pda in sort_names(PDAs))
|
||||
for(var/obj/item/pda/check_pda in GLOB.PDAs)
|
||||
if (!check_pda.owner || check_pda == src || check_pda.hidden)
|
||||
continue
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@
|
||||
set_pin_data(IC_OUTPUT, 4, exonet.address)
|
||||
|
||||
var/is_communicator = FALSE // improved communicator support
|
||||
for(var/obj/item/communicator/comm in all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.all_communicators)
|
||||
if(comm.exonet && comm.exonet.address == target_address)
|
||||
is_communicator = TRUE
|
||||
break
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// IT IS FINALLY TIME. IT IS HERE. Converted to HTML5 <audio> - Leshana
|
||||
var/const/PLAYER_HTML5_HTML={"<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11">
|
||||
<script type="text/javascript">
|
||||
function noErrorMessages () { return true; }
|
||||
window.onerror = noErrorMessages;
|
||||
function SetMusic(url, time, volume) {
|
||||
var player = document.getElementById('player');
|
||||
// IE can't handle us setting the time before it loads, so we must wait for asychronous load
|
||||
var setTime = function () {
|
||||
player.removeEventListener("canplay", setTime); // One time only!
|
||||
player.volume = volume;
|
||||
player.currentTime = time;
|
||||
player.play();
|
||||
}
|
||||
if(url != "") player.addEventListener("canplay", setTime, false);
|
||||
player.src = url;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<audio id="player"></audio>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
@@ -4,7 +4,7 @@
|
||||
//Prime this list if we need it.
|
||||
if(has_huds)
|
||||
// Note, this should be refactored to drop priority overlays
|
||||
add_overlay(backplane,TRUE) //Strap this on here, to block HUDs from appearing in rightclick menus: http://www.byond.com/forum/?post=2336679
|
||||
add_overlay(GLOB.backplane,TRUE) //Strap this on here, to block HUDs from appearing in rightclick menus: http://www.byond.com/forum/?post=2336679
|
||||
hud_list = list()
|
||||
hud_list.len = TOTAL_HUDS
|
||||
make_hud_overlays()
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/init()
|
||||
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
|
||||
laws = new global.using_map.default_law_type //use map's default
|
||||
laws = new using_map.default_law_type //use map's default
|
||||
additional_law_channels["Binary"] = "#b"
|
||||
var/new_ai = select_active_ai_with_fewest_borgs()
|
||||
if(new_ai)
|
||||
|
||||
@@ -729,15 +729,16 @@ GLOBAL_LIST_INIT(organ_rel_size, list(
|
||||
|
||||
//Icon is used to occlude things like huds from the faulty byond context menu.
|
||||
// http://www.byond.com/forum/?post=2336679
|
||||
var/global/image/backplane
|
||||
/hook/startup/proc/generate_backplane()
|
||||
GLOBAL_DATUM_INIT(backplane, /image, generate_backplane())
|
||||
/proc/generate_backplane()
|
||||
var/image/backplane
|
||||
backplane = image('icons/misc/win32.dmi')
|
||||
backplane.alpha = 0
|
||||
backplane.plane = -100
|
||||
backplane.layer = MOB_LAYER-0.1
|
||||
backplane.mouse_opacity = 0
|
||||
|
||||
return TRUE
|
||||
return backplane
|
||||
|
||||
/mob/proc/get_sound_env(var/pressure_factor)
|
||||
if (pressure_factor < 0.5)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/effect/overmap/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!global.using_map.use_overmap)
|
||||
if(!using_map.use_overmap)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
if(render_map) // Initialize map objects
|
||||
|
||||
@@ -59,13 +59,13 @@
|
||||
find_z_levels() // This populates map_z and assigns z levels to the ship.
|
||||
register_z_levels() // This makes external calls to update global z level information.
|
||||
|
||||
if(!global.using_map.overmap_z)
|
||||
if(!using_map.overmap_z)
|
||||
build_overmap()
|
||||
|
||||
start_x = start_x || rand(OVERMAP_EDGE, global.using_map.overmap_size - OVERMAP_EDGE)
|
||||
start_y = start_y || rand(OVERMAP_EDGE, global.using_map.overmap_size - OVERMAP_EDGE)
|
||||
start_x = start_x || rand(OVERMAP_EDGE, using_map.overmap_size - OVERMAP_EDGE)
|
||||
start_y = start_y || rand(OVERMAP_EDGE, using_map.overmap_size - OVERMAP_EDGE)
|
||||
|
||||
forceMove(locate(start_x, start_y, global.using_map.overmap_z))
|
||||
forceMove(locate(start_x, start_y, using_map.overmap_z))
|
||||
|
||||
// CHOMPAdd Start
|
||||
if(dyn_poi)
|
||||
@@ -166,27 +166,27 @@
|
||||
for(var/zlevel in map_z)
|
||||
GLOB.map_sectors["[zlevel]"] = src
|
||||
|
||||
global.using_map.player_levels |= map_z
|
||||
using_map.player_levels |= map_z
|
||||
if(!in_space)
|
||||
global.using_map.sealed_levels |= map_z
|
||||
using_map.sealed_levels |= map_z
|
||||
/* VOREStation Removal - We have a map system that does this already.
|
||||
if(base)
|
||||
global.using_map.station_levels |= map_z
|
||||
global.using_map.contact_levels |= map_z
|
||||
global.using_map.map_levels |= map_z
|
||||
using_map.station_levels |= map_z
|
||||
using_map.contact_levels |= map_z
|
||||
using_map.map_levels |= map_z
|
||||
*/
|
||||
|
||||
/obj/effect/overmap/visitable/proc/unregister_z_levels()
|
||||
GLOB.map_sectors -= map_z
|
||||
|
||||
global.using_map.player_levels -= map_z
|
||||
using_map.player_levels -= map_z
|
||||
if(!in_space)
|
||||
global.using_map.sealed_levels -= map_z
|
||||
using_map.sealed_levels -= map_z
|
||||
/* VOREStation Removal - We have a map system that does this already.
|
||||
if(base)
|
||||
global.using_map.station_levels -= map_z
|
||||
global.using_map.contact_levels -= map_z
|
||||
global.using_map.map_levels -= map_z
|
||||
using_map.station_levels -= map_z
|
||||
using_map.contact_levels -= map_z
|
||||
using_map.map_levels -= map_z
|
||||
*/
|
||||
|
||||
/obj/effect/overmap/visitable/get_scan_data()
|
||||
@@ -308,23 +308,23 @@
|
||||
GLOB.priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos_ch.ogg', zlevel = zlevel) //CHOMPedit, changed sound
|
||||
|
||||
/proc/build_overmap()
|
||||
if(!global.using_map.use_overmap)
|
||||
if(!using_map.use_overmap)
|
||||
return 1
|
||||
|
||||
testing("Building overmap...")
|
||||
world.increment_max_z()
|
||||
global.using_map.overmap_z = world.maxz
|
||||
using_map.overmap_z = world.maxz
|
||||
|
||||
testing("Putting overmap on [global.using_map.overmap_z]")
|
||||
testing("Putting overmap on [using_map.overmap_z]")
|
||||
var/area/overmap/A = new
|
||||
for(var/turf/T as anything in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z)))
|
||||
if(T.x == 1 || T.y == 1 || T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size)
|
||||
for(var/turf/T as anything in block(locate(1,1,using_map.overmap_z), locate(using_map.overmap_size,using_map.overmap_size,using_map.overmap_z)))
|
||||
if(T.x == 1 || T.y == 1 || T.x == using_map.overmap_size || T.y == using_map.overmap_size)
|
||||
T = T.ChangeTurf(/turf/unsimulated/map/edge)
|
||||
else
|
||||
T = T.ChangeTurf(/turf/unsimulated/map)
|
||||
ChangeArea(T, A)
|
||||
|
||||
global.using_map.sealed_levels |= global.using_map.overmap_z
|
||||
using_map.sealed_levels |= using_map.overmap_z
|
||||
|
||||
if(!GLOB.dynamic_sector_master) //CHOMPedit: hook dynamic sector generation into overmap gen
|
||||
new /obj/effect/overmap/visitable/dynamic // CHOMPedit, glob var assignment is handled in the object.
|
||||
|
||||
@@ -56,7 +56,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
|
||||
/obj/machinery/computer/ship/helm/process()
|
||||
..()
|
||||
if(autopilot && dx && dy && !autopilot_disabled)
|
||||
var/turf/T = locate(dx,dy,global.using_map.overmap_z)
|
||||
var/turf/T = locate(dx,dy,using_map.overmap_z)
|
||||
if(linked.loc == T)
|
||||
if(linked.is_still())
|
||||
autopilot = 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
start_x = loc.x
|
||||
start_y = loc.y
|
||||
// But pick an empty z level to use
|
||||
map_z += global.using_map.get_empty_zlevel()
|
||||
map_z += using_map.get_empty_zlevel()
|
||||
. = ..()
|
||||
if(!map_z[1])
|
||||
log_and_message_admins("Could not create empty sector at [x], [y]. No available z levels to allocate.")
|
||||
@@ -26,7 +26,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/find_z_levels()
|
||||
LAZYADD(map_z, global.using_map.get_empty_zlevel())
|
||||
LAZYADD(map_z, using_map.get_empty_zlevel())
|
||||
|
||||
/obj/effect/overmap/visitable/sector/temporary/proc/is_empty(var/mob/observer)
|
||||
if(!LAZYLEN(map_z))
|
||||
@@ -44,7 +44,7 @@
|
||||
qdel(src)
|
||||
|
||||
/proc/get_deepspace(x,y)
|
||||
var/turf/unsimulated/map/overmap_turf = locate(x,y,global.using_map.overmap_z)
|
||||
var/turf/unsimulated/map/overmap_turf = locate(x,y,using_map.overmap_z)
|
||||
if(!istype(overmap_turf))
|
||||
CRASH("Attempt to get deepspace at ([x],[y]) which is not on overmap: [overmap_turf]")
|
||||
var/obj/effect/overmap/visitable/sector/temporary/res = locate() in overmap_turf
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
testing("[A] spacemoving from [M] ([M.x], [M.y]).")
|
||||
|
||||
var/turf/map = locate(M.x,M.y,global.using_map.overmap_z)
|
||||
var/turf/map = locate(M.x,M.y,using_map.overmap_z)
|
||||
var/obj/effect/overmap/visitable/TM
|
||||
for(var/obj/effect/overmap/visitable/O in map)
|
||||
if(O != M && O.in_space && prob(50))
|
||||
|
||||
@@ -56,11 +56,11 @@ GLOBAL_LIST_EMPTY(map_sectors)
|
||||
name = "[x]-[y]"
|
||||
var/list/numbers = list()
|
||||
|
||||
if(x == 1 || x == global.using_map.overmap_size)
|
||||
if(x == 1 || x == using_map.overmap_size)
|
||||
numbers += list("[round(y/10)]","[round(y%10)]")
|
||||
if(y == 1 || y == global.using_map.overmap_size)
|
||||
if(y == 1 || y == using_map.overmap_size)
|
||||
numbers += "-"
|
||||
if(y == 1 || y == global.using_map.overmap_size)
|
||||
if(y == 1 || y == using_map.overmap_size)
|
||||
numbers += list("[round(x/10)]","[round(x%10)]")
|
||||
|
||||
for(var/i = 1 to numbers.len)
|
||||
@@ -70,12 +70,12 @@ GLOBAL_LIST_EMPTY(map_sectors)
|
||||
if(y == 1)
|
||||
I.pixel_y = 3
|
||||
I.pixel_x = 5*i + 4
|
||||
if(y == global.using_map.overmap_size)
|
||||
if(y == using_map.overmap_size)
|
||||
I.pixel_y = world.icon_size - 9
|
||||
I.pixel_x = 5*i + 4
|
||||
if(x == 1)
|
||||
I.pixel_x = 5*i - 2
|
||||
if(x == global.using_map.overmap_size)
|
||||
if(x == using_map.overmap_size)
|
||||
I.pixel_x = 5*i + 2
|
||||
add_overlay(I)
|
||||
AddElement(/datum/element/turf_z_transparency)
|
||||
|
||||
@@ -35,7 +35,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) //cache for faxes that have been sent to admins
|
||||
if( !(("[department]" in GLOB.alldepartments) || ("[department]" in GLOB.admin_departments)) )
|
||||
GLOB.alldepartments |= department
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob)
|
||||
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user)
|
||||
if(issilicon(user)) //CHOMPEdit Start this allows borgs to use fax machines, meant for the Unity and Clerical modules.
|
||||
authenticated = user.name
|
||||
tgui_interact(user)
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
data["convo_job"] = sanitize(c["job"])
|
||||
break
|
||||
else
|
||||
var/convopdas[0]
|
||||
var/pdas[0]
|
||||
for(var/obj/item/pda/P as anything in PDAs)
|
||||
var/list/convopdas = list()
|
||||
var/list/pdas = list()
|
||||
for(var/obj/item/pda/P as anything in GLOB.PDAs)
|
||||
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
if(!P.owner || PM.toff || P == pda || PM.m_hidden)
|
||||
@@ -194,7 +194,7 @@
|
||||
to_chat(usr, "Turn on your receiver in order to send messages.")
|
||||
return
|
||||
|
||||
for(var/obj/item/pda/P as anything in PDAs)
|
||||
for(var/obj/item/pda/P as anything in GLOB.PDAs)
|
||||
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
|
||||
|
||||
if(!P.owner || !PM || PM.hidden || P == pda || PM.toff)
|
||||
@@ -237,7 +237,7 @@
|
||||
modified_message["target"] = "\ref[M]"
|
||||
|
||||
var/list/targets = list()
|
||||
for(var/obj/item/pda/pda in PDAs)
|
||||
for(var/obj/item/pda/pda in GLOB.PDAs)
|
||||
if(pda.cartridge && pda.owner && is_type_in_list(pda.cartridge, M.cartridges_to_send_to))
|
||||
targets |= pda
|
||||
if(targets.len)
|
||||
|
||||
@@ -108,8 +108,7 @@
|
||||
|
||||
/obj/item/pda/Initialize(mapload)
|
||||
. = ..()
|
||||
PDAs += src
|
||||
PDAs = sort_names(PDAs)
|
||||
GLOB.PDAs += src
|
||||
update_programs()
|
||||
if(default_cartridge)
|
||||
cartridge = new default_cartridge(src)
|
||||
@@ -474,7 +473,7 @@
|
||||
return
|
||||
|
||||
/obj/item/pda/Destroy()
|
||||
PDAs -= src
|
||||
GLOB.PDAs -= src
|
||||
if (id && !delete_id && id.loc == src)
|
||||
id.forceMove(get_turf(loc))
|
||||
else
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
update_docking_target(current_location)
|
||||
if(active_docking_controller)
|
||||
set_docking_codes(active_docking_controller.docking_codes)
|
||||
else if(global.using_map.use_overmap)
|
||||
else if(using_map.use_overmap)
|
||||
var/obj/effect/overmap/visitable/location = get_overmap_sector(get_z(current_location))
|
||||
if(location && location.docking_codes)
|
||||
set_docking_codes(location.docking_codes)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/obj/machinery/computer/C = user
|
||||
|
||||
if(world.time <= reset_time)
|
||||
C.visible_message(span_notice("[global.using_map.boss_name] will not allow the Special Operations shuttle to launch yet."))
|
||||
C.visible_message(span_notice("[using_map.boss_name] will not allow the Special Operations shuttle to launch yet."))
|
||||
if (((world.time - reset_time)/10) > 60)
|
||||
C.visible_message(span_notice("[-((world.time - reset_time)/10)/60] minutes remain!"))
|
||||
else
|
||||
|
||||
@@ -13,17 +13,6 @@
|
||||
|
||||
owner = S
|
||||
|
||||
if(!admin_laws)
|
||||
admin_laws = new()
|
||||
player_laws = new()
|
||||
|
||||
init_subtypes(/datum/ai_laws, admin_laws)
|
||||
admin_laws = dd_sortedObjectList(admin_laws)
|
||||
|
||||
for(var/datum/ai_laws/laws in admin_laws)
|
||||
if(laws.selectable)
|
||||
player_laws += laws
|
||||
|
||||
/datum/tgui_module/law_manager/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
if(..())
|
||||
return TRUE
|
||||
@@ -113,14 +102,14 @@
|
||||
return TRUE
|
||||
|
||||
if("state_law_set")
|
||||
var/datum/ai_laws/ALs = locate(params["state_law_set"]) in (is_admin(ui.user) ? admin_laws : player_laws)
|
||||
var/datum/ai_laws/ALs = locate(params["state_law_set"]) in (is_admin(ui.user) ? GLOB.admin_laws : GLOB.player_laws)
|
||||
if(ALs)
|
||||
owner.statelaws(ALs)
|
||||
return TRUE
|
||||
|
||||
if("transfer_laws")
|
||||
if(is_malf(ui.user))
|
||||
var/datum/ai_laws/ALs = locate(params["transfer_laws"]) in (is_admin(ui.user) ? admin_laws : player_laws)
|
||||
var/datum/ai_laws/ALs = locate(params["transfer_laws"]) in (is_admin(ui.user) ? GLOB.admin_laws : GLOB.player_laws)
|
||||
if(ALs)
|
||||
log_and_message_admins("has transfered the [ALs.name] laws to [owner].")
|
||||
ALs.sync(owner, 0)
|
||||
@@ -165,7 +154,7 @@
|
||||
channels[++channels.len] = list("channel" = ch_name)
|
||||
data["channel"] = owner.lawchannel
|
||||
data["channels"] = channels
|
||||
data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws)
|
||||
data["law_sets"] = package_multiple_laws(data["isAdmin"] ? GLOB.admin_laws : GLOB.player_laws)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
var/datum/map/using_map = new USING_MAP_DATUM
|
||||
GLOBAL_LIST_EMPTY(all_maps)
|
||||
|
||||
|
||||
@@ -493,71 +493,73 @@ export const LawManagerLawSets = (props: {
|
||||
onChange={(value: string) => onSearchLawName(value)}
|
||||
/>
|
||||
{law_sets.length
|
||||
? prepareSearch(law_sets, searchLawName).map((laws) => (
|
||||
<Section
|
||||
key={laws.name}
|
||||
title={laws.name}
|
||||
buttons={
|
||||
<Stack>
|
||||
<Stack.Item>
|
||||
<Button
|
||||
disabled={!isMalf}
|
||||
icon="sync"
|
||||
onClick={() =>
|
||||
act('transfer_laws', { transfer_laws: laws.ref })
|
||||
}
|
||||
>
|
||||
Load Laws
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Button
|
||||
icon="volume-up"
|
||||
onClick={() =>
|
||||
act('state_law_set', { state_law_set: laws.ref })
|
||||
}
|
||||
>
|
||||
State Laws
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
}
|
||||
>
|
||||
{laws.laws.has_ion_laws ? (
|
||||
<LawsTable
|
||||
noButtons
|
||||
laws={laws.laws.ion_laws}
|
||||
title={`${ion_law_nr} Laws:`}
|
||||
isAdmin={isAdmin}
|
||||
isMalf={isMalf}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{laws.laws.has_zeroth_laws || laws.laws.has_inherent_laws ? (
|
||||
<LawsTable
|
||||
noButtons
|
||||
laws={laws.laws.zeroth_laws.concat(laws.laws.inherent_laws)}
|
||||
title={laws.header}
|
||||
isAdmin={isAdmin}
|
||||
isMalf={isMalf}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{laws.laws.has_supplied_laws ? (
|
||||
<LawsTable
|
||||
noButtons
|
||||
laws={laws.laws.supplied_laws}
|
||||
title="Supplied Laws"
|
||||
isAdmin={isAdmin}
|
||||
isMalf={isMalf}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</Section>
|
||||
))
|
||||
? prepareSearch(law_sets, searchLawName)
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((laws) => (
|
||||
<Section
|
||||
key={laws.name}
|
||||
title={laws.name}
|
||||
buttons={
|
||||
<Stack>
|
||||
<Stack.Item>
|
||||
<Button
|
||||
disabled={!isMalf}
|
||||
icon="sync"
|
||||
onClick={() =>
|
||||
act('transfer_laws', { transfer_laws: laws.ref })
|
||||
}
|
||||
>
|
||||
Load Laws
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Button
|
||||
icon="volume-up"
|
||||
onClick={() =>
|
||||
act('state_law_set', { state_law_set: laws.ref })
|
||||
}
|
||||
>
|
||||
State Laws
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
}
|
||||
>
|
||||
{laws.laws.has_ion_laws ? (
|
||||
<LawsTable
|
||||
noButtons
|
||||
laws={laws.laws.ion_laws}
|
||||
title={`${ion_law_nr} Laws:`}
|
||||
isAdmin={isAdmin}
|
||||
isMalf={isMalf}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{laws.laws.has_zeroth_laws || laws.laws.has_inherent_laws ? (
|
||||
<LawsTable
|
||||
noButtons
|
||||
laws={laws.laws.zeroth_laws.concat(laws.laws.inherent_laws)}
|
||||
title={laws.header}
|
||||
isAdmin={isAdmin}
|
||||
isMalf={isMalf}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{laws.laws.has_supplied_laws ? (
|
||||
<LawsTable
|
||||
noButtons
|
||||
laws={laws.laws.supplied_laws}
|
||||
title="Supplied Laws"
|
||||
isAdmin={isAdmin}
|
||||
isMalf={isMalf}
|
||||
/>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</Section>
|
||||
))
|
||||
: ''}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -152,7 +152,9 @@ export const MessageMonitorAdmin = (props) => {
|
||||
custommessage,
|
||||
} = data;
|
||||
|
||||
const recipientOptions = Object.keys(possibleRecipients);
|
||||
const recipientOptions = Object.keys(possibleRecipients).sort((a, b) =>
|
||||
a.localeCompare(b),
|
||||
);
|
||||
|
||||
return (
|
||||
<Section title="Admin Messaging">
|
||||
|
||||
@@ -152,7 +152,7 @@ const MessengerList = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const PDAList = (props) => {
|
||||
const PDAList = (props: { pdas: pda[]; title: string; msgAct: string }) => {
|
||||
const { act, data } = useBackend<Data>();
|
||||
|
||||
const { pdas, title, msgAct } = props;
|
||||
@@ -165,31 +165,33 @@ const PDAList = (props) => {
|
||||
|
||||
return (
|
||||
<Section title={title}>
|
||||
{pdas.map((pda) => (
|
||||
<Box key={pda.Reference}>
|
||||
<Button
|
||||
icon="arrow-circle-down"
|
||||
onClick={() => act(msgAct, { target: pda.Reference })}
|
||||
>
|
||||
{pda.Name}
|
||||
</Button>
|
||||
{!!charges &&
|
||||
plugins.map((plugin) => (
|
||||
<Button
|
||||
key={plugin.ref}
|
||||
icon={plugin.icon}
|
||||
onClick={() =>
|
||||
act('Messenger Plugin', {
|
||||
plugin: plugin.ref,
|
||||
target: pda.Reference,
|
||||
})
|
||||
}
|
||||
>
|
||||
{plugin.name}
|
||||
</Button>
|
||||
))}
|
||||
</Box>
|
||||
))}
|
||||
{pdas
|
||||
.sort((a, b) => a.Name.localeCompare(b.Name))
|
||||
.map((pda) => (
|
||||
<Box key={pda.Reference}>
|
||||
<Button
|
||||
icon="arrow-circle-down"
|
||||
onClick={() => act(msgAct, { target: pda.Reference })}
|
||||
>
|
||||
{pda.Name}
|
||||
</Button>
|
||||
{!!charges &&
|
||||
plugins.map((plugin) => (
|
||||
<Button
|
||||
key={plugin.ref}
|
||||
icon={plugin.icon}
|
||||
onClick={() =>
|
||||
act('Messenger Plugin', {
|
||||
plugin: plugin.ref,
|
||||
target: pda.Reference,
|
||||
})
|
||||
}
|
||||
>
|
||||
{plugin.name}
|
||||
</Button>
|
||||
))}
|
||||
</Box>
|
||||
))}
|
||||
</Section>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -48,17 +48,19 @@ export const SubtabLoadout = (props: {
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
<Stack.Item textAlign="center">
|
||||
{Object.keys(categories).map((key) => (
|
||||
<Button
|
||||
key={key}
|
||||
selected={key === activeCategory}
|
||||
onClick={() => setActiveCategory(key)}
|
||||
mr={1}
|
||||
mt={1}
|
||||
>
|
||||
{key}
|
||||
</Button>
|
||||
))}
|
||||
{Object.keys(categories)
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.map((key) => (
|
||||
<Button
|
||||
key={key}
|
||||
selected={key === activeCategory}
|
||||
onClick={() => setActiveCategory(key)}
|
||||
mr={1}
|
||||
mt={1}
|
||||
>
|
||||
{key}
|
||||
</Button>
|
||||
))}
|
||||
</Stack.Item>
|
||||
<Stack.Divider />
|
||||
<Stack.Item textAlign="center">
|
||||
@@ -70,59 +72,63 @@ export const SubtabLoadout = (props: {
|
||||
<Stack.Item grow>
|
||||
<Section mt={1} fill scrollable>
|
||||
<Table>
|
||||
{activeCategoryItems.map((item) => (
|
||||
<Fragment key={item.name}>
|
||||
<Table.Row>
|
||||
<Table.Cell collapsing>
|
||||
<Button
|
||||
selected={
|
||||
active_gear_list ? item.name in active_gear_list : false
|
||||
}
|
||||
onClick={() => act('toggle_gear', { gear: item.name })}
|
||||
>
|
||||
{item.name}
|
||||
</Button>
|
||||
</Table.Cell>
|
||||
<Table.Cell collapsing>{item.cost}</Table.Cell>
|
||||
<Table.Cell style={{ wordWrap: 'break-word' }}>
|
||||
{item.desc}
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
{item.show_roles && item.allowed_roles?.length ? (
|
||||
{activeCategoryItems
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((item) => (
|
||||
<Fragment key={item.name}>
|
||||
<Table.Row>
|
||||
<Table.Cell colSpan={2} textAlign="right">
|
||||
Allowed Roles:
|
||||
<Table.Cell collapsing>
|
||||
<Button
|
||||
selected={
|
||||
active_gear_list
|
||||
? item.name in active_gear_list
|
||||
: false
|
||||
}
|
||||
onClick={() => act('toggle_gear', { gear: item.name })}
|
||||
>
|
||||
{item.name}
|
||||
</Button>
|
||||
</Table.Cell>
|
||||
<Table.Cell>{item.allowed_roles.join(',')}</Table.Cell>
|
||||
</Table.Row>
|
||||
) : null}
|
||||
{item.name in gear_tweaks ? (
|
||||
<Table.Row>
|
||||
<Table.Cell colSpan={3}>
|
||||
{gear_tweaks[item.name].map((tweak) => (
|
||||
<Box ml={4} key={tweak.ref}>
|
||||
<Button
|
||||
onClick={() =>
|
||||
act('gear_tweak', {
|
||||
gear: item.name,
|
||||
tweak: tweak.ref,
|
||||
})
|
||||
}
|
||||
>
|
||||
<div
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: Loadouts
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: tweak.contents,
|
||||
}}
|
||||
/>
|
||||
</Button>
|
||||
</Box>
|
||||
))}
|
||||
<Table.Cell collapsing>{item.cost}</Table.Cell>
|
||||
<Table.Cell style={{ wordWrap: 'break-word' }}>
|
||||
{item.desc}
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
) : null}
|
||||
</Fragment>
|
||||
))}
|
||||
{item.show_roles && item.allowed_roles?.length ? (
|
||||
<Table.Row>
|
||||
<Table.Cell colSpan={2} textAlign="right">
|
||||
Allowed Roles:
|
||||
</Table.Cell>
|
||||
<Table.Cell>{item.allowed_roles.join(',')}</Table.Cell>
|
||||
</Table.Row>
|
||||
) : null}
|
||||
{item.name in gear_tweaks ? (
|
||||
<Table.Row>
|
||||
<Table.Cell colSpan={3}>
|
||||
{gear_tweaks[item.name].map((tweak) => (
|
||||
<Box ml={4} key={tweak.ref}>
|
||||
<Button
|
||||
onClick={() =>
|
||||
act('gear_tweak', {
|
||||
gear: item.name,
|
||||
tweak: tweak.ref,
|
||||
})
|
||||
}
|
||||
>
|
||||
<div
|
||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: Loadouts
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: tweak.contents,
|
||||
}}
|
||||
/>
|
||||
</Button>
|
||||
</Box>
|
||||
))}
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
) : null}
|
||||
</Fragment>
|
||||
))}
|
||||
</Table>
|
||||
</Section>
|
||||
</Stack.Item>
|
||||
|
||||
+1
-2
@@ -115,6 +115,7 @@
|
||||
#include "code\__defines\items_clothing.dm"
|
||||
#include "code\__defines\job_controller.dm"
|
||||
#include "code\__defines\jobs.dm"
|
||||
#include "code\__defines\js_snippets.dm"
|
||||
#include "code\__defines\jukebox.dm"
|
||||
#include "code\__defines\life.dm"
|
||||
#include "code\__defines\lighting.dm"
|
||||
@@ -2256,7 +2257,6 @@
|
||||
#include "code\game\turfs\unsimulated\sky_vr.dm"
|
||||
#include "code\game\turfs\unsimulated\walls.dm"
|
||||
#include "code\js\byjax.dm"
|
||||
#include "code\js\menus.dm"
|
||||
#include "code\matrices\color_matrix.dm"
|
||||
#include "code\modules\admin\admin.dm"
|
||||
#include "code\modules\admin\admin_attack_log.dm"
|
||||
@@ -3404,7 +3404,6 @@
|
||||
#include "code\modules\materials\sheets\organic\tanning\tanning_rack.dm"
|
||||
#include "code\modules\media\juke_remote.dm"
|
||||
#include "code\modules\media\media_machinery.dm"
|
||||
#include "code\modules\media\media_player_html5.dm"
|
||||
#include "code\modules\media\media_tracks.dm"
|
||||
#include "code\modules\media\mediamanager.dm"
|
||||
#include "code\modules\media\walkpod.dm"
|
||||
|
||||
Reference in New Issue
Block a user