mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-23 12:46:17 +01:00
Merge pull request #1674 from haha26315/Overboard;-Railings-Update
Handrail update, general fixes
This commit is contained in:
@@ -155,6 +155,18 @@
|
||||
NeighborsCheck(UpdateNeighgors)
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
//Ensure layering is appropriate to direction.
|
||||
switch (src.dir)
|
||||
if (NORTH)
|
||||
layer = BELOW_MOB_LAYER
|
||||
if (SOUTH)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if (EAST)
|
||||
layer = BELOW_MOB_LAYER
|
||||
if (WEST)
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
if (!check || !anchored)//|| !anchored
|
||||
icon_state = "[icon_modifier]railing0"
|
||||
else
|
||||
@@ -263,8 +275,8 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!shock(user, 70))
|
||||
user.visible_message("<span class='warning'>[user] gets shocked by [src]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
shock(user, 70)
|
||||
|
||||
|
||||
/obj/structure/railing/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
@@ -320,6 +332,7 @@
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
user.visible_message("<span class='warning'>[user] gets shocked by [src]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
@@ -359,26 +372,3 @@
|
||||
/obj/structure/railing/handrail/unachored
|
||||
anchored = FALSE
|
||||
|
||||
/obj/structure/railing/handrail/update_icon(var/UpdateNeighbors = 1)
|
||||
overlays.Cut()
|
||||
if (!check || !anchored)//|| !anchored
|
||||
icon_state = "[icon_modifier]railing0"
|
||||
else
|
||||
icon_state = "[icon_modifier]railing1"
|
||||
if (check & 32)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]corneroverlay")
|
||||
if ((check & 16) || !(check & 32) || (check & 64))
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]frontoverlay_l")
|
||||
if (!(check & 2) || (check & 1) || (check & 4))
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]frontoverlay_r")
|
||||
if(check & 4)
|
||||
switch (src.dir)
|
||||
if (NORTH)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = 32)
|
||||
if (SOUTH)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = -32)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if (EAST)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = -32)
|
||||
if (WEST)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = 32)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.7 KiB |
Reference in New Issue
Block a user