Skip to content

LAWNMOWERS! #12757

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4314,6 +4314,7 @@
#include "code\modules\vehicles\atv.dm"
#include "code\modules\vehicles\bicycle.dm"
#include "code\modules\vehicles\lavaboat.dm"
#include "code\modules\vehicles\lawnmower.dm"
#include "code\modules\vehicles\motorized_wheelchair.dm"
#include "code\modules\vehicles\pimpin_ride.dm"
#include "code\modules\vehicles\ridden.dm"
Expand Down
16 changes: 15 additions & 1 deletion code/datums/components/riding/riding_vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
set_vehicle_dir_layer(WEST, OBJ_LAYER)

/datum/component/riding/vehicle/scooter/skateboard/wheelys
vehicle_move_delay = 0
vehicle_move_delay = 1.5

/datum/component/riding/vehicle/scooter/skateboard/wheelys/handle_specials()
. = ..()
Expand Down Expand Up @@ -291,3 +291,17 @@
emped = FALSE
var/atom/movable/AM = parent
AM.remove_emitter("smoke")

/datum/component/riding/vehicle/lawnmower
vehicle_move_delay = 2
ride_check_flags = RIDER_NEEDS_LEGS | RIDER_NEEDS_ARMS | UNBUCKLE_DISABLED_RIDER
empable = TRUE

/datum/component/riding/vehicle/lawnmower/handle_specials()
. = ..()
set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 7), TEXT_EAST = list(-5, 2), TEXT_WEST = list(5, 2)))

/datum/component/riding/vehicle/lawnmower/nukie
vehicle_move_delay = 1
ride_check_flags = RIDER_NEEDS_LEGS | RIDER_NEEDS_ARMS | UNBUCKLE_DISABLED_RIDER
empable = TRUE
9 changes: 9 additions & 0 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,15 @@
crate_name = "internals crate"
crate_type = /obj/structure/closet/crate/internals

/datum/supply_pack/emergency/lawnmower
name = "Lawnmower Crate"
desc = "Contains an unstable and slow lawnmower. Use with caution!"
cost = 3000
max_supply = 3
contains = list(/obj/vehicle/ridden/lawnmower)
crate_name = "lawnmower crate"
contraband = TRUE

