Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamps the who verb into three verbs ready #3148

Merged
merged 22 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#define R_EVERYTHING ALL //the sum of all other rank permissions, used for +EVERYTHING

#define ADMIN_QUE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=[REF(user)]'>?</a>)"
#define ADMIN_REZ(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];revive=[REF(user)]'>HEAL</a>)"
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=[REF(user)]'>FLW</a>)"
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayeropts=[REF(user)]'>PP</a>)"
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(TRUE)];Vars=[REF(atom)]'>VV</a>)"
Expand All @@ -51,11 +52,14 @@
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];SyndicateReply=[REF(user)]'>RPLY</a>)"
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminspawncookie=[REF(user)]'>SC</a>)"
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=[REF(user)]'>SMITE</a>)"
#define ADMIN_SMITE_SMOL(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=[REF(user)]'>SMT</a>)"
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;[HrefToken(TRUE)];set_selfdestruct_code=1'>SETCODE</a>)"
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
#define ADMIN_HALFMONTY(user) "[ADMIN_QUE(user)] [ADMIN_FLW(user)] [ADMIN_REZ(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_SC(user)] [ADMIN_SMITE_SMOL(user)]"
#define ADMIN_QUARTERMONTY(user) "[ADMIN_QUE(user)] [ADMIN_FLW(user)] [ADMIN_PP(user)] [ADMIN_SC(user)]"
#define ADMIN_TPMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_JMP(user)] [ADMIN_FLW(user)]"
#define ADMIN_TPMONTY(user) "[key_name_admin(user)] [ADMIN_TPMONTY_NONAME(user)]"
#define ADMIN_JMP(src) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
Expand Down
8 changes: 7 additions & 1 deletion code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@
/// Changelog entries
#define PMC_OOC_NOTES_UPDATE "update_ur_ooc" // Player Master Changelog
#define PMC_QUIRK_OVERHAUL_2K23 "updated_ur_quirks" // Player Master Changelog
#define PMC_DAN_MESSED_UP_WHO_STUFF "whoops" // Player Master Changelog
#define PMC_PORNHUD_WHITELIST_RELOCATION "ur_nads_are_here_now" // Player Master Changelog

/// The master Preferences Changelog to check the player's prefs against.
/// includes a list of actions that need to be taken to update the player's prefs.
#define PREFERENCES_MASTER_CHANGELOG list(PMC_OOC_NOTES_UPDATE, PMC_QUIRK_OVERHAUL_2K23)
#define PREFERENCES_MASTER_CHANGELOG list(\
PMC_OOC_NOTES_UPDATE, \
PMC_QUIRK_OVERHAUL_2K23,\
PMC_DAN_MESSED_UP_WHO_STUFF,\
)
2 changes: 2 additions & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,12 @@
#define span_linkOff(str) ("<span class='linkOff'>" + str + "</span>")
#define span_linkOn(str) ("<span class='linkOn'>" + str + "</span>")
#define span_looc(str) ("<span class='looc'>" + str + "</span>")
#define span_rlooc(str) ("<span class='brass'><b>" + str + "</b></span>")
#define span_love(str) ("<span class='love'>" + str + "</span>")

#define span_medal(str) ("<span class='medal'>" + str + "</span>")
#define span_medradio(str) ("<span class='medradio'>" + str + "</span>")
#define span_message(str) ("<span class='message'>" + str + "</span>")
#define span_memo(str) ("<span class='memo'>" + str + "</span>")
#define span_memoedit(str) ("<span class='memoedit'>" + str + "</span>")
#define span_mind_control(str) ("<span class='mind_control'>" + str + "</span>")
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
#define INIT_ORDER_ATOMS 30
#define INIT_ORDER_ITEMSPAWNERS 29
#define INIT_ORDER_VALIDBALL 28
#define INIT_ORDER_WHO 27
#define INIT_ORDER_LANGUAGE 25
#define INIT_ORDER_PLANTS 21
#define INIT_ORDER_MACHINES 20
Expand Down
17 changes: 17 additions & 0 deletions code/__DEFINES/voreconstants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,20 @@ GLOBAL_LIST_INIT(prey_release_sounds, list(
"Burp 15" = 'modular_splurt/sound/voice/burps/belch15.ogg', */
"None" = null
))

/// aight so you get to sit here under all the nonexistant burps and farts and think about what you did
#define WHO_SHOWS_ME (1<<0)
#define WHO_SHOWS_WHERE (1<<1)
#define WHO_SHOWS_COORDS (1<<2)
#define WHO_SHOWS_NAME (1<<3)
#define WHO_SHOWS_ROLE (1<<4)
#define WHO_SHOWS_POSE (1<<5)

#define DEFAULT_WHO_FLAGS (WHO_SHOWS_ME | WHO_SHOWS_NAME | WHO_SHOWS_POSE | WHO_SHOWS_WHERE)

