mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Adds shift-middle click pointing (#7487)
* Adds shift-middle click pointing * Borgs and buckled folk can now point * Create Lorilili - pointing.yml
This commit is contained in:
@@ -51,6 +51,9 @@
|
|||||||
if(modifiers["shift"] && modifiers["ctrl"])
|
if(modifiers["shift"] && modifiers["ctrl"])
|
||||||
CtrlShiftClickOn(A)
|
CtrlShiftClickOn(A)
|
||||||
return 1
|
return 1
|
||||||
|
if(modifiers["shift"] && modifiers["middle"])
|
||||||
|
ShiftMiddleClickOn(A)
|
||||||
|
return 1
|
||||||
if(modifiers["middle"])
|
if(modifiers["middle"])
|
||||||
MiddleClickOn(A)
|
MiddleClickOn(A)
|
||||||
return 1
|
return 1
|
||||||
@@ -229,6 +232,15 @@
|
|||||||
return
|
return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Shift middle click
|
||||||
|
Used for pointing.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/mob/proc/ShiftMiddleClickOn(atom/A)
|
||||||
|
pointed(A)
|
||||||
|
return
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Shift click
|
Shift click
|
||||||
For most mobs, examine.
|
For most mobs, examine.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
/mob/living/silicon/robot/ClickOn(var/atom/A, var/params)
|
/mob/living/silicon/robot/ClickOn(var/atom/A, var/params)
|
||||||
if(!checkClickCooldown())
|
if(!checkClickCooldown())
|
||||||
return
|
return
|
||||||
|
|
||||||
setClickCooldown(1)
|
setClickCooldown(1)
|
||||||
|
|
||||||
if(client.buildmode) // comes after object.Click to allow buildmode gui objects to be clicked
|
if(client.buildmode) // comes after object.Click to allow buildmode gui objects to be clicked
|
||||||
@@ -20,6 +20,9 @@
|
|||||||
if(modifiers["shift"] && modifiers["ctrl"])
|
if(modifiers["shift"] && modifiers["ctrl"])
|
||||||
CtrlShiftClickOn(A)
|
CtrlShiftClickOn(A)
|
||||||
return
|
return
|
||||||
|
if(modifiers["shift"] && modifiers["middle"])
|
||||||
|
ShiftMiddleClickOn(A)
|
||||||
|
return
|
||||||
if(modifiers["middle"])
|
if(modifiers["middle"])
|
||||||
MiddleClickOn(A)
|
MiddleClickOn(A)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
//mob verbs are faster than object verbs. See above.
|
//mob verbs are faster than object verbs. See above.
|
||||||
/mob/living/pointed(atom/A as mob|obj|turf in view())
|
/mob/living/pointed(atom/A as mob|obj|turf in view())
|
||||||
if(src.stat || !src.canmove || src.restrained())
|
if(src.stat || src.restrained())
|
||||||
return 0
|
return 0
|
||||||
if(src.status_flags & FAKEDEATH)
|
if(src.status_flags & FAKEDEATH)
|
||||||
return 0
|
return 0
|
||||||
@@ -248,7 +248,7 @@ default behaviour is:
|
|||||||
/mob/living/Crossed(var/atom/movable/AM) // Transplanting this from /mob/living/carbon/human/Crossed()
|
/mob/living/Crossed(var/atom/movable/AM) // Transplanting this from /mob/living/carbon/human/Crossed()
|
||||||
if(AM == src || AM.is_incorporeal()) // We're not going to run over ourselves or ghosts
|
if(AM == src || AM.is_incorporeal()) // We're not going to run over ourselves or ghosts
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(AM, /mob/living/bot/mulebot))
|
if(istype(AM, /mob/living/bot/mulebot))
|
||||||
var/mob/living/bot/mulebot/MB = AM
|
var/mob/living/bot/mulebot/MB = AM
|
||||||
MB.runOver(src)
|
MB.runOver(src)
|
||||||
|
|||||||
4
html/changelogs/Lorilili - pointing.yml
Normal file
4
html/changelogs/Lorilili - pointing.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: Lorilili
|
||||||
|
delete-after: True
|
||||||
|
changes:
|
||||||
|
- rscadd: "You can now point using shift and middle mouse button."
|
||||||
Reference in New Issue
Block a user