From 34ac758a25628324b2f41323830fb1a02426623a Mon Sep 17 00:00:00 2001 From: NullFag Date: Fri, 19 Jul 2024 03:03:03 +0200 Subject: [PATCH 1/7] skibidi bop bop bop yes yes --- .vscode/settings.json | 5 +- code/__DEFINES/~splurt_defines/intents.dm | 5 ++ code/__DEFINES/~splurt_defines/keybinding.dm | 4 ++ code/__HELPERS/~splurt_helpers/mob.dm | 10 ++++ code/_onclick/click_ctrl.dm | 3 ++ code/modules/mob/living/living.dm | 15 ++++++ .../code/datums/keybinding/human.dm | 46 +++++++++++++++++++ modular_zzplurt/code/modules/client/click.dm | 20 ++++++++ modular_zzplurt/code/modules/hud/_hud.dm | 8 ++++ .../code/modules/hud/screen_objects.dm | 26 +++++++++++ .../code/modules/intents/keybindings.dm | 26 +++++++++++ tgstation.dme | 8 ++++ 12 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 code/__DEFINES/~splurt_defines/intents.dm create mode 100644 code/__DEFINES/~splurt_defines/keybinding.dm create mode 100644 code/__HELPERS/~splurt_helpers/mob.dm create mode 100644 modular_zzplurt/code/datums/keybinding/human.dm create mode 100644 modular_zzplurt/code/modules/client/click.dm create mode 100644 modular_zzplurt/code/modules/hud/_hud.dm create mode 100644 modular_zzplurt/code/modules/hud/screen_objects.dm create mode 100644 modular_zzplurt/code/modules/intents/keybindings.dm diff --git a/.vscode/settings.json b/.vscode/settings.json index 0ef2ce67760b5..967fbbd69c67e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -46,5 +46,8 @@ "workbench.editorAssociations": { "*.dmi": "dmiEditor.dmiEditor" }, - "Lua.diagnostics.enable": false + "Lua.diagnostics.enable": false, + "dreammaker.byondPath": [ + "C:/Program Files (x86)/BYOND_NEW" + ] } diff --git a/code/__DEFINES/~splurt_defines/intents.dm b/code/__DEFINES/~splurt_defines/intents.dm new file mode 100644 index 0000000000000..881d4dbfd04ce --- /dev/null +++ b/code/__DEFINES/~splurt_defines/intents.dm @@ -0,0 +1,5 @@ +//INTENT VOODOO SHIT, ABANDON ALL HOPE YE WHO ENTER. +#define INTENT_HELP 0 +#define INTENT_DISARM null +#define INTENT_GRAB "" +#define INTENT_HARM TRUE diff --git a/code/__DEFINES/~splurt_defines/keybinding.dm b/code/__DEFINES/~splurt_defines/keybinding.dm new file mode 100644 index 0000000000000..c1ba3d07f388e --- /dev/null +++ b/code/__DEFINES/~splurt_defines/keybinding.dm @@ -0,0 +1,4 @@ +#define COMSIG_KB_HUMAN_SET_INTENT_HELP_DOWN "keybinding_human_set_intent_help_down" +#define COMSIG_KB_HUMAN_SET_INTENT_DISARM_DOWN "keybinding_human_set_intent_disarm_down" +#define COMSIG_KB_HUMAN_SET_INTENT_GRAB_DOWN "keybinding_human_set_intent_grab_down" +#define COMSIG_KB_HUMAN_SET_INTENT_HARM_DOWN "keybinding_human_set_intent_harm_down" diff --git a/code/__HELPERS/~splurt_helpers/mob.dm b/code/__HELPERS/~splurt_helpers/mob.dm new file mode 100644 index 0000000000000..5c4e5141b4ff0 --- /dev/null +++ b/code/__HELPERS/~splurt_helpers/mob.dm @@ -0,0 +1,10 @@ +/proc/resolve_intent_name(intent) + switch(intent) + if(INTENT_HELP) + return "help" + if(INTENT_DISARM) + return "disarm" + if(INTENT_GRAB) + return "grab" + if(INTENT_HARM) + return "harm" diff --git a/code/_onclick/click_ctrl.dm b/code/_onclick/click_ctrl.dm index ebb22b9eafd11..cac1e210c48bb 100644 --- a/code/_onclick/click_ctrl.dm +++ b/code/_onclick/click_ctrl.dm @@ -35,6 +35,9 @@ . = ..() if(. || world.time < next_move || !can_perform_action(target, NOT_INSIDE_TARGET | SILENT_ADJACENCY | ALLOW_RESTING | FORBID_TELEKINESIS_REACH)) + message_admins(world.time) + message_admins(next_move) + message_admins(world.time < next_move ? "TRUE" : "FALSE") return . = TRUE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 89d34c3402489..8bb88b7786e6b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -173,7 +173,12 @@ if(isliving(M)) var/mob/living/L = M + //SPLURT EDIT START + /* their_combat_mode = L.combat_mode + */ + their_combat_mode = L.combat_mode != INTENT_HELP + //SKYRAT EDIT END they_can_move = L.mobility_flags & MOBILITY_MOVE //Also spread diseases for(var/thing in diseases) @@ -232,7 +237,12 @@ else if( !(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP)) &&\ ((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || !their_combat_mode) &&\ + //SPLURT EDIT START + /* (HAS_TRAIT(src, TRAIT_RESTRAINED) || !combat_mode) + */ + (HAS_TRAIT(src, TRAIT_RESTRAINED) || combat_mode == INTENT_HELP) + //SPLURT EDIT END ) mob_swap = TRUE if(mob_swap) @@ -275,7 +285,12 @@ //If they're a human, and they're not in help intent, block pushing if(ishuman(M)) var/mob/living/carbon/human/human = M + //SPLURT EDIT START + /* if(human.combat_mode) + */ + if(human.combat_mode != INTENT_HELP) + //SPLURT EDIT END return TRUE //if they are a cyborg, and they're alive and in combat mode, block pushing if(iscyborg(M)) diff --git a/modular_zzplurt/code/datums/keybinding/human.dm b/modular_zzplurt/code/datums/keybinding/human.dm new file mode 100644 index 0000000000000..092c37ca12775 --- /dev/null +++ b/modular_zzplurt/code/datums/keybinding/human.dm @@ -0,0 +1,46 @@ +/datum/keybinding/human/set_intent + var/set_intent = NONE + +/datum/keybinding/human/set_intent/down(client/user) + . = ..() + if(.) + return + + var/mob/living/carbon/human/human = user.mob + human.set_combat_mode(set_intent, silent = TRUE) + return TRUE + +/datum/keybinding/human/set_intent/help + name = "set_intent_help" + full_name = "Set intent to Help" + hotkey_keys = list("1") + keybind_signal = COMSIG_KB_HUMAN_SET_INTENT_HELP_DOWN + set_intent = INTENT_HELP + +/datum/keybinding/human/set_intent/disarm + name = "set_intent_disarm" + full_name = "Set intent to Disarm" + hotkey_keys = list("2") + keybind_signal = COMSIG_KB_HUMAN_SET_INTENT_DISARM_DOWN + set_intent = INTENT_DISARM + +/datum/keybinding/human/set_intent/grab + name = "set_intent_grab" + full_name = "Set intent to Grab" + hotkey_keys = list("3") + keybind_signal = COMSIG_KB_HUMAN_SET_INTENT_GRAB_DOWN + set_intent = INTENT_GRAB + +/datum/keybinding/human/set_intent/harm + name = "set_intent_harm" + full_name = "Set intent to Harm" + hotkey_keys = list("4") + keybind_signal = COMSIG_KB_HUMAN_SET_INTENT_HARM_DOWN + set_intent = INTENT_HARM + + +/datum/keybinding/living/disable_combat_mode/can_use(client/user) + return ..() && !ishuman(user.mob) + +/datum/keybinding/living/enable_combat_mode/can_use(client/user) + return ..() && !ishuman(user.mob) diff --git a/modular_zzplurt/code/modules/client/click.dm b/modular_zzplurt/code/modules/client/click.dm new file mode 100644 index 0000000000000..c5fb2a965faea --- /dev/null +++ b/modular_zzplurt/code/modules/client/click.dm @@ -0,0 +1,20 @@ +/mob/living/carbon/human + var/_last_next_move = 0 + +/mob/living/carbon/human/ClickOn(atom/A, params) + if(world.time <= next_click) + return + _last_next_move = next_move + return ..() + +/mob/living/carbon/human/UnarmedAttack(atom/attack_target, proximity_flag, list/modifiers) + if(isliving(attack_target)) + switch(combat_mode) + if(INTENT_DISARM) + modifiers -= LEFT_CLICK + modifiers[RIGHT_CLICK] = TRUE + if(INTENT_GRAB) + next_move = _last_next_move + CtrlClickOn(attack_target) + return + return ..() diff --git a/modular_zzplurt/code/modules/hud/_hud.dm b/modular_zzplurt/code/modules/hud/_hud.dm new file mode 100644 index 0000000000000..8d8cd6c86278f --- /dev/null +++ b/modular_zzplurt/code/modules/hud/_hud.dm @@ -0,0 +1,8 @@ +/datum/hud/human/New(mob/living/carbon/human/owner) + . = ..() + var/index = static_inventory.Find(action_intent) + static_inventory[index] = null + qdel(action_intent) + + action_intent = new /atom/movable/screen/intent_toggle(null, src) + static_inventory[index] = action_intent diff --git a/modular_zzplurt/code/modules/hud/screen_objects.dm b/modular_zzplurt/code/modules/hud/screen_objects.dm new file mode 100644 index 0000000000000..f6fff0f273162 --- /dev/null +++ b/modular_zzplurt/code/modules/hud/screen_objects.dm @@ -0,0 +1,26 @@ +/atom/movable/screen/intent_toggle + name = "intent" + icon_state = "help" + screen_loc = ui_acti + +/atom/movable/screen/intent_toggle/update_icon_state() + . = ..() + var/mob/living/owner = hud?.mymob + if(owner) + icon_state = resolve_intent_name(owner.combat_mode) + +/atom/movable/screen/intent_toggle/Click(location, control, params) + var/list/modifiers = params2list(params) + var/_x = text2num(modifiers["icon-x"]) + var/_y = text2num(modifiers["icon-y"]) + var/mob/living/target_mob = usr + + if(_x <= 16) + if(_y <= 16) + target_mob.set_combat_mode(INTENT_HARM, silent = TRUE) + else + target_mob.set_combat_mode(INTENT_HELP, silent = TRUE) + else if(_y <= 16) + target_mob.set_combat_mode(INTENT_GRAB, silent = TRUE) + else + target_mob.set_combat_mode(INTENT_DISARM, silent = TRUE) diff --git a/modular_zzplurt/code/modules/intents/keybindings.dm b/modular_zzplurt/code/modules/intents/keybindings.dm new file mode 100644 index 0000000000000..96e9c342eb432 --- /dev/null +++ b/modular_zzplurt/code/modules/intents/keybindings.dm @@ -0,0 +1,26 @@ +/datum/keybinding/human/set_intent_help + name = "set_intent_help" + full_name = "Set intent to Help" + hotkey_keys = list("1") + +/datum/keybinding/human/set_intent_disarm + name = "set_intent_help" + full_name = "Set intent to Disarm" + hotkey_keys = list("2") + +/datum/keybinding/human/set_intent_grab + name = "set_intent_help" + full_name = "Set intent to Grab" + hotkey_keys = list("3") + +/datum/keybinding/human/set_intent_harm + name = "set_intent_help" + full_name = "Set intent to Harm" + hotkey_keys = list("4") + + +/datum/keybinding/living/disable_combat_mode/can_use(client/user) + return ..() && !ishuman(user.mob) + +/datum/keybinding/living/enable_combat_mode/can_use(client/user) + return ..() && !ishuman(user.mob) diff --git a/tgstation.dme b/tgstation.dme index 874f222302664..bfb38040cbdf9 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -486,6 +486,8 @@ #include "code\__DEFINES\~skyrat_defines\_HELPERS\offset_index.dm" #include "code\__DEFINES\~skyrat_defines\signals\signals_human.dm" #include "code\__DEFINES\~skyrat_defines\traits\declarations.dm" +#include "code\__DEFINES\~splurt_defines\intents.dm" +#include "code\__DEFINES\~splurt_defines\keybinding.dm" #include "code\__DEFINES\~~bubber_defines\access.dm" #include "code\__DEFINES\~~bubber_defines\cameranets.dm" #include "code\__DEFINES\~~bubber_defines\changeling_zombie.dm" @@ -624,6 +626,7 @@ #include "code\__HELPERS\~skyrat_helpers\level_traits.dm" #include "code\__HELPERS\~skyrat_helpers\logging.dm" #include "code\__HELPERS\~skyrat_helpers\unsorted.dm" +#include "code\__HELPERS\~splurt_helpers\mob.dm" #include "code\_globalvars\_regexes.dm" #include "code\_globalvars\admin.dm" #include "code\_globalvars\arcade.dm" @@ -9106,17 +9109,22 @@ #include "modular_zzplurt\code\controllers\configuration\entries\discord.dm" #include "modular_zzplurt\code\controllers\subsystem\discord.dm" #include "modular_zzplurt\code\datums\components\crafting\crafting.dm" +#include "modular_zzplurt\code\datums\keybinding\human.dm" #include "modular_zzplurt\code\game\objects\items\devices\transfer_valve.dm" #include "modular_zzplurt\code\modules\admin\player_panel.dm" #include "modular_zzplurt\code\modules\admin\playtimes.dm" #include "modular_zzplurt\code\modules\admin\transform.dm" #include "modular_zzplurt\code\modules\atmospherics\machinery\portable\canister.dm" +#include "modular_zzplurt\code\modules\client\click.dm" #include "modular_zzplurt\code\modules\client\client_procs.dm" #include "modular_zzplurt\code\modules\client\preferences\player_panel.dm" #include "modular_zzplurt\code\modules\client\verbs\looc.dm" #include "modular_zzplurt\code\modules\client\verbs\ooc.dm" #include "modular_zzplurt\code\modules\discord\tgs_commands.dm" #include "modular_zzplurt\code\modules\discord\verbs.dm" +#include "modular_zzplurt\code\modules\hud\_hud.dm" +#include "modular_zzplurt\code\modules\hud\screen_objects.dm" +#include "modular_zzplurt\code\modules\intents\keybindings.dm" #include "modular_zzplurt\code\modules\mob\mob.dm" #include "modular_zzplurt\code\modules\mob\mob_defines.dm" #include "modular_zzplurt\code\modules\mob\dead\new_player\new_player.dm" From d8c500d69baa8abf5f95ec1f404ec956b194a3f2 Mon Sep 17 00:00:00 2001 From: NullFag Date: Fri, 19 Jul 2024 16:57:16 +0200 Subject: [PATCH 2/7] fuck go back --- .vscode/settings.json | 5 +---- code/_onclick/click_ctrl.dm | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 967fbbd69c67e..0ef2ce67760b5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -46,8 +46,5 @@ "workbench.editorAssociations": { "*.dmi": "dmiEditor.dmiEditor" }, - "Lua.diagnostics.enable": false, - "dreammaker.byondPath": [ - "C:/Program Files (x86)/BYOND_NEW" - ] + "Lua.diagnostics.enable": false } diff --git a/code/_onclick/click_ctrl.dm b/code/_onclick/click_ctrl.dm index cac1e210c48bb..ebb22b9eafd11 100644 --- a/code/_onclick/click_ctrl.dm +++ b/code/_onclick/click_ctrl.dm @@ -35,9 +35,6 @@ . = ..() if(. || world.time < next_move || !can_perform_action(target, NOT_INSIDE_TARGET | SILENT_ADJACENCY | ALLOW_RESTING | FORBID_TELEKINESIS_REACH)) - message_admins(world.time) - message_admins(next_move) - message_admins(world.time < next_move ? "TRUE" : "FALSE") return . = TRUE From 166c37011ab18a0496b5f9d85df81db81f36efc3 Mon Sep 17 00:00:00 2001 From: NullDagaf <55005783+NullDagaf@users.noreply.github.com> Date: Fri, 19 Jul 2024 15:05:01 +0000 Subject: [PATCH 3/7] oh yeah this is splurt not skyrat --- code/modules/mob/living/living.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 8bb88b7786e6b..484ae1ac184dd 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -95,7 +95,7 @@ if(HAS_TRAIT(src, TRAIT_CATLIKE_GRACE) && (small_surface_area || usable_legs >= 2) && body_position == STANDING_UP && can_help_themselves) . |= ZIMPACT_NO_MESSAGE|ZIMPACT_NO_SPIN skip_knockdown = TRUE - if(small_surface_area || (isfelinid(src) || istajaran(src))) // SKYRAT EDIT CHANGE - ORIGINAL: if(small_surface_area) + if(small_surface_area || (isfelinid(src) || istajaran(src))) // EDIT CHANGE - ORIGINAL: if(small_surface_area) visible_message( span_notice("[src] makes a hard landing on [impacted_turf], but lands safely on [p_their()] feet!"), span_notice("You make a hard landing on [impacted_turf], but land safely on your feet!"), @@ -178,7 +178,7 @@ their_combat_mode = L.combat_mode */ their_combat_mode = L.combat_mode != INTENT_HELP - //SKYRAT EDIT END + //SPLURT EDIT END they_can_move = L.mobility_flags & MOBILITY_MOVE //Also spread diseases for(var/thing in diseases) From e8ed34cb499548ece9864b86add3d6249740ddff Mon Sep 17 00:00:00 2001 From: NullFag Date: Fri, 19 Jul 2024 17:59:27 +0200 Subject: [PATCH 4/7] why was that here --- .../code/modules/intents/keybindings.dm | 26 ------------------- tgstation.dme | 1 - 2 files changed, 27 deletions(-) delete mode 100644 modular_zzplurt/code/modules/intents/keybindings.dm diff --git a/modular_zzplurt/code/modules/intents/keybindings.dm b/modular_zzplurt/code/modules/intents/keybindings.dm deleted file mode 100644 index 96e9c342eb432..0000000000000 --- a/modular_zzplurt/code/modules/intents/keybindings.dm +++ /dev/null @@ -1,26 +0,0 @@ -/datum/keybinding/human/set_intent_help - name = "set_intent_help" - full_name = "Set intent to Help" - hotkey_keys = list("1") - -/datum/keybinding/human/set_intent_disarm - name = "set_intent_help" - full_name = "Set intent to Disarm" - hotkey_keys = list("2") - -/datum/keybinding/human/set_intent_grab - name = "set_intent_help" - full_name = "Set intent to Grab" - hotkey_keys = list("3") - -/datum/keybinding/human/set_intent_harm - name = "set_intent_help" - full_name = "Set intent to Harm" - hotkey_keys = list("4") - - -/datum/keybinding/living/disable_combat_mode/can_use(client/user) - return ..() && !ishuman(user.mob) - -/datum/keybinding/living/enable_combat_mode/can_use(client/user) - return ..() && !ishuman(user.mob) diff --git a/tgstation.dme b/tgstation.dme index bfb38040cbdf9..ee2c7ca52a929 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9124,7 +9124,6 @@ #include "modular_zzplurt\code\modules\discord\verbs.dm" #include "modular_zzplurt\code\modules\hud\_hud.dm" #include "modular_zzplurt\code\modules\hud\screen_objects.dm" -#include "modular_zzplurt\code\modules\intents\keybindings.dm" #include "modular_zzplurt\code\modules\mob\mob.dm" #include "modular_zzplurt\code\modules\mob\mob_defines.dm" #include "modular_zzplurt\code\modules\mob\dead\new_player\new_player.dm" From 6464437496e6d29ef788a7508ddac60edae8341d Mon Sep 17 00:00:00 2001 From: NullDagaf <55005783+NullDagaf@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:01:57 +0000 Subject: [PATCH 5/7] what happened heer --- code/modules/mob/living/living.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 484ae1ac184dd..3c6f77d481698 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -95,7 +95,7 @@ if(HAS_TRAIT(src, TRAIT_CATLIKE_GRACE) && (small_surface_area || usable_legs >= 2) && body_position == STANDING_UP && can_help_themselves) . |= ZIMPACT_NO_MESSAGE|ZIMPACT_NO_SPIN skip_knockdown = TRUE - if(small_surface_area || (isfelinid(src) || istajaran(src))) // EDIT CHANGE - ORIGINAL: if(small_surface_area) + if(small_surface_area || (isfelinid(src) || istajaran(src))) // SKYRAT EDIT CHANGE - ORIGINAL: if(small_surface_area) visible_message( span_notice("[src] makes a hard landing on [impacted_turf], but lands safely on [p_their()] feet!"), span_notice("You make a hard landing on [impacted_turf], but land safely on your feet!"), From c85b54069e00923f6d59ac782a8973685317f4c3 Mon Sep 17 00:00:00 2001 From: NullFag Date: Fri, 19 Jul 2024 20:27:59 +0200 Subject: [PATCH 6/7] i said sure why not --- .../{~splurt_defines => ~~~splurt_defines}/intents.dm | 0 .../{~splurt_defines => ~~~splurt_defines}/keybinding.dm | 0 tgstation.dme | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename code/__DEFINES/{~splurt_defines => ~~~splurt_defines}/intents.dm (100%) rename code/__DEFINES/{~splurt_defines => ~~~splurt_defines}/keybinding.dm (100%) diff --git a/code/__DEFINES/~splurt_defines/intents.dm b/code/__DEFINES/~~~splurt_defines/intents.dm similarity index 100% rename from code/__DEFINES/~splurt_defines/intents.dm rename to code/__DEFINES/~~~splurt_defines/intents.dm diff --git a/code/__DEFINES/~splurt_defines/keybinding.dm b/code/__DEFINES/~~~splurt_defines/keybinding.dm similarity index 100% rename from code/__DEFINES/~splurt_defines/keybinding.dm rename to code/__DEFINES/~~~splurt_defines/keybinding.dm diff --git a/tgstation.dme b/tgstation.dme index ee2c7ca52a929..c3e4c666017da 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -486,8 +486,6 @@ #include "code\__DEFINES\~skyrat_defines\_HELPERS\offset_index.dm" #include "code\__DEFINES\~skyrat_defines\signals\signals_human.dm" #include "code\__DEFINES\~skyrat_defines\traits\declarations.dm" -#include "code\__DEFINES\~splurt_defines\intents.dm" -#include "code\__DEFINES\~splurt_defines\keybinding.dm" #include "code\__DEFINES\~~bubber_defines\access.dm" #include "code\__DEFINES\~~bubber_defines\cameranets.dm" #include "code\__DEFINES\~~bubber_defines\changeling_zombie.dm" @@ -509,6 +507,8 @@ #include "code\__DEFINES\~~bubber_defines\transport.dm" #include "code\__DEFINES\~~bubber_defines\___HELPERS\global_lists.dm" #include "code\__DEFINES\~~bubber_defines\research\techweb_nodes.dm" +#include "code\__DEFINES\~~~splurt_defines\intents.dm" +#include "code\__DEFINES\~~~splurt_defines\keybinding.dm" #include "code\__HELPERS\_auxtools_api.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_planes.dm" From ec1becf9342ab4bc19fbdae64db52d27ba22af97 Mon Sep 17 00:00:00 2001 From: NullFag Date: Sun, 21 Jul 2024 00:53:57 +0200 Subject: [PATCH 7/7] cockumentation --- code/__DEFINES/~~~splurt_defines/intents.dm | 3 +++ modular_zzplurt/code/modules/client/click.dm | 1 + 2 files changed, 4 insertions(+) diff --git a/code/__DEFINES/~~~splurt_defines/intents.dm b/code/__DEFINES/~~~splurt_defines/intents.dm index 881d4dbfd04ce..19cf156b9a63d 100644 --- a/code/__DEFINES/~~~splurt_defines/intents.dm +++ b/code/__DEFINES/~~~splurt_defines/intents.dm @@ -1,5 +1,8 @@ //INTENT VOODOO SHIT, ABANDON ALL HOPE YE WHO ENTER. + +//all different flavors of "falsey" #define INTENT_HELP 0 #define INTENT_DISARM null #define INTENT_GRAB "" +//except harm which needs to be the only one that passes if(combat_mode) checks #define INTENT_HARM TRUE diff --git a/modular_zzplurt/code/modules/client/click.dm b/modular_zzplurt/code/modules/client/click.dm index c5fb2a965faea..be1a63b3d7235 100644 --- a/modular_zzplurt/code/modules/client/click.dm +++ b/modular_zzplurt/code/modules/client/click.dm @@ -14,6 +14,7 @@ modifiers -= LEFT_CLICK modifiers[RIGHT_CLICK] = TRUE if(INTENT_GRAB) + //CtrlClickOn checks for next_move.. which ClickOn has just set right before calling this. next_move = _last_next_move CtrlClickOn(attack_target) return