mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
add VV for ID cards and card access (#29897)
* add VV for ID card access * Update code/game/objects/obj_vv.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> * hell * ID card VV * dumb * fix build * log and message admins --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
co-authored by
Contrabang
parent
860d091ee1
commit
94e7b1d007
@@ -159,6 +159,9 @@
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/item/card/id/proc/regenerate_name()
|
||||
name = "[registered_name]'s ID Card ([assignment])"
|
||||
|
||||
/obj/item/card/id/activate_self(mob/user)
|
||||
if(..())
|
||||
return
|
||||
@@ -368,7 +371,10 @@
|
||||
.["registered_name"] = registered_name
|
||||
.["assignment"] = assignment
|
||||
.["current_skin"] = icon_state
|
||||
.["current_skin_name"] = get_skin_desc(icon_state)
|
||||
.["lastlog"] = lastlog
|
||||
.["access"] = access
|
||||
.["associated_account_number"] = associated_account_number
|
||||
|
||||
/obj/item/card/id/proc/flash_card(mob/user)
|
||||
user.visible_message("[user] shows you: [bicon(src)] [name]. The assignment on the card: [assignment]",\
|
||||
@@ -878,6 +884,26 @@
|
||||
desc = "An evil-looking ID issued to members of the Syndicate."
|
||||
icon_state = "syndie"
|
||||
|
||||
/obj/item/card/id/vv_get_dropdown()
|
||||
. = ..()
|
||||
|
||||
VV_DROPDOWN_OPTION(VV_HK_MODIFY_ID_CARD, "Modify ID Card")
|
||||
|
||||
/obj/item/card/id/vv_do_topic(list/href_list)
|
||||
. = ..()
|
||||
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(href_list[VV_HK_MODIFY_ID_CARD])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[key_name_admin(usr)] is modifying the ID card [src] [ADMIN_COORDJMP(T)]")
|
||||
var/datum/ui_module/id_card_modifier/ui = new(target = src)
|
||||
ui.ui_interact(usr)
|
||||
|
||||
// Decals
|
||||
/obj/item/id_decal
|
||||
name = "identification card decal"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
else
|
||||
VV_DROPDOWN_OPTION(VV_HK_MAKENORMALSPEED, "Make normal process")
|
||||
VV_DROPDOWN_OPTION(VV_HK_MODIFYARMOR, "Modify armor values")
|
||||
VV_DROPDOWN_OPTION(VV_HK_MODIFY_ACCESS, "Modify access")
|
||||
|
||||
/obj/vv_do_topic(list/href_list)
|
||||
. = ..()
|
||||
@@ -118,3 +119,10 @@
|
||||
|
||||
log_admin("[key_name(usr)] modified the armor on [src] to: melee = [armorlist[MELEE]], bullet = [armorlist[BULLET]], laser = [armorlist[LASER]], energy = [armorlist[ENERGY]], bomb = [armorlist[BOMB]], rad = [armorlist[RAD]], fire = [armorlist[FIRE]], acid = [armorlist[ACID]], magic = [armorlist[MAGIC]]")
|
||||
message_admins("<span class='notice'>[key_name(usr)] modified the armor on [src] to: melee = [armorlist[MELEE]], bullet = [armorlist[BULLET]], laser = [armorlist[LASER]], energy = [armorlist[ENERGY]], bomb = [armorlist[BOMB]], rad = [armorlist[RAD]], fire = [armorlist[FIRE]], acid = [armorlist[ACID]], magic = [armorlist[MAGIC]]</span>")
|
||||
if(href_list[VV_HK_MODIFY_ACCESS])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
log_and_message_admins("[key_name_admin(usr)] is modifying the access of [src]")
|
||||
var/datum/ui_module/obj_access_modifier/ui = new(target = src)
|
||||
ui.ui_interact(usr)
|
||||
|
||||
Reference in New Issue
Block a user