mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-26 14:36:50 +01:00
Merge branch 'release' of https://github.com/VOREStation/VOREStation into izac
This commit is contained in:
@@ -8,7 +8,7 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/cmd_mod_say, //VOREStation Add,
|
||||
/client/proc/cmd_event_say, //VOREStation Add,
|
||||
/client/proc/cmd_mentor_ticket_panel,
|
||||
/client/proc/cmd_mentor_say
|
||||
/client/proc/cmd_mentor_say,
|
||||
// /client/proc/hide_verbs, //hides all our adminverbs, //VOREStation Remove,
|
||||
// /client/proc/hide_most_verbs, //hides all our hideable adminverbs, //VOREStation Remove,
|
||||
// /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, //VOREStation Remove,
|
||||
@@ -18,6 +18,8 @@ var/list/admin_verbs_default = list(
|
||||
// /client/proc/cmd_mod_say,
|
||||
// /client/proc/deadchat //toggles deadchat on/off,
|
||||
// /client/proc/toggle_ahelp_sound,
|
||||
/client/proc/toggle_admin_global_looc,
|
||||
/client/proc/toggle_admin_deadchat
|
||||
)
|
||||
|
||||
var/list/admin_verbs_admin = list(
|
||||
@@ -230,7 +232,7 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/cmd_debug_tog_aliens,
|
||||
/client/proc/cmd_display_del_log,
|
||||
/client/proc/cmd_display_init_log,
|
||||
/client/proc/cmd_display_overlay_log,
|
||||
// /client/proc/cmd_display_overlay_log,
|
||||
/client/proc/air_report,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/reload_eventMs,
|
||||
|
||||
@@ -191,7 +191,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
"color" = COLOR_WEBHOOK_POOR
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
GLOB.ahelp_tickets.active_tickets += src
|
||||
|
||||
/datum/admin_help/Destroy()
|
||||
@@ -428,6 +428,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
|
||||
//Show the ticket panel
|
||||
/datum/admin_help/proc/TicketPanel()
|
||||
tgui_interact(usr.client.mob)
|
||||
|
||||
/datum/admin_help/proc/TicketPanelLegacy()
|
||||
var/list/dat = list("<html><head><title>Ticket #[id]</title></head>")
|
||||
var/ref_src = "\ref[src]"
|
||||
dat += "<h4>Admin Help Ticket #[id]: [LinkedReplyName(ref_src)]</h4>"
|
||||
@@ -468,6 +471,65 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
log_admin(msg)
|
||||
TicketPanel() //we have to be here to do this
|
||||
|
||||
/datum/admin_help/tgui_fallback(payload)
|
||||
if(..())
|
||||
return
|
||||
|
||||
TicketPanelLegacy()
|
||||
|
||||
/datum/admin_help/tgui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "AdminTicketPanel", "Ticket #[id] - [LinkedReplyName("\ref[src]")]")
|
||||
ui.open()
|
||||
|
||||
/datum/admin_help/tgui_state(mob/user)
|
||||
return GLOB.tgui_admin_state
|
||||
|
||||
/datum/admin_help/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["id"] = id
|
||||
|
||||
var/ref_src = "\ref[src]"
|
||||
data["title"] = name
|
||||
data["name"] = LinkedReplyName(ref_src)
|
||||
|
||||
switch(state)
|
||||
if(AHELP_ACTIVE)
|
||||
data["state"] = "open"
|
||||
if(AHELP_RESOLVED)
|
||||
data["state"] = "resolved"
|
||||
if(AHELP_CLOSED)
|
||||
data["state"] = "closed"
|
||||
else
|
||||
data["state"] = "unknown"
|
||||
|
||||
data["opened_at"] = (world.time - opened_at)
|
||||
data["closed_at"] = (world.time - closed_at)
|
||||
data["opened_at_date"] = gameTimestamp(wtime = opened_at)
|
||||
data["closed_at_date"] = gameTimestamp(wtime = closed_at)
|
||||
|
||||
data["actions"] = FullMonty(ref_src)
|
||||
|
||||
data["log"] = _interactions
|
||||
|
||||
return data
|
||||
|
||||
/datum/admin_help/tgui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("retitle")
|
||||
Retitle()
|
||||
. = TRUE
|
||||
if("reopen")
|
||||
Reopen()
|
||||
. = TRUE
|
||||
if("legacy")
|
||||
TicketPanelLegacy()
|
||||
. = TRUE
|
||||
|
||||
//Forwarded action from admin/Topic
|
||||
/datum/admin_help/proc/Action(action)
|
||||
testing("Ahelp action: [action]")
|
||||
|
||||
@@ -34,5 +34,6 @@
|
||||
|
||||
//if they requested spice, then remove spice verb temporarily to prevent spamming
|
||||
usr.verbs -= /client/verb/adminspice
|
||||
spawn(6000)
|
||||
usr.verbs += /client/verb/adminspice // 10 minute cool-down for spice request
|
||||
spawn(10 MINUTES)
|
||||
if(usr) // In case we left in the 10 minute cooldown
|
||||
usr.verbs += /client/verb/adminspice // 10 minute cool-down for spice request
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
to_chat(usr, "<span class='notice'>***********************************************************<br>\
|
||||
Left Mouse Button on turf = Select as point A<br>\
|
||||
Right Mouse Button on turf = Select as point B<br>\
|
||||
Right Mouse Button on buildmode button = Change floor/wall type<br>\
|
||||
Right Mouse Button on buildmode button = Change floor/wall type/area name<br>\
|
||||
***********************************************************</span>")
|
||||
|
||||
if(BUILDMODE_LADDER)
|
||||
@@ -189,6 +189,7 @@
|
||||
var/atom/movable/throw_atom = null
|
||||
var/list/selected_mobs = list()
|
||||
var/copied_faction = null
|
||||
var/warned = 0
|
||||
|
||||
/obj/effect/bmode/buildholder/Destroy()
|
||||
qdel(builddir)
|
||||
@@ -219,13 +220,15 @@
|
||||
screen_loc = "NORTH,WEST+2"
|
||||
var/varholder = "name"
|
||||
var/valueholder = "derp"
|
||||
var/objholder = /obj/structure/closet
|
||||
var/objholder = null
|
||||
var/objsay = 1
|
||||
|
||||
var/wall_holder = /turf/simulated/wall
|
||||
var/floor_holder = /turf/simulated/floor/plating
|
||||
var/turf/coordA = null
|
||||
var/turf/coordB = null
|
||||
var/area_enabled = 0
|
||||
var/area_name = "New Area"
|
||||
|
||||
var/new_light_color = "#FFFFFF"
|
||||
var/new_light_range = 3
|
||||
@@ -252,7 +255,7 @@
|
||||
|
||||
return 1
|
||||
if(BUILDMODE_ADVANCED)
|
||||
objholder = get_path_from_partial_text(/obj/structure/closet)
|
||||
objholder = get_path_from_partial_text()
|
||||
|
||||
if(BUILDMODE_EDIT)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
@@ -275,6 +278,18 @@
|
||||
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world)
|
||||
|
||||
if(BUILDMODE_ROOM)
|
||||
var/area_choice = tgui_alert(usr, "Would you like to generate a new area as well?","Room Builder", list("No", "Yes"))
|
||||
switch(area_choice)
|
||||
if("No")
|
||||
area_enabled = 0
|
||||
if("Yes")
|
||||
area_enabled = 1
|
||||
area_name = tgui_input_text(usr, "New area name", "Room Buildmode", max_length = MAX_NAME_LEN)
|
||||
if(isnull(area_name))
|
||||
to_chat(usr, "<span class='notice'>You must enter a non-null name.</span>")
|
||||
area_enabled = 0
|
||||
return
|
||||
area_name = sanitize(area_name,MAX_NAME_LEN)
|
||||
var/choice = tgui_alert(usr, "Would you like to change the floor or wall holders?","Room Builder", list("Floor", "Wall"))
|
||||
switch(choice)
|
||||
if("Floor")
|
||||
@@ -330,7 +345,13 @@
|
||||
return
|
||||
else if(istype(object,/turf/simulated/floor))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/space)
|
||||
if(!holder.warned)
|
||||
var/warning = tgui_alert(user, "Are you -sure- you want to delete this turf and make it the base turf for this Z level?", "GRIEF ALERT", list("No", "Yes"))
|
||||
if(warning == "Yes")
|
||||
holder.warned = 1
|
||||
else
|
||||
return
|
||||
T.ChangeTurf(get_base_turf_by_area(T)) //Defaults to Z if area does not have a special base turf.
|
||||
return
|
||||
else if(istype(object,/turf/simulated/wall/r_wall))
|
||||
var/turf/T = object
|
||||
@@ -358,13 +379,20 @@
|
||||
if(NORTHWEST)
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.set_dir(NORTHWEST)
|
||||
else if(istype(object,/turf) && pa.Find("ctrl") && pa.Find("alt") && pa.Find("middle"))
|
||||
var/turf/T = object
|
||||
var/obj/item/toy/plushie/teshari/easter_egg = new /obj/item/toy/plushie/teshari(T)
|
||||
easter_egg.name = "coding teshari plushie"
|
||||
easter_egg.desc = "A small purple teshari with a plush keyboard attached to it. Where did this come from?"
|
||||
easter_egg.color = "#a418c7"
|
||||
|
||||
|
||||
if(BUILDMODE_ADVANCED)
|
||||
if(pa.Find("left") && !pa.Find("ctrl"))
|
||||
if(ispath(holder.buildmode.objholder,/turf))
|
||||
var/turf/T = get_turf(object)
|
||||
T.ChangeTurf(holder.buildmode.objholder)
|
||||
else
|
||||
else if(ispath(holder.buildmode.objholder))
|
||||
var/obj/A = new holder.buildmode.objholder (get_turf(object))
|
||||
A.set_dir(holder.builddir.dir)
|
||||
else if(pa.Find("right"))
|
||||
@@ -411,13 +439,19 @@
|
||||
to_chat(user, "<span class='notice'>Defined [object] ([object.type]) as point B.</span>")
|
||||
|
||||
if(holder.buildmode.coordA && holder.buildmode.coordB)
|
||||
if(isnull(holder.buildmode.area_name))
|
||||
to_chat(user, "<span class='notice'>ERROR: Insert area name before use.</span>")
|
||||
holder.buildmode.coordA = null
|
||||
holder.buildmode.coordB = null
|
||||
return
|
||||
to_chat(user, "<span class='notice'>A and B set, creating rectangle.</span>")
|
||||
holder.buildmode.make_rectangle(
|
||||
holder.buildmode.coordA,
|
||||
holder.buildmode.coordB,
|
||||
holder.buildmode.wall_holder,
|
||||
holder.buildmode.floor_holder
|
||||
)
|
||||
holder.buildmode.floor_holder,
|
||||
holder.buildmode.area_enabled,
|
||||
holder.buildmode.area_name)
|
||||
holder.buildmode.coordA = null
|
||||
holder.buildmode.coordB = null
|
||||
|
||||
@@ -647,11 +681,9 @@
|
||||
result = matches[1]
|
||||
else
|
||||
result = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches, strict_modern = TRUE)
|
||||
if(!objholder)
|
||||
result = default_path
|
||||
return result
|
||||
|
||||
/obj/effect/bmode/buildmode/proc/make_rectangle(var/turf/A, var/turf/B, var/turf/wall_type, var/turf/floor_type)
|
||||
/obj/effect/bmode/buildmode/proc/make_rectangle(var/turf/A, var/turf/B, var/turf/wall_type, var/turf/floor_type, var/area_enabled, var/area_name)
|
||||
if(!A || !B) // No coords
|
||||
return
|
||||
if(A.z != B.z) // Not same z-level
|
||||
@@ -685,6 +717,10 @@
|
||||
var/high_bound_x = lower_left_corner.x + abs(width)
|
||||
var/high_bound_y = lower_left_corner.y + abs(height)
|
||||
|
||||
var/origin_x = lower_left_corner.x + round((abs(width)/2))
|
||||
var/origin_y = lower_left_corner.y + round((abs(height)/2))
|
||||
var/turf/origin
|
||||
|
||||
for(var/i = low_bound_x, i <= high_bound_x, i++)
|
||||
for(var/j = low_bound_y, j <= high_bound_y, j++)
|
||||
var/turf/T = locate(i, j, z_level)
|
||||
@@ -693,11 +729,91 @@
|
||||
T.ChangeTurf(wall_type)
|
||||
else
|
||||
new wall_type(T)
|
||||
|
||||
else
|
||||
if(T.x == origin_x && T.y == origin_y) //Get the middle of the square.
|
||||
origin = T
|
||||
if(isturf(floor_type))
|
||||
T.ChangeTurf(floor_type)
|
||||
else
|
||||
new floor_type(T)
|
||||
if(area_enabled) //Let's try not to make a new area unless you got walls and a floor.
|
||||
create_buildmode_area(area_name, origin) //Generates a new area.
|
||||
|
||||
/proc/create_buildmode_area(var/area_name, var/turf/origin)
|
||||
var/turfs = detect_room_buildmode(origin)
|
||||
|
||||
var/area/newA
|
||||
var/area/oldA = get_area(origin)
|
||||
var/str = area_name
|
||||
str = sanitize(str,MAX_NAME_LEN)
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
newA = new /area/buildmode
|
||||
newA.dynamic_lighting = FALSE // Without this it's pitch black if you build anywhere but space.
|
||||
newA.luminosity = TRUE // Without this it's pitch black if you build anywhere but space.
|
||||
newA.setup(str)
|
||||
newA.has_gravity = oldA.has_gravity
|
||||
|
||||
for(var/i in 1 to length(turfs)) //Fix lighting. Praise the lord.
|
||||
var/turf/thing = turfs[i]
|
||||
newA.contents += thing
|
||||
thing.change_area(oldA, newA)
|
||||
|
||||
set_area_machinery(newA, newA.name, oldA.name)// Change the name and area defines of all the machinery to the correct area.
|
||||
oldA.power_check() //Simply makes the area turn the power off if you nicked an APC from it.
|
||||
return TRUE
|
||||
|
||||
/proc/detect_room_buildmode(var/turf/first, var/allowedAreas = AREA_SPACE)
|
||||
if(!istype(first))
|
||||
return
|
||||
var/list/turf/found = new
|
||||
var/list/turf/pending = list(first)
|
||||
while(pending.len)
|
||||
var/turf/T = pending[1]
|
||||
pending -= T
|
||||
for (var/dir in cardinal)
|
||||
var/turf/NT = get_step(T,dir)
|
||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||
continue
|
||||
// We ask ZAS to determine if its airtight. Thats what matters anyway right?
|
||||
if(air_master.air_blocked(T, NT))
|
||||
// Okay thats the edge of the room
|
||||
if(get_area_type_buildmode(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT))
|
||||
found += NT // So we include walls/doors not already in any area
|
||||
continue
|
||||
if (istype(NT, /turf/space))
|
||||
return //omg hull breach we all going to die here
|
||||
if (istype(NT, /turf/simulated/shuttle))
|
||||
return // Unsure why this, but was in old code. Trusting for now.
|
||||
if (NT.loc != first.loc && !(get_area_type_buildmode(NT.loc) & allowedAreas))
|
||||
// Edge of a protected area. Lets stop here...
|
||||
continue
|
||||
if (!istype(NT, /turf/simulated))
|
||||
// Great, unsimulated... eh, just stop searching here
|
||||
continue
|
||||
// Okay, NT looks promising, lets continue the search there!
|
||||
pending += NT
|
||||
found += T
|
||||
// end while
|
||||
return found
|
||||
|
||||
/proc/get_area_type_buildmode(area/A)
|
||||
if(A.outdoors)
|
||||
return AREA_SPACE
|
||||
|
||||
for (var/type in BUILDABLE_AREA_TYPES)
|
||||
if ( istype(A,type) )
|
||||
return AREA_SPACE
|
||||
|
||||
for (var/type in SPECIALS)
|
||||
if ( istype(A,type) )
|
||||
return AREA_SPECIAL
|
||||
return AREA_STATION
|
||||
|
||||
/area/buildmode
|
||||
dynamic_lighting = FALSE
|
||||
luminosity = FALSE
|
||||
|
||||
#undef BUILDMODE_BASIC
|
||||
#undef BUILDMODE_ADVANCED
|
||||
|
||||
@@ -249,6 +249,7 @@
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
src << browse(replacetext(SSatoms.InitLog(), "\n", "<br>"), "window=initlog")
|
||||
|
||||
/*
|
||||
/client/proc/cmd_display_overlay_log()
|
||||
set category = "Debug"
|
||||
set name = "Display overlay Log"
|
||||
@@ -256,7 +257,7 @@
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
render_stats(SSoverlays.stats, src)
|
||||
|
||||
*/
|
||||
// Render stats list for round-end statistics.
|
||||
/proc/render_stats(list/stats, user, sort = /proc/cmp_generic_stat_item_time)
|
||||
sortTim(stats, sort, TRUE)
|
||||
@@ -676,4 +677,4 @@
|
||||
|
||||
var/log = "[key_name(src)] changed [planet.name]'s time to [planet.current_time.show_time("hh:mm")]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
log_admin(log)
|
||||
|
||||
@@ -86,10 +86,14 @@
|
||||
if (!holder)
|
||||
return
|
||||
|
||||
var/msg = sanitize(tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]")))
|
||||
var/msg = tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]"))
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
|
||||
msg = sanitize(msg)
|
||||
|
||||
if(usr)
|
||||
if (usr.client)
|
||||
if(usr.client.holder)
|
||||
@@ -530,8 +534,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(equipment)
|
||||
if(charjob)
|
||||
job_master.EquipRank(new_character, charjob, 1)
|
||||
new_character.mind.assigned_role = charjob
|
||||
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
|
||||
if(new_character.mind)
|
||||
new_character.mind.assigned_role = charjob
|
||||
new_character.mind.role_alt_title = job_master.GetPlayerAltTitle(new_character, charjob)
|
||||
//equip_custom_items(new_character) //VOREStation Removal
|
||||
|
||||
//If desired, add records.
|
||||
@@ -550,10 +555,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_admin("[admin] has spawned [player_key]'s character [new_character.real_name].")
|
||||
message_admins("[admin] has spawned [player_key]'s character [new_character.real_name].", 1)
|
||||
|
||||
|
||||
|
||||
|
||||
feedback_add_details("admin_verb","RSPCH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
// Drop pods
|
||||
if(showy == "Polite")
|
||||
var/turf/T = get_turf(new_character)
|
||||
@@ -1078,7 +1083,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Drop Pod Atom"
|
||||
set desc = "Spawn a new atom/movable in a drop pod where you are."
|
||||
set category = "Fun"
|
||||
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
@@ -1099,7 +1104,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
chosen = tgui_input_list(usr, "Select a movable type:", "Spawn in Drop Pod", matches)
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
|
||||
var/podtype = tgui_alert(src,"Destructive drop pods cause damage in a 3x3 and may break turfs. Polite drop pods lightly damage the turfs but won't break through.", "Drop Pod", list("Polite", "Destructive", "Cancel"))
|
||||
if(podtype == "Cancel")
|
||||
return
|
||||
@@ -1120,14 +1125,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Drop Pod Deploy"
|
||||
set desc = "Drop an existing mob where you are in a drop pod."
|
||||
set category = "Fun"
|
||||
|
||||
|
||||
if(!check_rights(R_SPAWN))
|
||||
return
|
||||
|
||||
var/mob/living/L = tgui_input_list(usr, "Select the mob to drop:", "Mob Picker", living_mob_list)
|
||||
if(!L)
|
||||
return
|
||||
|
||||
|
||||
var/podtype = tgui_alert(src,"Destructive drop pods cause damage in a 3x3 and may break turfs. Polite drop pods lightly damage the turfs but won't break through.", "Drop Pod", list("Polite", "Destructive", "Cancel"))
|
||||
if(podtype == "Cancel")
|
||||
return
|
||||
|
||||
@@ -146,6 +146,7 @@ var/redspace_abduction_z
|
||||
redspace_abduction_z = -1
|
||||
to_chat(user,"<span class='warning'>This is the first use of the verb this shift, it will take a minute to configure the abduction z-level. It will be z[world.maxz+1].</span>")
|
||||
var/z = ++world.maxz
|
||||
world.max_z_changed()
|
||||
for(var/x = 1 to world.maxx)
|
||||
for(var/y = 1 to world.maxy)
|
||||
var/turf/T = locate(x,y,z)
|
||||
@@ -232,7 +233,7 @@ var/redspace_abduction_z
|
||||
|
||||
to_chat(target, "<span class='notice' style='font: small-caps bold large monospace!important'>Autosaving your progress, please wait...</span>")
|
||||
target << 'sound/effects/ding.ogg'
|
||||
|
||||
|
||||
var/static/list/bad_tips = list(
|
||||
"Did you know that black shoes protect you from electrocution while hacking?",
|
||||
"Did you know that airlocks always have a wire that disables ID checks?",
|
||||
|
||||
Reference in New Issue
Block a user