[s] Fixes altclick exploits

This commit is contained in:
ShizCalev
2018-02-11 05:08:00 -06:00
committed by CitadelStationBot
parent 7f7bea7468
commit f4685cfe01
60 changed files with 660 additions and 129 deletions
+4 -4
View File
@@ -12,11 +12,11 @@
var/rotation_flags = NONE
var/default_rotation_direction = ROTATION_CLOCKWISE
/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation)
if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE
//throw if no rotation direction is specificed ?
src.rotation_flags = rotation_flags
@@ -25,7 +25,7 @@
src.can_user_rotate = can_user_rotate
else
src.can_user_rotate = CALLBACK(src,.proc/default_can_user_rotate)
if(can_be_rotated)
src.can_be_rotated = can_be_rotated
else
@@ -89,7 +89,7 @@
after_rotation.Invoke(user,rotation_type)
/datum/component/simple_rotation/proc/default_can_user_rotate(mob/living/user, rotation_type)
if(!istype(user) || !user.Adjacent(parent) || user.incapacitated())
if(!istype(user) || !user.canUseTopic(parent, BE_CLOSE, NO_DEXTERY))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return FALSE
return TRUE