diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 2e13cb16c9..15d3962ee4 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -45,11 +45,13 @@ if((!can_buckle && !force) || M.buckled || (buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src) return FALSE + M.buckling = src if(!M.can_buckle() && !force) if(M == usr) to_chat(M, "You are unable to buckle yourself to [src]!") else to_chat(usr, "You are unable to buckle [M] to [src]!") + M.buckling = null return FALSE if(M.pulledby && buckle_prevents_pull) @@ -58,6 +60,7 @@ if(!check_loc && M.loc != loc) M.forceMove(loc) + M.buckling = null M.buckled = src M.setDir(dir) buckled_mobs |= M diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm index 42ede622a1..0e3930aaf2 100644 --- a/code/game/turfs/simulated/lava.dm +++ b/code/game/turfs/simulated/lava.dm @@ -111,15 +111,17 @@ continue //YOU'RE FLYING OVER IT if("lava" in L.weather_immunities) continue - if(L.buckled) - if(isobj(L.buckled)) - var/obj/O = L.buckled - if(O.resistance_flags & LAVA_PROOF) - continue - if(isliving(L.buckled)) //Goliath riding - var/mob/living/live = L.buckled - if("lava" in live.weather_immunities) - continue + var/buckle_check = L.buckling + if(!buckle_check) + buckle_check = L.buckled + if(isobj(buckle_check)) + var/obj/O = buckle_check + if(O.resistance_flags & LAVA_PROOF) + continue + else if(isliving(buckle_check)) + var/mob/living/live = buckle_check + if("lava" in live.weather_immunities) + continue L.adjustFireLoss(20) if(L) //mobs turning into object corpses could get deleted here. diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 60577ea7a9..21e69d0197 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -467,75 +467,6 @@ qdel(src) -//Boat - -/obj/vehicle/ridden/lavaboat - name = "lava boat" - desc = "A boat used for traversing lava." - icon_state = "goliath_boat" - icon = 'icons/obj/lavaland/dragonboat.dmi' - resistance_flags = LAVA_PROOF | FIRE_PROOF - can_buckle = TRUE - -/obj/vehicle/ridden/lavaboat/Initialize() - . = ..() - var/datum/component/riding/D = LoadComponent(/datum/component/riding) - D.keytype = /obj/item/oar - D.allowed_turf_typecache = typecacheof(/turf/open/lava) - -/obj/item/oar - name = "oar" - icon = 'icons/obj/vehicles.dmi' - icon_state = "oar" - item_state = "oar" - lefthand_file = 'icons/mob/inhands/misc/lavaland_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/lavaland_righthand.dmi' - desc = "Not to be confused with the kind Research hassles you for." - force = 12 - w_class = WEIGHT_CLASS_NORMAL - resistance_flags = LAVA_PROOF | FIRE_PROOF - -/datum/crafting_recipe/oar - name = "goliath bone oar" - result = /obj/item/oar - reqs = list(/obj/item/stack/sheet/bone = 2) - time = 15 - category = CAT_PRIMAL - -/datum/crafting_recipe/boat - name = "goliath hide boat" - result = /obj/vehicle/ridden/lavaboat - reqs = list(/obj/item/stack/sheet/animalhide/goliath_hide = 3) - time = 50 - category = CAT_PRIMAL - -//Dragon Boat - - -/obj/item/ship_in_a_bottle - name = "ship in a bottle" - desc = "A tiny ship inside a bottle." - icon = 'icons/obj/lavaland/artefacts.dmi' - icon_state = "ship_bottle" - -/obj/item/ship_in_a_bottle/attack_self(mob/user) - to_chat(user, "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.") - playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1) - new /obj/vehicle/ridden/lavaboat/dragon(get_turf(src)) - qdel(src) - -/obj/vehicle/ridden/lavaboat/dragon - name = "mysterious boat" - desc = "This boat moves where you will it, without the need for an oar." - icon_state = "dragon_boat" - -/obj/vehicle/ridden/lavaboat/dragon/Initialize() - . = ..() - var/datum/component/riding/D = LoadComponent(/datum/component/riding) - D.vehicle_move_delay = 1 - D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(1, 2), TEXT_SOUTH = list(1, 2), TEXT_EAST = list(1, 2), TEXT_WEST = list( 1, 2))) - D.keytype = null - //Potion of Flight /obj/item/reagent_containers/glass/bottle/potion icon = 'icons/obj/lavaland/artefacts.dmi' diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 4e179c0b4d..d7bba73ce7 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -68,6 +68,7 @@ var/m_intent = MOVE_INTENT_RUN//Living var/lastKnownIP = null var/atom/movable/buckled = null//Living + var/atom/movable/buckling //Hands var/active_hand_index = 1 diff --git a/code/modules/vehicles/lavaboat.dm b/code/modules/vehicles/lavaboat.dm new file mode 100644 index 0000000000..020a17fb04 --- /dev/null +++ b/code/modules/vehicles/lavaboat.dm @@ -0,0 +1,69 @@ + +//Boat + +/obj/vehicle/ridden/lavaboat + name = "lava boat" + desc = "A boat used for traversing lava." + icon_state = "goliath_boat" + icon = 'icons/obj/lavaland/dragonboat.dmi' + resistance_flags = LAVA_PROOF | FIRE_PROOF + can_buckle = TRUE + +/obj/vehicle/ridden/lavaboat/Initialize() + . = ..() + var/datum/component/riding/D = LoadComponent(/datum/component/riding) + D.keytype = /obj/item/oar + D.allowed_turf_typecache = typecacheof(/turf/open/lava) + +/obj/item/oar + name = "oar" + icon = 'icons/obj/vehicles.dmi' + icon_state = "oar" + item_state = "oar" + lefthand_file = 'icons/mob/inhands/misc/lavaland_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/lavaland_righthand.dmi' + desc = "Not to be confused with the kind Research hassles you for." + force = 12 + w_class = WEIGHT_CLASS_NORMAL + resistance_flags = LAVA_PROOF | FIRE_PROOF + +/datum/crafting_recipe/oar + name = "goliath bone oar" + result = /obj/item/oar + reqs = list(/obj/item/stack/sheet/bone = 2) + time = 15 + category = CAT_PRIMAL + +/datum/crafting_recipe/boat + name = "goliath hide boat" + result = /obj/vehicle/ridden/lavaboat + reqs = list(/obj/item/stack/sheet/animalhide/goliath_hide = 3) + time = 50 + category = CAT_PRIMAL + +//Dragon Boat + + +/obj/item/ship_in_a_bottle + name = "ship in a bottle" + desc = "A tiny ship inside a bottle." + icon = 'icons/obj/lavaland/artefacts.dmi' + icon_state = "ship_bottle" + +/obj/item/ship_in_a_bottle/attack_self(mob/user) + to_chat(user, "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.") + playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, 1) + new /obj/vehicle/ridden/lavaboat/dragon(get_turf(src)) + qdel(src) + +/obj/vehicle/ridden/lavaboat/dragon + name = "mysterious boat" + desc = "This boat moves where you will it, without the need for an oar." + icon_state = "dragon_boat" + +/obj/vehicle/ridden/lavaboat/dragon/Initialize() + . = ..() + var/datum/component/riding/D = LoadComponent(/datum/component/riding) + D.vehicle_move_delay = 1 + D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(1, 2), TEXT_SOUTH = list(1, 2), TEXT_EAST = list(1, 2), TEXT_WEST = list( 1, 2))) + D.keytype = null diff --git a/tgstation.dme b/tgstation.dme index 7f35e065b8..ea9cc25bf0 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2455,6 +2455,7 @@ #include "code\modules\vehicles\atv.dm" #include "code\modules\vehicles\bicycle.dm" #include "code\modules\vehicles\entered.dm" +#include "code\modules\vehicles\lavaboat.dm" #include "code\modules\vehicles\pimpin_ride.dm" #include "code\modules\vehicles\ridden.dm" #include "code\modules\vehicles\scooter.dm"