forked from Bubberstation/Bubberstation
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from SPLURT-Station/FUCKUS
[MODULAR] adds combat mode
- Loading branch information
Showing
8 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//redefines | ||
#undef ui_combat_toggle | ||
#undef ui_crafting | ||
#undef ui_building | ||
#undef ui_language_menu | ||
#undef ui_navigate_menu | ||
|
||
#define ui_combat_toggle "EAST-4:24,SOUTH:5" | ||
#define ui_crafting "EAST-5:22,SOUTH:5" | ||
#define ui_building "EAST-5:22,SOUTH:21" | ||
#define ui_language_menu "EAST-5:6,SOUTH:21" | ||
#define ui_navigate_menu "EAST-5:22,SOUTH:5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/datum/keybinding/living/combat_indicator/down(client/user) | ||
. = ..() | ||
var/mob/living/carbon/human/humie = user.mob | ||
if(. && istype(humie)) | ||
return | ||
humie.set_combat_focus(!humie.combat_focus) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
modular_zzplurt/code/modules/mob/living/carbon/human/human.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/mob/living/carbon/human | ||
/// Are we currently in combat focus? | ||
var/combat_focus = FALSE |
20 changes: 20 additions & 0 deletions
20
modular_zzplurt/code/modules/mob/living/carbon/human/human_defense.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/mob/living/carbon/human/proc/set_combat_focus(new_mode, silent = TRUE) | ||
if(combat_focus == new_mode) | ||
return | ||
|
||
. = combat_focus | ||
combat_focus = new_mode | ||
hud_used?.focus_toggle?.update_appearance() | ||
|
||
var/focus_sound = client?.prefs.read_preference(/datum/preference/toggle/sound_combatmode) | ||
if(combat_focus) | ||
face_mouse = !!client?.prefs?.read_preference(/datum/preference/toggle/face_cursor_combat_mode) | ||
set_combat_indicator(TRUE) | ||
if(focus_sound) | ||
SEND_SOUND(src, sound('sound/misc/ui_togglecombat.ogg', volume = 25)) //Sound from interbay! | ||
else | ||
face_mouse = FALSE | ||
set_combat_indicator(FALSE) | ||
if(focus_sound) | ||
SEND_SOUND(src, sound('sound/misc/ui_toggleoffcombat.ogg', volume = 25)) //Slightly modified version of the above | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters