Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Призраки камня душ теперь настоящие призраки #13626

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
79 changes: 40 additions & 39 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 All @@ -57,6 +94,9 @@
visible_message("<span class='warning'>[user] gently taps [src] with the [O].</span>")
return

/mob/living/simple_animal/shade/CanPass(atom/movable/mover, turf/target, height=0)
return TRUE

/mob/living/simple_animal/shade/god
name = "Unbelievable God"
real_name = "Unbelievable God"
Expand Down Expand Up @@ -141,45 +181,6 @@
/mob/living/simple_animal/shade/god/RangedAttack(atom/A, params)
god_attack(A)

/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
Loading