mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
Lavaboat now doesn't burn you when you ride it over lava (#19405)
* Lavaboat now doesn't burn you when you ride it * Add some more sanity checks * don't forget to test your code * as I was saying * Cleanups
This commit is contained in:
@@ -166,6 +166,8 @@
|
||||
icon = 'icons/obj/lavaland/dragonboat.dmi'
|
||||
held_key_type = /obj/item/oar
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
/// The last time we told the user that they can't drive on land, so we don't spam them
|
||||
var/last_message_time = 0
|
||||
|
||||
/obj/vehicle/lavaboat/relaymove(mob/user, direction)
|
||||
var/turf/next = get_step(src, direction)
|
||||
@@ -174,9 +176,24 @@
|
||||
if(istype(next, /turf/simulated/floor/plating/lava/smooth) || istype(current, /turf/simulated/floor/plating/lava/smooth)) //We can move from land to lava, or lava to land, but not from land to land
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Boats don't go on land!</span>")
|
||||
if(last_message_time + 1 SECONDS < world.time)
|
||||
to_chat(user, "<span class='warning'>Boats don't go on land!</span>")
|
||||
last_message_time = world.time
|
||||
return FALSE
|
||||
|
||||
/obj/vehicle/lavaboat/Destroy()
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
M.weather_immunities -= "lava"
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/lavaboat/user_buckle_mob(mob/living/M, mob/user)
|
||||
M.weather_immunities |= "lava"
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/lavaboat/unbuckle_mob(mob/living/buckled_mob, force)
|
||||
. = ..()
|
||||
buckled_mob.weather_immunities -= "lava"
|
||||
|
||||
/obj/item/oar
|
||||
name = "oar"
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
|
||||
Reference in New Issue
Block a user