mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
@@ -1 +0,0 @@
|
||||
#define COMSIG_KB_MOB_PIXELSHIFT "keybinding_mob_pixelshift"
|
||||
@@ -106,11 +106,6 @@
|
||||
/// A luminescence-shifted value of the last color calculated for chatmessage overlays
|
||||
var/chat_color_darkened
|
||||
|
||||
// Use SET_BASE_PIXEL(x, y) to set these in typepath definitions, it'll handle pixel_x and y for you
|
||||
///Default pixel x shifting for the atom's icon.
|
||||
var/base_pixel_x = 0
|
||||
///Default pixel y shifting for the atom's icon.
|
||||
var/base_pixel_y = 0
|
||||
///Used for changing icon states for different base sprites.
|
||||
var/base_icon_state
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
var/mob/M = user.mob
|
||||
M.westface()
|
||||
return TRUE
|
||||
/*
|
||||
|
||||
/datum/keybinding/mob/shift_north
|
||||
hotkey_keys = list("CtrlShiftW", "CtrlShiftNorth")
|
||||
name = "pixel_shift_north"
|
||||
@@ -122,7 +122,7 @@
|
||||
var/mob/M = user.mob
|
||||
M.westshift()
|
||||
return TRUE
|
||||
*/
|
||||
|
||||
/datum/keybinding/living/hold_sprint
|
||||
hotkey_keys = list()
|
||||
classic_keys = list()
|
||||
|
||||
@@ -669,7 +669,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
setDir(SOUTH)
|
||||
client.last_turn = world.time + MOB_FACE_DIRECTION_DELAY
|
||||
return TRUE
|
||||
/*
|
||||
|
||||
/mob/verb/eastshift()
|
||||
set hidden = TRUE
|
||||
if(!canface())
|
||||
@@ -701,7 +701,7 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
if(pixel_y >= -32)
|
||||
pixel_y--
|
||||
is_shifted = TRUE
|
||||
*/
|
||||
|
||||
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
var/resting = 0 //Carbon
|
||||
var/lying = 0
|
||||
var/lying_prev = 0
|
||||
|
||||
/// Whether the mob is pixel shifted or not
|
||||
var/is_shifted = FALSE
|
||||
|
||||
/// List of movement speed modifiers applying to this mob
|
||||
|
||||
@@ -45,14 +45,6 @@
|
||||
if(mob.force_moving)
|
||||
return FALSE
|
||||
|
||||
// Sandstorm Edit
|
||||
if(mob.shifting)
|
||||
mob.pixel_shift(direction)
|
||||
return FALSE
|
||||
else if(mob.is_shifted)
|
||||
mob.unpixel_shift()
|
||||
//
|
||||
|
||||
var/mob/living/L = mob //Already checked for isliving earlier
|
||||
if(L.incorporeal_move) //Move though walls
|
||||
Process_Incorpmove(direction)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
to_chat(src, span_warning("You cannot increase your layer priority any further."))
|
||||
return
|
||||
|
||||
layer = clamp(layer, MOB_LAYER_SHIFT_MIN, MOB_LAYER_SHIFT_MAX)
|
||||
layer += MOB_LAYER_SHIFT_INCREMENT
|
||||
var/layer_priority = FLOOR((layer - MOB_LAYER) * 100, 1) // Just for text feedback
|
||||
to_chat(src, span_notice("Your layer priority is now [layer_priority]."))
|
||||
@@ -32,7 +31,6 @@
|
||||
to_chat(src, span_warning("You cannot decrease your layer priority any further."))
|
||||
return
|
||||
|
||||
layer = clamp(layer, MOB_LAYER_SHIFT_MIN, MOB_LAYER_SHIFT_MAX)
|
||||
layer -= MOB_LAYER_SHIFT_INCREMENT
|
||||
var/layer_priority = FLOOR((layer - MOB_LAYER) * 100, 1) // Just for text feedback
|
||||
to_chat(src, span_notice("Your layer priority is now [layer_priority]."))
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
#define MAXIMUM_PIXEL_SHIFT 16
|
||||
#define PASSABLE_SHIFT_THRESHOLD 8
|
||||
|
||||
/mob
|
||||
/// If we are in the shifting setting.
|
||||
var/shifting = FALSE
|
||||
|
||||
/// Takes the four cardinal direction defines. Any atoms moving into this atom's tile will be allowed to from the added directions.
|
||||
var/passthroughable = NONE
|
||||
|
||||
/datum/keybinding/mob/pixel_shift
|
||||
hotkey_keys = list("B")
|
||||
name = "pixel_shift"
|
||||
full_name = "Pixel Shift"
|
||||
description = "Shift your characters offset."
|
||||
category = CATEGORY_MOVEMENT
|
||||
keybind_signal = COMSIG_KB_MOB_PIXELSHIFT
|
||||
|
||||
/datum/keybinding/mob/pixel_shift/down(client/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/mob/M = user.mob
|
||||
M.shifting = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/keybinding/mob/pixel_shift/up(client/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
var/mob/M = user.mob
|
||||
M.shifting = FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/proc/unpixel_shift()
|
||||
return
|
||||
|
||||
/mob/living/unpixel_shift()
|
||||
. = ..()
|
||||
passthroughable = NONE
|
||||
if(is_shifted)
|
||||
is_shifted = FALSE
|
||||
pixel_x = get_standard_pixel_x_offset() + base_pixel_x
|
||||
client?.pixel_x = 0
|
||||
pixel_y = get_standard_pixel_y_offset() + base_pixel_y
|
||||
client?.pixel_y = 0
|
||||
|
||||
/mob/proc/pixel_shift(direction)
|
||||
return
|
||||
|
||||
/mob/living/set_pull_offsets(mob/living/pull_target, grab_state)
|
||||
pull_target.unpixel_shift()
|
||||
return ..()
|
||||
|
||||
/mob/living/reset_pull_offsets(mob/living/pull_target, override)
|
||||
pull_target.unpixel_shift()
|
||||
return ..()
|
||||
|
||||
/mob/living/pixel_shift(direction)
|
||||
passthroughable = NONE
|
||||
// switch(direction) // diagonal pixel-shifting, rejoice
|
||||
if(CHECK_BITFIELD(direction, NORTH))
|
||||
if(pixel_y <= MAXIMUM_PIXEL_SHIFT + base_pixel_y)
|
||||
pixel_y++
|
||||
client?.pixel_y++
|
||||
is_shifted = TRUE
|
||||
if(CHECK_BITFIELD(direction, EAST))
|
||||
if(pixel_x <= MAXIMUM_PIXEL_SHIFT + base_pixel_x)
|
||||
pixel_x++
|
||||
client?.pixel_x++
|
||||
is_shifted = TRUE
|
||||
if(CHECK_BITFIELD(direction, SOUTH))
|
||||
if(pixel_y >= -MAXIMUM_PIXEL_SHIFT + base_pixel_y)
|
||||
pixel_y--
|
||||
client?.pixel_y--
|
||||
is_shifted = TRUE
|
||||
if(CHECK_BITFIELD(direction, WEST))
|
||||
if(pixel_x >= -MAXIMUM_PIXEL_SHIFT + base_pixel_x)
|
||||
pixel_x--
|
||||
client?.pixel_x--
|
||||
is_shifted = TRUE
|
||||
|
||||
// Yes, I know this sets it to true for everything if more than one is matched.
|
||||
// Movement doesn't check diagonals, and instead just checks EAST or WEST, depending on where you are for those.
|
||||
if(pixel_y > PASSABLE_SHIFT_THRESHOLD)
|
||||
passthroughable |= EAST | SOUTH | WEST
|
||||
if(pixel_x > PASSABLE_SHIFT_THRESHOLD)
|
||||
passthroughable |= NORTH | SOUTH | WEST
|
||||
if(pixel_y < -PASSABLE_SHIFT_THRESHOLD)
|
||||
passthroughable |= NORTH | EAST | WEST
|
||||
if(pixel_x < -PASSABLE_SHIFT_THRESHOLD)
|
||||
passthroughable |= NORTH | EAST | SOUTH
|
||||
|
||||
/mob/living/CanAllowThrough(atom/movable/mover, turf/target)
|
||||
// Make sure to not allow projectiles of any kind past where they normally wouldn't.
|
||||
if(!istype(mover, /obj/item/projectile) && !mover.throwing && passthroughable & mover.dir)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
#undef MAXIMUM_PIXEL_SHIFT
|
||||
#undef PASSABLE_SHIFT_THRESHOLD
|
||||
@@ -237,7 +237,6 @@
|
||||
#include "code\__HELPERS\sorts\TimSort.dm"
|
||||
#include "code\__SANDCODE\DEFINES\chat.dm"
|
||||
#include "code\__SANDCODE\DEFINES\DNA.dm"
|
||||
#include "code\__SANDCODE\DEFINES\keybindings.dm"
|
||||
#include "code\__SANDCODE\DEFINES\language.dm"
|
||||
#include "code\__SANDCODE\DEFINES\lewd.dm"
|
||||
#include "code\__SANDCODE\DEFINES\loadout.dm"
|
||||
@@ -4192,7 +4191,6 @@
|
||||
#include "modular_sand\code\modules\mob\living\simple_animal\hostile\mining_mobs\elites\legionnaire.dm"
|
||||
#include "modular_sand\code\modules\mob\living\simple_animal\hostile\mining_mobs\elites\pandora.dm"
|
||||
#include "modular_sand\code\modules\movespeed\modifiers\components.dm"
|
||||
#include "modular_sand\code\modules\pixel_shift\pixel_shift.dm"
|
||||
#include "modular_sand\code\modules\power\cell.dm"
|
||||
#include "modular_sand\code\modules\power\lightning.dm"
|
||||
#include "modular_sand\code\modules\power\port_gen.dm"
|
||||
|
||||
Reference in New Issue
Block a user