mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Saving/loading custom outfits. (#44183)
* Saving/loading custom outfits. * Small fix and some more relevant name
This commit is contained in:
+20
-25
@@ -1689,33 +1689,28 @@
|
||||
else
|
||||
to_chat(usr, "You may only use this when the game is running.")
|
||||
|
||||
else if(href_list["create_outfit"])
|
||||
else if(href_list["create_outfit_finalize"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/datum/outfit/O = new /datum/outfit
|
||||
//swap this for js dropdowns sometime
|
||||
O.name = href_list["outfit_name"]
|
||||
O.uniform = text2path(href_list["outfit_uniform"])
|
||||
O.shoes = text2path(href_list["outfit_shoes"])
|
||||
O.gloves = text2path(href_list["outfit_gloves"])
|
||||
O.suit = text2path(href_list["outfit_suit"])
|
||||
O.head = text2path(href_list["outfit_head"])
|
||||
O.back = text2path(href_list["outfit_back"])
|
||||
O.mask = text2path(href_list["outfit_mask"])
|
||||
O.glasses = text2path(href_list["outfit_glasses"])
|
||||
O.r_hand = text2path(href_list["outfit_r_hand"])
|
||||
O.l_hand = text2path(href_list["outfit_l_hand"])
|
||||
O.suit_store = text2path(href_list["outfit_s_store"])
|
||||
O.l_pocket = text2path(href_list["outfit_l_pocket"])
|
||||
O.r_pocket = text2path(href_list["outfit_r_pocket"])
|
||||
O.id = text2path(href_list["outfit_id"])
|
||||
O.belt = text2path(href_list["outfit_belt"])
|
||||
O.ears = text2path(href_list["outfit_ears"])
|
||||
|
||||
GLOB.custom_outfits.Add(O)
|
||||
message_admins("[key_name(usr)] created \"[O.name]\" outfit!")
|
||||
|
||||
create_outfit_finalize(usr,href_list)
|
||||
else if(href_list["load_outfit"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
load_outfit(usr)
|
||||
else if(href_list["create_outfit_menu"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
create_outfit(usr)
|
||||
else if(href_list["delete_outfit"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/outfit/O = locate(href_list["chosen_outfit"]) in GLOB.custom_outfits
|
||||
delete_outfit(usr,O)
|
||||
else if(href_list["save_outfit"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/outfit/O = locate(href_list["chosen_outfit"]) in GLOB.custom_outfits
|
||||
save_outfit(usr,O)
|
||||
else if(href_list["set_selfdestruct_code"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user