Merge pull request #5339 from IcyV/Chameleon-Flag

Adds an explosive chameleon-flag for traitors
This commit is contained in:
Fox McCloud
2016-08-12 18:59:31 -04:00
committed by GitHub
2 changed files with 45 additions and 0 deletions
+38
View File
@@ -156,3 +156,41 @@
name = "Nar'Sie Cultist flag"
desc = "A flag proudly boasting the logo of the cultists, sworn enemies of NT."
icon_state = "cultflag"
//Chameleon
/obj/item/flag/chameleon
name = "Chameleon flag"
desc = "A poor recreation of the official NT flag. It seems to shimmer a little."
icon_state = "ntflag"
origin_tech = "materials=3;magnets=4;syndicate=4"
var/used = 0
/obj/item/flag/chameleon/attack_self(mob/user)
if(used)
return
var/list/flag_types = typesof(/obj/item/flag) - list(src.type, /obj/item/flag)
var/list/flag = list()
for(var/flag_type in flag_types)
var/obj/item/flag/F = new flag_type
flag[capitalize(F.name)] = F
var/list/show_flag = list("EXIT" = null) + sortList(flag)
var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag
if(user && src in user.contents)
var/obj/item/flag/chosen_flag = flag[input_flag]
if(chosen_flag)
name = chosen_flag.name
icon_state = chosen_flag.icon_state
desc = chosen_flag.desc
used = 1
/obj/item/flag/chameleon/burn()
explosion(loc,1,2,4,4, flame_range = 4)
qdel(src)