Skip to content

Commit

Permalink
fix-shade
Browse files Browse the repository at this point in the history
  • Loading branch information
Udokun committed Nov 11, 2024
1 parent 5d71002 commit 88ff48b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/buckling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
to_chat(user, "<span class='warning'>You can't buckle [M] while doing something.</span>")
return FALSE

if(isconstruct(M))
if(isconstruct(M) || isshade(M))
to_chat(user, "<span class='warning'>The [M] is floating in the air and can't be buckled.</span>")
return FALSE

Expand Down
73 changes: 37 additions & 36 deletions code/modules/mob/living/simple_animal/shade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "Shade"
real_name = "Shade"
desc = "Связанный дух."
density = FALSE
icon = 'icons/mob/mob.dmi'
icon_state = "shade"
icon_living = "shade"
Expand Down Expand Up @@ -31,6 +32,42 @@
has_head = TRUE
has_arm = TRUE

/mob/living/simple_animal/shade/Move(atom/NewLoc, direct)
. = TRUE

var/oldLoc = loc

set_dir(direct)
if(NewLoc)
if (SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, NewLoc, direct) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
return

forceMove(NewLoc)
return

forceMove(get_turf(src)) //Get out of closets and such as a ghostly being.
var/new_x = x
var/new_y = y
if((direct & NORTH) && y < world.maxy)
new_y++
else if((direct & SOUTH) && y > 1)
new_y--
if((direct & EAST) && x < world.maxx)
new_x++
else if((direct & WEST) && x > 1)
new_x--

if (SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, locate(new_x, new_y, z), direct) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
return

x = new_x
y = new_y

Moved(oldLoc, 0)

/mob/living/simple_animal/shade/Process_Spacemove(movement_dir = 0)
return TRUE

/mob/living/simple_animal/shade/Life()
..()
if(stat == DEAD)
Expand Down Expand Up @@ -144,42 +181,6 @@
/mob/living/simple_animal/shade/god/CanPass(atom/movable/mover, turf/target, height=0)
return TRUE

/mob/living/simple_animal/shade/god/Move(atom/NewLoc, direct)
. = TRUE

var/oldLoc = loc

set_dir(direct)
if(NewLoc)
if (SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, NewLoc, direct) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
return

forceMove(NewLoc)
return

forceMove(get_turf(src)) //Get out of closets and such as a ghostly being.
var/new_x = x
var/new_y = y
if((direct & NORTH) && y < world.maxy)
new_y++
else if((direct & SOUTH) && y > 1)
new_y--
if((direct & EAST) && x < world.maxx)
new_x++
else if((direct & WEST) && x > 1)
new_x--

if (SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, locate(new_x, new_y, z), direct) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
return

x = new_x
y = new_y

Moved(oldLoc, 0)

/mob/living/simple_animal/shade/god/Process_Spacemove(movement_dir = 0)
return TRUE

/mob/living/simple_animal/shade/god/verb/view_manfiest()
set name = "View Crew Manifest"
set category = "Deity"
Expand Down

0 comments on commit 88ff48b

Please sign in to comment.