mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
Merge remote-tracking branch 'refs/remotes/origin/master' into smoothing-improvements
This commit is contained in:
@@ -100,14 +100,14 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
return
|
||||
|
||||
var/who
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(!who)
|
||||
who = "[C]"
|
||||
else
|
||||
who += ", [C]"
|
||||
|
||||
var/adminwho
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(!adminwho)
|
||||
adminwho = "[C]"
|
||||
else
|
||||
|
||||
@@ -9,7 +9,7 @@ world/IsBanned(key,address,computer_id)
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.")
|
||||
var/admin = 0
|
||||
var/ckey = ckey(key)
|
||||
if((ckey in admin_datums) || (ckey in deadmins))
|
||||
if((ckey in admin_datums) || (ckey in GLOB.deadmins))
|
||||
var/datum/admins/A = admin_datums[ckey]
|
||||
if(A.rights & R_ADMIN)
|
||||
admin = 1
|
||||
|
||||
@@ -4,7 +4,7 @@ var/global/nologevent = 0
|
||||
////////////////////////////////
|
||||
/proc/message_admins(var/msg)
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
if(C.prefs && !(C.prefs.toggles & CHAT_NO_ADMINLOGS))
|
||||
to_chat(C, msg)
|
||||
@@ -12,7 +12,7 @@ var/global/nologevent = 0
|
||||
/proc/msg_admin_attack(var/text, var/loglevel)
|
||||
if(!nologevent)
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ATTACK:</span> <span class=\"message\">[text]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
if(C.prefs.atklog == ATKLOG_NONE)
|
||||
continue
|
||||
@@ -23,7 +23,7 @@ var/global/nologevent = 0
|
||||
|
||||
/proc/message_adminTicket(var/msg)
|
||||
msg = "<span class='adminticket'><span class='prefix'>ADMIN TICKET:</span> [msg]</span>"
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
if(C.prefs && !(C.prefs.toggles & CHAT_NO_TICKETLOGS))
|
||||
to_chat(C, msg)
|
||||
@@ -31,7 +31,7 @@ var/global/nologevent = 0
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
/datum/admins/proc/show_player_panel(var/mob/M in mob_list)
|
||||
/datum/admins/proc/show_player_panel(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Show Player Panel"
|
||||
set desc="Edit player (respawn, ban, heal, etc)"
|
||||
@@ -827,7 +827,7 @@ var/global/nologevent = 0
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/show_traitor_panel(var/mob/M in mob_list)
|
||||
/datum/admins/proc/show_traitor_panel(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set desc = "Edit mobs's memory and role"
|
||||
set name = "Show Traitor Panel"
|
||||
@@ -864,7 +864,7 @@ var/global/nologevent = 0
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
var/ai_number = 0
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
for(var/mob/living/silicon/S in GLOB.mob_list)
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
to_chat(usr, "<b>AI [key_name(S, TRUE)]'s laws:</b>")
|
||||
@@ -960,7 +960,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
|
||||
//returns a list of ckeys of the kicked clients
|
||||
/proc/kick_clients_in_lobby(message, kick_only_afk = 0)
|
||||
var/list/kicked_client_names = list()
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(istype(C.mob, /mob/new_player))
|
||||
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
|
||||
continue
|
||||
@@ -1037,7 +1037,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
|
||||
// result[3] is the number of staff that match the rank mask and are inactive
|
||||
/proc/staff_countup(rank_mask = R_BAN)
|
||||
var/list/result = list(0, 0, 0)
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(rank_mask && !check_rights_for(X, rank_mask))
|
||||
result[2]++
|
||||
continue
|
||||
|
||||
@@ -61,10 +61,10 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
/proc/load_admins()
|
||||
//clear the datums references
|
||||
admin_datums.Cut()
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
C.remove_admin_verbs()
|
||||
C.holder = null
|
||||
admins.Cut()
|
||||
GLOB.admins.Cut()
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
load_admin_ranks()
|
||||
@@ -97,7 +97,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
|
||||
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(directory[ckey])
|
||||
D.associate(GLOB.directory[ckey])
|
||||
|
||||
else
|
||||
//The current admin system uses SQL
|
||||
@@ -121,7 +121,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
|
||||
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(directory[ckey])
|
||||
D.associate(GLOB.directory[ckey])
|
||||
if(!admin_datums)
|
||||
log_world("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
|
||||
@@ -212,7 +212,6 @@ var/list/admin_verbs_proccall = list(
|
||||
)
|
||||
var/list/admin_verbs_snpc = list(
|
||||
/client/proc/resetSNPC,
|
||||
/client/proc/toggleSNPC,
|
||||
/client/proc/customiseSNPC,
|
||||
/client/proc/hide_snpc_verbs
|
||||
)
|
||||
@@ -446,10 +445,10 @@ var/list/admin_verbs_ticket = list(
|
||||
|
||||
/client/proc/findStealthKey(txt)
|
||||
if(txt)
|
||||
for(var/P in stealthminID)
|
||||
if(stealthminID[P] == txt)
|
||||
for(var/P in GLOB.stealthminID)
|
||||
if(GLOB.stealthminID[P] == txt)
|
||||
return P
|
||||
txt = stealthminID[ckey]
|
||||
txt = GLOB.stealthminID[ckey]
|
||||
return txt
|
||||
|
||||
/client/proc/createStealthKey()
|
||||
@@ -457,11 +456,11 @@ var/list/admin_verbs_ticket = list(
|
||||
var/i = 0
|
||||
while(i == 0)
|
||||
i = 1
|
||||
for(var/P in stealthminID)
|
||||
if(num == stealthminID[P])
|
||||
for(var/P in GLOB.stealthminID)
|
||||
if(num == GLOB.stealthminID[P])
|
||||
num++
|
||||
i = 0
|
||||
stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
GLOB.stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
|
||||
/client/proc/stealth()
|
||||
set category = "Admin"
|
||||
@@ -521,7 +520,7 @@ var/list/admin_verbs_ticket = list(
|
||||
return
|
||||
|
||||
var/datum/preferences/D
|
||||
var/client/C = directory[warned_ckey]
|
||||
var/client/C = GLOB.directory[warned_ckey]
|
||||
if(C) D = C.prefs
|
||||
else D = preferences_datums[warned_ckey]
|
||||
|
||||
@@ -593,7 +592,7 @@ var/list/admin_verbs_ticket = list(
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] created an admin explosion at [epicenter.loc]</span>")
|
||||
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/give_spell(mob/T as mob in mob_list) // -- Urist
|
||||
/client/proc/give_spell(mob/T as mob in GLOB.mob_list) // -- Urist
|
||||
set category = "Event"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
@@ -618,7 +617,7 @@ var/list/admin_verbs_ticket = list(
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("[key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
|
||||
|
||||
/client/proc/give_disease(mob/T in mob_list)
|
||||
/client/proc/give_disease(mob/T in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
@@ -705,7 +704,7 @@ var/list/admin_verbs_ticket = list(
|
||||
message_admins("[key_name_admin(usr)] deadmined themself.")
|
||||
deadmin()
|
||||
verbs += /client/proc/readmin
|
||||
deadmins += ckey
|
||||
GLOB.deadmins += ckey
|
||||
to_chat(src, "<span class='interface'>You are now a normal player.</span>")
|
||||
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -763,17 +762,17 @@ var/list/admin_verbs_ticket = list(
|
||||
flags = text2num(flags)
|
||||
D = new(admin_rank, flags, ckey)
|
||||
|
||||
var/client/C = directory[ckey]
|
||||
var/client/C = GLOB.directory[ckey]
|
||||
D.associate(C)
|
||||
message_admins("[key_name_admin(usr)] re-adminned themselves.")
|
||||
log_admin("[key_name(usr)] re-adminned themselves.")
|
||||
deadmins -= ckey
|
||||
GLOB.deadmins -= ckey
|
||||
feedback_add_details("admin_verb","RAS")
|
||||
return
|
||||
else
|
||||
to_chat(src, "You are already an admin.")
|
||||
verbs -= /client/proc/readmin
|
||||
deadmins -= ckey
|
||||
GLOB.deadmins -= ckey
|
||||
return
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
@@ -807,7 +806,7 @@ var/list/admin_verbs_ticket = list(
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
|
||||
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in GLOB.silicon_mob_list
|
||||
if(!S) return
|
||||
|
||||
var/datum/nano_module/law_manager/L = new(S)
|
||||
@@ -815,7 +814,7 @@ var/list/admin_verbs_ticket = list(
|
||||
log_and_message_admins("has opened [S]'s law manager.")
|
||||
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/change_human_appearance_admin(mob/living/carbon/human/H in mob_list)
|
||||
/client/proc/change_human_appearance_admin(mob/living/carbon/human/H in GLOB.mob_list)
|
||||
set name = "C.M.A. - Admin"
|
||||
set desc = "Allows you to change the mob appearance"
|
||||
set category = "Admin"
|
||||
@@ -841,7 +840,7 @@ var/list/admin_verbs_ticket = list(
|
||||
H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0)
|
||||
feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/change_human_appearance_self(mob/living/carbon/human/H in mob_list)
|
||||
/client/proc/change_human_appearance_self(mob/living/carbon/human/H in GLOB.mob_list)
|
||||
set name = "C.M.A. - Self"
|
||||
set desc = "Allows the mob to change its appearance"
|
||||
set category = "Admin"
|
||||
@@ -977,7 +976,7 @@ var/list/admin_verbs_ticket = list(
|
||||
else
|
||||
to_chat(usr, "You now won't get debug log messages")
|
||||
|
||||
/client/proc/man_up(mob/T as mob in mob_list)
|
||||
/client/proc/man_up(mob/T as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Man Up"
|
||||
set desc = "Tells mob to man up and deal with it."
|
||||
@@ -1003,7 +1002,7 @@ var/list/admin_verbs_ticket = list(
|
||||
var/confirm = alert("Are you sure you want to send the global message?", "Confirm Man Up Global", "Yes", "No")
|
||||
|
||||
if(confirm == "Yes")
|
||||
for(var/mob/T as mob in mob_list)
|
||||
for(var/mob/T as mob in GLOB.mob_list)
|
||||
to_chat(T, "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>")
|
||||
T << 'sound/voice/ManUp1.ogg'
|
||||
|
||||
|
||||
@@ -1,656 +0,0 @@
|
||||
#define BASIC_BUILDMODE 1
|
||||
#define ADV_BUILDMODE 2
|
||||
#define VAR_BUILDMODE 3
|
||||
#define THROW_BUILDMODE 4
|
||||
#define AREA_BUILDMODE 5
|
||||
#define COPY_BUILDMODE 6
|
||||
#define AREAEDIT_BUILDMODE 7
|
||||
#define FILL_BUILDMODE 8
|
||||
#define LINK_BUILDMODE 9
|
||||
#define BOOM_BUILDMODE 10
|
||||
#define SAVE_BUILDMODE 11
|
||||
#define NUM_BUILDMODES 11
|
||||
|
||||
/obj/screen/buildmode
|
||||
icon = 'icons/misc/buildmode.dmi'
|
||||
var/datum/click_intercept/buildmode/bd
|
||||
layer = HUD_LAYER_BUILDMODE
|
||||
|
||||
/obj/screen/buildmode/New(bld)
|
||||
..()
|
||||
bd = bld
|
||||
|
||||
/obj/screen/buildmode/mode
|
||||
name = "Toggle Mode"
|
||||
icon_state = "buildmode1"
|
||||
screen_loc = "NORTH,WEST"
|
||||
|
||||
/obj/screen/buildmode/mode/Click(location, control, params)
|
||||
var/list/pa = params2list(params)
|
||||
|
||||
if(pa.Find("left"))
|
||||
bd.toggle_modes()
|
||||
else if(pa.Find("right"))
|
||||
bd.change_settings(usr)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/screen/buildmode/mode/update_icon()
|
||||
icon_state = "buildmode[bd.mode]"
|
||||
return
|
||||
|
||||
/obj/screen/buildmode/help
|
||||
icon_state = "buildhelp"
|
||||
screen_loc = "NORTH,WEST+1"
|
||||
name = "Buildmode Help"
|
||||
|
||||
/obj/screen/buildmode/help/Click()
|
||||
bd.show_help(usr)
|
||||
return 1
|
||||
|
||||
/obj/screen/buildmode/bdir
|
||||
icon_state = "build"
|
||||
screen_loc = "NORTH,WEST+2"
|
||||
name = "Change Dir"
|
||||
|
||||
/obj/screen/buildmode/bdir/update_icon()
|
||||
dir = bd.build_dir
|
||||
return
|
||||
|
||||
/obj/screen/buildmode/bdir/Click()
|
||||
bd.change_dir()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/screen/buildmode/quit
|
||||
icon_state = "buildquit"
|
||||
screen_loc = "NORTH,WEST+3"
|
||||
name = "Quit Buildmode"
|
||||
|
||||
/obj/screen/buildmode/quit/Click()
|
||||
bd.quit()
|
||||
return 1
|
||||
|
||||
/obj/screen/buildmode/dir/Click()
|
||||
bd.change_dir()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/effect/buildmode_reticule
|
||||
var/image/I
|
||||
var/client/cl
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/buildmode_reticule/New(var/turf/t, var/client/c)
|
||||
loc = t
|
||||
I = image('icons/mob/blob.dmi', t, "marker",19.0,2) // Sprite reuse wooo
|
||||
if(c)
|
||||
cl = c
|
||||
cl.images += I
|
||||
else
|
||||
log_runtime(EXCEPTION("Buildmode reticule created without a client!"), src)
|
||||
|
||||
/obj/effect/buildmode_reticule/proc/deselect()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/buildmode_reticule/Destroy()
|
||||
cl.images -= I
|
||||
cl = null
|
||||
qdel(I)
|
||||
return ..()
|
||||
|
||||
/obj/effect/buildmode_line
|
||||
var/image/I
|
||||
var/client/cl
|
||||
|
||||
/obj/effect/buildmode_line/New(var/client/c, var/atom/atom_a, var/atom/atom_b, var/linename)
|
||||
name = linename
|
||||
loc = get_turf(atom_a)
|
||||
I = image('icons/misc/mark.dmi', src, "line", 19.0)
|
||||
var/x_offset = ((atom_b.x * 32) + atom_b.pixel_x) - ((atom_a.x * 32) + atom_a.pixel_x)
|
||||
var/y_offset = ((atom_b.y * 32) + atom_b.pixel_y) - ((atom_a.y * 32) + atom_a.pixel_y)
|
||||
|
||||
var/matrix/M = matrix()
|
||||
M.Translate(0, 16)
|
||||
M.Scale(1, sqrt((x_offset * x_offset) + (y_offset * y_offset)) / 32)
|
||||
M.Turn(90 - Atan2(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
M.Translate(atom_a.pixel_x, atom_a.pixel_y)
|
||||
|
||||
transform = M
|
||||
cl = c
|
||||
cl.images += I
|
||||
|
||||
/obj/effect/buildmode_line/Destroy()
|
||||
if(I)
|
||||
if(istype(cl))
|
||||
cl.images -= I
|
||||
cl = null
|
||||
QDEL_NULL(I)
|
||||
return ..()
|
||||
|
||||
/datum/click_intercept
|
||||
var/client/holder = null
|
||||
var/list/obj/screen/buttons = list()
|
||||
|
||||
/datum/click_intercept/New(client/c)
|
||||
create_buttons()
|
||||
holder = c
|
||||
holder.click_intercept = src
|
||||
holder.show_popup_menus = 0
|
||||
holder.screen += buttons
|
||||
|
||||
/datum/click_intercept/Destroy()
|
||||
QDEL_LIST(buttons)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/click_intercept/proc/create_buttons()
|
||||
return
|
||||
|
||||
/datum/click_intercept/proc/InterceptClickOn(user,params,atom/object)
|
||||
return
|
||||
|
||||
/datum/click_intercept/proc/quit()
|
||||
holder.screen -= buttons
|
||||
holder.click_intercept = null
|
||||
holder.show_popup_menus = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/datum/click_intercept/buildmode
|
||||
var/mode = BASIC_BUILDMODE
|
||||
var/build_dir = SOUTH
|
||||
var/atom/movable/throw_atom = null
|
||||
var/obj/effect/buildmode_reticule/cornerA = null
|
||||
var/obj/effect/buildmode_reticule/cornerB = null
|
||||
var/generator_path = null
|
||||
var/varholder = "name"
|
||||
var/valueholder = "derp"
|
||||
var/objholder = /obj/structure/closet
|
||||
var/area/storedarea = null
|
||||
var/image/areaimage
|
||||
var/atom/movable/stored = null
|
||||
var/list/link_lines = list()
|
||||
var/obj/link_obj
|
||||
var/valid_links = 0
|
||||
//Explosion mode
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
var/flames = -1
|
||||
// Saving mode
|
||||
var/use_json = TRUE
|
||||
|
||||
/datum/click_intercept/buildmode/New(client/c)
|
||||
..()
|
||||
areaimage = image('icons/turf/areas.dmi',null,"yellow")
|
||||
holder.images += areaimage
|
||||
|
||||
/datum/click_intercept/buildmode/Destroy()
|
||||
stored = null
|
||||
Reset()
|
||||
areaimage.loc = null
|
||||
qdel(areaimage)
|
||||
return ..()
|
||||
|
||||
/datum/click_intercept/buildmode/create_buttons()
|
||||
buttons += new /obj/screen/buildmode/mode(src)
|
||||
buttons += new /obj/screen/buildmode/help(src)
|
||||
buttons += new /obj/screen/buildmode/bdir(src)
|
||||
buttons += new /obj/screen/buildmode/quit(src)
|
||||
|
||||
/datum/click_intercept/buildmode/proc/toggle_modes()
|
||||
mode = (mode % NUM_BUILDMODES) +1
|
||||
Reset()
|
||||
return
|
||||
|
||||
/datum/click_intercept/buildmode/proc/show_help(mob/user)
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + alt = Airlock</span>")
|
||||
to_chat(user, "")
|
||||
to_chat(user, "<span class='notice'>Use the button in the upper left corner to</span>")
|
||||
to_chat(user, "<span class='notice'>change the direction of built objects.</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(ADV_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button = Delete objects</span>")
|
||||
to_chat(user, "")
|
||||
to_chat(user, "<span class='notice'>Use the button in the upper left corner to</span>")
|
||||
to_chat(user, "<span class='notice'>change the direction of built objects.</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(VAR_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(THROW_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(AREA_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select generator</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(COPY_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj/turf/mob = Spawn a Copy of selected target</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj/mob = Select target to copy</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(AREAEDIT_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj/turf/mob = Paint area</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj/turf/mob = Select area to paint</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Create new area</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(FILL_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + Alt on turf/obj/mob = Delete region</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select object type</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(LINK_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj = Select button to link</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj = Link/unlink to selected button")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(BOOM_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Mouse Button on obj = Kaboom</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
if(SAVE_BUILDMODE)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/click_intercept/buildmode/proc/change_settings(mob/user)
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
|
||||
return 1
|
||||
if(ADV_BUILDMODE)
|
||||
var/target_path = input(user,"Enter typepath:" ,"Typepath","/obj/structure/closet")
|
||||
objholder = text2path(target_path)
|
||||
if(!ispath(objholder))
|
||||
objholder = pick_closest_path(target_path)
|
||||
if(!objholder || ispath(objholder, /area))
|
||||
objholder = /obj/structure/closet
|
||||
alert("That path is not allowed.")
|
||||
else
|
||||
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
|
||||
objholder = /obj/structure/closet
|
||||
if(VAR_BUILDMODE)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
|
||||
varholder = input(user,"Enter variable name:" ,"Name", "name")
|
||||
if(varholder in locked && !check_rights(R_DEBUG,0))
|
||||
|
||||
return 1
|
||||
var/thetype = input(user,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
||||
if(!thetype) return 1
|
||||
switch(thetype)
|
||||
if("text")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value", "value") as text
|
||||
if("number")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value", 123) as num
|
||||
if("mob-reference")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as mob in mob_list
|
||||
if("obj-reference")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as obj in world
|
||||
if("turf-reference")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as turf in world
|
||||
if(AREA_BUILDMODE)
|
||||
var/list/gen_paths = subtypesof(/datum/mapGenerator)
|
||||
|
||||
var/type = input(user,"Select Generator Type","Type") as null|anything in gen_paths
|
||||
if(!type) return
|
||||
|
||||
generator_path = type
|
||||
cornerA = null
|
||||
cornerB = null
|
||||
if(AREAEDIT_BUILDMODE)
|
||||
var/target_path = input(user,"Enter typepath:", "Typepath", "/area")
|
||||
var/areatype = text2path(target_path)
|
||||
if(ispath(areatype,/area))
|
||||
var/areaname = input(user,"Enter area name:", "Area name", "Area")
|
||||
if(!areaname || !length(areaname))
|
||||
return
|
||||
storedarea = new areatype
|
||||
storedarea.power_equip = 0
|
||||
storedarea.power_light = 0
|
||||
storedarea.power_environ = 0
|
||||
storedarea.always_unpowered = 0
|
||||
storedarea.name = areaname
|
||||
areaimage.loc = storedarea
|
||||
if(FILL_BUILDMODE)
|
||||
var/target_path = input(user,"Enter typepath:" ,"Typepath","/obj/structure/closet")
|
||||
objholder = text2path(target_path)
|
||||
if(!ispath(objholder))
|
||||
objholder = pick_closest_path(target_path)
|
||||
if(!objholder || ispath(objholder, /area))
|
||||
objholder = /obj/structure/closet
|
||||
return
|
||||
else
|
||||
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
|
||||
objholder = /obj/structure/closet
|
||||
deselect_region()
|
||||
if(BOOM_BUILDMODE)
|
||||
devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
||||
if(devastation == null) devastation = -1
|
||||
heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
||||
if(heavy == null) heavy = -1
|
||||
light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
||||
if(light == null) light = -1
|
||||
flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
||||
if(flash == null) flash = -1
|
||||
flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
||||
if(flames == null) flames = -1
|
||||
|
||||
if(SAVE_BUILDMODE)
|
||||
use_json = (alert("Would you like to use json (Default is \"Yes\")?",,"Yes","No") == "Yes")
|
||||
|
||||
/datum/click_intercept/buildmode/proc/change_dir()
|
||||
switch(build_dir)
|
||||
if(NORTH)
|
||||
build_dir = EAST
|
||||
if(EAST)
|
||||
build_dir = SOUTH
|
||||
if(SOUTH)
|
||||
build_dir = WEST
|
||||
if(WEST)
|
||||
build_dir = NORTHWEST
|
||||
if(NORTHWEST)
|
||||
build_dir = NORTH
|
||||
return 1
|
||||
|
||||
/datum/click_intercept/buildmode/proc/deselect_region()
|
||||
QDEL_NULL(cornerA)
|
||||
QDEL_NULL(cornerB)
|
||||
|
||||
/datum/click_intercept/buildmode/proc/Reset()//Reset temporary variables
|
||||
deselect_region()
|
||||
if(mode == AREAEDIT_BUILDMODE)
|
||||
areaimage.loc = storedarea
|
||||
else
|
||||
areaimage.loc = null
|
||||
for(var/obj/effect/buildmode_line/L in link_lines)
|
||||
qdel(L)
|
||||
link_lines -= L
|
||||
|
||||
/datum/click_intercept/buildmode/proc/select_tile(var/turf/T)
|
||||
return new /obj/effect/buildmode_reticule(T, holder)
|
||||
|
||||
/proc/togglebuildmode(mob/M as mob in player_list)
|
||||
set name = "Toggle Build Mode"
|
||||
set category = "Event"
|
||||
|
||||
if(M.client)
|
||||
if(istype(M.client.click_intercept,/datum/click_intercept/buildmode))
|
||||
var/datum/click_intercept/buildmode/B = M.client.click_intercept
|
||||
B.quit()
|
||||
log_admin("[key_name(usr)] has left build mode.")
|
||||
else
|
||||
new/datum/click_intercept/buildmode(M.client)
|
||||
message_admins("[key_name_admin(usr)] has entered build mode.")
|
||||
log_admin("[key_name(usr)] has entered build mode.")
|
||||
|
||||
/datum/click_intercept/buildmode/InterceptClickOn(user,params,atom/object) //Click Intercept
|
||||
var/list/pa = params2list(params)
|
||||
var/right_click = pa.Find("right")
|
||||
var/left_click = pa.Find("left")
|
||||
var/alt_click = pa.Find("alt")
|
||||
var/ctrl_click = pa.Find("ctrl")
|
||||
|
||||
. = 1
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
|
||||
var/turf/T = object
|
||||
if(istype(object,/turf/space))
|
||||
T.ChangeTurf(/turf/simulated/floor/plasteel)
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else if(istype(object,/turf/simulated/wall))
|
||||
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])")
|
||||
return
|
||||
else if(right_click)
|
||||
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])")
|
||||
if(istype(object,/turf/simulated/wall))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/simulated/floor/plasteel)
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/space)
|
||||
else if(istype(object,/turf/simulated/wall/r_wall))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else if(istype(object,/obj))
|
||||
qdel(object)
|
||||
return
|
||||
else if(istype(object,/turf) && alt_click && left_click)
|
||||
log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])")
|
||||
new/obj/machinery/door/airlock(get_turf(object))
|
||||
else if(istype(object,/turf) && ctrl_click && left_click)
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.setDir(build_dir)
|
||||
log_admin("Build Mode: [key_name(user)] built a window at ([object.x],[object.y],[object.z])")
|
||||
|
||||
if(ADV_BUILDMODE)
|
||||
if(left_click)
|
||||
if(ispath(objholder,/turf))
|
||||
var/turf/T = get_turf(object)
|
||||
log_admin("Build Mode: [key_name(user)] modified [T] ([T.x],[T.y],[T.z]) to [objholder]")
|
||||
T.ChangeTurf(objholder)
|
||||
else if(!isnull(objholder))
|
||||
var/obj/A = new objholder (get_turf(object))
|
||||
A.setDir(build_dir)
|
||||
log_admin("Build Mode: [key_name(user)] modified [A]'s ([A.x],[A.y],[A.z]) dir to [build_dir]")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Select object type first.</span>")
|
||||
else if(right_click)
|
||||
if(isobj(object))
|
||||
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])")
|
||||
qdel(object)
|
||||
|
||||
if(VAR_BUILDMODE)
|
||||
if(left_click) //I cant believe this shit actually compiles.
|
||||
if(object.vars.Find(varholder))
|
||||
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
|
||||
object.vars[varholder] = valueholder
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
|
||||
if(right_click)
|
||||
if(object.vars.Find(varholder))
|
||||
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
|
||||
object.vars[varholder] = initial(object.vars[varholder])
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
|
||||
|
||||
if(THROW_BUILDMODE)
|
||||
if(left_click)
|
||||
if(isturf(object))
|
||||
return
|
||||
throw_atom = object
|
||||
if(right_click)
|
||||
if(throw_atom)
|
||||
throw_atom.throw_at(object, 10, 1,user)
|
||||
log_admin("Build Mode: [key_name(user)] threw [throw_atom] at [object] ([object.x],[object.y],[object.z])")
|
||||
if(AREA_BUILDMODE)
|
||||
if(!cornerA)
|
||||
cornerA = select_tile(get_turf(object))
|
||||
return
|
||||
if(cornerA && !cornerB)
|
||||
cornerB = select_tile(get_turf(object))
|
||||
if(left_click) //rectangular
|
||||
if(cornerA && cornerB)
|
||||
if(!generator_path)
|
||||
to_chat(user, "<span class='warning'>Select generator type first.</span>")
|
||||
else
|
||||
var/datum/mapGenerator/G = new generator_path
|
||||
G.defineRegion(cornerA.loc,cornerB.loc,1)
|
||||
G.generate()
|
||||
deselect_region()
|
||||
return
|
||||
|
||||
//Something wrong - Reset
|
||||
deselect_region()
|
||||
if(COPY_BUILDMODE)
|
||||
if(left_click)
|
||||
var/turf/T = get_turf(object)
|
||||
if(stored)
|
||||
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
|
||||
else if(right_click)
|
||||
if(ismovableatom(object)) // No copying turfs for now.
|
||||
to_chat(user, "<span class='notice'>[object] set as template.</span>")
|
||||
stored = object
|
||||
if(AREAEDIT_BUILDMODE)
|
||||
if(left_click)
|
||||
if(!storedarea)
|
||||
return
|
||||
var/turf/T = get_turf(object)
|
||||
if(get_area(T) != storedarea)
|
||||
storedarea.contents.Add(T)
|
||||
else if(right_click)
|
||||
var/turf/T = get_turf(object)
|
||||
storedarea = get_area(T)
|
||||
areaimage.loc = storedarea
|
||||
if(FILL_BUILDMODE)
|
||||
if(!cornerA)
|
||||
cornerA = select_tile(get_turf(object))
|
||||
return
|
||||
if(cornerA && !cornerB)
|
||||
cornerB = select_tile(get_turf(object))
|
||||
if(left_click) //rectangular
|
||||
if(cornerA && cornerB)
|
||||
if(alt_click)
|
||||
empty_region(block(get_turf(cornerA),get_turf(cornerB)))
|
||||
deselect_region()
|
||||
else
|
||||
if(!objholder)
|
||||
to_chat(user, "<span class='warning'>Select object type first.</span>")
|
||||
else
|
||||
for(var/turf/T in block(get_turf(cornerA),get_turf(cornerB)))
|
||||
if(ispath(objholder,/turf))
|
||||
T.ChangeTurf(objholder)
|
||||
else
|
||||
var/obj/A = new objholder(T)
|
||||
A.setDir(build_dir)
|
||||
deselect_region()
|
||||
return
|
||||
|
||||
//Something wrong - Reset
|
||||
deselect_region()
|
||||
if(LINK_BUILDMODE)
|
||||
if(left_click && istype(object, /obj/machinery))
|
||||
link_obj = object
|
||||
if(right_click && istype(object, /obj/machinery))
|
||||
if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
var/obj/machinery/door/airlock/P = object
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(holder, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
if(P.id_tag == M.id && (P in range(M.range, M)) && P.id_tag && P.id_tag != "")
|
||||
P.id_tag = null
|
||||
to_chat(holder, "[P] unlinked.")
|
||||
goto(line_jump)
|
||||
if(!M.normaldoorcontrol)
|
||||
if(link_lines.len && alert(holder, "Warning: This will disable links to connected pod doors. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
M.normaldoorcontrol = 1
|
||||
if(P.id_tag && alert(holder, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
P.id_tag = M.id
|
||||
if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/poddoor))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
var/obj/machinery/door/poddoor/P = object
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(holder, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
if(P.id_tag == M.id && P.id_tag && P.id_tag != "")
|
||||
P.id_tag = null
|
||||
to_chat(holder, "[P] unlinked.")
|
||||
goto(line_jump)
|
||||
if(M.normaldoorcontrol)
|
||||
if(link_lines.len && alert(holder, "Warning: This will disable links to connected airlocks. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
M.normaldoorcontrol = 0
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(holder, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
if(P.id_tag && P.id_tag != 1 && alert(holder, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
P.id_tag = M.id
|
||||
|
||||
line_jump // For the goto
|
||||
valid_links = 0
|
||||
for(var/obj/effect/buildmode_line/L in link_lines)
|
||||
qdel(L)
|
||||
link_lines -= L
|
||||
|
||||
if(istype(link_obj, /obj/machinery/door_control))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
for(var/obj/machinery/door/airlock/P in range(M.range,M))
|
||||
if(P.id_tag == M.id)
|
||||
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
|
||||
L.color = M.normaldoorcontrol ? "#339933" : "#993333"
|
||||
if(M.normaldoorcontrol)
|
||||
valid_links = 1
|
||||
link_lines += L
|
||||
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
|
||||
L2.color = L.color
|
||||
link_lines += L2
|
||||
for(var/obj/machinery/door/poddoor/P in airlocks)
|
||||
if(P.id_tag == M.id)
|
||||
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
|
||||
L.color = M.normaldoorcontrol ? "#993333" : "#339933"
|
||||
if(M.normaldoorcontrol)
|
||||
valid_links = 0
|
||||
link_lines += L
|
||||
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
|
||||
L2.color = L.color
|
||||
link_lines += L2
|
||||
if(BOOM_BUILDMODE)
|
||||
explosion(object, devastation, heavy, light, flash, null, TRUE, flames)
|
||||
if(SAVE_BUILDMODE)
|
||||
if(!cornerA)
|
||||
cornerA = select_tile(get_turf(object))
|
||||
return
|
||||
if(!cornerB)
|
||||
cornerB = select_tile(get_turf(object))
|
||||
if(left_click)
|
||||
if(cornerA && cornerB)
|
||||
var/turf/A = get_turf(cornerA)
|
||||
var/turf/B = get_turf(cornerB)
|
||||
deselect_region() // So we don't read our own reticules
|
||||
var/map_name = input(holder, "Please select a name for your map", "Buildmode", "")
|
||||
if(map_name == "")
|
||||
return
|
||||
var/map_flags = 0
|
||||
if(use_json)
|
||||
map_flags = 32 // Magic number defined in `writer.dm` that I can't use directly
|
||||
// because #defines are for some reason our coding standard
|
||||
var/our_map = maploader.save_map(A,B,map_name,map_flags)
|
||||
holder << ftp(our_map) // send the map they've made! Or are stealing, whatever
|
||||
to_chat(holder, "Map saving complete! [our_map]")
|
||||
return
|
||||
|
||||
deselect_region()
|
||||
@@ -35,11 +35,11 @@ var/list/admin_datums = list()
|
||||
owner.on_holder_add()
|
||||
owner.add_admin_verbs() //TODO
|
||||
owner.verbs -= /client/proc/readmin
|
||||
admins |= C
|
||||
GLOB.admins |= C
|
||||
|
||||
/datum/admins/proc/disassociate()
|
||||
if(owner)
|
||||
admins -= owner
|
||||
GLOB.admins -= owner
|
||||
owner.remove_admin_verbs()
|
||||
owner.holder = null
|
||||
owner = null
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
else
|
||||
dat += "<tr><td><i>Nuclear Operative not found!</i></td></tr>"
|
||||
dat += "</table><br><table><tr><td><B>Nuclear Disk(s)</B></td></tr>"
|
||||
for(var/obj/item/disk/nuclear/N in poi_list)
|
||||
for(var/obj/item/disk/nuclear/N in GLOB.poi_list)
|
||||
dat += "<tr><td>[N.name], "
|
||||
var/atom/disk_loc = N.loc
|
||||
while(!istype(disk_loc, /turf))
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
var/ruler
|
||||
ruler = "<hr style='background:#000000; border:0; height:3px'>"
|
||||
navbar = "<a href='?_src_=holder;nonalpha=1'>\[All\]</a>|<a href='?_src_=holder;nonalpha=2'>\[#\]</a>"
|
||||
for(var/letter in alphabet)
|
||||
for(var/letter in GLOB.alphabet)
|
||||
navbar += "|<a href='?_src_=holder;shownote=[letter]'>\[[letter]\]</a>"
|
||||
navbar += "<br><form method='GET' name='search' action='?'>\
|
||||
<input type='hidden' name='_src_' value='holder'>\
|
||||
|
||||
+24
-24
@@ -146,7 +146,7 @@
|
||||
|
||||
var/mob/playermob
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.ckey == banckey)
|
||||
playermob = M
|
||||
break
|
||||
@@ -238,7 +238,7 @@
|
||||
else
|
||||
D = new /datum/admins(new_rank, rights, adm_ckey)
|
||||
|
||||
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
var/client/C = GLOB.directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
D.associate(C) //link up with the client and add verbs
|
||||
|
||||
updateranktodb(adm_ckey, new_rank)
|
||||
@@ -1259,7 +1259,7 @@
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.")
|
||||
|
||||
var/mob/new_player/NP = new()
|
||||
non_respawnable_keys -= M.ckey
|
||||
GLOB.non_respawnable_keys -= M.ckey
|
||||
NP.ckey = M.ckey
|
||||
qdel(M)
|
||||
|
||||
@@ -1552,7 +1552,7 @@
|
||||
if(is_mhelp)
|
||||
helptype = "MENTORHELP"
|
||||
var/take_msg = "<span class='notice'><b>[helptype]</b>: <b>[key_name(usr.client)]</b> is attending to <b>[key_name(M)]'s</b> question.</span>"
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_ADMIN, 0, X.mob))
|
||||
to_chat(X, take_msg)
|
||||
else if(is_mhelp && check_rights(R_MOD|R_MENTOR, 0, X.mob))
|
||||
@@ -1583,7 +1583,7 @@
|
||||
if (H.current)
|
||||
to_chat(H.current, "<span class='danger'>[ticker.cultdat.entity_name]</span> murmurs, <span class='cultlarge'>[input]</span></span>")
|
||||
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
for(var/mob/dead/observer/O in GLOB.player_list)
|
||||
to_chat(O, "<span class='danger'>[ticker.cultdat.entity_name]</span> murmurs, <span class='cultlarge'>[input]</span></span>")
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has talked with the Voice of [ticker.cultdat.entity_name].")
|
||||
@@ -1916,7 +1916,7 @@
|
||||
if("Crew Traitor")
|
||||
logmsg = "crew traitor."
|
||||
var/list/possible_traitors = list()
|
||||
for(var/mob/living/player in living_mob_list)
|
||||
for(var/mob/living/player in GLOB.living_mob_list)
|
||||
if(player.client && player.mind && !player.mind.special_role && player.stat != DEAD && player != H)
|
||||
if(ishuman(player))
|
||||
if(player.client && (ROLE_TRAITOR in player.client.prefs.be_special) && !jobban_isbanned(player, ROLE_TRAITOR) && !jobban_isbanned(player, "Syndicate"))
|
||||
@@ -1988,7 +1988,7 @@
|
||||
P.name = "Central Command - paper"
|
||||
var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions")
|
||||
var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes
|
||||
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><B>Nanotrasen Science Station Cyberiad</B></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
|
||||
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><B>Nanotrasen Science Station [using_map.station_short]</B></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
|
||||
if(stype == "Handle it yourselves!")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <B><I>DECLINED</I></B> automatically by NAS Trurl Fax Registration.<BR><BR>Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.<BR><BR><i><small>This is an automatic message.</small>"
|
||||
else if(stype == "Illegible fax")
|
||||
@@ -2066,7 +2066,7 @@
|
||||
|
||||
var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "")
|
||||
if(!input) return
|
||||
ert_request_answered = 1
|
||||
ert_request_answered = TRUE
|
||||
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
|
||||
log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].")
|
||||
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Your ERT request has been denied for the following reasons: [input]. Message ends.\"")
|
||||
@@ -2509,14 +2509,14 @@
|
||||
if("monkey")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","M")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
spawn(0)
|
||||
H.monkeyize()
|
||||
ok = 1
|
||||
if("corgi")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","M")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
spawn(0)
|
||||
H.corgize()
|
||||
ok = 1
|
||||
@@ -2587,7 +2587,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","PW")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] teleported all players to the prison station.</span>", 1)
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
var/turf/loc = find_loc(H)
|
||||
var/security = 0
|
||||
if(!is_station_level(loc.z) || prisonwarped.Find(H))
|
||||
@@ -2631,7 +2631,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","TA([objective])")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !H.client || !H.mind) continue
|
||||
if(is_special_character(H)) continue
|
||||
//traitorize(H, objective, 0)
|
||||
@@ -2644,7 +2644,7 @@
|
||||
ticker.mode.greet_traitor(H.mind)
|
||||
//ticker.mode.forge_traitor_objectives(H.mind)
|
||||
ticker.mode.finalize_traitor(H.mind)
|
||||
for(var/mob/living/silicon/A in player_list)
|
||||
for(var/mob/living/silicon/A in GLOB.player_list)
|
||||
ticker.mode.traitors += A.mind
|
||||
A.mind.special_role = SPECIAL_ROLE_TRAITOR
|
||||
var/datum/objective/new_objective = new
|
||||
@@ -2681,7 +2681,7 @@
|
||||
feedback_add_details("admin_secrets_fun_used","FL")
|
||||
while(!usr.stat)
|
||||
//knock yourself out to stop the ghosts
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat != 2 && prob(25))
|
||||
var/area/AffectedArea = get_area(M)
|
||||
if(AffectedArea.name != "Space" && AffectedArea.name != "Engine Walls" && AffectedArea.name != "Chemical Lab Test Chamber" && AffectedArea.name != "Escape Shuttle" && AffectedArea.name != "Arrival Area" && AffectedArea.name != "Arrival Shuttle" && AffectedArea.name != "start area" && AffectedArea.name != "Engine Combustion Chamber")
|
||||
@@ -2704,7 +2704,7 @@
|
||||
if(prob(25) && !W.anchored)
|
||||
step_rand(W)
|
||||
sleep(rand(100,1000))
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat != 2)
|
||||
M.show_message(text("<span class='notice'>The chilling wind suddenly stops...</span>"), 1)
|
||||
if("lightout")
|
||||
@@ -2717,13 +2717,13 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BO")
|
||||
message_admins("[key_name_admin(usr)] broke all lights", 1)
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.broken()
|
||||
if("whiteout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","WO")
|
||||
message_admins("[key_name_admin(usr)] fixed all lights", 1)
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.fix()
|
||||
if("floorlava")
|
||||
feedback_inc("admin_secrets_fun_used", 1)
|
||||
@@ -2752,7 +2752,7 @@
|
||||
if("retardify")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","RET")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
to_chat(H, "<span class='danger'>You suddenly feel stupid.</span>")
|
||||
H.setBrainLoss(60)
|
||||
message_admins("[key_name_admin(usr)] made everybody retarded")
|
||||
@@ -2778,7 +2778,7 @@
|
||||
if("eagles")//SCRAW
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in airlocks)
|
||||
for(var/obj/machinery/door/airlock/W in GLOB.airlocks)
|
||||
if(is_station_level(W.z) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
@@ -2918,7 +2918,7 @@
|
||||
if("manifest")
|
||||
var/dat = "<B>Showing Crew Manifest.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.ckey)
|
||||
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
|
||||
dat += "</table>"
|
||||
@@ -2928,7 +2928,7 @@
|
||||
if("DNA")
|
||||
var/dat = "<B>Showing DNA from blood.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.dna && H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.b_type]</td></tr>"
|
||||
dat += "</table>"
|
||||
@@ -2936,7 +2936,7 @@
|
||||
if("fingerprints")
|
||||
var/dat = "<B>Showing Fingerprints.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.ckey)
|
||||
if(H.dna && H.dna.uni_identity)
|
||||
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
|
||||
@@ -2982,12 +2982,12 @@
|
||||
dat += "No-one has done anything this round!"
|
||||
usr << browse(dat, "window=admin_log")
|
||||
if("maint_access_brig")
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in GLOB.airlocks)
|
||||
if(access_maint_tunnels in M.req_access)
|
||||
M.req_access = list(access_brig)
|
||||
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
|
||||
if("maint_access_engiebrig")
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in GLOB.airlocks)
|
||||
if(access_maint_tunnels in M.req_access)
|
||||
M.req_access = list()
|
||||
M.req_one_access = list(access_brig,access_engine)
|
||||
|
||||
@@ -38,7 +38,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/list/surnames = list()
|
||||
var/list/forenames = list()
|
||||
var/list/ckeys = list()
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
var/list/indexing = list(M.real_name, M.name)
|
||||
if(M.mind) indexing += M.mind.name
|
||||
|
||||
@@ -94,7 +94,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/list/mentorholders = list()
|
||||
var/list/modholders = list()
|
||||
var/list/adminholders = list()
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_ADMIN, 0, X.mob))
|
||||
if(X.is_afk())
|
||||
admin_number_afk++
|
||||
@@ -152,7 +152,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/admin_number_afk = 0 //Holds the number of admins who are afk
|
||||
var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins)
|
||||
var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
admin_number_total++;
|
||||
var/invalid = 0
|
||||
if(requiredflags != 0 && !check_rights_for(X, requiredflags))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(var/mob/M in mob_list)
|
||||
/client/proc/jumptomob(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getmob(var/mob/M in mob_list)
|
||||
/client/proc/Getmob(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
@@ -120,7 +120,7 @@
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
@@ -136,7 +136,7 @@
|
||||
admin_forcemove(usr, M.loc)
|
||||
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sendmob(var/mob/M in mob_list)
|
||||
/client/proc/sendmob(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Send Mob"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_context(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_pm_context(mob/M as mob in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
@@ -67,7 +67,7 @@
|
||||
if(istext(whom))
|
||||
if(cmptext(copytext(whom,1,2),"@"))
|
||||
whom = findStealthKey(whom)
|
||||
C = directory[whom]
|
||||
C = GLOB.directory[whom]
|
||||
else if(istype(whom,/client))
|
||||
C = whom
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
//check client/X is an admin and isn't the sender or recipient
|
||||
if(X == C || X == src)
|
||||
continue
|
||||
@@ -224,7 +224,7 @@
|
||||
to_chat(src, "<font color='blue'>IRC PM to-<b>IRC-Admins</b>: [msg]</font>")
|
||||
|
||||
log_admin("PM: [key_name(src)]->IRC: [msg]")
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(X == src)
|
||||
continue
|
||||
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, X.mob))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
log_adminsay(msg, src)
|
||||
|
||||
if(check_rights(R_ADMIN,0))
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
msg = "<span class='emoji_enabled'>[msg]</span>"
|
||||
to_chat(C, "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>")
|
||||
@@ -31,7 +31,7 @@
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, C.mob))
|
||||
var/display_name = key
|
||||
if(holder.fakekey)
|
||||
@@ -62,7 +62,7 @@
|
||||
enabling = TRUE
|
||||
admin_verbs_mentor += msay
|
||||
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_ADMIN|R_MOD, 0, C.mob))
|
||||
continue
|
||||
if(!check_rights(R_MENTOR, 0, C.mob))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<HR>"}
|
||||
|
||||
if(dbcon.IsConnected())
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
dat += "<p>[C.ckey] (Player Age: <font color = 'red'>[C.player_age]</font>) - <b>[C.computer_id]</b> / <b>[C.address]</b><br>"
|
||||
if(C.related_accounts_cid.len)
|
||||
dat += "--Accounts associated with CID: "
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if(holder && holder.fakekey)
|
||||
display_name = holder.fakekey
|
||||
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder && (M.client.holder.rights & R_ADMIN)) )
|
||||
to_chat(M, "<font color='#960018'><span class='ooc'><span class='prefix'>AOOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
custom_event_admin_msg = input
|
||||
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, "<h1 class='alert'>Custom Admin Event Info</h1>")
|
||||
to_chat(X, "<h2 class='alert'>A custom event is starting. OOC Admin Info:</h2>")
|
||||
|
||||
@@ -208,7 +208,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
usr.show_message(t, 1)
|
||||
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_robotize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_robotize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Robot"
|
||||
|
||||
@@ -226,7 +226,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_animalize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
@@ -250,7 +250,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.Animalize()
|
||||
|
||||
|
||||
/client/proc/makepAI(var/turf/T in mob_list)
|
||||
/client/proc/makepAI(var/turf/T in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make pAI"
|
||||
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
||||
@@ -259,7 +259,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return
|
||||
|
||||
var/list/available = list()
|
||||
for(var/mob/C in mob_list)
|
||||
for(var/mob/C in GLOB.mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
@@ -286,7 +286,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
paiController.pai_candidates.Remove(candidate)
|
||||
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_alienize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_alienize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Alien"
|
||||
|
||||
@@ -306,7 +306,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_slimeize(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_slimeize(var/mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make slime"
|
||||
|
||||
@@ -326,7 +326,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_super(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_super(var/mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Make Superhero"
|
||||
|
||||
@@ -337,8 +337,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/type = input("Pick the Superhero","Superhero") as null|anything in all_superheroes
|
||||
var/datum/superheroes/S = all_superheroes[type]
|
||||
var/type = input("Pick the Superhero","Superhero") as null|anything in GLOB.all_superheroes
|
||||
var/datum/superheroes/S = GLOB.all_superheroes[type]
|
||||
if(S)
|
||||
S.create(M)
|
||||
log_admin("[key_name(src)] has turned [M.key] into a Superhero.")
|
||||
@@ -377,7 +377,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
for(var/I in singularities)
|
||||
for(var/I in GLOB.singularities)
|
||||
var/obj/singularity/S = I
|
||||
if(!is_level_reachable(S.z))
|
||||
continue
|
||||
@@ -398,7 +398,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
|
||||
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_grantfullaccess(var/mob/M in mob_list)
|
||||
/client/proc/cmd_admin_grantfullaccess(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Grant Full Access"
|
||||
|
||||
@@ -432,7 +432,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
log_admin("[key_name(src)] has granted [M.key] full access.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has granted [M.key] full access.</span>", 1)
|
||||
|
||||
/client/proc/cmd_assume_direct_control(var/mob/M in mob_list)
|
||||
/client/proc/cmd_assume_direct_control(var/mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Assume direct control"
|
||||
set desc = "Direct intervention"
|
||||
@@ -569,7 +569,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in mob_list)
|
||||
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Select equipment"
|
||||
|
||||
@@ -691,11 +691,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in machines)
|
||||
for(var/obj/machinery/power/emitter/E in GLOB.machines)
|
||||
if(E.anchored)
|
||||
E.active = 1
|
||||
|
||||
for(var/obj/machinery/field/generator/F in machines)
|
||||
for(var/obj/machinery/field/generator/F in GLOB.machines)
|
||||
if(F.active == 0)
|
||||
F.active = 1
|
||||
F.state = 2
|
||||
@@ -706,13 +706,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
F.update_icon()
|
||||
|
||||
spawn(30)
|
||||
for(var/obj/machinery/the_singularitygen/G in machines)
|
||||
for(var/obj/machinery/the_singularitygen/G in GLOB.machines)
|
||||
if(G.anchored)
|
||||
var/obj/singularity/S = new /obj/singularity(get_turf(G))
|
||||
S.energy = 800
|
||||
break
|
||||
|
||||
for(var/obj/machinery/power/rad_collector/Rad in machines)
|
||||
for(var/obj/machinery/power/rad_collector/Rad in GLOB.machines)
|
||||
if(Rad.anchored)
|
||||
if(!Rad.P)
|
||||
var/obj/item/tank/plasma/Plasma = new/obj/item/tank/plasma(Rad)
|
||||
@@ -724,7 +724,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!Rad.active)
|
||||
Rad.toggle_power()
|
||||
|
||||
for(var/obj/machinery/power/smes/SMES in machines)
|
||||
for(var/obj/machinery/power/smes/SMES in GLOB.machines)
|
||||
if(SMES.anchored)
|
||||
SMES.input_attempt = 1
|
||||
|
||||
@@ -738,21 +738,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
|
||||
if("Players")
|
||||
to_chat(usr, jointext(player_list,","))
|
||||
to_chat(usr, jointext(GLOB.player_list,","))
|
||||
if("Admins")
|
||||
to_chat(usr, jointext(admins,","))
|
||||
to_chat(usr, jointext(GLOB.admins,","))
|
||||
if("Mobs")
|
||||
to_chat(usr, jointext(mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.mob_list,","))
|
||||
if("Living Mobs")
|
||||
to_chat(usr, jointext(living_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.living_mob_list,","))
|
||||
if("Dead Mobs")
|
||||
to_chat(usr, jointext(dead_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.dead_mob_list,","))
|
||||
if("Silicons")
|
||||
to_chat(usr, jointext(silicon_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.silicon_mob_list,","))
|
||||
if("Clients")
|
||||
to_chat(usr, jointext(clients,","))
|
||||
to_chat(usr, jointext(GLOB.clients,","))
|
||||
if("Respawnable Mobs")
|
||||
to_chat(usr, jointext(respawnable_list,","))
|
||||
to_chat(usr, jointext(GLOB.respawnable_list,","))
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug"
|
||||
@@ -866,7 +866,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return
|
||||
|
||||
var/list/names = list()
|
||||
for(var/i in ruin_landmarks)
|
||||
for(var/i in GLOB.ruin_landmarks)
|
||||
var/obj/effect/landmark/ruin/ruin_landmark = i
|
||||
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
var/global/list/frozen_mob_list = list()
|
||||
/client/proc/freeze(var/mob/living/M as mob in mob_list)
|
||||
/client/proc/freeze(var/mob/living/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Freeze"
|
||||
|
||||
@@ -84,7 +84,7 @@ var/global/list/frozen_mob_list = list()
|
||||
|
||||
//////////////////////////Freeze Mech
|
||||
|
||||
/client/proc/freezemecha(var/obj/mecha/O as obj in mechas_list)
|
||||
/client/proc/freezemecha(var/obj/mecha/O as obj in GLOB.mechas_list)
|
||||
set category = "Admin"
|
||||
set name = "Freeze Mech"
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
var/list/players_to_spawn = list()
|
||||
if(pick_manually)
|
||||
var/list/possible_ghosts = list()
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(!G.client.is_afk())
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
possible_ghosts += G
|
||||
|
||||
@@ -38,7 +38,7 @@ var/global/sent_honksquad = 0
|
||||
//Generates a list of HONKsquad from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world.
|
||||
var/list/commandos = list() //actual commando ghosts as picked by the user.
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list.
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
@@ -48,7 +48,7 @@ var/global/sent_honksquad = 0
|
||||
commandos += candidate//Add their ghost to commandos.
|
||||
|
||||
//Spawns HONKsquad and equips them.
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(honksquad_number<=0) break
|
||||
if(L.name == "HONKsquad")
|
||||
honk_leader_selected = honksquad_number == 1?1:0
|
||||
@@ -77,7 +77,7 @@ var/global/sent_honksquad = 0
|
||||
var/mob/living/carbon/human/new_honksquad = new(spawn_location.loc)
|
||||
var/honksquad_leader_rank = pick("Lieutenant", "Captain", "Major")
|
||||
var/honksquad_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
|
||||
var/honksquad_name = pick(clown_names)
|
||||
var/honksquad_name = pick(GLOB.clown_names)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the commando.
|
||||
if(honk_leader_selected)
|
||||
|
||||
@@ -48,7 +48,7 @@ var/global/sent_syndicate_infiltration_team = 0
|
||||
|
||||
if(pick_manually)
|
||||
var/list/possible_ghosts = list()
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(!G.client.is_afk())
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
possible_ghosts += G
|
||||
@@ -69,7 +69,7 @@ var/global/sent_syndicate_infiltration_team = 0
|
||||
var/list/sit_spawns = list()
|
||||
var/list/sit_spawns_leader = list()
|
||||
var/list/sit_spawns_mgmt = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name == "Syndicate-Infiltrator")
|
||||
sit_spawns += L
|
||||
if(L.name == "Syndicate-Infiltrator-Leader")
|
||||
|
||||
@@ -212,19 +212,19 @@
|
||||
typecache = typecacheof(typecache)
|
||||
. = list()
|
||||
if(ispath(T, /mob))
|
||||
for(var/mob/thing in mob_list)
|
||||
for(var/mob/thing in GLOB.mob_list)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(ispath(T, /obj/machinery/door))
|
||||
for(var/obj/machinery/door/thing in airlocks)
|
||||
for(var/obj/machinery/door/thing in GLOB.airlocks)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if(ispath(T, /obj/machinery))
|
||||
for(var/obj/machinery/thing in machines)
|
||||
for(var/obj/machinery/thing in GLOB.machines)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
@@ -254,7 +254,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
else if(ispath(T, /client))
|
||||
for(var/client/thing in clients)
|
||||
for(var/client/thing in GLOB.clients)
|
||||
if(typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
@@ -195,7 +195,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "step_size", "bound_height",
|
||||
|
||||
|
||||
if(VV_CLIENT)
|
||||
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in clients
|
||||
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
@@ -516,6 +516,24 @@ var/list/VVpixelmovement = list("step_x", "step_y", "step_size", "bound_height",
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
|
||||
|
||||
/proc/vv_varname_lockcheck(param_var_name)
|
||||
if(param_var_name in VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return FALSE
|
||||
if(param_var_name in VVckey_edit)
|
||||
if(!check_rights(R_EVENT | R_DEBUG))
|
||||
return FALSE
|
||||
if(param_var_name in VVicon_edit_lock)
|
||||
if(!check_rights(R_EVENT | R_DEBUG))
|
||||
return FALSE
|
||||
if(param_var_name in VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return FALSE
|
||||
var/prompt = alert(usr, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
if(prompt != "Continue")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/client/proc/modify_variables(atom/O, param_var_name = null, autodetect_class = 0)
|
||||
if(!check_rights(R_VAREDIT))
|
||||
return
|
||||
@@ -544,25 +562,11 @@ var/list/VVpixelmovement = list("step_x", "step_y", "step_size", "bound_height",
|
||||
if(!O.can_vv_get(variable))
|
||||
return
|
||||
|
||||
if(!vv_varname_lockcheck(variable))
|
||||
return
|
||||
|
||||
var_value = O.vars[variable]
|
||||
|
||||
if(variable in VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
if(variable in VVckey_edit)
|
||||
if(!check_rights(R_EVENT | R_DEBUG))
|
||||
return
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(!check_rights(R_EVENT | R_DEBUG))
|
||||
return
|
||||
if(variable in VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
if(prompt != "Continue")
|
||||
return
|
||||
|
||||
|
||||
var/default = vv_get_class(var_value)
|
||||
|
||||
if(isnull(default))
|
||||
|
||||
@@ -57,7 +57,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making [antnum] traitors with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making [antnum] traitors with One-Click-Antag")
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(CandCheck(ROLE_TRAITOR, applicant, temp))
|
||||
candidates += applicant
|
||||
|
||||
@@ -88,7 +88,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making [antnum] changelings with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making [antnum] changelings with One-Click-Antag")
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(CandCheck(ROLE_CHANGELING, applicant, temp))
|
||||
candidates += applicant
|
||||
|
||||
@@ -118,7 +118,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making [antnum] revolutionaries with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making [antnum] revolutionaries with One-Click-Antag")
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(CandCheck(ROLE_REV, applicant, temp))
|
||||
candidates += applicant
|
||||
|
||||
@@ -166,7 +166,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making a Cult with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making a Cult with One-Click-Antag")
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(CandCheck(ROLE_CULTIST, applicant, temp))
|
||||
candidates += applicant
|
||||
|
||||
@@ -195,7 +195,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making a [antnum] person Nuke Op Team with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making a [antnum] person Nuke Op Team with One-Click-Antag")
|
||||
|
||||
for(var/mob/G in respawnable_list)
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
if(istype(G) && G.client && (ROLE_OPERATIVE in G.client.prefs.be_special))
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(player_old_enough_antag(G.client,ROLE_OPERATIVE))
|
||||
@@ -328,7 +328,7 @@ client/proc/one_click_antag()
|
||||
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
||||
|
||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
for(var/mob/G in respawnable_list)
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
if(!jobban_isbanned(G, "Syndicate"))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
@@ -399,7 +399,7 @@ client/proc/one_click_antag()
|
||||
var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc)
|
||||
var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major")
|
||||
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
|
||||
var/syndicate_commando_name = pick(last_names)
|
||||
var/syndicate_commando_name = pick(GLOB.last_names)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the commando.
|
||||
if(syndicate_leader_selected)
|
||||
@@ -437,7 +437,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making Vox Raiders with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making Vox Raiders with One-Click-Antag")
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/G in respawnable_list)
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
if(istype(G) && G.client && (ROLE_RAIDER in G.client.prefs.be_special))
|
||||
if(player_old_enough_antag(G.client,ROLE_RAIDER))
|
||||
if(!jobban_isbanned(G, "raider") && !jobban_isbanned(G, "Syndicate"))
|
||||
@@ -542,7 +542,7 @@ client/proc/one_click_antag()
|
||||
log_admin("[key_name(owner)] tried making Vampires with One-Click-Antag")
|
||||
message_admins("[key_name_admin(owner)] tried making Vampires with One-Click-Antag")
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(CandCheck(ROLE_VAMPIRE, applicant, temp))
|
||||
candidates += applicant
|
||||
|
||||
@@ -567,7 +567,7 @@ client/proc/one_click_antag()
|
||||
message_admins("[key_name_admin(owner)] tried making Thunderdone Teams with One-Click-Antag")
|
||||
|
||||
//Generates a list of candidates from active ghosts.
|
||||
for(var/mob/G in respawnable_list)
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a Thunderdome match about to start?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
return
|
||||
|
||||
var/list/incompatible_species = list(/datum/species/plasmaman, /datum/species/vox)
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
continue
|
||||
if(is_special_character(H))
|
||||
@@ -62,7 +62,7 @@
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(is_special_character(H)) continue
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
var/list/incompatible_species = list(/datum/species/plasmaman, /datum/species/vox)
|
||||
var/team_toggle = 0
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
continue
|
||||
if(is_special_character(H))
|
||||
|
||||
@@ -10,7 +10,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
log_admin("[key_name(src)] stopped admin sounds.")
|
||||
message_admins("[key_name_admin(src)] stopped admin sounds.", 1)
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
M << awful_sound
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
@@ -28,7 +28,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
log_admin("[key_name(src)] played sound [S]")
|
||||
message_admins("[key_name_admin(src)] played sound [S]", 1)
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client.prefs.sound & SOUND_MIDI)
|
||||
M << uploaded_sound
|
||||
|
||||
@@ -92,7 +92,7 @@ var/list/sounds_cache = list()
|
||||
if(C == "Yep")
|
||||
ignore_power = 1
|
||||
|
||||
for(var/O in global_intercoms)
|
||||
for(var/O in GLOB.global_intercoms)
|
||||
var/obj/item/radio/intercom/I = O
|
||||
if(!is_station_level(I.z) && !ignore_z)
|
||||
continue
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
log_say("(PRAYER) [msg]", usr)
|
||||
msg = "<span class='notice'>[bicon(cross)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]:</font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=[UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>) (<A HREF='?_src_=holder;Bless=[UID()]'>BLESS</A>) (<A HREF='?_src_=holder;Smite=[UID()]'>SMITE</A>):</b> [msg]</span>"
|
||||
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
to_chat(usr, "Your prayers have been received by the gods.")
|
||||
@@ -41,7 +41,7 @@
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color=orange>CENTCOMM: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) [ADMIN_CENTCOM_REPLY(Sender)]):</span> [msg]"
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
@@ -50,7 +50,7 @@
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) [ADMIN_SYNDICATE_REPLY(Sender)]:</span> [msg]"
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
@@ -59,7 +59,7 @@
|
||||
/proc/HONK_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color=pink>HONK: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</span> [msg]"
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
@@ -70,7 +70,7 @@
|
||||
msg = "<span class='adminnotice'><b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>RESPOND</A>):</b> [msg]</span>"
|
||||
if(repeat_warning)
|
||||
msg += "<BR><span class='adminnotice'><b>WARNING: ERT request has gone 5 minutes with no reply!</b></span>"
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
@@ -80,7 +80,7 @@
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=[Sender.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</span>"
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(check_rights(R_EVENT,0,X.mob))
|
||||
to_chat(X, msg)
|
||||
to_chat(X, "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/client/proc/cmd_admin_drop_everything(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_drop_everything(mob/M as mob in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Drop Everything"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
|
||||
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_prison(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_prison(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Prison"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</span>", 1)
|
||||
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_subtle_message(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Subtle Message"
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
var/missing_ages = 0
|
||||
var/msg = ""
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C.player_age == "Requires database")
|
||||
missing_ages = 1
|
||||
continue
|
||||
@@ -144,13 +144,13 @@
|
||||
|
||||
|
||||
|
||||
/client/proc/cmd_admin_headset_message(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Headset Message"
|
||||
|
||||
admin_headset_message(M)
|
||||
|
||||
/client/proc/admin_headset_message(mob/M in mob_list, sender = null)
|
||||
/client/proc/admin_headset_message(mob/M in GLOB.mob_list, sender = null)
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_godmode(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Godmode"
|
||||
|
||||
@@ -342,7 +342,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
var/mob/dead/observer/G_found
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(G.ckey == input)
|
||||
G_found = G
|
||||
break
|
||||
@@ -490,7 +490,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
/proc/create_xeno(ckey)
|
||||
if(!ckey)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat != DEAD) continue //we are not dead!
|
||||
if(!(ROLE_ALIEN in M.client.prefs.be_special)) continue //we don't want to be an alium
|
||||
if(jobban_isbanned(M, "alien") || jobban_isbanned(M, "Syndicate")) continue //we are jobbanned
|
||||
@@ -525,7 +525,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
var/list/mobs = list()
|
||||
var/list/ghosts = list()
|
||||
var/list/sortmob = sortAtom(mob_list) // get the mob list.
|
||||
var/list/sortmob = sortAtom(GLOB.mob_list) // get the mob list.
|
||||
/var/any=0
|
||||
for(var/mob/dead/observer/M in sortmob)
|
||||
mobs.Add(M) //filter it where it's only ghosts
|
||||
@@ -564,7 +564,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in GLOB.mob_list)
|
||||
set category = "Event"
|
||||
set name = "Rejuvenate"
|
||||
|
||||
@@ -721,7 +721,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
else
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_gib(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_gib(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Gib"
|
||||
|
||||
@@ -761,7 +761,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] used gibself.</span>", 1)
|
||||
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Check Contents"
|
||||
|
||||
@@ -861,7 +861,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_admin("[key_name(src)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
|
||||
message_admins("[key_name_admin(usr)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
|
||||
|
||||
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
|
||||
/client/proc/cmd_admin_attack_log(mob/M as mob in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Attack Log"
|
||||
|
||||
@@ -942,7 +942,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/datum/TCS_Compiler/C = S.Compiler
|
||||
S.rawcode = ""
|
||||
C.Compile("")
|
||||
for(var/obj/machinery/computer/telecomms/traffic/T in machines)
|
||||
for(var/obj/machinery/computer/telecomms/traffic/T in GLOB.machines)
|
||||
T.storedcode = ""
|
||||
log_admin("[key_name(usr)] blanked all telecomms scripts.")
|
||||
message_admins("[key_name_admin(usr)] blanked all telecomms scripts.")
|
||||
@@ -963,7 +963,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/job_string
|
||||
var/key_string
|
||||
var/role_string
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
if(!isLivingSSD(H))
|
||||
continue
|
||||
mins_ssd = round((world.time - H.last_logout) / 600)
|
||||
|
||||
@@ -48,7 +48,7 @@ var/global/sent_strike_team = 0
|
||||
var/commando_number = commandos_possible //for selecting a leader
|
||||
var/is_leader = TRUE // set to FALSE after leader is spawned
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
|
||||
if(commando_number <= 0)
|
||||
break
|
||||
@@ -108,7 +108,7 @@ var/global/sent_strike_team = 0
|
||||
commando_number--
|
||||
|
||||
//Spawns the rest of the commando gear.
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name == "Commando_Manual")
|
||||
//new /obj/item/gun/energy/pulse_rifle(L.loc)
|
||||
var/obj/item/paper/P = new(L.loc)
|
||||
@@ -119,7 +119,7 @@ var/global/sent_strike_team = 0
|
||||
P.stamp(stamp)
|
||||
qdel(stamp)
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name == "Commando-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
|
||||
qdel(L)
|
||||
@@ -132,7 +132,7 @@ var/global/sent_strike_team = 0
|
||||
var/mob/living/carbon/human/new_commando = new(spawn_location.loc)
|
||||
var/commando_leader_rank = pick("Lieutenant", "Captain", "Major")
|
||||
var/commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
|
||||
var/commando_name = pick(last_names)
|
||||
var/commando_name = pick(GLOB.last_names)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the commando.
|
||||
if(is_leader)
|
||||
|
||||
@@ -53,7 +53,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
sent_syndicate_strike_team = 1
|
||||
|
||||
//Spawns commandos and equips them.
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
|
||||
if(syndicate_commando_number <= 0)
|
||||
break
|
||||
@@ -88,7 +88,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
is_leader = FALSE
|
||||
syndicate_commando_number--
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name == "Syndicate-Commando-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
|
||||
qdel(L)
|
||||
@@ -101,7 +101,7 @@ var/global/sent_syndicate_strike_team = 0
|
||||
var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc)
|
||||
var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major")
|
||||
var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
|
||||
var/syndicate_commando_name = pick(last_names)
|
||||
var/syndicate_commando_name = pick(GLOB.last_names)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the commando.
|
||||
if(is_leader)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
affecting.receive_damage(1, 0)
|
||||
H.updatehealth()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("<span class='danger'>SPLAT!</span>")
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
/obj/item/assembly/voice/noise/hear_talk(mob/living/M as mob, msg)
|
||||
return
|
||||
|
||||
/obj/item/assembly/voice/hear_message(mob/living/M as mob, msg)
|
||||
/obj/item/assembly/voice/noise/hear_message(mob/living/M as mob, msg)
|
||||
pulse(0)
|
||||
var/turf/T = get_turf(src) //otherwise it won't work in hand
|
||||
T.visible_message("<span class='warning'>[bicon(src)] beeps!</span>")
|
||||
@@ -31,7 +31,7 @@
|
||||
return 1
|
||||
if(href_list["set_subject"])
|
||||
var/list/emitters=list()
|
||||
for(var/obj/machinery/power/emitter/E in machines)
|
||||
for(var/obj/machinery/power/emitter/E in GLOB.machines)
|
||||
if(!isnull(E.id_tag) && E.frequency == parent.frequency)
|
||||
emitters|=E.id_tag
|
||||
if(emitters.len==0)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return 1
|
||||
if(href_list["set_injector"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in GLOB.machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names
|
||||
@@ -75,7 +75,7 @@
|
||||
return 1
|
||||
if(href_list["set_injector"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in GLOB.machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
return 1
|
||||
if(href_list["set_scrubber"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines)
|
||||
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
|
||||
injector_names|=S.id_tag
|
||||
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
|
||||
@@ -77,7 +77,7 @@
|
||||
return 1
|
||||
if(href_list["set_scrubber"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines)
|
||||
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
|
||||
injector_names|=S.id_tag
|
||||
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
|
||||
@@ -145,7 +145,7 @@ var/global/list/gas_labels=list(
|
||||
return 1
|
||||
if(href_list["set_scrubber"])
|
||||
var/list/injector_names=list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines)
|
||||
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
|
||||
injector_names|=S.id_tag
|
||||
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
return 1
|
||||
if(href_list["set_sensor"])
|
||||
var/list/sensor_list = list()
|
||||
for(var/obj/machinery/air_sensor/G in machines)
|
||||
for(var/obj/machinery/air_sensor/G in GLOB.machines)
|
||||
if(!isnull(G.id_tag) && G.frequency == parent.frequency)
|
||||
sensor_list|=G.id_tag
|
||||
for(var/obj/machinery/meter/M in machines)
|
||||
for(var/obj/machinery/meter/M in GLOB.machines)
|
||||
if(!isnull(M.id_tag) && M.frequency == parent.frequency)
|
||||
sensor_list|=M.id_tag
|
||||
sensor = input("Select a sensor:", "Sensor Data", field) as null|anything in sensor_list
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(href_list["set_vent_pump"])
|
||||
var/list/injector_names = list()
|
||||
if(!vent_type)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names |= I.id_tag
|
||||
else
|
||||
@@ -98,7 +98,7 @@
|
||||
if(href_list["set_vent_pump"])
|
||||
var/list/injector_names=list()
|
||||
if(!mode)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
else
|
||||
@@ -190,7 +190,7 @@
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
else
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
|
||||
@@ -282,7 +282,7 @@ checks bitflags
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
else
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
|
||||
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
|
||||
injector_names|=I.id_tag
|
||||
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
if(instant || (roundstart && (ticker && ticker.current_state > GAME_STATE_SETTING_UP)))
|
||||
create()
|
||||
else
|
||||
poi_list |= src
|
||||
GLOB.poi_list |= src
|
||||
LAZYADD(GLOB.mob_spawners[name], src)
|
||||
|
||||
/obj/effect/mob_spawn/Destroy()
|
||||
poi_list -= src
|
||||
GLOB.poi_list -= src
|
||||
var/list/spawners = GLOB.mob_spawners[name]
|
||||
LAZYREMOVE(spawners, src)
|
||||
if(!LAZYLEN(spawners))
|
||||
@@ -70,6 +70,9 @@
|
||||
|
||||
/obj/effect/mob_spawn/proc/create(ckey, flavour = TRUE, name)
|
||||
var/mob/living/M = new mob_type(get_turf(src)) //living mobs only
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H && !H.dna)
|
||||
H.Initialize(null)
|
||||
if(!random)
|
||||
M.real_name = mob_name ? mob_name : M.name
|
||||
if(!mob_gender)
|
||||
@@ -338,7 +341,7 @@
|
||||
outfit = /datum/outfit/job/clown
|
||||
|
||||
/obj/effect/mob_spawn/human/clown/Initialize()
|
||||
mob_name = pick(clown_names)
|
||||
mob_name = pick(GLOB.clown_names)
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/clownmili
|
||||
@@ -346,7 +349,7 @@
|
||||
outfit = /datum/outfit/clownsoldier
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/clownmili/Initialize()
|
||||
mob_name = "Officer [pick(clown_names)]"
|
||||
mob_name = "Officer [pick(GLOB.clown_names)]"
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/clownoff
|
||||
@@ -354,7 +357,7 @@
|
||||
outfit = /datum/outfit/clownofficer
|
||||
|
||||
/obj/effect/mob_spawn/human/corpse/clownoff/Initialize()
|
||||
mob_name = "Honk Specialist [pick(clown_names)]"
|
||||
mob_name = "Honk Specialist [pick(GLOB.clown_names)]"
|
||||
..()
|
||||
|
||||
|
||||
@@ -385,7 +388,7 @@
|
||||
outfit = /datum/outfit/job/mime
|
||||
|
||||
/obj/effect/mob_spawn/human/mime/Initialize()
|
||||
mob_name = pick(mime_names)
|
||||
mob_name = pick(GLOB.mime_names)
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/scientist
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
spawn(1)
|
||||
beenused = 1
|
||||
var/unlocked_something = 0
|
||||
for(var/obj/machinery/door/poddoor/P in airlocks)
|
||||
for(var/obj/machinery/door/poddoor/P in GLOB.airlocks)
|
||||
if(P.density && P.id_tag == door_to_open && P.z == z)
|
||||
P.open()
|
||||
unlocked_something = 1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
opacity = 0
|
||||
mouse_opacity = 0
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
density = 0
|
||||
anchored = 1
|
||||
invisibility = 101
|
||||
|
||||
@@ -152,7 +152,7 @@ var/sc_safecode5 = "[rand(0,9)]"
|
||||
new /obj/item/clothing/head/helmet/space/cult(src)
|
||||
new /obj/item/clothing/suit/space/cult(src)
|
||||
//new /obj/item/teleportation_scroll(src)
|
||||
new /obj/item/ore/diamond(src)
|
||||
new /obj/item/stack/ore/diamond(src)
|
||||
|
||||
/*
|
||||
* Modified Nar-Sie
|
||||
|
||||
@@ -177,8 +177,8 @@
|
||||
|
||||
spawn(rand(800,1200))
|
||||
if(C.stat == DEAD)
|
||||
dead_mob_list -= C
|
||||
living_mob_list += C
|
||||
GLOB.dead_mob_list -= C
|
||||
GLOB.living_mob_list += C
|
||||
C.stat = CONSCIOUS
|
||||
C.timeofdeath = 0
|
||||
C.setToxLoss(0)
|
||||
@@ -237,7 +237,7 @@
|
||||
to_chat(user, "<span class='warning'>The communicator buzzes, and you hear the voice again: 'Really? I think not. Get them!'</span>")
|
||||
if(option_threat)
|
||||
to_chat(user, "<span class='warning'>The communicator buzzes, and you hear the voice again: 'Oh really now?' You hear a clicking sound. 'Team, get back here. We have trouble'. Then the line goes dead.</span>")
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name == "wildwest_syndipod")
|
||||
var/obj/spacepod/syndi/P = new /obj/spacepod/syndi(get_turf(L))
|
||||
P.name = "Syndi Recon Pod"
|
||||
@@ -250,7 +250,7 @@
|
||||
used = TRUE
|
||||
|
||||
/obj/item/wildwest_communicator/proc/stand_down()
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in living_mob_list)
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.living_mob_list)
|
||||
W.on_alert = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged/wildwest
|
||||
@@ -262,8 +262,9 @@
|
||||
return list()
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/death(gibbed)
|
||||
if(!on_alert)
|
||||
// putting this up here so we don't say anything after deathgasp
|
||||
if(can_die() && !on_alert)
|
||||
say("How could you betray the Syndicate?")
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in living_mob_list)
|
||||
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.living_mob_list)
|
||||
W.on_alert = TRUE
|
||||
..(gibbed)
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -59,7 +59,7 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
|
||||
space_manager.remove_dirt(zlev)
|
||||
log_world(" Away mission loaded: [map]")
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
@@ -92,7 +92,7 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
|
||||
|
||||
//map_transition_config.Add(AWAY_MISSION_LIST)
|
||||
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name != "awaystart")
|
||||
continue
|
||||
awaydestinations.Add(L)
|
||||
|
||||
@@ -159,12 +159,12 @@
|
||||
|
||||
/obj/effect/view_portal/New()
|
||||
..()
|
||||
portals += src
|
||||
GLOB.portals += src
|
||||
|
||||
/obj/effect/view_portal/Initialize()
|
||||
..()
|
||||
if(id)
|
||||
for(var/obj/effect/view_portal/O in portals)
|
||||
for(var/obj/effect/view_portal/O in GLOB.portals)
|
||||
if(id == O.id && O != src && can_link(O))
|
||||
other = O
|
||||
O.other = src
|
||||
@@ -174,7 +174,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/view_portal/Destroy()
|
||||
portals -= src
|
||||
GLOB.portals -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/view_portal/proc/can_link(obj/effect/view_portal/P)
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
# Buildmode
|
||||
|
||||
## Code layout
|
||||
|
||||
### Buildmode
|
||||
|
||||
Manager for buildmode modes. Contains logic to manage switching between each mode, and presenting a suitable user interface.
|
||||
|
||||
### Effects
|
||||
|
||||
Special graphics used by buildmode modes for user interface purposes.
|
||||
|
||||
### Buildmode Mode
|
||||
|
||||
Implementer of buildmode behaviors.
|
||||
|
||||
Existing varieties:
|
||||
|
||||
+ Basic
|
||||
|
||||
**Description**:
|
||||
|
||||
Allows creation of simple structures consisting of floors, walls, windows, and airlocks.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Left click a turf*:
|
||||
|
||||
"Upgrades" the turf based on the following rules below:
|
||||
|
||||
+ Space -> Tiled floor
|
||||
+ Simulated floor -> Regular wall
|
||||
+ Wall -> Reinforced wall
|
||||
|
||||
+ *Right click a turf*:
|
||||
|
||||
"Downgrades" the turf based on the following rules below:
|
||||
|
||||
+ Reinforced wall -> Regular wall
|
||||
+ Wall -> Tiled floor
|
||||
+ Simulated floor -> Space
|
||||
|
||||
+ *Right click an object*:
|
||||
|
||||
Deletes the clicked object.
|
||||
|
||||
+ *Alt+Left click a location*:
|
||||
|
||||
Places an airlock at the clicked location.
|
||||
|
||||
+ *Ctrl+Left click a location*:
|
||||
|
||||
Places a window at the clicked location.
|
||||
|
||||
+ Advanced
|
||||
|
||||
**Description**:
|
||||
|
||||
Creates an instance of a configurable atom path where you click.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click on the mode selector*:
|
||||
|
||||
Choose a path to spawn.
|
||||
|
||||
+ *Alt+Left click a turf, object, or mob*:
|
||||
|
||||
Select the type of the object clicked.
|
||||
|
||||
+ *Left click a location* (requires chosen path):
|
||||
|
||||
Place an instance of the chosen path at the location.
|
||||
|
||||
+ *Right click an object*:
|
||||
|
||||
Delete the object.
|
||||
|
||||
+ Fill
|
||||
|
||||
**Description**:
|
||||
|
||||
Creates an instance of an atom path on every tile in a chosen region.
|
||||
|
||||
With a special control input, instead deletes everything within the region.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click on the mode selector*:
|
||||
|
||||
Choose a path to spawn.
|
||||
|
||||
+ *Left click on a region* (requires chosen path):
|
||||
|
||||
Fill the region with the chosen path.
|
||||
|
||||
+ *Alt+Left click on a region*:
|
||||
|
||||
Deletes everything within the region.
|
||||
|
||||
+ *Right click during region selection*:
|
||||
|
||||
Cancel region selection.
|
||||
|
||||
+ Atmos
|
||||
|
||||
**Description**:
|
||||
|
||||
Fills a region with configurable atmos. By default, ignores unsimulated turfs, but is able to "overwrite" the atmos of unsimulated turfs with a special control input.
|
||||
|
||||
By default, fills a region with a breathable, standard atmosphere.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click on the mode selector icon*:
|
||||
|
||||
Set the following traits:
|
||||
|
||||
+ Total Pressure
|
||||
+ Temperature
|
||||
+ Partial Pressure Ratio (PPR) Oxygen
|
||||
+ PPR Nitrogen
|
||||
+ PPR Plasma
|
||||
+ PPR CO2
|
||||
+ PPR N2O
|
||||
|
||||
+ *Left click a region*:
|
||||
|
||||
Fill the region with the configured atmos.
|
||||
|
||||
+ *Control+Left click a region*:
|
||||
|
||||
As with the regular left click, but also "overwrites" the base atmos of any unsimulated turfs in the region - such as space turfs.
|
||||
|
||||
+ *Right click during region selection*:
|
||||
|
||||
Cancel region selection.
|
||||
|
||||
+ Copy
|
||||
|
||||
**Description**:
|
||||
|
||||
Take an existing object in the world, and place duplicates with identical attributes where you click.
|
||||
|
||||
May not always work nicely - "deep" variables such as lists or datums may malfunction.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click an existing object*:
|
||||
|
||||
Select the clicked object as a template.
|
||||
|
||||
+ *Left click a location* (Requires a selected object as template):
|
||||
|
||||
Place a duplicate of the template at the clicked location.
|
||||
|
||||
+ Link
|
||||
|
||||
**Description**:
|
||||
|
||||
Form links between door control buttons and either airlocks or pod bay doors.
|
||||
|
||||
The selected button will be highlighted, and visible lines will be drawn between the doors it is linked to and itself.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Left click a door control button*:
|
||||
|
||||
Makes the button active, and show what doors it is linked to.
|
||||
|
||||
+ *Right click an airlock* (requires active button):
|
||||
|
||||
Links the airlock to the active button. Will remove all links from the button first, if the button is linked to pod bay doors.
|
||||
|
||||
+ *Right click a pod bay door* (requires active button):
|
||||
|
||||
Links the pod bay door to the active button. Will remove all links from the button first, if the button is linked to regular airlocks.
|
||||
|
||||
+ Area Edit
|
||||
|
||||
**Description**:
|
||||
|
||||
Modifies and creates areas.
|
||||
|
||||
The active area will be highlighted in yellow.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click the mode selector*:
|
||||
|
||||
Create a new area, and make it active.
|
||||
|
||||
+ *Right click an existing area*:
|
||||
|
||||
Make the clicked area active.
|
||||
|
||||
+ *Left click a turf*:
|
||||
|
||||
When an area is active, adds the turf to the active area.
|
||||
|
||||
+ Var Edit
|
||||
|
||||
**Description**:
|
||||
|
||||
Allows for setting and resetting variables of objects with a click.
|
||||
|
||||
If the object does not have the var, will do nothing and print a warning message.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click the mode selector*:
|
||||
|
||||
Choose which variable to set, and what to set it to.
|
||||
|
||||
+ *Left click an atom*:
|
||||
|
||||
Change the clicked atom's variables as configured.
|
||||
|
||||
+ *Right click an atom*:
|
||||
|
||||
Reset the targeted variable to its original value in the code.
|
||||
|
||||
+ Map Generator
|
||||
|
||||
**Description**:
|
||||
|
||||
Fills rectangular regions with algorithmically generated content. Right click during region selection to cancel.
|
||||
|
||||
See the `procedural_mapping` module for the generators themselves.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right-click on the mode selector*:
|
||||
|
||||
Select a map generator from all the generators present in the codebase.
|
||||
|
||||
+ *Left click two corners of an area*:
|
||||
|
||||
Use the generator to populate the region.
|
||||
|
||||
+ *Right click during region selection*:
|
||||
|
||||
Cancel region selection.
|
||||
|
||||
+ Save
|
||||
|
||||
**Description**:
|
||||
|
||||
Captures a rectangular region in a `.dmm` format, which can be loaded back later using the "Place Map Template" debug verb.
|
||||
|
||||
Keep in mind this feature is somewhat experimental, and may not always work.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click on the mode selector*:
|
||||
|
||||
Configure whether to save in either JSON mode or not.
|
||||
|
||||
+ *Left click two corners of an area*:
|
||||
|
||||
Save the region to a `.dmm` file. You will be prompted for where to save this - a copy will be saved in the `_maps/quicksave` folder.
|
||||
|
||||
+ *Right click during region selection*:
|
||||
|
||||
Cancel region selection.
|
||||
|
||||
+ Throwing
|
||||
|
||||
**Description**:
|
||||
|
||||
Select an object with left click, and right click to throw it towards where you clicked.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Left click on a movable atom*:
|
||||
|
||||
Select the atom for throwing.
|
||||
|
||||
+ *Right click on a location*:
|
||||
|
||||
Throw the selected atom towards that location.
|
||||
|
||||
+ Boom
|
||||
|
||||
**Description**:
|
||||
|
||||
Make explosions where you click.
|
||||
|
||||
**Controls**:
|
||||
|
||||
+ *Right click the mode selector*:
|
||||
|
||||
Configure the explosion size.
|
||||
|
||||
+ *Left click a location*:
|
||||
|
||||
Cause an explosion where you clicked.
|
||||
@@ -0,0 +1,87 @@
|
||||
/datum/buildmode_mode
|
||||
var/key = "oops"
|
||||
|
||||
var/datum/click_intercept/buildmode/BM
|
||||
|
||||
var/use_corner_selection = FALSE
|
||||
var/processing_selection = FALSE
|
||||
var/list/preview
|
||||
var/turf/cornerA
|
||||
var/turf/cornerB
|
||||
|
||||
/datum/buildmode_mode/New(datum/click_intercept/buildmode/newBM)
|
||||
BM = newBM
|
||||
preview = list()
|
||||
return ..()
|
||||
|
||||
/datum/buildmode_mode/Destroy()
|
||||
Reset()
|
||||
return ..()
|
||||
|
||||
/datum/buildmode_mode/proc/enter_mode(datum/click_intercept/buildmode/BM)
|
||||
return
|
||||
|
||||
/datum/buildmode_mode/proc/exit_mode(datum/click_intercept/buildmode/BM)
|
||||
return
|
||||
|
||||
/datum/buildmode_mode/proc/get_button_iconstate()
|
||||
return "buildmode_[key]"
|
||||
|
||||
/datum/buildmode_mode/proc/show_help(mob/user)
|
||||
CRASH("No help defined, yell at a coder")
|
||||
to_chat(user, "<span class='warning'>There is no help defined for this mode, this is a bug.</span>")
|
||||
|
||||
/datum/buildmode_mode/proc/change_settings(mob/user)
|
||||
to_chat(user, "<span class='warning'>There is no configuration available for this mode</span>")
|
||||
|
||||
/datum/buildmode_mode/proc/Reset()
|
||||
deselect_region()
|
||||
|
||||
/datum/buildmode_mode/proc/select_tile(turf/T, corner_to_select)
|
||||
var/overlaystate
|
||||
BM.holder.images -= preview
|
||||
switch(corner_to_select)
|
||||
if(AREASELECT_CORNERA)
|
||||
overlaystate = "greenOverlay"
|
||||
if(AREASELECT_CORNERB)
|
||||
overlaystate = "blueOverlay"
|
||||
preview += image('icons/turf/overlays.dmi', T, overlaystate)
|
||||
BM.holder.images += preview
|
||||
return T
|
||||
|
||||
/datum/buildmode_mode/proc/highlight_region(region)
|
||||
BM.holder.images -= preview
|
||||
for(var/t in region)
|
||||
preview += image('icons/turf/overlays.dmi', T, "redOverlay")
|
||||
BM.holder.images += preview
|
||||
|
||||
/datum/buildmode_mode/proc/deselect_region()
|
||||
BM.holder.images -= preview
|
||||
QDEL_LIST(preview)
|
||||
cornerA = null
|
||||
cornerB = null
|
||||
|
||||
/datum/buildmode_mode/proc/handle_click(user, params, object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
if(use_corner_selection)
|
||||
if(left_click)
|
||||
if(!cornerA)
|
||||
cornerA = select_tile(get_turf(object), AREASELECT_CORNERA)
|
||||
return
|
||||
else if(!cornerB)
|
||||
cornerB = select_tile(get_turf(object), AREASELECT_CORNERB)
|
||||
to_chat(user, "<span class='boldwarning'>Region selected, if you're happy with your selection left click again, otherwise right click.</span>")
|
||||
return
|
||||
if(processing_selection)
|
||||
return
|
||||
processing_selection = TRUE
|
||||
handle_selected_region(user, params)
|
||||
processing_selection = FALSE
|
||||
deselect_region()
|
||||
else if(cornerA || cornerB)
|
||||
to_chat(user, "<span class='notice'>Region selection canceled!</span>")
|
||||
deselect_region()
|
||||
|
||||
/datum/buildmode_mode/proc/handle_selected_region(mob/user, params)
|
||||
return
|
||||
@@ -0,0 +1,127 @@
|
||||
#define BM_SWITCHSTATE_NONE 0
|
||||
#define BM_SWITCHSTATE_MODE 1
|
||||
#define BM_SWITCHSTATE_DIR 2
|
||||
|
||||
/datum/click_intercept/buildmode
|
||||
var/build_dir = SOUTH
|
||||
var/datum/buildmode_mode/mode
|
||||
|
||||
// SECTION UI
|
||||
|
||||
// Switching management
|
||||
var/switch_state = BM_SWITCHSTATE_NONE
|
||||
var/switch_width = 5
|
||||
// modeswitch UI
|
||||
var/obj/screen/buildmode/mode/modebutton
|
||||
var/list/modeswitch_buttons = list()
|
||||
// dirswitch UI
|
||||
var/obj/screen/buildmode/bdir/dirbutton
|
||||
var/list/dirswitch_buttons = list()
|
||||
|
||||
/datum/click_intercept/buildmode/New()
|
||||
mode = new /datum/buildmode_mode/basic(src)
|
||||
. = ..()
|
||||
mode.enter_mode(src)
|
||||
|
||||
/datum/click_intercept/buildmode/Destroy()
|
||||
close_switchstates()
|
||||
QDEL_NULL(mode)
|
||||
QDEL_LIST(modeswitch_buttons)
|
||||
QDEL_LIST(dirswitch_buttons)
|
||||
return ..()
|
||||
|
||||
/datum/click_intercept/buildmode/create_buttons()
|
||||
// keep a reference so we can update it upon mode switch
|
||||
modebutton = new /obj/screen/buildmode/mode(src)
|
||||
buttons += modebutton
|
||||
buttons += new /obj/screen/buildmode/help(src)
|
||||
// keep a reference so we can update it upon dir switch
|
||||
dirbutton = new /obj/screen/buildmode/bdir(src)
|
||||
buttons += dirbutton
|
||||
buttons += new /obj/screen/buildmode/quit(src)
|
||||
// build the list of modeswitching buttons
|
||||
build_options_grid(subtypesof(/datum/buildmode_mode), modeswitch_buttons, /obj/screen/buildmode/modeswitch)
|
||||
build_options_grid(list(SOUTH,EAST,WEST,NORTH,NORTHWEST), dirswitch_buttons, /obj/screen/buildmode/dirswitch)
|
||||
|
||||
/datum/click_intercept/buildmode/proc/build_options_grid(list/elements, list/buttonslist, buttontype)
|
||||
var/pos_idx = 0
|
||||
for(var/thing in elements)
|
||||
var/x = pos_idx % switch_width
|
||||
var/y = FLOOR(pos_idx / switch_width, 1)
|
||||
var/obj/screen/buildmode/B = new buttontype(src, thing)
|
||||
// extra .5 for a nice offset look
|
||||
B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]"
|
||||
buttonslist += B
|
||||
pos_idx++
|
||||
|
||||
/datum/click_intercept/buildmode/proc/close_switchstates()
|
||||
switch(switch_state)
|
||||
if(BM_SWITCHSTATE_MODE)
|
||||
close_modeswitch()
|
||||
if(BM_SWITCHSTATE_DIR)
|
||||
close_dirswitch()
|
||||
|
||||
/datum/click_intercept/buildmode/proc/toggle_modeswitch()
|
||||
if(switch_state == BM_SWITCHSTATE_MODE)
|
||||
close_modeswitch()
|
||||
else
|
||||
close_switchstates()
|
||||
open_modeswitch()
|
||||
|
||||
/datum/click_intercept/buildmode/proc/open_modeswitch()
|
||||
switch_state = BM_SWITCHSTATE_MODE
|
||||
holder.screen += modeswitch_buttons
|
||||
|
||||
/datum/click_intercept/buildmode/proc/close_modeswitch()
|
||||
switch_state = BM_SWITCHSTATE_NONE
|
||||
holder.screen -= modeswitch_buttons
|
||||
|
||||
/datum/click_intercept/buildmode/proc/toggle_dirswitch()
|
||||
if(switch_state == BM_SWITCHSTATE_DIR)
|
||||
close_dirswitch()
|
||||
else
|
||||
close_switchstates()
|
||||
open_dirswitch()
|
||||
|
||||
/datum/click_intercept/buildmode/proc/open_dirswitch()
|
||||
switch_state = BM_SWITCHSTATE_DIR
|
||||
holder.screen += dirswitch_buttons
|
||||
|
||||
/datum/click_intercept/buildmode/proc/close_dirswitch()
|
||||
switch_state = BM_SWITCHSTATE_NONE
|
||||
holder.screen -= dirswitch_buttons
|
||||
|
||||
/datum/click_intercept/buildmode/proc/change_mode(newmode)
|
||||
mode.exit_mode(src)
|
||||
QDEL_NULL(mode)
|
||||
close_switchstates()
|
||||
mode = new newmode(src)
|
||||
mode.enter_mode(src)
|
||||
modebutton.update_icon()
|
||||
|
||||
/datum/click_intercept/buildmode/proc/change_dir(newdir)
|
||||
build_dir = newdir
|
||||
close_dirswitch()
|
||||
dirbutton.update_icon()
|
||||
return TRUE
|
||||
|
||||
/datum/click_intercept/buildmode/InterceptClickOn(user, params, atom/object)
|
||||
mode.handle_click(user, params, object)
|
||||
|
||||
/proc/togglebuildmode(mob/M in GLOB.player_list)
|
||||
set name = "Toggle Build Mode"
|
||||
set category = "Event"
|
||||
|
||||
if(M.client)
|
||||
if(istype(M.client.click_intercept, /datum/click_intercept/buildmode))
|
||||
var/datum/click_intercept/buildmode/B = M.client.click_intercept
|
||||
B.quit()
|
||||
log_admin("[key_name(usr)] has left build mode.")
|
||||
else
|
||||
new/datum/click_intercept/buildmode(M.client)
|
||||
message_admins("[key_name_admin(usr)] has entered build mode.")
|
||||
log_admin("[key_name(usr)] has entered build mode.")
|
||||
|
||||
#undef BM_SWITCHSTATE_NONE
|
||||
#undef BM_SWITCHSTATE_MODE
|
||||
#undef BM_SWITCHSTATE_DIR
|
||||
@@ -0,0 +1,88 @@
|
||||
/obj/screen/buildmode
|
||||
icon = 'icons/misc/buildmode.dmi'
|
||||
var/datum/click_intercept/buildmode/bd
|
||||
layer = HUD_LAYER_BUILDMODE
|
||||
|
||||
/obj/screen/buildmode/New(bld)
|
||||
bd = bld
|
||||
return ..()
|
||||
|
||||
/obj/screen/buildmode/Destroy()
|
||||
bd = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/buildmode/mode
|
||||
name = "Toggle Mode"
|
||||
icon_state = "buildmode_basic"
|
||||
screen_loc = "NORTH,WEST"
|
||||
|
||||
/obj/screen/buildmode/mode/Click(location, control, params)
|
||||
var/list/pa = params2list(params)
|
||||
|
||||
if(pa.Find("left"))
|
||||
bd.toggle_modeswitch()
|
||||
else if(pa.Find("right"))
|
||||
bd.mode.change_settings(usr)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/screen/buildmode/mode/update_icon()
|
||||
icon_state = bd.mode.get_button_iconstate()
|
||||
|
||||
/obj/screen/buildmode/help
|
||||
icon_state = "buildhelp"
|
||||
screen_loc = "NORTH,WEST+1"
|
||||
name = "Buildmode Help"
|
||||
|
||||
/obj/screen/buildmode/help/Click()
|
||||
bd.mode.show_help(usr)
|
||||
return TRUE
|
||||
|
||||
/obj/screen/buildmode/bdir
|
||||
icon_state = "build"
|
||||
screen_loc = "NORTH,WEST+2"
|
||||
name = "Change Dir"
|
||||
|
||||
/obj/screen/buildmode/bdir/update_icon()
|
||||
dir = bd.build_dir
|
||||
|
||||
/obj/screen/buildmode/bdir/Click()
|
||||
bd.toggle_dirswitch()
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
// used to switch between modes
|
||||
/obj/screen/buildmode/modeswitch
|
||||
var/datum/buildmode_mode/modetype
|
||||
|
||||
/obj/screen/buildmode/modeswitch/New(bld, mt)
|
||||
modetype = mt
|
||||
icon_state = "buildmode_[initial(modetype.key)]"
|
||||
name = initial(modetype.key)
|
||||
return ..(bld)
|
||||
|
||||
/obj/screen/buildmode/modeswitch/Click()
|
||||
bd.change_mode(modetype)
|
||||
return TRUE
|
||||
|
||||
// used to switch between dirs
|
||||
/obj/screen/buildmode/dirswitch
|
||||
icon_state = "build"
|
||||
|
||||
/obj/screen/buildmode/dirswitch/New(bld, newdir)
|
||||
dir = newdir
|
||||
name = dir2text(dir)
|
||||
return ..(bld)
|
||||
|
||||
/obj/screen/buildmode/dirswitch/Click()
|
||||
bd.change_dir(dir)
|
||||
return TRUE
|
||||
|
||||
/obj/screen/buildmode/quit
|
||||
icon_state = "buildquit"
|
||||
screen_loc = "NORTH,WEST+3"
|
||||
name = "Quit Buildmode"
|
||||
|
||||
/obj/screen/buildmode/quit/Click()
|
||||
bd.quit()
|
||||
return TRUE
|
||||
@@ -0,0 +1,28 @@
|
||||
/obj/effect/buildmode_line
|
||||
var/image/I
|
||||
var/client/cl
|
||||
|
||||
/obj/effect/buildmode_line/New(client/C, atom/atom_a, atom/atom_b, linename)
|
||||
name = linename
|
||||
loc = get_turf(atom_a)
|
||||
I = image('icons/misc/mark.dmi', src, "line", 19.0)
|
||||
var/x_offset = ((atom_b.x * 32) + atom_b.pixel_x) - ((atom_a.x * 32) + atom_a.pixel_x)
|
||||
var/y_offset = ((atom_b.y * 32) + atom_b.pixel_y) - ((atom_a.y * 32) + atom_a.pixel_y)
|
||||
|
||||
var/matrix/mat = matrix()
|
||||
mat.Translate(0, 16)
|
||||
mat.Scale(1, sqrt((x_offset * x_offset) + (y_offset * y_offset)) / 32)
|
||||
mat.Turn(90 - Atan2(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
mat.Translate(atom_a.pixel_x, atom_a.pixel_y)
|
||||
|
||||
transform = mat
|
||||
cl = C
|
||||
cl.images += I
|
||||
|
||||
/obj/effect/buildmode_line/Destroy()
|
||||
if(I)
|
||||
if(istype(cl))
|
||||
cl.images -= I
|
||||
cl = null
|
||||
QDEL_NULL(I)
|
||||
return ..()
|
||||
@@ -0,0 +1,59 @@
|
||||
/datum/buildmode_mode/advanced
|
||||
key = "advanced"
|
||||
var/objholder = null
|
||||
|
||||
// FIXME: add logic which adds a button displaying the icon
|
||||
// of the currently selected path
|
||||
|
||||
/datum/buildmode_mode/advanced/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + alt on turf/obj = Copy object type")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button = Delete objects</span>")
|
||||
to_chat(user, "")
|
||||
to_chat(user, "<span class='notice'>Use the button in the upper left corner to</span>")
|
||||
to_chat(user, "<span class='notice'>change the direction of built objects.</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/advanced/change_settings(mob/user)
|
||||
var/target_path = input(user,"Enter typepath:" ,"Typepath","/obj/structure/closet")
|
||||
objholder = text2path(target_path)
|
||||
if(!ispath(objholder))
|
||||
objholder = pick_closest_path(target_path)
|
||||
if(!objholder)
|
||||
alert("No path was selected")
|
||||
return
|
||||
else if(ispath(objholder, /area))
|
||||
objholder = null
|
||||
alert("That path is not allowed.")
|
||||
return
|
||||
|
||||
/datum/buildmode_mode/advanced/handle_click(user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
var/alt_click = pa.Find("alt")
|
||||
|
||||
if(left_click && alt_click)
|
||||
if (isturf(object) || isobj(object) || ismob(object))
|
||||
objholder = object.type
|
||||
to_chat(user, "<span class='notice'>[initial(object.name)] ([object.type]) selected.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[initial(object.name)] is not a turf, object, or mob! Please select again.</span>")
|
||||
else if(left_click)
|
||||
if(ispath(objholder,/turf))
|
||||
var/turf/T = get_turf(object)
|
||||
log_admin("Build Mode: [key_name(user)] modified [T] ([T.x],[T.y],[T.z]) to [objholder]")
|
||||
T.ChangeTurf(objholder)
|
||||
else if(!isnull(objholder))
|
||||
var/obj/A = new objholder (get_turf(object))
|
||||
A.setDir(BM.build_dir)
|
||||
log_admin("Build Mode: [key_name(user)] modified [A]'s ([A.x],[A.y],[A.z]) dir to [BM.build_dir]")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Select object type first.</span>")
|
||||
else if(right_click)
|
||||
if(isobj(object))
|
||||
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])")
|
||||
qdel(object)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/datum/buildmode_mode/area_edit
|
||||
key = "areaedit"
|
||||
var/area/storedarea
|
||||
var/image/areaimage
|
||||
|
||||
/datum/buildmode_mode/area_edit/New()
|
||||
areaimage = image('icons/turf/areas.dmi', null, "yellow")
|
||||
..()
|
||||
|
||||
/datum/buildmode_mode/area_edit/enter_mode(datum/click_intercept/buildmode/BM)
|
||||
BM.holder.images += areaimage
|
||||
|
||||
/datum/buildmode_mode/area_edit/exit_mode(datum/click_intercept/buildmode/BM)
|
||||
areaimage.loc = null // de-color the area
|
||||
BM.holder.images -= areaimage
|
||||
return ..()
|
||||
|
||||
/datum/buildmode_mode/area_edit/Destroy()
|
||||
QDEL_NULL(areaimage)
|
||||
return ..()
|
||||
|
||||
/datum/buildmode_mode/area_edit/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj/turf/mob = Paint area</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj/turf/mob = Select area to paint</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Create new area</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/area_edit/change_settings(mob/user)
|
||||
var/target_path = input(user,"Enter typepath:", "Typepath", "/area")
|
||||
var/areatype = text2path(target_path)
|
||||
if(ispath(areatype,/area))
|
||||
var/areaname = input(user,"Enter area name:", "Area name", "Area")
|
||||
if(!areaname || !length(areaname))
|
||||
return
|
||||
storedarea = new areatype
|
||||
storedarea.power_equip = 0
|
||||
storedarea.power_light = 0
|
||||
storedarea.power_environ = 0
|
||||
storedarea.always_unpowered = 0
|
||||
storedarea.name = areaname
|
||||
areaimage.loc = storedarea // color our area
|
||||
|
||||
/datum/buildmode_mode/area_edit/handle_click(user, params, object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
|
||||
if(left_click)
|
||||
if(!storedarea)
|
||||
to_chat(user, "<span class='warning'>Configure or select the area you want to paint first!</span>")
|
||||
return
|
||||
var/turf/T = get_turf(object)
|
||||
if(get_area(T) != storedarea)
|
||||
storedarea.contents.Add(T)
|
||||
else if(right_click)
|
||||
var/turf/T = get_turf(object)
|
||||
storedarea = get_area(T)
|
||||
areaimage.loc = storedarea // color our area
|
||||
@@ -0,0 +1,72 @@
|
||||
/datum/buildmode_mode/atmos
|
||||
key = "atmos"
|
||||
|
||||
use_corner_selection = TRUE
|
||||
var/pressure = ONE_ATMOSPHERE
|
||||
var/temperature = T20C
|
||||
var/oxygen = O2STANDARD
|
||||
var/nitrogen = N2STANDARD
|
||||
var/plasma = 0
|
||||
var/cdiox = 0
|
||||
var/nitrox = 0
|
||||
|
||||
|
||||
/datum/buildmode_mode/atmos/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + Ctrl on turf = Set 'base atmos conditions' for unsimulated turfs in region</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Adjust target atmos</span>")
|
||||
to_chat(user, "<span class='notice'><b>Notice:</b> Starts out with standard breathable/liveable defaults</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
// FIXME this is a little tedious, something where you don't have to fill in each field would be cooler
|
||||
// maybe some kind of stat panel thing?
|
||||
/datum/buildmode_mode/atmos/change_settings(mob/user)
|
||||
pressure = input(user, "Atmospheric Pressure", "Input", ONE_ATMOSPHERE) as num|null
|
||||
temperature = input(user, "Temperature", "Input", T20C) as num|null
|
||||
oxygen = input(user, "Oxygen ratio", "Input", O2STANDARD) as num|null
|
||||
nitrogen = input(user, "Nitrogen ratio", "Input", N2STANDARD) as num|null
|
||||
plasma = input(user, "Plasma ratio", "Input", 0) as num|null
|
||||
cdiox = input(user, "CO2 ratio", "Input", 0) as num|null
|
||||
nitrox = input(user, "N2O ratio", "Input", 0) as num|null
|
||||
|
||||
/datum/buildmode_mode/atmos/proc/ppratio_to_moles(ppratio)
|
||||
// ideal gas equation: Pressure * Volume = Moles * r * Temperature
|
||||
// air datum fields are in moles, we have partial pressure ratios
|
||||
// Moles = (Pressure * Volume) / (r * Temperature)
|
||||
return ((ppratio * pressure) * CELL_VOLUME) / (temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
/datum/buildmode_mode/atmos/handle_selected_region(mob/user, params)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/ctrl_click = pa.Find("ctrl")
|
||||
if(left_click) //rectangular
|
||||
for(var/turf/T in block(cornerA,cornerB))
|
||||
if(istype(T, /turf/simulated))
|
||||
// fill the turf with the appropriate gasses
|
||||
// this feels slightly icky
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)
|
||||
S.air.temperature = temperature
|
||||
S.air.oxygen = ppratio_to_moles(oxygen)
|
||||
S.air.nitrogen = ppratio_to_moles(nitrogen)
|
||||
S.air.toxins = ppratio_to_moles(plasma)
|
||||
S.air.carbon_dioxide = ppratio_to_moles(cdiox)
|
||||
S.air.trace_gases.Cut()
|
||||
if(nitrox)
|
||||
var/datum/gas/TG = new /datum/gas/sleeping_agent
|
||||
TG.moles = ppratio_to_moles(nitrox)
|
||||
S.air.trace_gases += TG
|
||||
S.update_visuals()
|
||||
S.air_update_turf()
|
||||
else if(ctrl_click) // overwrite "default" unsimulated air
|
||||
T.temperature = temperature
|
||||
T.oxygen = ppratio_to_moles(oxygen)
|
||||
T.nitrogen = ppratio_to_moles(nitrogen)
|
||||
T.toxins = ppratio_to_moles(plasma)
|
||||
T.carbon_dioxide = ppratio_to_moles(cdiox)
|
||||
// no interface for trace gases on unsim turfs
|
||||
T.air_update_turf()
|
||||
|
||||
// admin log
|
||||
log_admin("Build Mode: [key_name(user)] changed the atmos of region [COORD(cornerA)] to [COORD(cornerB)]. T: [temperature], P: [pressure], Ox: [oxygen]%, N2: [nitrogen]%, Plsma: [plasma]%, CO2: [cdiox]%, N2O: [nitrox]%. [ctrl_click ? "Overwrote base unsimulated turf gases." : ""]")
|
||||
@@ -0,0 +1,50 @@
|
||||
/datum/buildmode_mode/basic
|
||||
key = "basic"
|
||||
|
||||
/datum/buildmode_mode/basic/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + alt = Airlock</span>")
|
||||
to_chat(user, "")
|
||||
to_chat(user, "<span class='notice'>Use the button in the upper left corner to</span>")
|
||||
to_chat(user, "<span class='notice'>change the direction of built objects.</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/basic/handle_click(user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
var/ctrl_click = pa.Find("ctrl")
|
||||
var/alt_click = pa.Find("alt")
|
||||
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
|
||||
var/turf/T = object
|
||||
if(istype(object,/turf/space))
|
||||
T.ChangeTurf(/turf/simulated/floor/plasteel)
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else if(istype(object,/turf/simulated/wall))
|
||||
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])")
|
||||
else if(right_click)
|
||||
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])")
|
||||
if(istype(object,/turf/simulated/wall))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/simulated/floor/plasteel)
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/space)
|
||||
else if(istype(object,/turf/simulated/wall/r_wall))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else if(istype(object,/obj))
|
||||
qdel(object)
|
||||
else if(istype(object,/turf) && alt_click && left_click)
|
||||
log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])")
|
||||
new/obj/machinery/door/airlock(get_turf(object))
|
||||
else if(istype(object,/turf) && ctrl_click && left_click)
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.setDir(BM.build_dir)
|
||||
log_admin("Build Mode: [key_name(user)] built a window at ([object.x],[object.y],[object.z])")
|
||||
@@ -0,0 +1,32 @@
|
||||
/datum/buildmode_mode/boom
|
||||
key = "boom"
|
||||
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
var/flames = -1
|
||||
|
||||
/datum/buildmode_mode/boom/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Mouse Button on obj = Kaboom</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/boom/change_settings(mob/user)
|
||||
devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
||||
if(devastation == null) devastation = -1
|
||||
heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
||||
if(heavy == null) heavy = -1
|
||||
light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
||||
if(light == null) light = -1
|
||||
flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
||||
if(flash == null) flash = -1
|
||||
flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
||||
if(flames == null) flames = -1
|
||||
|
||||
/datum/buildmode_mode/boom/handle_click(user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
|
||||
if(left_click)
|
||||
explosion(object, devastation, heavy, light, flash, null, TRUE, flames)
|
||||
@@ -0,0 +1,27 @@
|
||||
/datum/buildmode_mode/copy
|
||||
key = "copy"
|
||||
var/atom/movable/stored = null
|
||||
|
||||
/datum/buildmode_mode/copy/exit_mode()
|
||||
stored = null
|
||||
return ..()
|
||||
|
||||
/datum/buildmode_mode/copy/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj/turf/mob = Spawn a Copy of selected target</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj/mob = Select target to copy</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/copy/handle_click(user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
|
||||
if(left_click)
|
||||
var/turf/T = get_turf(object)
|
||||
if(stored)
|
||||
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
|
||||
else if(right_click)
|
||||
if(ismovableatom(object)) // No copying turfs for now.
|
||||
to_chat(user, "<span class='notice'>[object] set as template.</span>")
|
||||
stored = object
|
||||
@@ -0,0 +1,49 @@
|
||||
/datum/buildmode_mode/fill
|
||||
key = "fill"
|
||||
|
||||
use_corner_selection = TRUE
|
||||
var/objholder = null
|
||||
|
||||
/datum/buildmode_mode/fill/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button + Alt on turf/obj/mob = Delete region</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select object type</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/fill/change_settings(mob/user)
|
||||
var/target_path = input(user,"Enter typepath:" ,"Typepath","/obj/structure/closet")
|
||||
objholder = text2path(target_path)
|
||||
if(!ispath(objholder))
|
||||
objholder = pick_closest_path(target_path)
|
||||
if(!objholder)
|
||||
alert("No path has been selected.")
|
||||
return
|
||||
else if(ispath(objholder, /area))
|
||||
objholder = null
|
||||
alert("Area paths are not supported for this mode, use the area edit mode instead.")
|
||||
return
|
||||
deselect_region()
|
||||
|
||||
/datum/buildmode_mode/fill/handle_click(mob/user, params, obj/object)
|
||||
if(isnull(objholder))
|
||||
to_chat(user, "<span class='warning'>Select an object type first.</span>")
|
||||
deselect_region()
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/buildmode_mode/fill/handle_selected_region(mob/user, params)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/alt_click = pa.Find("alt")
|
||||
|
||||
if(left_click) //rectangular
|
||||
if(alt_click)
|
||||
empty_region(block(cornerA,cornerB))
|
||||
else
|
||||
for(var/turf/T in block(cornerA,cornerB))
|
||||
if(ispath(objholder,/turf))
|
||||
T.ChangeTurf(objholder)
|
||||
else
|
||||
var/obj/A = new objholder(T)
|
||||
A.setDir(BM.build_dir)
|
||||
@@ -0,0 +1,94 @@
|
||||
/datum/buildmode_mode/link
|
||||
key = "link"
|
||||
|
||||
var/list/link_lines = list()
|
||||
var/obj/link_obj
|
||||
|
||||
|
||||
/datum/buildmode_mode/link/proc/clear_lines()
|
||||
QDEL_LIST(link_lines)
|
||||
|
||||
/datum/buildmode_mode/link/proc/form_connection(atom/source, atom/dest, valid)
|
||||
var/obj/effect/buildmode_line/L = new(BM.holder, source, dest, "[source.name] to [dest.name]")
|
||||
L.color = valid ? "#339933" : "#993333"
|
||||
link_lines += L
|
||||
var/obj/effect/buildmode_line/L2 = new(BM.holder, dest, source, "[dest.name] to [source.name]") // Yes, reversed one so that you can see it source both sides.
|
||||
L2.color = L.color
|
||||
link_lines += L2
|
||||
|
||||
/datum/buildmode_mode/link/Destroy()
|
||||
clear_lines()
|
||||
link_obj = null
|
||||
return ..()
|
||||
|
||||
/datum/buildmode_mode/link/Reset()
|
||||
clear_lines()
|
||||
link_obj = null
|
||||
..()
|
||||
|
||||
/datum/buildmode_mode/link/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on obj = Select button to link</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on obj = Link/unlink to selected button")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
// FIXME: this probably would work better with something component-based
|
||||
/datum/buildmode_mode/link/handle_click(mob/user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
if(left_click && istype(object, /obj/machinery))
|
||||
link_obj = object
|
||||
if(right_click && istype(object, /obj/machinery))
|
||||
if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
var/obj/machinery/door/airlock/P = object
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
if(P.id_tag == M.id && (P in range(M.range, M)) && P.id_tag && P.id_tag != "")
|
||||
P.id_tag = null
|
||||
to_chat(user, "[P] unlinked.")
|
||||
goto(line_jump)
|
||||
if(!M.normaldoorcontrol)
|
||||
if(link_lines.len && alert(user, "Warning: This will disable links to connected pod doors. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
M.normaldoorcontrol = 1
|
||||
if(P.id_tag && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
P.id_tag = M.id
|
||||
if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/poddoor))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
var/obj/machinery/door/poddoor/P = object
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
if(P.id_tag == M.id && P.id_tag && P.id_tag != "")
|
||||
P.id_tag = null
|
||||
to_chat(user, "[P] unlinked.")
|
||||
goto(line_jump)
|
||||
if(M.normaldoorcontrol)
|
||||
if(link_lines.len && alert(user, "Warning: This will disable links to connected airlocks. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
M.normaldoorcontrol = 0
|
||||
if(!M.id || M.id == "")
|
||||
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
|
||||
if(!M.id || M.id == "")
|
||||
goto(line_jump)
|
||||
if(P.id_tag && P.id_tag != 1 && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
|
||||
goto(line_jump)
|
||||
P.id_tag = M.id
|
||||
|
||||
line_jump // For the goto
|
||||
clear_lines()
|
||||
|
||||
if(istype(link_obj, /obj/machinery/door_control))
|
||||
var/obj/machinery/door_control/M = link_obj
|
||||
for(var/obj/machinery/door/airlock/P in range(M.range,M))
|
||||
if(P.id_tag == M.id)
|
||||
form_connection(M, P, M.normaldoorcontrol)
|
||||
for(var/obj/machinery/door/poddoor/P in GLOB.airlocks)
|
||||
if(P.id_tag == M.id)
|
||||
form_connection(M, P, !M.normaldoorcontrol)
|
||||
@@ -0,0 +1,40 @@
|
||||
/datum/buildmode_mode/mapgen
|
||||
key = "mapgen"
|
||||
|
||||
use_corner_selection = TRUE
|
||||
var/generator_path
|
||||
|
||||
/datum/buildmode_mode/mapgen/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select generator</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/mapgen/change_settings(mob/user)
|
||||
var/list/gen_paths = subtypesof(/datum/mapGenerator)
|
||||
|
||||
var/type = input(user,"Select Generator Type","Type") as null|anything in gen_paths
|
||||
if(!type) return
|
||||
|
||||
generator_path = type
|
||||
deselect_region()
|
||||
|
||||
/datum/buildmode_mode/mapgen/handle_click(mob/user, params, obj/object)
|
||||
if(isnull(generator_path))
|
||||
to_chat(user, "<span class='warning'>Select generator type first.</span>")
|
||||
deselect_region()
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/buildmode_mode/mapgen/handle_selected_region(mob/user, params)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
|
||||
if(left_click) //rectangular
|
||||
if(cornerA && cornerB)
|
||||
var/datum/mapGenerator/G = new generator_path
|
||||
G.defineRegion(cornerA, cornerB, 1)
|
||||
highlight_region(G.map)
|
||||
var/confirm = alert("Are you sure you want run the map generator?", "Run generator", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
G.generate()
|
||||
@@ -0,0 +1,28 @@
|
||||
/datum/buildmode_mode/save
|
||||
key = "save"
|
||||
|
||||
use_corner_selection = TRUE
|
||||
var/use_json = TRUE
|
||||
|
||||
/datum/buildmode_mode/save/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/save/change_settings(mob/user)
|
||||
use_json = (alert("Would you like to use json (Default is \"Yes\")?",,"Yes","No") == "Yes")
|
||||
|
||||
/datum/buildmode_mode/save/handle_selected_region(mob/user, params)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
if(left_click)
|
||||
var/map_name = input(user, "Please select a name for your map", "Buildmode", "")
|
||||
if(map_name == "")
|
||||
return
|
||||
var/map_flags = 0
|
||||
if(use_json)
|
||||
map_flags = 32 // Magic number defined in `writer.dm` that I can't use directly
|
||||
// because #defines are for some reason our coding standard
|
||||
var/our_map = maploader.save_map(cornerA, cornerB, map_name, map_flags)
|
||||
user << ftp(our_map) // send the map they've made! Or are stealing, whatever
|
||||
to_chat(user, "Map saving complete! [our_map]")
|
||||
@@ -0,0 +1,12 @@
|
||||
// SKELETON CODE, not yet functional
|
||||
|
||||
/datum/buildmode_mode/sdql
|
||||
key = "sdql"
|
||||
|
||||
var/sdql_command = "SELECT /turf IN"
|
||||
|
||||
/datum/buildmode_mode/sdql/show_help(mob/user)
|
||||
|
||||
/datum/buildmode_mode/sdql/change_settings(mob/user)
|
||||
|
||||
/datum/buildmode_mode/sdql/handle_click(mob/user, params, obj/object)
|
||||
@@ -0,0 +1,25 @@
|
||||
/datum/buildmode_mode/throwing
|
||||
key = "throw"
|
||||
|
||||
var/atom/movable/throw_atom = null
|
||||
|
||||
/datum/buildmode_mode/throwing/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
/datum/buildmode_mode/throwing/handle_click(user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
|
||||
if(left_click)
|
||||
if(isturf(object))
|
||||
return
|
||||
throw_atom = object
|
||||
to_chat(user, "Selected object '[throw_atom]'")
|
||||
if(right_click)
|
||||
if(throw_atom)
|
||||
throw_atom.throw_at(object, 10, 1, user)
|
||||
log_admin("Build Mode: [key_name(user)] threw [throw_atom] at [object] ([object.x],[object.y],[object.z])")
|
||||
@@ -0,0 +1,55 @@
|
||||
/datum/buildmode_mode/varedit
|
||||
key = "edit"
|
||||
// Varedit mode
|
||||
var/varholder = "name"
|
||||
var/valueholder = "value"
|
||||
|
||||
/datum/buildmode_mode/varedit/show_help(mob/user)
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>")
|
||||
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>")
|
||||
to_chat(user, "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>")
|
||||
to_chat(user, "<span class='notice'>***********************************************************</span>")
|
||||
|
||||
// FIXME: This needs to use a standard var-editing interface instead of
|
||||
// doing its own thing here
|
||||
/datum/buildmode_mode/varedit/change_settings(mob/user)
|
||||
var/temp_varname = input(user,"Enter variable name:", "Name", "name")
|
||||
if(!vv_varname_lockcheck(temp_varname))
|
||||
return
|
||||
|
||||
var/temp_value = user.client.vv_get_value()
|
||||
if(isnull(temp_value["class"]))
|
||||
Reset()
|
||||
to_chat(user, "<span class='notice'>Variable unset.</span>")
|
||||
return
|
||||
// we assign this once all user input is done, since things could get wonky otherwise
|
||||
varholder = temp_varname
|
||||
valueholder = temp_value["value"]
|
||||
|
||||
/datum/buildmode_mode/varedit/handle_click(user, params, obj/object)
|
||||
var/list/pa = params2list(params)
|
||||
var/left_click = pa.Find("left")
|
||||
var/right_click = pa.Find("right")
|
||||
|
||||
if(isnull(varholder))
|
||||
to_chat(user, "<span class='warning'>Choose a variable to modify first.</span>")
|
||||
return
|
||||
if(left_click)
|
||||
if(object.vars.Find(varholder))
|
||||
if(!object.vv_edit_var(varholder, valueholder))
|
||||
to_chat(user, "<span class='warning'>Your edit was rejected by [object].</span>")
|
||||
return
|
||||
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
|
||||
if(right_click)
|
||||
if(object.vars.Find(varholder))
|
||||
var/reset_value = initial(object.vars[varholder])
|
||||
if(!object.vv_edit_var(varholder, reset_value))
|
||||
to_chat(user, "<span class='warning'>Your edit was rejected by [object].</span>")
|
||||
return
|
||||
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [reset_value]")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
|
||||
|
||||
@@ -147,7 +147,7 @@ proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
|
||||
var/datum/asset/A = new type()
|
||||
A.register()
|
||||
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
//doing this to a client too soon after they've connected can cause issues, also the proc we call sleeps
|
||||
spawn(10)
|
||||
getFilesSlow(C, asset_cache, FALSE)
|
||||
|
||||
@@ -306,13 +306,13 @@
|
||||
to_chat(src, "<span class='warning'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</span>")
|
||||
|
||||
|
||||
clients += src
|
||||
directory[ckey] = src
|
||||
GLOB.clients += src
|
||||
GLOB.directory[ckey] = src
|
||||
|
||||
//Admin Authorisation
|
||||
holder = admin_datums[ckey]
|
||||
if(holder)
|
||||
admins += src
|
||||
GLOB.admins += src
|
||||
holder.owner = src
|
||||
|
||||
donator_check()
|
||||
@@ -392,9 +392,9 @@
|
||||
/client/Del()
|
||||
if(holder)
|
||||
holder.owner = null
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
clients -= src
|
||||
GLOB.admins -= src
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
Master.UpdateTickRate()
|
||||
return ..()
|
||||
|
||||
@@ -648,8 +648,8 @@
|
||||
|
||||
//For debugging purposes
|
||||
/client/proc/list_all_languages()
|
||||
for(var/L in all_languages)
|
||||
var/datum/language/lang = all_languages[L]
|
||||
for(var/L in GLOB.all_languages)
|
||||
var/datum/language/lang = GLOB.all_languages[L]
|
||||
var/message = "[lang.name] : [lang.type]"
|
||||
if(lang.flags & RESTRICTED)
|
||||
message += " (RESTRICTED)"
|
||||
|
||||
@@ -321,7 +321,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>Hair:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Color</a> [color_square(h_colour)]"
|
||||
var/datum/sprite_accessory/temp_hair_style = hair_styles_public_list[h_style]
|
||||
var/datum/sprite_accessory/temp_hair_style = GLOB.hair_styles_public_list[h_style]
|
||||
if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour)
|
||||
dat += " <a href='?_src_=prefs;preference=secondary_hair;task=input'>Color #2</a> [color_square(h_sec_colour)]"
|
||||
dat += "<br>"
|
||||
@@ -329,7 +329,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>Facial Hair:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=f_style;task=input'>[f_style ? "[f_style]" : "Shaved"]</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Color</a> [color_square(f_colour)]"
|
||||
var/datum/sprite_accessory/temp_facial_hair_style = facial_hair_styles_list[f_style]
|
||||
var/datum/sprite_accessory/temp_facial_hair_style = GLOB.facial_hair_styles_list[f_style]
|
||||
if(temp_facial_hair_style && temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour)
|
||||
dat += " <a href='?_src_=prefs;preference=secondary_facial;task=input'>Color #2</a> [color_square(f_sec_colour)]"
|
||||
dat += "<br>"
|
||||
@@ -1252,7 +1252,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(S.bodyflags & HAS_SKIN_COLOR)
|
||||
s_colour = rand_hex_color()
|
||||
if("bag")
|
||||
backbag = pick(backbaglist)
|
||||
backbag = pick(GLOB.backbaglist)
|
||||
/*if("skin_style")
|
||||
h_style = random_skin_style(gender)*/
|
||||
if("all")
|
||||
@@ -1281,14 +1281,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
// var/whitelisted = 0
|
||||
|
||||
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
|
||||
for(var/Spec in whitelisted_species)
|
||||
for(var/Spec in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(user,Spec))
|
||||
new_species += Spec
|
||||
// whitelisted = 1
|
||||
// if(!whitelisted)
|
||||
// alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
|
||||
else //Not using the whitelist? Aliens for everyone!
|
||||
new_species += whitelisted_species
|
||||
new_species += GLOB.whitelisted_species
|
||||
|
||||
species = input("Please select a species", "Character Generation", null) in new_species
|
||||
var/datum/species/NS = GLOB.all_species[species]
|
||||
@@ -1334,15 +1334,15 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_colours["tail"] = "#000000"
|
||||
|
||||
// Don't wear another species' underwear!
|
||||
var/datum/sprite_accessory/SA = underwear_list[underwear]
|
||||
var/datum/sprite_accessory/SA = GLOB.underwear_list[underwear]
|
||||
if(!SA || !(species in SA.species_allowed))
|
||||
underwear = random_underwear(gender, species)
|
||||
|
||||
SA = undershirt_list[undershirt]
|
||||
SA = GLOB.undershirt_list[undershirt]
|
||||
if(!SA || !(species in SA.species_allowed))
|
||||
undershirt = random_undershirt(gender, species)
|
||||
|
||||
SA = socks_list[socks]
|
||||
SA = GLOB.socks_list[socks]
|
||||
if(!SA || !(species in SA.species_allowed))
|
||||
socks = random_socks(gender, species)
|
||||
|
||||
@@ -1373,8 +1373,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/list/new_languages = list("None")
|
||||
/*
|
||||
if(config.usealienwhitelist)
|
||||
for(var/L in all_languages)
|
||||
var/datum/language/lang = all_languages[L]
|
||||
for(var/L in GLOB.all_languages)
|
||||
var/datum/language/lang = GLOB.all_languages[L]
|
||||
if((!(lang.flags & RESTRICTED)) && (is_alien_whitelisted(user, L)||(!( lang.flags & WHITELISTED ))))
|
||||
new_languages += lang
|
||||
languages_available = 1
|
||||
@@ -1383,8 +1383,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
alert(user, "There are not currently any available secondary languages.")
|
||||
else
|
||||
*/
|
||||
for(var/L in all_languages)
|
||||
var/datum/language/lang = all_languages[L]
|
||||
for(var/L in GLOB.all_languages)
|
||||
var/datum/language/lang = GLOB.all_languages[L]
|
||||
if(!(lang.flags & RESTRICTED))
|
||||
new_languages += lang.name
|
||||
|
||||
@@ -1415,7 +1415,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("secondary_hair")
|
||||
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_public_list[h_style]
|
||||
var/datum/sprite_accessory/hair_style = GLOB.hair_styles_public_list[h_style]
|
||||
if(hair_style.secondary_theme && !hair_style.no_sec_colour)
|
||||
var/new_hair = input(user, "Choose your character's secondary hair colour:", "Character Preference", h_sec_colour) as color|null
|
||||
if(new_hair)
|
||||
@@ -1423,8 +1423,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("h_style")
|
||||
var/list/valid_hairstyles = list()
|
||||
for(var/hairstyle in hair_styles_public_list)
|
||||
var/datum/sprite_accessory/SA = hair_styles_public_list[hairstyle]
|
||||
for(var/hairstyle in GLOB.hair_styles_public_list)
|
||||
var/datum/sprite_accessory/SA = GLOB.hair_styles_public_list[hairstyle]
|
||||
|
||||
if(hairstyle == "Bald") //Just in case.
|
||||
valid_hairstyles += hairstyle
|
||||
@@ -1460,8 +1460,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("ha_style")
|
||||
if(S.bodyflags & HAS_HEAD_ACCESSORY) //Species with head accessories.
|
||||
var/list/valid_head_accessory_styles = list()
|
||||
for(var/head_accessory_style in head_accessory_styles_list)
|
||||
var/datum/sprite_accessory/H = head_accessory_styles_list[head_accessory_style]
|
||||
for(var/head_accessory_style in GLOB.head_accessory_styles_list)
|
||||
var/datum/sprite_accessory/H = GLOB.head_accessory_styles_list[head_accessory_style]
|
||||
if(!(species in H.species_allowed))
|
||||
continue
|
||||
|
||||
@@ -1476,9 +1476,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return
|
||||
if(S.bodyflags & HAS_ALT_HEADS) //Species with alt heads.
|
||||
var/list/valid_alt_heads = list()
|
||||
valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option
|
||||
for(var/alternate_head in alt_heads_list)
|
||||
var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head]
|
||||
valid_alt_heads["None"] = GLOB.alt_heads_list["None"] //The only null entry should be the "None" option
|
||||
for(var/alternate_head in GLOB.alt_heads_list)
|
||||
var/datum/sprite_accessory/alt_heads/head = GLOB.alt_heads_list[alternate_head]
|
||||
if(!(species in head.species_allowed))
|
||||
continue
|
||||
|
||||
@@ -1489,16 +1489,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
alt_head = new_alt_head
|
||||
if(m_styles["head"])
|
||||
var/head_marking = m_styles["head"]
|
||||
var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking]
|
||||
var/datum/sprite_accessory/body_markings/head/head_marking_style = GLOB.marking_styles_list[head_marking]
|
||||
if(!head_marking_style.heads_allowed || (!("All" in head_marking_style.heads_allowed) && !(alt_head in head_marking_style.heads_allowed)))
|
||||
m_styles["head"] = "None"
|
||||
|
||||
if("m_style_head")
|
||||
if(S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings.
|
||||
var/list/valid_markings = list()
|
||||
valid_markings["None"] = marking_styles_list["None"]
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[markingstyle]
|
||||
valid_markings["None"] = GLOB.marking_styles_list["None"]
|
||||
for(var/markingstyle in GLOB.marking_styles_list)
|
||||
var/datum/sprite_accessory/body_markings/head/M = GLOB.marking_styles_list[markingstyle]
|
||||
if(!(species in M.species_allowed))
|
||||
continue
|
||||
if(M.marking_location != "head")
|
||||
@@ -1539,9 +1539,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("m_style_body")
|
||||
if(S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos.
|
||||
var/list/valid_markings = list()
|
||||
valid_markings["None"] = marking_styles_list["None"]
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
|
||||
valid_markings["None"] = GLOB.marking_styles_list["None"]
|
||||
for(var/markingstyle in GLOB.marking_styles_list)
|
||||
var/datum/sprite_accessory/M = GLOB.marking_styles_list[markingstyle]
|
||||
if(!(species in M.species_allowed))
|
||||
continue
|
||||
if(M.marking_location != "body")
|
||||
@@ -1563,9 +1563,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("m_style_tail")
|
||||
if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings.
|
||||
var/list/valid_markings = list()
|
||||
valid_markings["None"] = marking_styles_list["None"]
|
||||
for(var/markingstyle in marking_styles_list)
|
||||
var/datum/sprite_accessory/body_markings/tail/M = marking_styles_list[markingstyle]
|
||||
valid_markings["None"] = GLOB.marking_styles_list["None"]
|
||||
for(var/markingstyle in GLOB.marking_styles_list)
|
||||
var/datum/sprite_accessory/body_markings/tail/M = GLOB.marking_styles_list[markingstyle]
|
||||
if(M.marking_location != "tail")
|
||||
continue
|
||||
if(!(species in M.species_allowed))
|
||||
@@ -1616,7 +1616,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("secondary_facial")
|
||||
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
|
||||
var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hair_styles_list[f_style]
|
||||
if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour)
|
||||
var/new_facial = input(user, "Choose your character's secondary facial-hair colour:", "Character Preference", f_sec_colour) as color|null
|
||||
if(new_facial)
|
||||
@@ -1624,8 +1624,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("f_style")
|
||||
var/list/valid_facial_hairstyles = list()
|
||||
for(var/facialhairstyle in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/SA = facial_hair_styles_list[facialhairstyle]
|
||||
for(var/facialhairstyle in GLOB.facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/SA = GLOB.facial_hair_styles_list[facialhairstyle]
|
||||
|
||||
if(facialhairstyle == "Shaved") //Just in case.
|
||||
valid_facial_hairstyles += facialhairstyle
|
||||
@@ -1657,30 +1657,30 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("underwear")
|
||||
var/list/valid_underwear = list()
|
||||
for(var/underwear in underwear_list)
|
||||
var/datum/sprite_accessory/SA = underwear_list[underwear]
|
||||
for(var/underwear in GLOB.underwear_list)
|
||||
var/datum/sprite_accessory/SA = GLOB.underwear_list[underwear]
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(!(species in SA.species_allowed))
|
||||
continue
|
||||
valid_underwear[underwear] = underwear_list[underwear]
|
||||
valid_underwear[underwear] = GLOB.underwear_list[underwear]
|
||||
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in valid_underwear
|
||||
ShowChoices(user)
|
||||
if(new_underwear)
|
||||
underwear = new_underwear
|
||||
if("undershirt")
|
||||
var/list/valid_undershirts = list()
|
||||
for(var/undershirt in undershirt_list)
|
||||
var/datum/sprite_accessory/SA = undershirt_list[undershirt]
|
||||
for(var/undershirt in GLOB.undershirt_list)
|
||||
var/datum/sprite_accessory/SA = GLOB.undershirt_list[undershirt]
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(!(species in SA.species_allowed))
|
||||
continue
|
||||
valid_undershirts[undershirt] = undershirt_list[undershirt]
|
||||
valid_undershirts[undershirt] = GLOB.undershirt_list[undershirt]
|
||||
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in valid_undershirts
|
||||
ShowChoices(user)
|
||||
if(new_undershirt)
|
||||
@@ -1688,15 +1688,15 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("socks")
|
||||
var/list/valid_sockstyles = list()
|
||||
for(var/sockstyle in socks_list)
|
||||
var/datum/sprite_accessory/SA = socks_list[sockstyle]
|
||||
for(var/sockstyle in GLOB.socks_list)
|
||||
var/datum/sprite_accessory/SA = GLOB.socks_list[sockstyle]
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(!(species in SA.species_allowed))
|
||||
continue
|
||||
valid_sockstyles[sockstyle] = socks_list[sockstyle]
|
||||
valid_sockstyles[sockstyle] = GLOB.socks_list[sockstyle]
|
||||
var/new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in valid_sockstyles
|
||||
ShowChoices(user)
|
||||
if(new_socks)
|
||||
@@ -1738,7 +1738,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
ooccolor = new_ooccolor
|
||||
|
||||
if("bag")
|
||||
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in backbaglist
|
||||
var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference") as null|anything in GLOB.backbaglist
|
||||
if(new_backbag)
|
||||
backbag = new_backbag
|
||||
|
||||
@@ -1816,8 +1816,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("Normal")
|
||||
if(limb == "head")
|
||||
m_styles["head"] = "None"
|
||||
h_style = hair_styles_public_list["Bald"]
|
||||
f_style = facial_hair_styles_list["Shaved"]
|
||||
h_style = GLOB.hair_styles_public_list["Bald"]
|
||||
f_style = GLOB.facial_hair_styles_list["Shaved"]
|
||||
organ_data[limb] = null
|
||||
rlimb_data[limb] = null
|
||||
if(third_limb)
|
||||
@@ -1867,8 +1867,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(limb == "head")
|
||||
ha_style = "None"
|
||||
alt_head = null
|
||||
h_style = hair_styles_public_list["Bald"]
|
||||
f_style = facial_hair_styles_list["Shaved"]
|
||||
h_style = GLOB.hair_styles_public_list["Bald"]
|
||||
f_style = GLOB.facial_hair_styles_list["Shaved"]
|
||||
m_styles["head"] = "None"
|
||||
rlimb_data[limb] = choice
|
||||
organ_data[limb] = "cyborg"
|
||||
@@ -2092,9 +2092,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
real_name += " [pick(last_names)]"
|
||||
real_name += " [pick(GLOB.last_names)]"
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(last_names)]"
|
||||
real_name += "[pick(GLOB.last_names)]"
|
||||
|
||||
character.add_language(language)
|
||||
|
||||
|
||||
@@ -272,12 +272,12 @@
|
||||
for(var/marking_location in m_colours)
|
||||
m_colours[marking_location] = sanitize_hexcolor(m_colours[marking_location], DEFAULT_MARKING_COLOURS[marking_location])
|
||||
hacc_colour = sanitize_hexcolor(hacc_colour)
|
||||
h_style = sanitize_inlist(h_style, hair_styles_public_list, initial(h_style))
|
||||
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
|
||||
h_style = sanitize_inlist(h_style, GLOB.hair_styles_public_list, initial(h_style))
|
||||
f_style = sanitize_inlist(f_style, GLOB.facial_hair_styles_list, initial(f_style))
|
||||
for(var/marking_location in m_styles)
|
||||
m_styles[marking_location] = sanitize_inlist(m_styles[marking_location], marking_styles_list, DEFAULT_MARKING_STYLES[marking_location])
|
||||
ha_style = sanitize_inlist(ha_style, head_accessory_styles_list, initial(ha_style))
|
||||
alt_head = sanitize_inlist(alt_head, alt_heads_list, initial(alt_head))
|
||||
m_styles[marking_location] = sanitize_inlist(m_styles[marking_location], GLOB.marking_styles_list, DEFAULT_MARKING_STYLES[marking_location])
|
||||
ha_style = sanitize_inlist(ha_style, GLOB.head_accessory_styles_list, initial(ha_style))
|
||||
alt_head = sanitize_inlist(alt_head, GLOB.alt_heads_list, initial(alt_head))
|
||||
e_colour = sanitize_hexcolor(e_colour)
|
||||
underwear = sanitize_text(underwear, initial(underwear))
|
||||
undershirt = sanitize_text(undershirt, initial(undershirt))
|
||||
|
||||
@@ -385,18 +385,12 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/match) && src.loc == user)
|
||||
var/obj/item/match/M = I
|
||||
if(!M.lit) // Match isn't lit, but isn't burnt.
|
||||
M.lit = 1
|
||||
M.icon_state = "match_lit"
|
||||
processing_objects.Add(M)
|
||||
M.update_icon()
|
||||
if(M.matchignite()) // Match isn't lit, but isn't burnt.
|
||||
user.visible_message("<span class='warning'>[user] strikes a [M] on the bottom of [src], lighting it.</span>","<span class='warning'>You strike the [M] on the bottom of [src] to light it.</span>")
|
||||
playsound(user.loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, 1)
|
||||
else if(M.lit == 1) // Match is lit, not extinguished.
|
||||
M.dropped()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] crushes the [M] into the bottom of [src], extinguishing it.</span>","<span class='warning'>You crush the [M] into the bottom of [src], extinguishing it.</span>")
|
||||
else // Match has been previously lit and extinguished.
|
||||
to_chat(user, "<span class='notice'>The [M] has already been extinguished.</span>")
|
||||
M.dropped()
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
|
||||
@@ -238,6 +238,12 @@ obj/item/clothing/head/blob
|
||||
desc = "An in-atmosphere helmet worn by security members of the Nanotrasen Emergency Response Team. Has red highlights."
|
||||
icon_state = "erthelmet_sec"
|
||||
|
||||
/obj/item/clothing/head/helmet/ert/security/paranormal
|
||||
name = "paranormal emergency response team helmet"
|
||||
desc = "An in-atmosphere helmet worn by paranormal members of the Nanotrasen Emergency Response Team. Has crusader sigils."
|
||||
icon_state = "knight_templar"
|
||||
item_state = "knight_templar"
|
||||
|
||||
//Engineer
|
||||
/obj/item/clothing/head/helmet/ert/engineer
|
||||
name = "emergency response team engineer helmet"
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
/obj/item/clothing/mask/breath/attack_self(var/mob/user)
|
||||
adjustmask(user)
|
||||
|
||||
/obj/item/clothing/mask/breath/AltClick(mob/user)
|
||||
..()
|
||||
if( (!in_range(src, user)) || user.stat || user.restrained() )
|
||||
return
|
||||
adjustmask(user)
|
||||
|
||||
/obj/item/clothing/mask/breath/medical
|
||||
desc = "A close-fitting sterile mask that can be connected to an air supply."
|
||||
name = "medical mask"
|
||||
@@ -41,3 +47,9 @@
|
||||
permeability_coefficient = 0.01
|
||||
species_restricted = list("Vox")
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/clothing/mask/breath/vox/attack_self(var/mob/user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/breath/vox/AltClick(mob/user)
|
||||
return
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
anchored = 1
|
||||
invisibility = 101
|
||||
opacity = 0
|
||||
mouse_opacity = 0
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/mob/holder = null
|
||||
|
||||
/obj/effect/chronos_cam/relaymove(var/mob/user, direction)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/t_scanner, /obj/item/rcd, /obj/item/crowbar, \
|
||||
/obj/item/screwdriver, /obj/item/weldingtool, /obj/item/wirecutters, /obj/item/wrench, /obj/item/multitool, \
|
||||
/obj/item/radio, /obj/item/analyzer, /obj/item/gun/energy/laser, /obj/item/gun/energy/pulse, \
|
||||
/obj/item/gun/energy/gun/advtaser, /obj/item/melee/baton, /obj/item/gun/energy/gun, /obj/item/gun/projectile/automatic/lasercarbine, /obj/item/gun/energy/gun/blueshield)
|
||||
/obj/item/gun/energy/gun/advtaser, /obj/item/melee/baton, /obj/item/gun/energy/gun, /obj/item/gun/projectile/automatic/lasercarbine, /obj/item/gun/energy/gun/blueshield, /obj/item/gun/energy/immolator/multi)
|
||||
strip_delay = 130
|
||||
species_fit = list("Drask", "Vox")
|
||||
sprite_sheets = list(
|
||||
@@ -56,12 +56,25 @@
|
||||
item_state = "helm-command"
|
||||
item_color = "ert_commander"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/commander/gamma
|
||||
name = "elite emergency response team commander helmet"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
icon_state = "hardsuit0-gammacommander"
|
||||
item_color = "gammacommander"
|
||||
species_fit = null
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/commander
|
||||
name = "emergency response team commander suit"
|
||||
desc = "A suit worn by the commander of a Nanotrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/commander/gamma
|
||||
name = "elite emergency response team commander suit"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
icon_state = "ert_gcommander"
|
||||
species_fit = null
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/security
|
||||
name = "emergency response team security helmet"
|
||||
@@ -70,12 +83,25 @@
|
||||
item_state = "syndicate-helm-black-red"
|
||||
item_color = "ert_security"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/security/gamma
|
||||
name = "elite emergency response team security helmet"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
icon_state = "hardsuit0-gammasecurity"
|
||||
item_color = "gammasecurity"
|
||||
species_fit = null
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/security
|
||||
name = "emergency response team security suit"
|
||||
desc = "A suit worn by security members of a Nanotrasen Emergency Response Team. Has red highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_security"
|
||||
item_state = "syndicate-black-red"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/security/gamma
|
||||
name = "elite emergency response team security suit"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
icon_state = "ert_gsecurity"
|
||||
species_fit = null
|
||||
|
||||
//Engineer
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/engineer
|
||||
name = "emergency response team engineer helmet"
|
||||
@@ -84,12 +110,26 @@
|
||||
item_state = "helm-orange"
|
||||
item_color = "ert_engineer"
|
||||
|
||||
//Engineer
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/engineer/gamma
|
||||
name = "elite emergency response team engineer helmet"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
icon_state = "hardsuit0-gammaengineer"
|
||||
item_color = "gammaengineer"
|
||||
species_fit = null
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/engineer
|
||||
name = "emergency response team engineer suit"
|
||||
desc = "A suit worn by the engineers of a Nanotrasen Emergency Response Team. Has yellow highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_engineer"
|
||||
item_state = "suit-orange"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/engineer/gamma
|
||||
name = "elite emergency response team engineer suit"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
icon_state = "ert_gengineer"
|
||||
species_fit = null
|
||||
|
||||
//Medical
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/medical
|
||||
name = "emergency response team medical helmet"
|
||||
@@ -97,11 +137,24 @@
|
||||
icon_state = "hardsuit0-ert_medical"
|
||||
item_color = "ert_medical"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/medical/gamma
|
||||
name = "elite emergency response team medical helmet"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
icon_state = "hardsuit0-gammamedical"
|
||||
item_color = "gammamedical"
|
||||
species_fit = null
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/medical
|
||||
name = "emergency response team medical suit"
|
||||
desc = "A suit worn by medical members of a Nanotrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
icon_state = "ert_medical"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/medical/gamma
|
||||
name = "elite emergency response team medical suit"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
icon_state = "ert_gmedical"
|
||||
species_fit = null
|
||||
|
||||
//Janitor
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/janitor
|
||||
name = "emergency response team janitor helmet"
|
||||
@@ -109,11 +162,24 @@
|
||||
icon_state = "hardsuit0-ert_janitor"
|
||||
item_color = "ert_janitor"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/janitor/gamma
|
||||
name = "elite emergency response team janitor helmet"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
icon_state = "hardsuit0-gammajanitor"
|
||||
item_color = "gammajanitor"
|
||||
species_fit = null
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/janitor
|
||||
name = "emergency response team janitor suit"
|
||||
desc = "A suit worn by the janitorial of a Nanotrasen Emergency Response Team. Has purple highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_janitor"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/janitor/gamma
|
||||
name = "elite emergency response team janitor suit"
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
icon_state = "ert_gjanitor"
|
||||
species_fit = null
|
||||
|
||||
//Paranormal
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/ert/paranormal
|
||||
name = "paranormal response unit helmet"
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
return 0
|
||||
if(prob(hit_reaction_chance))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
owner.visible_message("<span class='danger'>The reactive teleport system flings [H] clear of [attack_text], shutting itself off in the process!</span>")
|
||||
owner.visible_message("<span class='danger'>The reactive teleport system flings [H] clear of [attack_text]!</span>")
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(tele_range, H))
|
||||
if(istype(T, /turf/space))
|
||||
@@ -440,6 +440,13 @@
|
||||
name = "emergency response team security armor"
|
||||
desc = "A set of armor worn by security members of the Nanotrasen Emergency Response Team. Has red highlights."
|
||||
icon_state = "ertarmor_sec"
|
||||
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/ert/security/paranormal
|
||||
name = "emergency response team paranormal armor"
|
||||
desc = "A set of armor worn by paranormal members of the Nanotrasen Emergency Response Team. Has crusader sigils."
|
||||
icon_state = "knight_templar"
|
||||
item_state = "knight_templar"
|
||||
|
||||
//Engineer
|
||||
/obj/item/clothing/suit/armor/vest/ert/engineer
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
var/image/I = image(icon = 'icons/mob/robots.dmi' , icon_state = "robot", loc = H)
|
||||
I.override = 1
|
||||
I.overlays += image(icon = 'icons/mob/robots.dmi' , icon_state = "eyes-robot") //gotta look realistic
|
||||
H.add_alt_appearance("standard_borg_disguise", I, silicon_mob_list+H) //you look like a robot to robots! (including yourself because you're totally a robot)
|
||||
H.add_alt_appearance("standard_borg_disguise", I, GLOB.silicon_mob_list+H) //you look like a robot to robots! (including yourself because you're totally a robot)
|
||||
|
||||
/obj/item/clothing/suit/snowman
|
||||
name = "snowman outfit"
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
icon_state = "necklace"
|
||||
item_state = "necklace"
|
||||
item_color = "necklace"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
slot_flags = SLOT_TIE
|
||||
|
||||
/obj/item/clothing/accessory/necklace/locket
|
||||
name = "gold locket"
|
||||
@@ -398,7 +398,7 @@
|
||||
icon_state = "locket"
|
||||
item_state = "locket"
|
||||
item_color = "locket"
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
slot_flags = SLOT_TIE
|
||||
var/base_icon
|
||||
var/open
|
||||
var/obj/item/held //Item inside locket.
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
desc = "A terribly ragged and frayed grey jumpsuit. It looks like it hasn't been washed in over a decade."
|
||||
|
||||
/obj/item/clothing/under/color/grey/glorf/hit_reaction(mob/living/carbon/human/owner)
|
||||
owner.forcesay(hit_appends)
|
||||
owner.forcesay(GLOB.hit_appends)
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/under/color/orange
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
/obj/effect/countdown/proc/start()
|
||||
if(!started)
|
||||
fast_processing += src
|
||||
GLOB.fast_processing += src
|
||||
started = TRUE
|
||||
|
||||
/obj/effect/countdown/proc/stop()
|
||||
if(started)
|
||||
maptext = null
|
||||
fast_processing -= src
|
||||
GLOB.fast_processing -= src
|
||||
started = FALSE
|
||||
|
||||
/obj/effect/countdown/proc/get_value()
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/effect/countdown/Destroy()
|
||||
attached_to = null
|
||||
fast_processing -= src
|
||||
GLOB.fast_processing -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/countdown/ex_act(severity) //immune to explosions
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
var/list/surroundings = get_surroundings(user)
|
||||
var/list/can_craft = list()
|
||||
var/list/cant_craft = list()
|
||||
for(var/rec in crafting_recipes)
|
||||
for(var/rec in GLOB.crafting_recipes)
|
||||
var/datum/crafting_recipe/R = rec
|
||||
if(R.category != cur_category)
|
||||
continue
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
to_chat(user, "<span class= 'notice'>[target] already has body markings, any more would look silly!</span>")
|
||||
return
|
||||
|
||||
var/datum/sprite_accessory/body_markings/tattoo/temp_tatt = marking_styles_list[tattoo_icon]
|
||||
var/datum/sprite_accessory/body_markings/tattoo/temp_tatt = GLOB.marking_styles_list[tattoo_icon]
|
||||
if(!(target.dna.species.name in temp_tatt.species_allowed))
|
||||
to_chat(user, "<span class= 'notice'>You can't think of a way to make the [tattoo_name] design work on [target == user ? "your" : "[target]'s"] body type.</span>")
|
||||
return
|
||||
@@ -135,6 +135,27 @@
|
||||
/obj/item/claymore/fluff/hit_reaction()
|
||||
return 0
|
||||
|
||||
/obj/item/fluff/rsik_katana //Xydonus: Rsik Ugsharki
|
||||
name = "ceremonial katana"
|
||||
desc = "A shimmering ceremonial golden katana, for the most discerning class of ninja. Looks expensive, and fragile."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "rsik_katana"
|
||||
item_state = "rsik_katana"
|
||||
lefthand_file = 'icons/mob/inhands/fluff_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/fluff_righthand.dmi'
|
||||
force = 5
|
||||
sharp = 0
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 5
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
/obj/item/fluff/rsik_katana/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] tries to stab [src] into [user.p_their()] stomach! Except [src] shatters! [user.p_they(TRUE)] look[user.p_s()] as if [user.p_they()] might die from the shame.</span>")
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/crowbar/fluff/zelda_creedy_1 // Zomgponies: Griffin Rowley
|
||||
name = "Zelda's Crowbar"
|
||||
desc = "A pink crow bar that has an engraving that reads, 'To Zelda. Love always, Dawn'"
|
||||
@@ -1000,6 +1021,17 @@
|
||||
flags_inv = HIDEEARS
|
||||
|
||||
//////////// Uniforms ////////////
|
||||
/obj/item/clothing/under/fluff/counterfeitguise_uniform // thatdanguy23 : Rissa Williams
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
name = "Rissa's hand-me-downs"
|
||||
desc = "An old, hand-me-down baggy sweater and sweatpants combo. A label on the neck reads 'RISSA' in scruffy handwriting."
|
||||
lefthand_file = 'icons/mob/inhands/fluff_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/fluff_righthand.dmi'
|
||||
icon_state = "counterfeitguise"
|
||||
item_state = "counterfeitguise"
|
||||
item_color = "counterfeitguise"
|
||||
flags_size = ONESIZEFITSALL
|
||||
|
||||
/obj/item/clothing/under/fluff/benjaminfallout // Benjaminfallout: Pretzel Brassheart
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
name = "Pretzel's dress"
|
||||
@@ -1484,3 +1516,4 @@
|
||||
item_state = "Xann_necklace"
|
||||
item_color = "Xann_necklace"
|
||||
slot_flags = SLOT_TIE
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ log transactions
|
||||
authenticated_account.charge(-cash_amount, null, "Credit deposit", terminal_id = machine_id, dest_name = "Terminal")
|
||||
|
||||
/obj/machinery/atm/proc/reconnect_database()
|
||||
for(var/obj/machinery/computer/account_database/DB in machines)
|
||||
for(var/obj/machinery/computer/account_database/DB in GLOB.machines)
|
||||
if(DB.z == z && !(DB.stat & NOPOWER) && DB.activated)
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -65,7 +65,7 @@ var/global/list/all_money_accounts = list()
|
||||
T.amount = starting_funds
|
||||
if(!source_db)
|
||||
//set a random date, time and location some time over the past few decades
|
||||
T.date = "[num2text(rand(1,31))] [pick(month_names)], [rand(game_year - 20,game_year - 1)]"
|
||||
T.date = "[num2text(rand(1,31))] [pick(GLOB.month_names)], [rand(game_year - 20,game_year - 1)]"
|
||||
T.time = "[rand(0,23)]:[rand(0,59)]:[rand(0,59)]"
|
||||
T.source_terminal = "NTGalaxyNet Terminal #[rand(111,1111)]"
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(!location)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/computer/account_database/DB in machines)
|
||||
for(var/obj/machinery/computer/account_database/DB in GLOB.machines)
|
||||
if(DB.z == location.z)
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -109,9 +109,9 @@
|
||||
newMsg.body += "and their partner announced the birth of their [pick("first","second","third")] child on [affected_dest.name] early this morning. \
|
||||
Doctors say the child is well, and the parents are considering "
|
||||
if(prob(50))
|
||||
newMsg.body += capitalize(pick(first_names_female))
|
||||
newMsg.body += capitalize(pick(GLOB.first_names_female))
|
||||
else
|
||||
newMsg.body += capitalize(pick(first_names_male))
|
||||
newMsg.body += capitalize(pick(GLOB.first_names_male))
|
||||
newMsg.body += " for the name."
|
||||
else if(prob(50))
|
||||
newMsg.body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/obj/vent = pick_n_take(vents)
|
||||
var/mob/C = pick_n_take(candidates)
|
||||
if(C)
|
||||
respawnable_list -= C.client
|
||||
GLOB.respawnable_list -= C.client
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.key = C.key
|
||||
if(ticker && ticker.mode)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
blueeffect.icon = 'icons/effects/effects.dmi'
|
||||
blueeffect.icon_state = "shieldsparkles"
|
||||
blueeffect.layer = 17
|
||||
blueeffect.mouse_opacity = 0
|
||||
blueeffect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
M.client.screen += blueeffect
|
||||
sleep(20)
|
||||
M.client.screen -= blueeffect
|
||||
|
||||
@@ -11,7 +11,7 @@ Nanotrasen has approved a short break for all employees to relax and observe thi
|
||||
During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \
|
||||
Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \
|
||||
We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meteorology Division")
|
||||
for(var/V in player_list)
|
||||
for(var/V in GLOB.player_list)
|
||||
var/mob/M = V
|
||||
if((M.client.prefs.toggles & SOUND_MIDI) && is_station_level(M.z))
|
||||
M.playsound_local(null, 'sound/ambience/aurora_caelus.ogg', 20, FALSE, pressure_affected = FALSE)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(!candidates.len)
|
||||
return kill()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in all_vent_pumps)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.all_vent_pumps)
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
event_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
|
||||
|
||||
/datum/event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in machines)
|
||||
for(var/obj/machinery/vending/V in GLOB.machines)
|
||||
if(!is_station_level(V.z)) continue
|
||||
vendingMachines.Add(V)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/datum/event/carp_migration/start()
|
||||
|
||||
if(severity == EVENT_LEVEL_MAJOR)
|
||||
spawn_fish(landmarks_list.len)
|
||||
spawn_fish(GLOB.landmarks_list.len)
|
||||
else if(severity == EVENT_LEVEL_MODERATE)
|
||||
spawn_fish(rand(4, 6)) //12 to 30 carp, in small groups
|
||||
else
|
||||
@@ -32,7 +32,7 @@
|
||||
/datum/event/carp_migration/proc/spawn_fish(var/num_groups, var/group_size_min=3, var/group_size_max=5)
|
||||
var/list/spawn_locations = list()
|
||||
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
spawn_locations.Add(C.loc)
|
||||
spawn_locations = shuffle(spawn_locations)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"Ionospheri:%? MCayj^j<.3-BZZZZZZT", \
|
||||
"#4nd%;f4y6,>?%-BZZZZZZZT")
|
||||
|
||||
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list) //AIs are always aware of communication blackouts.
|
||||
to_chat(A, "<br>")
|
||||
to_chat(A, "<span class='warning'><b>[alert]</b></span>")
|
||||
to_chat(A, "<br>")
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!silent)
|
||||
event_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
|
||||
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list)
|
||||
to_chat(A, "<br>")
|
||||
to_chat(A, "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>")
|
||||
to_chat(A, "<br>")
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
if(!virus_type)
|
||||
virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis, /datum/disease/beesease, /datum/disease/anxiety, /datum/disease/fake_gbs, /datum/disease/fluspanish, /datum/disease/pierrot_throat, /datum/disease/lycan)
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
|
||||
if(issmall(H)) //don't infect monkies; that's a waste
|
||||
continue
|
||||
if(!H.client)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
for(var/i=1, i <= lightsoutAmount, i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
|
||||
for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
|
||||
@@ -92,7 +92,7 @@ var/list/event_last_fired = list()
|
||||
// Otherwise, follow the standard setup process
|
||||
else
|
||||
var/playercount_modifier = 1
|
||||
switch(player_list.len)
|
||||
switch(GLOB.player_list.len)
|
||||
if(0 to 10)
|
||||
playercount_modifier = 1.2
|
||||
if(11 to 15)
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
|
||||
/datum/event/proc/num_players()
|
||||
var/players = 0
|
||||
for(var/mob/living/carbon/human/P in player_list)
|
||||
for(var/mob/living/carbon/human/P in GLOB.player_list)
|
||||
if(P.client)
|
||||
players++
|
||||
return players
|
||||
@@ -373,9 +373,9 @@
|
||||
active_with_role["Cyborg"] = 0
|
||||
active_with_role["Janitor"] = 0
|
||||
active_with_role["Botanist"] = 0
|
||||
active_with_role["Any"] = player_list.len
|
||||
active_with_role["Any"] = GLOB.player_list.len
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
continue
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/list/skipped_areas = list(/area/turret_protected/ai)
|
||||
var/list/skipped_areas_apc = list(/area/engine/engineering)
|
||||
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
var/area/current_area = get_area(S)
|
||||
if((current_area.type in skipped_areas) || !is_station_level(S.z))
|
||||
continue
|
||||
@@ -33,7 +33,7 @@
|
||||
S.update_icon()
|
||||
S.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
continue
|
||||
@@ -46,13 +46,13 @@
|
||||
|
||||
if(announce)
|
||||
event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in apcs)
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
var/area/current_area = get_area(C)
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
continue
|
||||
if(C.cell)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
var/area/current_area = get_area(S)
|
||||
if((current_area.type in skipped_areas) || !is_station_level(S.z))
|
||||
continue
|
||||
@@ -65,7 +65,7 @@
|
||||
/proc/power_restore_quick(var/announce = 1)
|
||||
if(announce)
|
||||
event_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in machines)
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(!is_station_level(S.z))
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
for(var/turf/simulated/floor/T in orange(1,xmas))
|
||||
for(var/i=1,i<=rand(1,5),i++)
|
||||
new /obj/item/a_gift(T)
|
||||
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
|
||||
for(var/mob/living/simple_animal/corgi/Ian/Ian in GLOB.mob_list)
|
||||
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
|
||||
|
||||
/proc/ChristmasEvent()
|
||||
|
||||
@@ -41,7 +41,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
notify_ghosts("\A [src] is inbound!",
|
||||
enter_link="<a href=?src=[UID()];follow=1>(Click to follow)</a>",
|
||||
source=src, action=NOTIFY_FOLLOW)
|
||||
poi_list |= src
|
||||
GLOB.poi_list |= src
|
||||
if(end && end.z==z_original)
|
||||
walk_towards(src, destination, move_delay)
|
||||
|
||||
@@ -52,7 +52,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
ghost.ManualFollow(src)
|
||||
|
||||
/obj/effect/immovablerod/Destroy()
|
||||
poi_list.Remove(src)
|
||||
GLOB.poi_list.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/immovablerod/ex_act(test)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/datum/event/ion_storm/start()
|
||||
//AI laws
|
||||
for(var/mob/living/silicon/ai/M in living_mob_list)
|
||||
for(var/mob/living/silicon/ai/M in GLOB.living_mob_list)
|
||||
if(M.stat != 2 && M.see_in_dark != 0)
|
||||
var/message = generate_ion_law(ionMessage)
|
||||
if(message)
|
||||
@@ -32,7 +32,7 @@
|
||||
to_chat(M, "<br>")
|
||||
|
||||
if(botEmagChance)
|
||||
for(var/mob/living/simple_animal/bot/bot in machines)
|
||||
for(var/mob/living/simple_animal/bot/bot in GLOB.machines)
|
||||
if(prob(botEmagChance))
|
||||
bot.emag_act()
|
||||
|
||||
@@ -492,7 +492,7 @@
|
||||
|
||||
/proc/generate_static_ion_law()
|
||||
/var/list/players = list()
|
||||
for(var/mob/living/carbon/human/player in player_list)
|
||||
for(var/mob/living/carbon/human/player in GLOB.player_list)
|
||||
if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > MinutesToTicks(10))
|
||||
continue
|
||||
players += player.real_name
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user