mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
All turfs except /turf/simulated/wall can now be clicked to push pulled objects towards them
This commit is contained in:
@@ -218,29 +218,16 @@ turf/simulated/floor/proc/update_icon()
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/turf/simulated/floor/attack_hand(mob/user as mob)
|
/turf/simulated/floor/attack_hand(mob/user as mob)
|
||||||
if (is_light_floor())
|
. = ..()
|
||||||
toggle_lightfloor_on()
|
if(.)
|
||||||
update_icon()
|
|
||||||
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
|
|
||||||
return
|
return
|
||||||
if (user.pulling.anchored || !isturf(user.pulling.loc))
|
|
||||||
return
|
|
||||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
|
||||||
return
|
|
||||||
if (ismob(user.pulling))
|
|
||||||
var/mob/M = user.pulling
|
|
||||||
|
|
||||||
// if(M==user) //temporary hack to stop runtimes. ~Carn
|
if(is_light_floor())
|
||||||
// user.stop_pulling() //but...fixed the root of the problem
|
if(user.canmove && !user.restrained())
|
||||||
// return //shoudn't be needed now, unless somebody fucks with pulling again.
|
toggle_lightfloor_on()
|
||||||
|
update_icon()
|
||||||
var/mob/t = M.pulling
|
return 1
|
||||||
M.stop_pulling()
|
return 0
|
||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
|
||||||
M.start_pulling(t)
|
|
||||||
else
|
|
||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
|
||||||
return
|
|
||||||
|
|
||||||
/turf/simulated/floor/proc/gets_drilled()
|
/turf/simulated/floor/proc/gets_drilled()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -11,23 +11,6 @@
|
|||||||
if(!istype(src, /turf/space/transit))
|
if(!istype(src, /turf/space/transit))
|
||||||
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
|
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||||
|
|
||||||
/turf/space/attack_hand(mob/user as mob)
|
|
||||||
if ((user.restrained() || !( user.pulling )))
|
|
||||||
return
|
|
||||||
if (user.pulling.anchored || !isturf(user.pulling.loc))
|
|
||||||
return
|
|
||||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
|
||||||
return
|
|
||||||
if (ismob(user.pulling))
|
|
||||||
var/mob/M = user.pulling
|
|
||||||
var/atom/movable/t = M.pulling
|
|
||||||
M.stop_pulling()
|
|
||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
|
||||||
M.start_pulling(t)
|
|
||||||
else
|
|
||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
|
||||||
return
|
|
||||||
|
|
||||||
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
|
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
|
||||||
|
|
||||||
if (istype(C, /obj/item/stack/rods))
|
if (istype(C, /obj/item/stack/rods))
|
||||||
|
|||||||
@@ -37,6 +37,22 @@
|
|||||||
/turf/ex_act(severity)
|
/turf/ex_act(severity)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
/turf/attack_hand(mob/user)
|
||||||
|
if(!(user.canmove) || user.restrained() || !(user.pulling))
|
||||||
|
return 0
|
||||||
|
if(user.pulling.anchored || !isturf(user.pulling.loc))
|
||||||
|
return 0
|
||||||
|
if(user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)
|
||||||
|
return 0
|
||||||
|
if(ismob(user.pulling))
|
||||||
|
var/mob/M = user.pulling
|
||||||
|
var/atom/movable/t = M.pulling
|
||||||
|
M.stop_pulling()
|
||||||
|
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||||
|
M.start_pulling(t)
|
||||||
|
else
|
||||||
|
step(user.pulling, get_dir(user.pulling.loc, src))
|
||||||
|
return 1
|
||||||
|
|
||||||
/turf/bullet_act(var/obj/item/projectile/Proj)
|
/turf/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
||||||
|
|||||||
@@ -2,20 +2,3 @@
|
|||||||
name = "floor"
|
name = "floor"
|
||||||
icon = 'icons/turf/floors.dmi'
|
icon = 'icons/turf/floors.dmi'
|
||||||
icon_state = "Floor3"
|
icon_state = "Floor3"
|
||||||
|
|
||||||
/turf/unsimulated/floor/attack_hand(var/mob/user as mob)
|
|
||||||
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
|
|
||||||
return
|
|
||||||
if (user.pulling.anchored || !isturf(user.pulling.loc))
|
|
||||||
return
|
|
||||||
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
|
|
||||||
return
|
|
||||||
if (ismob(user.pulling))
|
|
||||||
var/mob/M = user.pulling
|
|
||||||
var/mob/t = M.pulling
|
|
||||||
M.stop_pulling()
|
|
||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
|
||||||
M.start_pulling(t)
|
|
||||||
else
|
|
||||||
step(user.pulling, get_dir(user.pulling.loc, src))
|
|
||||||
return
|
|
||||||
Reference in New Issue
Block a user