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

Donor gear is now manually claimed. #3835

Closed
Closed
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
2 changes: 0 additions & 2 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ SUBSYSTEM_DEF(ticker)
var/mob/M = J.spawn_in_player(player)
if(istype(M))
J.equip_job(M)
EquipCustomItems(M)

if(M.client)
var/client/C = M.client
Expand Down Expand Up @@ -428,7 +427,6 @@ SUBSYSTEM_DEF(ticker)
captainless = FALSE
if(player.job)
RoleAuthority.equip_role(player, RoleAuthority.roles_by_name[player.job], late_join = FALSE)
EquipCustomItems(player)
if(player.client)
var/client/C = player.client
if(C.player_data && C.player_data.playtime_loaded && length(C.player_data.playtimes) == 0)
Expand Down
15 changes: 15 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,21 @@ var/list/roundstart_mod_verbs = list(
prefs.save_preferences()
return

/client/proc/claim_donor()
set category = "OOC.Donor"
set name = "Claim Donor Gear"
if(!donator)
to_chat(usr, SPAN_WARNING("You are not a donator. How did you get this?"))
log_debug("[key_name(mob)] attempted to claim donor gear without being on the donor list.")
remove_verb(src, /client/proc/claim_donor)//Little bit of self-policing.
return FALSE
if(!ishuman(mob))
to_chat(usr, SPAN_WARNING("You need to be a living human to do this."))
return FALSE
log_game("[key_name(mob)] claimed their donor gear at [get_area_name(mob)].")//No gaming it in the field for free stuff.
mob.attack_log += text("\[[time_stamp()]\] <font color='orange'>[key_name(mob)] claimed their donor gear at [get_area_name(mob)].</font>")
EquipCustomItems(mob)
return TRUE

#define MAX_WARNS 3
#define AUTOBANTIME 10
Expand Down
2 changes: 2 additions & 0 deletions code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
if(src.ckey == line)
src.donator = 1
add_verb(src, /client/proc/set_ooc_color_self)
add_verb(src, /client/proc/claim_donor)
to_chat(src, SPAN_YAUTJABOLDBIG("If you have special donor gear, you may claim it from the OOC tab."))

//if(prefs.window_skin & TOGGLE_WINDOW_SKIN)
// set_night_skin()
Expand Down
8 changes: 5 additions & 3 deletions code/modules/customitems/item_spawning.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@
GLOBAL_LIST_FILE_LOAD(custom_items, "config/custom_items.txt")

/proc/EquipCustomItems(mob/living/carbon/human/M)
var/client/donor = M.client
remove_verb(donor, /client/proc/claim_donor)
Comment on lines +10 to +11
Copy link
Member

@harryob harryob Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no guarantee that this is being called from the verb forever, remove the verb from them inside that verb. verb verb verb verb verb

for(var/line in GLOB.custom_items)
// split & clean up
var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])

if(Entry.len < 3)
if(Entry.len < 2)
continue;

if(Entry[1] == M.ckey && Entry[2] == M.real_name)
var/list/Paths = splittext(Entry[3], ",")
if(Entry[1] == M.ckey)
var/list/Paths = splittext(Entry[2], ",")
for(var/P in Paths)
var/ok = 0 // 1 if the item was placed successfully
P = trim(P)
Expand Down
1 change: 0 additions & 1 deletion code/modules/mob/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@

var/mob/living/carbon/human/character = create_character(TRUE) //creates the human and transfers vars and mind
RoleAuthority.equip_role(character, RoleAuthority.roles_for_mode[rank], late_join = TRUE)
EquipCustomItems(character)

if(security_level > SEC_LEVEL_BLUE || EvacuationAuthority.evac_status)
to_chat(character, SPAN_HIGHDANGER("As you stagger out of hypersleep, the sleep bay blares: '[EvacuationAuthority.evac_status ? "VESSEL UNDERGOING EVACUATION PROCEDURES, SELF DEFENSE KIT PROVIDED" : "VESSEL IN HEIGHTENED ALERT STATUS, SELF DEFENSE KIT PROVIDED"]'."))
Expand Down