mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Changes hardsuit activation button to a per-client toggle.
Currently toggleable between: - middle-click (default) - alt-click - control-click
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
#include "code\_onclick\item_attack.dm"
|
#include "code\_onclick\item_attack.dm"
|
||||||
#include "code\_onclick\observer.dm"
|
#include "code\_onclick\observer.dm"
|
||||||
#include "code\_onclick\other_mobs.dm"
|
#include "code\_onclick\other_mobs.dm"
|
||||||
|
#include "code\_onclick\rig.dm"
|
||||||
#include "code\_onclick\telekinesis.dm"
|
#include "code\_onclick\telekinesis.dm"
|
||||||
#include "code\_onclick\hud\_defines.dm"
|
#include "code\_onclick\hud\_defines.dm"
|
||||||
#include "code\_onclick\hud\alien_larva.dm"
|
#include "code\_onclick\hud\alien_larva.dm"
|
||||||
|
|||||||
@@ -229,17 +229,6 @@
|
|||||||
/mob/living/carbon/MiddleClickOn(var/atom/A)
|
/mob/living/carbon/MiddleClickOn(var/atom/A)
|
||||||
swap_hand()
|
swap_hand()
|
||||||
|
|
||||||
/mob/living/carbon/human/MiddleClickOn(var/atom/A)
|
|
||||||
|
|
||||||
if(back)
|
|
||||||
var/obj/item/weapon/rig/rig = back
|
|
||||||
if(istype(rig) && rig.selected_module)
|
|
||||||
if(world.time <= next_move) return
|
|
||||||
next_move = world.time + 8
|
|
||||||
rig.selected_module.engage(A)
|
|
||||||
return
|
|
||||||
|
|
||||||
swap_hand()
|
|
||||||
|
|
||||||
// In case of use break glass
|
// In case of use break glass
|
||||||
/*
|
/*
|
||||||
|
|||||||
61
code/_onclick/rig.dm
Normal file
61
code/_onclick/rig.dm
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
#define MIDDLE_CLICK 0
|
||||||
|
#define ALT_CLICK 1
|
||||||
|
#define CTRL_CLICK 2
|
||||||
|
#define MAX_HARDSUIT_CLICK_MODE 2
|
||||||
|
|
||||||
|
/client
|
||||||
|
var/hardsuit_click_mode = MIDDLE_CLICK
|
||||||
|
|
||||||
|
/client/verb/toggle_hardsuit_mode()
|
||||||
|
set name = "Toggle Hardsuit Activation Mode"
|
||||||
|
set desc = "Switch between hardsuit activation modes."
|
||||||
|
set category = "OOC"
|
||||||
|
|
||||||
|
hardsuit_click_mode++
|
||||||
|
if(hardsuit_click_mode > MAX_HARDSUIT_CLICK_MODE)
|
||||||
|
hardsuit_click_mode = 0
|
||||||
|
|
||||||
|
switch(hardsuit_click_mode)
|
||||||
|
if(MIDDLE_CLICK)
|
||||||
|
src << "Hardsuit activation mode set to middle-click."
|
||||||
|
if(ALT_CLICK)
|
||||||
|
src << "Hardsuit activation mode set to alt-click."
|
||||||
|
if(CTRL_CLICK)
|
||||||
|
src << "Hardsuit activation mode set to control-click."
|
||||||
|
else
|
||||||
|
src << "Somehow you bugged the system. Setting your hardsuit mode to middle-click."
|
||||||
|
hardsuit_click_mode = MIDDLE_CLICK
|
||||||
|
|
||||||
|
/mob/living/carbon/human/MiddleClickOn(atom/A)
|
||||||
|
if(client && client.hardsuit_click_mode == MIDDLE_CLICK)
|
||||||
|
if(HardsuitClickOn(A))
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/AltClickOn(atom/A)
|
||||||
|
if(client && client.hardsuit_click_mode == ALT_CLICK)
|
||||||
|
if(HardsuitClickOn(A))
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/CtrlClickOn(atom/A)
|
||||||
|
if(client && client.hardsuit_click_mode == CTRL_CLICK)
|
||||||
|
if(HardsuitClickOn(A))
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/HardsuitClickOn(atom/A)
|
||||||
|
if(back)
|
||||||
|
var/obj/item/weapon/rig/rig = back
|
||||||
|
if(istype(rig) && rig.selected_module)
|
||||||
|
if(world.time <= next_move) return 1
|
||||||
|
next_move = world.time + 8
|
||||||
|
rig.selected_module.engage(A)
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
#undef MIDDLE_CLICK
|
||||||
|
#undef ALT_CLICK
|
||||||
|
#undef CTRL_CLICK
|
||||||
|
#undef MAX_HARDSUIT_CLICK_MODE
|
||||||
Reference in New Issue
Block a user