Var menu has a dropdown for granting martial arts. (#39049)

I was making a ninjutsu martial art, and I got really pissed that I have to
make specific snowflake items whenever I want to test a martial art, so I coded
a quick fix for that in the dropdown. Then, I realized that admins have to find
these same dumb snowflake art granters and so I decided to quickly make a new
branch and pr this.

Why: Way better way of doing martial art TC trades, hopefully saves some time
for our admins. Maybe helpful in setting up events.
This commit is contained in:
tralezab
2018-07-11 18:53:37 -07:00
committed by Tad Hardesty
parent dae25ac160
commit 7ca74a8436
2 changed files with 28 additions and 0 deletions
+27
View File
@@ -998,6 +998,33 @@
manipulate_organs(C)
href_list["datumrefresh"] = href_list["editorgans"]
else if(href_list["givemartialart"])
if(!check_rights(NONE))
return
var/mob/living/carbon/C = locate(href_list["givemartialart"]) in GLOB.carbon_list
if(!istype(C))
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
var/list/artpaths = subtypesof(/datum/martial_art)
var/list/artnames = list()
for(var/i in artpaths)
var/datum/martial_art/M = i
artnames[initial(M.name)] = M
var/result = input(usr, "Choose the martial art to teach","JUDO CHOP") as null|anything in artnames
if(!usr)
return
if(QDELETED(C))
to_chat(usr, "Mob doesn't exist anymore")
return
if(result)
var/chosenart = artnames[result]
var/datum/martial_art/MA = new chosenart
MA.teach(C)
else if(href_list["givetrauma"])
if(!check_rights(NONE))
return
+1
View File
@@ -864,6 +864,7 @@
.["Modify bodypart"] = "?_src_=vars;[HrefToken()];editbodypart=[REF(src)]"
.["Modify organs"] = "?_src_=vars;[HrefToken()];editorgans=[REF(src)]"
.["Hallucinate"] = "?_src_=vars;[HrefToken()];hallucinate=[REF(src)]"
.["Give martial arts"] = "?_src_=vars;[HrefToken()];givemartialart=[REF(src)]"
.["Give brain trauma"] = "?_src_=vars;[HrefToken()];givetrauma=[REF(src)]"
.["Cure brain traumas"] = "?_src_=vars;[HrefToken()];curetraumas=[REF(src)]"