/datum/supply_pack/emergency/metalfoam
name = "Metal Foam Grenade Crate"
desc = "Seal up those pesky hull breaches with 7 Metal Foam Grenades."
Expand Down
7 changes: 7 additions & 0 deletions code/modules/uplink/uplink_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2556,3 +2556,10 @@ GLOBAL_LIST_INIT(illegal_tech_blacklist, typecacheof(list(
surplus = 0
disabled = TRUE // #11346 Currently in a broken state, lasso'd mobs will never unregister a target once they have locked onto one, making them unusable.

/datum/uplink_item/support/nukielawnmower
name = "Syndicate Organism Shredder"
desc = "An armoured and modified lawn mower that can mow down any organic in its path. It is a fast and armoured to melee and ranged weaponry, but it's extremely vunerable to: bombs, fire, and form of acid"
item = /obj/vehicle/ridden/lawnmower/nukie
cost = 60
surplus = 0
purchasable_from = UPLINK_NUKE_OPS
127 changes: 127 additions & 0 deletions code/modules/vehicles/lawnmower.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/obj/vehicle/ridden/lawnmower
name = "Doom. Co Ultra-Mega-Mower"
desc = "Equipped with reliable safeties to prevent <i>accidents</i> in the workplace. The safety light is <b>on</b>."
icon = 'icons/obj/vehicles.dmi'
icon_state = "lawnmower"
uses_integrity = 1
var/emagged = FALSE
var/emagged_by = null
var/list/drive_sounds = list('sound/effects/mowermove1.ogg', 'sound/effects/mowermove2.ogg')
var/list/gib_sounds = list('sound/effects/mowermovesquish.ogg')


/obj/vehicle/ridden/lawnmower/Initialize(mapload)
. = ..()
AddElement(/datum/element/ridable, /datum/component/riding/vehicle/lawnmower)

/obj/vehicle/ridden/lawnmower/emagged
emagged = TRUE
desc = "Equipped with reliable safeties to prevent <i>accidents</i> in the workplace. The safety light is off"

/obj/vehicle/ridden/lawnmower/atom_destruction()
explosion(src, -1, 1, 2, 4, flame_range = 3)
. = ..()

/obj/vehicle/ridden/lawnmower/on_emag(mob/user)
. = ..()
if(emagged)
to_chat(user, span_warning("The safety mechanisms on \the [src] are already disabled!"))
return
to_chat(user, span_warning("You disable the safety mechanisms on \the [src]."))
desc = "Equipped with reliable safeties to prevent <i>accidents</i> in the workplace. The safety light is <b>off</b>."
emagged = TRUE
if(user)
emagged_by = key_name(user)

/obj/vehicle/ridden/lawnmower/Bump(atom/A)
. = ..()
if(emagged)
if(isliving(A))
var/mob/living/M = A
M.adjustBruteLoss(25)
playsound(loc, 'sound/effects/bang.ogg', 50, 1)
var/atom/newLoc = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
M.throw_at(newLoc, 4, 1)

/obj/vehicle/ridden/lawnmower/Move()
. = ..()
var/gibbed = FALSE
playsound(loc, pick(drive_sounds), 50, 1)
var/mob/living/carbon/H

if(has_buckled_mobs())
H = buckled_mobs[1]
H.investigate_log("[H] entered [src] as the driver")
else
return .

if(emagged)
for(var/mob/living/carbon/human/M in loc)
if(M == H)
continue
if(M.body_position == LYING_DOWN)
visible_message(span_danger("\the [src] grinds [M.name] into a fine paste!"))
M.gib()
M.log_message("has been gibbed by an emagged lawnmower that was driven by [(H.ckey || "nobody")] and emagged by [(emagged_by || "nobody")]", LOG_ATTACK, color="red")
H.log_message("has gibbed [(M.ckey || "none-player")] using an emagged lawnmower that was emagged by [(emagged_by || "nobody")]", LOG_ATTACK, color="red")
shake_camera(M, 20, 1)
gibbed = TRUE

if(gibbed)
shake_camera(H, 10, 1)
playsound(loc, pick(gib_sounds), 75, 1)

mow_lawn()

/obj/vehicle/ridden/lawnmower/proc/mow_lawn()
//Nearly copypasted from goats
var/obj/structure/spacevine/spacevine = locate(/obj/structure/spacevine) in loc
if(spacevine)
qdel(spacevine)

var/obj/structure/glowshroom/glowshroom = locate(/obj/structure/glowshroom) in loc
if(glowshroom)
qdel(glowshroom)

var/obj/structure/alien/weeds/ayy_weeds = locate(/obj/structure/alien/weeds) in loc
if(ayy_weeds)
qdel(ayy_weeds)

var/obj/structure/flora/flora = locate(/obj/structure/flora) in loc
if(flora)
if(!istype(flora, /obj/structure/flora/rock))
qdel(flora)
else
take_damage(25)
visible_message(span_danger("\the [src] makes a awful grinding sound as it drives over [flora]!"))

/obj/vehicle/ridden/lawnmower/nukie
name = "Syndicate Organism Shredder"
desc = "A modified lawnmower with a custom paint job. There are no safety mechanisms on this model, rip and tear."
icon = 'icons/obj/vehicles.dmi'
icon_state = "syndi_lawnmower"
armor_type = /datum/armor/ridden_syndi_lawnmower
emagged = TRUE
drive_sounds = list('sound/effects/mower_treads.ogg')
gib_sounds = list('sound/effects/splat.ogg')

/datum/armor/ridden_syndi_lawnmower
melee = 60
bullet = 70
laser = 70
bomb = 10
fire = 10
acid = 10

/obj/vehicle/ridden/lawnmower/nukie/on_emag(mob/user)
. = ..()
to_chat(user, span_warning("There are no safety mechanisms on \the [src]!"))

/obj/vehicle/ridden/lawnmower/nukie/Initialize(mapload)
. = ..()
RemoveElement(/datum/element/ridable, /datum/component/riding/vehicle/lawnmower)
AddElement(/datum/element/ridable, /datum/component/riding/vehicle/lawnmower/nukie)

/obj/vehicle/ridden/lawnmower/nukie/atom_destruction()
explosion(src, -1, 3, 5, 7, flame_range = 5)
. = ..()
1 change: 1 addition & 0 deletions code/modules/vehicles/pimpin_ride.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@
/obj/vehicle/ridden/janicart/upgraded/keyless
floorbuffer = TRUE
key_type = null

Binary file modified icons/obj/vehicles.dmi
Binary file not shown.
Binary file added sound/effects/mower_treads.ogg
Binary file not shown.
Binary file added sound/effects/mowermove1.ogg
Binary file not shown.
Binary file added sound/effects/mowermove2.ogg
Binary file not shown.
Binary file added sound/effects/mowermovesquish.ogg
Binary file not shown.
Loading