mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-01 21:13:07 +00:00
Force name update on new() of syndicate ID cards
Will make sure there is no null names making players unclickable as well as making syndicate cards work
This commit is contained in:
@@ -202,6 +202,26 @@
|
||||
registered_name=null
|
||||
var/registered_user=null
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/New(mob/user as mob)
|
||||
..()
|
||||
var t = reject_bad_name(input(user, "What name would you like to put on this card?\nNode: You can change this later by clicking on the ID card while it's in your hand.", "Agent card name", ishuman(user) ? user.real_name : user.name))
|
||||
if(!t)
|
||||
alert("Invalid name.")
|
||||
if(!registered_name)
|
||||
registered_name = ishuman(user) ? user.real_name : user.name
|
||||
else
|
||||
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.")
|
||||
assignment = "Assistant"
|
||||
else
|
||||
assignment = u
|
||||
name = "[registered_name]'s ID Card ([assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
registered_user = user
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(O, /obj/item/weapon/card/id))
|
||||
|
||||
Reference in New Issue
Block a user