From c170f57ba738031fc3b1ca383d6e4d495e5b7562 Mon Sep 17 00:00:00 2001 From: meyar Date: Sat, 18 May 2013 06:48:01 -0400 Subject: [PATCH] Returns lost functionality to the traitor ID, letting a traitor re-forge their ID more than once. --- code/game/objects/items/weapons/cards_ids.dm | 23 +++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 649a4fe713c..ca138e0ba01 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -130,7 +130,7 @@ if(user.mind.special_role) usr << "\blue The card's microscanners activate as you pass it over the ID, copying its access." - +/obj/item/weapon/card/id/syndicate/var/mob/registered_user = null /obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) if(!src.registered_name) //Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak @@ -148,6 +148,27 @@ src.assignment = u src.name = "[src.registered_name]'s ID Card ([src.assignment])" user << "\blue You successfully forge the ID card." + registered_user = user + else if(registered_user == user) + switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show")) + if("Rename") + var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26) + if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm + alert("Invalid name.") + return + src.registered_name = t + + var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")),1,MAX_MESSAGE_LEN) + if(!u) + alert("Invalid assignment.") + src.registered_name = "" + return + src.assignment = u + src.name = "[src.registered_name]'s ID Card ([src.assignment])" + user << "\blue You successfully forge the ID card." + return + if("Show") + ..() else ..()