push
This commit is contained in:
@@ -77,6 +77,15 @@
|
||||
markstring = "[VV_MARKED_DATUM] (CURRENT: [(istype(holder) && istype(holder.marked_datum))? holder.marked_datum.type : "NULL"])"
|
||||
classes += markstring
|
||||
|
||||
var/list/tagstrings = new
|
||||
if(!(VV_TAGGED_DATUM in restricted_classes) && holder && LAZYLEN(holder.tagged_datums))
|
||||
var/i = 0
|
||||
for(var/datum/iter_tagged_datum as anything in holder.tagged_datums)
|
||||
i++
|
||||
var/new_tagstring = "[VV_TAGGED_DATUM] #[i]: [iter_tagged_datum.type])"
|
||||
tagstrings[new_tagstring] = iter_tagged_datum
|
||||
classes += new_tagstring
|
||||
|
||||
if(restricted_classes)
|
||||
classes -= restricted_classes
|
||||
|
||||
@@ -87,6 +96,11 @@
|
||||
if(holder && holder.marked_datum && .["class"] == markstring)
|
||||
.["class"] = VV_MARKED_DATUM
|
||||
|
||||
if(holder && tagstrings[.["class"]])
|
||||
var/datum/chosen_datum = tagstrings[.["class"]]
|
||||
.["value"] = chosen_datum
|
||||
.["class"] = VV_TAGGED_DATUM
|
||||
|
||||
switch(.["class"])
|
||||
if(VV_TEXT)
|
||||
.["value"] = input("Enter new text:", "Text", current_value) as null|text
|
||||
@@ -202,6 +216,11 @@
|
||||
.["class"] = null
|
||||
return
|
||||
|
||||
if(VV_TAGGED_DATUM)
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
|
||||
if(VV_PROCCALL_RETVAL)
|
||||
var/list/get_retval = list()
|
||||
callproc_blocking(get_retval)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/client/proc/tag_datum(datum/target_datum)
|
||||
if(!holder || QDELETED(target_datum))
|
||||
return
|
||||
holder.add_tagged_datum(target_datum)
|
||||
|
||||
/client/proc/toggle_tag_datum(datum/target_datum)
|
||||
if(!holder || !target_datum)
|
||||
return
|
||||
|
||||
if(LAZYFIND(holder.tagged_datums, target_datum))
|
||||
holder.remove_tagged_datum(target_datum)
|
||||
else
|
||||
holder.add_tagged_datum(target_datum)
|
||||
|
||||
/client/proc/tag_datum_mapview(datum/target_datum as mob|obj|turf|area in view(view))
|
||||
set category = "Debug"
|
||||
set name = "Tag Datum"
|
||||
tag_datum(target_datum)
|
||||
@@ -59,6 +59,8 @@
|
||||
|
||||
if(href_list[VV_HK_MARK])
|
||||
usr.client.mark_datum(target)
|
||||
if(href_list[VV_HK_TAG])
|
||||
usr.client.tag_datum(target)
|
||||
if(href_list[VV_HK_ADDCOMPONENT])
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user