#define WHO_LOCKOUT_NAME (1<<0)
#define WHO_LOCKOUT_ROLE (1<<1)
#define WHO_LOCKOUT_WHERE (1<<2)
#define WHO_LOCKOUT_POSE (1<<3)

#define MAX_STATUS_LEN 86
15 changes: 15 additions & 0 deletions code/__DEFINES/weather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
Z_LEVEL_REDLICK,\
Z_LEVEL_GARLAND)

GLOBAL_LIST_INIT(z2name, list(
"[Z_LEVEL_CENTCOM]" = "CentCom",
"[Z_LEVEL_DUNGEON]" = "Dungeon",
"[Z_LEVEL_NASH_UNDERGROUND]" = "Nash Underground",
"[Z_LEVEL_NASH_COMMON]" = "Nash Common",
"[Z_LEVEL_NASH_LVL2]" = "Nash Lvl 2",
"[Z_LEVEL_NASH_LVL3]" = "Nash Lvl 3",
"[Z_LEVEL_REDWATER]" = "Redwater",
"[Z_LEVEL_REDLICK]" = "Redlick",
"[Z_LEVEL_GARLAND]" = "Garland",
"[Z_LEVEL_REDLICK_UPPER]" = "Redlick Upper",
"[Z_LEVEL_TRANSIT]" = "Transit",
"[Z_LEVEL_VR]" = "VR"
))

/* * * * * * * * * * * * *
* THE Z LEVELS~
* 3 = NASH UNDERGROUND
Expand Down
8 changes: 6 additions & 2 deletions code/__HELPERS/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/eng

/// Things that count as airtight for the purposes of blueprinting
/// Cus some things block sight but arent airtight
GLOBAL_LIST_INIT(room_sealers, typecacheof(
GLOBAL_LIST_INIT(room_sealers, typecacheof(list(
/obj/structure/window,
/obj/machinery/door,
/obj/structure/simple_door,
))
/obj/structure/fence,
/obj/structure/handrail,
/obj/structure/barricade,
/obj/structure/railing,
)))

// Gets an atmos isolated contained space
// Tries to find a room within a given space, considering opaque/dense turfs and certain objects as walls
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
var/name = input(user, message, title, default) as text|null
if(isnull(name))
return
if(!check_rights_for(user?.client, R_ADMIN) || i_will_sanitize_dont_worry) // only *we* get to make malicious shit~
if(!check_rights(R_ADMIN, FALSE) || i_will_sanitize_dont_worry) // only *we* get to make malicious shit~
name = strip_html_simple(name, max_length) // you throw the <html link that goatsies everyone>
if(no_trim)
return copytext(html_encode(name), 1, max_length)
Expand All @@ -110,7 +110,7 @@
var/name = input(user, message, title, default) as message|null
if(isnull(name)) // Return null if canceled.
return null
if(!check_rights_for(user?.client, R_ADMIN) || i_will_sanitize_dont_worry)
if(!check_rights(R_ADMIN, FALSE) || i_will_sanitize_dont_worry)
name = strip_html_simple(name, max_length) // Oh cool the description is literally tubgirl
if(no_trim)
return copytext(html_encode(name), 1, max_length)
Expand Down
17 changes: 16 additions & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
return LAZYACCESS(first_last, 1)
return rname

/proc/ckey2mob(ckey)
/proc/ckey2mob(ckey) // I know its already a proc up in this document, mine's better
var/client/clint = LAZYACCESS(GLOB.directory, ckey)
if(!clint)
return null
Expand All @@ -1730,6 +1730,21 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
return clont.prefs
CRASH("extract_prefs() was given something that wasn't a client, mob, or ckey. I mean seriously this is about as forgiving as it gets!")

/// Takes in a mob, client, or even prefs, and returns their ckey
/proc/extract_ckey(something) // one way or another, im getting your ckey (to break)
if(istext(something))
return something
if(isclient(something))
var/client/clint = something
return clint.ckey
if(istype(something, /datum/preferences)) // prefs? good, i'll take it
var/datum/preferences/P = something
return P.parent.ckey
if(ismob(something))
var/mob/mobby = something
return mobby.ckey
CRASH("extract_prefs() was given something that wasn't a client, mob, or ckey. I mean seriously this is about as forgiving as it gets!")

/// Makes a gaussian distribution, returning a positive integer
/proc/GaussianReacharound(mean, stddev, min, max)
var/cool_input = gaussian(mean, stddev)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GLOBAL_LIST_EMPTY(bunker_passthrough)
//This is for procs to replace all the goddamn 'in world's that are chilling around the code

GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**.
GLOBAL_LIST_EMPTY(has_played_list) //all mobs **who ever had clients**.
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob
GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
Expand Down
Loading