Merge pull request #11712 from Markolie/lazy

Custom outfit manager and spawn with outfit on transform/reincarnate
This commit is contained in:
variableundefined
2019-08-24 12:27:48 -04:00
committed by GitHub
17 changed files with 743 additions and 143 deletions
+43 -8
View File
@@ -341,9 +341,6 @@
if("Cancel") return
if("Yes") delmob = 1
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
message_admins("<span class='notice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</span>", 1)
switch(href_list["simplemake"])
if("observer") M.change_mob_type( /mob/dead/observer , null, null, delmob, 1 )
if("drone") M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob, 1 )
@@ -351,7 +348,11 @@
if("queen") M.change_mob_type( /mob/living/carbon/alien/humanoid/queen/large , null, null, delmob, 1 )
if("sentinel") M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob, 1 )
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob, 1 )
if("human") M.change_mob_type( /mob/living/carbon/human, null, null, delmob, 1 )
if("human")
var/posttransformoutfit = usr.client.robust_dress_shop()
var/mob/living/carbon/human/newmob = M.change_mob_type(/mob/living/carbon/human, null, null, delmob, 1)
if(posttransformoutfit && istype(newmob))
newmob.equipOutfit(posttransformoutfit)
if("slime") M.change_mob_type( /mob/living/carbon/slime , null, null, delmob, 1 )
if("monkey") M.change_mob_type( /mob/living/carbon/human/monkey , null, null, delmob, 1 )
if("robot") M.change_mob_type( /mob/living/silicon/robot , null, null, delmob, 1 )
@@ -368,6 +369,9 @@
if("constructwraith") M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob, 1 )
if("shade") M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob, 1 )
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
message_admins("<span class='notice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]</span>", 1)
/////////////////////////////////////new ban stuff
else if(href_list["unbanf"])
@@ -1510,14 +1514,22 @@
usr.client.cmd_admin_animalize(M)
else if(href_list["incarn_ghost"])
if(!check_rights(R_SPAWN)) return
if(!check_rights(R_SPAWN))
return
var/mob/dead/observer/G = locateUID(href_list["incarn_ghost"])
if(!istype(G))
to_chat(usr, "This will only work on /mob/dead/observer")
log_admin("[key_name(G)] was incarnated by [key_name(src.owner)]")
message_admins("[key_name_admin(G)] was incarnated by [key_name_admin(src.owner)]")
G.incarnate_ghost()
var/posttransformoutfit = usr.client.robust_dress_shop()
var/mob/living/carbon/human/H = G.incarnate_ghost()
if(posttransformoutfit && istype(H))
H.equipOutfit(posttransformoutfit)
log_admin("[key_name(G)] was incarnated by [key_name(owner)]")
message_admins("[key_name_admin(G)] was incarnated by [key_name_admin(owner)]")
else if(href_list["togmutate"])
if(!check_rights(R_SPAWN)) return
@@ -3373,6 +3385,29 @@
message_admins("[key_name_admin(usr)] forcefully unlinked the discord account belonging to [target_ckey]")
log_admin("[key_name_admin(usr)] forcefully unlinked the discord account belonging to [target_ckey]")
else if(href_list["create_outfit_finalize"])
if(!check_rights(R_EVENT))
return
create_outfit_finalize(usr,href_list)
else if(href_list["load_outfit"])
if(!check_rights(R_EVENT))
return
load_outfit(usr)
else if(href_list["create_outfit_menu"])
if(!check_rights(R_EVENT))
return
create_outfit(usr)
else if(href_list["delete_outfit"])
if(!check_rights(R_EVENT))
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_EVENT))
return
var/datum/outfit/O = locate(href_list["chosen_outfit"]) in GLOB.custom_outfits
save_outfit(usr,O)
/client/proc/create_eventmob_for(var/mob/living/carbon/human/H, var/killthem = 0)
if(!check_rights(R_EVENT))
return