Skip to content

Commit

Permalink
yay
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 7, 2023
1 parent 6cb1a17 commit f942041
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,17 @@ 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?"))
return FALSE
if(!ishuman(mob))
to_chat(usr, SPAN_WARNING("You need to be a living human to do this."))
return FALSE
EquipCustomItems(mob)
return TRUE

#define MAX_WARNS 3
#define AUTOBANTIME 10
Expand Down
10 changes: 10 additions & 0 deletions code/modules/customitems/item_spawning.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
GLOBAL_LIST_FILE_LOAD(custom_items, "config/custom_items.txt")

/proc/EquipCustomItems(mob/living/carbon/human/M)
var/client/donor = M.client
if(!donor.donator)
return FALSE
var/wanted = alert(M, "Do you want to use your donor gear this round?\n\nNote: You may claim your donor gear at a later point.", "Use Donor Gear?", "Yes", "No")
if(wanted != "Yes")
to_chat(M, SPAN_WARNING("You have chosen not to use your donor gear this round. It may be claimed later in the OOC tab."))
add_verb(donor, /client/proc/claim_donor)
return FALSE
remove_verb(donor, /client/proc/claim_donor)
for(var/line in GLOB.custom_items)
// split & clean up
var/list/Entry = splittext(line, ":")
Expand All @@ -17,6 +26,7 @@ GLOBAL_LIST_FILE_LOAD(custom_items, "config/custom_items.txt")
continue;

if(Entry[1] == M.ckey && Entry[2] == M.real_name)

var/list/Paths = splittext(Entry[3], ",")
for(var/P in Paths)
var/ok = 0 // 1 if the item was placed successfully
Expand Down

0 comments on commit f942041

Please sign in to comment.