mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Replaces intents with combat mode (#56601)
About The Pull Request
This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:
Disarm and Grab intents have been removed.
Harm/Help is now combat mode, toggled by F or 4 by default
The context/verb/popup menu now only works when you do shift+right-click
Right click is now disarm, both in and out of combat mode.
Grabbing is now on ctrl-click.
If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)
Minor interaction changes:
Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game
Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.
As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.
As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.
In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.
The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog
cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
This commit is contained in:
@@ -4,6 +4,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/client/parent
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/save_path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/max_save_slots = 3
|
||||
|
||||
@@ -702,6 +703,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Play Admin MIDIs:</b> <a href='?_src_=prefs;preference=hear_midis'>[(toggles & SOUND_MIDI) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play Lobby Music:</b> <a href='?_src_=prefs;preference=lobby_music'>[(toggles & SOUND_LOBBY) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play End of Round Sounds:</b> <a href='?_src_=prefs;preference=endofround_sounds'>[(toggles & SOUND_ENDOFROUND) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>Play Combat Mode Sounds:</b> <a href='?_src_=prefs;preference=combat_mode_sound'>[(toggles & SOUND_COMBATMODE) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<b>See Pull Requests:</b> <a href='?_src_=prefs;preference=pull_requests'>[(chat_toggles & CHAT_PULLR) ? "Enabled":"Disabled"]</a><br>"
|
||||
dat += "<br>"
|
||||
|
||||
@@ -1766,6 +1768,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("endofround_sounds")
|
||||
toggles ^= SOUND_ENDOFROUND
|
||||
|
||||
if("combat_mode_sound")
|
||||
toggles ^= SOUND_COMBATMODE
|
||||
|
||||
if("ghost_ears")
|
||||
chat_toggles ^= CHAT_GHOSTEARS
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 38
|
||||
#define SAVEFILE_VERSION_MAX 39
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -87,6 +87,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if (!found_block_movement)
|
||||
LAZYADD(key_bindings["Ctrl"], "block_movement")
|
||||
|
||||
if (current_version < 39)
|
||||
LAZYADD(key_bindings["F"], "toggle_combat_mode")
|
||||
LAZYADD(key_bindings["4"], "toggle_combat_mode")
|
||||
|
||||
/datum/preferences/proc/update_character(current_version, savefile/S)
|
||||
return
|
||||
|
||||
@@ -133,7 +137,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
return
|
||||
if(fexists("data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"))
|
||||
path = "data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"
|
||||
return
|
||||
path = "data/player_saves/[ckey[1]]/[ckey]/[filename]"
|
||||
save_path = "data/player_saves/combat_test/[ckey[1]]/[ckey]/[filename]"
|
||||
|
||||
/datum/preferences/proc/load_preferences()
|
||||
if(!path)
|
||||
@@ -273,7 +281,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/datum/preferences/proc/save_preferences()
|
||||
if(!path)
|
||||
return FALSE
|
||||
var/savefile/S = new /savefile(path)
|
||||
var/savefile/S = new /savefile()
|
||||
if(!S)
|
||||
return FALSE
|
||||
S.cd = "/"
|
||||
@@ -495,7 +503,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
/datum/preferences/proc/save_character()
|
||||
if(!path)
|
||||
return FALSE
|
||||
var/savefile/S = new /savefile(path)
|
||||
var/savefile/S = new /savefile(save_path)
|
||||
if(!S)
|
||||
return FALSE
|
||||
S.cd = "/character[default_slot]"
|
||||
|
||||
@@ -178,6 +178,20 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, toggleendofroundsounds)()
|
||||
/datum/verbs/menu/settings/sound/toggleendofroundsounds/Get_checked(client/C)
|
||||
return C.prefs.toggles & SOUND_ENDOFROUND
|
||||
|
||||
TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, togglecombatmodesound)()
|
||||
set name = "Hear/Silence Combat Mode Toggle Sound"
|
||||
set category = "Preferences"
|
||||
set desc = "Hear Combat Mode Toggle Sound"
|
||||
usr.client.prefs.toggles ^= SOUND_COMBATMODE
|
||||
usr.client.prefs.save_preferences()
|
||||
if(usr.client.prefs.toggles & SOUND_COMBATMODE)
|
||||
to_chat(usr, "You will now hear a sound when combat mode is turned on.")
|
||||
else
|
||||
to_chat(usr, "You will no longer hear a sound when combat mode is turned on.")
|
||||
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Toggle Combat Mode Toggle Sounds", "[usr.client.prefs.toggles & SOUND_COMBATMODE ? "Enabled" : "Disabled"]"))
|
||||
|
||||
/datum/verbs/menu/settings/sound/togglecombatmodesound/Get_checked(client/C)
|
||||
return C.prefs.toggles & SOUND_COMBATMODE
|
||||
|
||||
TOGGLE_CHECKBOX(/datum/verbs/menu/settings/sound, togglemidis)()
|
||||
set name = "Hear/Silence Midis"
|
||||
|
||||
@@ -81,17 +81,7 @@
|
||||
|
||||
var/suicide_message
|
||||
|
||||
if(a_intent == INTENT_DISARM)
|
||||
if(prob(25))
|
||||
disarm_suicide() // Snowflake suicide for a tired joke.
|
||||
return //above proc handles logging and death
|
||||
suicide_message = pick("[src] is attempting to push [p_their()] own head off [p_their()] shoulders! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is pushing [p_their()] thumbs into [p_their()] eye sockets! It looks like [p_theyre()] trying to commit suicide.")
|
||||
else if(a_intent == INTENT_GRAB)
|
||||
suicide_message = pick("[src] is attempting to pull [p_their()] own head off! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is aggressively grabbing [p_their()] own neck! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is pulling [p_their()] eyes out of their sockets! It looks like [p_theyre()] trying to commit suicide.")
|
||||
else if(a_intent == INTENT_HELP)
|
||||
if(!combat_mode)
|
||||
var/obj/item/organ/brain/userbrain = getorgan(/obj/item/organ/brain)
|
||||
if(userbrain?.damage >= 75)
|
||||
suicide_message = "[src] pulls both arms outwards in front of [p_their()] chest and pumps them behind [p_their()] back, repeats this motion in a smaller range of motion \
|
||||
|
||||
Reference in New Issue
Block a user