mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 22:25:46 +01:00
eee8878024
* datumized spells * finished * last changes * conflict * Update code/datums/spells/alien_spells/transfer_plasma.dm * conflicts * shitty runtime fix until i get to this tomorrow * Update code/datums/spell.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spell_handler/alien_spell_handler.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/alien_spells/regurgitate.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/alien_spells/regurgitate.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/bloodcrawl.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/bloodcrawl.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/awaymissions/mission_code/ruins/wizardcrash.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/research/xenobiology/xenobiology.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/living/carbon/superheroes.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/conjure.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/ethereal_jaunt.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/emplosion.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/turf_teleport.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/dna/mutations/mutation_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/dna/mutations/mutation_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/gamemodes/miniantags/revenant/revenant_abilities.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * guess who just rework the entire malf ai actionsf ai * gc better --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
64 lines
1.6 KiB
Plaintext
64 lines
1.6 KiB
Plaintext
GLOBAL_LIST_INIT(pai_emotions, list(
|
|
"Happy" = 1,
|
|
"Cat" = 2,
|
|
"Extremely Happy" = 3,
|
|
"Face" = 4,
|
|
"Laugh" = 5,
|
|
"Off" = 6,
|
|
"Sad" = 7,
|
|
"Angry" = 8,
|
|
"What" = 9
|
|
))
|
|
|
|
GLOBAL_LIST_EMPTY(pai_software_by_key)
|
|
|
|
/datum/spell/access_software_pai
|
|
name = "Software interface"
|
|
desc = "Allows you to access your downloaded software."
|
|
clothes_req = FALSE
|
|
base_cooldown = 1 SECONDS
|
|
action_icon_state = "choose_module"
|
|
action_background_icon_state = "bg_tech_blue"
|
|
|
|
/datum/spell/access_software_pai/create_new_targeting()
|
|
return new /datum/spell_targeting/self
|
|
|
|
/datum/spell/access_software_pai/cast(list/targets, mob/living/user = usr)
|
|
var/mob/living/silicon/pai/pai_user = user
|
|
|
|
pai_user.ui_interact(pai_user)
|
|
|
|
/mob/living/silicon/pai/ui_state(mob/user)
|
|
return GLOB.self_state
|
|
|
|
/mob/living/silicon/pai/ui_interact(mob/user, datum/tgui/ui = null)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "PAI", name)
|
|
ui.open()
|
|
|
|
/mob/living/silicon/pai/ui_data(mob/user)
|
|
var/list/data = list()
|
|
data["app_template"] = active_software.template_file
|
|
data["app_icon"] = active_software.ui_icon
|
|
data["app_title"] = active_software.name
|
|
data["app_data"] = active_software.get_app_data(src)
|
|
|
|
return data
|
|
|
|
// Yes the stupid amount of args here is important, so we can proxy stuff to child UIs
|
|
/mob/living/silicon/pai/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
if(..())
|
|
return
|
|
|
|
. = TRUE
|
|
|
|
switch(action)
|
|
// This call is global to all templates, hence the prefix
|
|
if("MASTER_back")
|
|
active_software = installed_software["mainmenu"]
|
|
// Bail early
|
|
return
|
|
else
|
|
active_software.ui_act(action, params, ui, state)
|