mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
verb macro system (pr 1/3) (#96720)
## About The Pull Request just macro-izes all the usages of verbs in the codebase as a pre-requisite to my follow up pr that serializes all the verbs arguments so we can tgui-ify the command bar, so we can then put it on the onscreen map. this also basically does the same as #94487 so can easily be integrated into the verb queueing stuff... but does not actually do any verb queueing by itself. basically im just trying to be https://github.com/tgstation/tgstation/labels/Atomic ## Why It's Good For The Game it doesn't really do anything by itself but it does let us do more stuff ## Changelog 🆑 code: the backend to all verbs in the game has been played with, please report any issues to github /🆑 --------- Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
/client/proc/makepAI(turf/target in GLOB.mob_list)
|
||||
set category = "Admin.Fun"
|
||||
set name = "Make pAI"
|
||||
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
||||
|
||||
ADMIN_VERB(makepAI, R_FUN, "Make pAI", "Specify a location to spawn a pAI device, then specify a key to play that pAI", ADMIN_CATEGORY_FUN, turf/target in GLOB.mob_list)
|
||||
var/list/available = list()
|
||||
for(var/mob/player as anything in GLOB.player_list)
|
||||
if(player.client && player.key)
|
||||
available.Add(player)
|
||||
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sort_names(available))
|
||||
var/mob/choice = tgui_input_list(user, "Choose a player to play the pAI", "Spawn pAI", sort_names(available))
|
||||
if(isnull(choice))
|
||||
return
|
||||
|
||||
@@ -16,7 +12,7 @@
|
||||
return
|
||||
|
||||
if(!isobserver(choice))
|
||||
var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
|
||||
var/confirm = tgui_alert(user, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
var/obj/item/pai_card/card = new(target)
|
||||
@@ -26,8 +22,8 @@
|
||||
pai.real_name = pai.name
|
||||
pai.PossessByPlayer(choice.key)
|
||||
card.set_personality(pai)
|
||||
if(SSpai.candidates[key])
|
||||
SSpai.candidates -= key
|
||||
if(SSpai.candidates[user.key])
|
||||
SSpai.candidates -= user.key
|
||||
BLACKBOX_LOG_ADMIN_VERB("Make pAI")
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user