Stamp Bonanza (#9790)

This commit is contained in:
fernerr
2020-08-29 16:24:25 +02:00
committed by GitHub
parent 5d875f9bb5
commit 285d9800a0
8 changed files with 73 additions and 10 deletions
@@ -32,6 +32,7 @@
backpack_contents = list(
/obj/item/storage/box/ceti_visa = 1,
/obj/item/storage/box/tcfl_pamphlet = 1,
/obj/item/stamp/biesel = 1,
/obj/item/gun/energy/pistol = 1
)
@@ -67,6 +68,7 @@
accessory = /obj/item/clothing/accessory/sol_pin
backpack_contents = list(
/obj/item/storage/box/sol_visa = 1,
/obj/item/stamp/sol = 1,
/obj/item/device/camera = 1,
/obj/item/gun/projectile/pistol/sol = 1
)
+48 -9
View File
@@ -51,24 +51,63 @@
name = "centcomm rubber stamp"
icon_state = "stamp-cent"
/obj/item/stamp/einstein
name = "einstein engines rubber stamp"
icon_state = "stamp-einstein"
/obj/item/stamp/hephaestus
name = "hephaestus industries rubber stamp"
icon_state = "stamp-heph"
/obj/item/stamp/idris
name = "idris incorporated rubber stamp"
icon_state = "stamp-idris"
/obj/item/stamp/zavodskoi
name = "zavodskoi interstellar rubber stamp"
icon_state = "stamp-zavod"
/obj/item/stamp/zeng_hu
name = "zeng-hu pharmaceuticals rubber stamp"
icon_state = "stamp-zenghu"
/obj/item/stamp/biesel
name = "\improper Republic of Biesel rubber stamp"
icon_state = "stamp-biesel"
/obj/item/stamp/sol
name = "\improper Sol Alliance rubber stamp"
icon_state = "stamp-sol"
// Syndicate stamp to forge documents.
/obj/item/stamp/chameleon/attack_self(mob/user as mob)
var/list/stamp_types = typesof(/obj/item/stamp) - src.type - subtypesof(/obj/item/stamp/fluff)
var/list/stamp_selection = list()
var/list/stamp_types = typesof(/obj/item/stamp) - src.type // Get all stamp types except our own
var/list/stamps = list()
// Generate them into a list
for(var/stamp_type in stamp_types)
var/obj/item/stamp/S = new stamp_type
stamps[capitalize(S.name)] = S
stamp_selection[capitalize(S.name)] = S
var/list/show_stamps = list("EXIT" = null) + sortList(stamps) // the list that will be shown to the user to pick from
var/input_stamp = input(user, "Choose a stamp to disguise as.", "Choose a stamp.") in show_stamps
var/input_stamp = input("Choose a stamp to disguise as.", "Chameleon stamp.") as null|anything in sortList(stamp_selection)
if(isnull(input_stamp))
return
if(user && (src in user.contents))
var/obj/item/stamp/chosen_stamp = stamps[capitalize(input_stamp)]
var/obj/item/stamp/chosen_stamp = stamp_selection[capitalize(input_stamp)]
if(chosen_stamp)
name = chosen_stamp.name
icon_state = chosen_stamp.icon_state
/obj/item/stamp/chameleon/verb/rename()
set name = "Rename stamp"
set category = "Object"
set src in usr
var/n_name = sanitizeSafe(input(usr, "Which faction or rank would you like your stamp to represent?", "Stamp Designation", null) as text, MAX_NAME_LEN)
if(loc == usr && n_name)
//Attempts to keep the custom stamp name consistent
n_name = replacetext(n_name," rubber stamp","")
n_name = replacetext(n_name," stamp","")
n_name = replacetext(n_name,"stamp","")
name = "[n_name] rubber stamp"