mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 20:14:31 +01:00
next globs (#19292)
* next globs * few more * some more * . * should be added on map laod * . * that needs its own PR * .
This commit is contained in:
@@ -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", new_sound = 'sound/AI/aurora.ogg') //VOREStation Edit
|
||||
|
||||
/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)
|
||||
|
||||
@@ -11,7 +11,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!
|
||||
..()
|
||||
|
||||
/datum/event/meteor_wave/announce()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -252,7 +252,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)
|
||||
|
||||
@@ -725,15 +725,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))
|
||||
|
||||
if(!docking_codes)
|
||||
docking_codes = "[ascii2text(rand(65,90))][ascii2text(rand(65,90))][ascii2text(rand(65,90))][ascii2text(rand(65,90))]"
|
||||
@@ -150,27 +150,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()
|
||||
@@ -291,23 +291,23 @@
|
||||
GLOB.priority_announcement.Announce(message, new_title = "Automated Distress Signal", new_sound = 'sound/AI/sos.ogg', zlevel = zlevel)
|
||||
|
||||
/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
|
||||
|
||||
testing("Overmap build complete.")
|
||||
return 1
|
||||
|
||||
@@ -54,7 +54,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)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/verb/remove_card()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -107,8 +107,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user