Skip to content

Commit

Permalink
Adds a Bicycle to the game (tgstation#24431)
Browse files Browse the repository at this point in the history
* 自転車をゲームに追加する

* adds file

* dfssdffds

* cdvsffsg

* fixes

* Update bicycle.dm
  • Loading branch information
Iamgoofball authored and optimumtact committed Mar 2, 2017
1 parent f32834f commit 93f9b71
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/datums/riding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@
generic_pixel_x = 0
generic_pixel_y = 4

//i want to ride my
/datum/riding/bicycle
keytype = null
generic_pixel_x = 0
generic_pixel_y = 4
vehicle_move_delay = 0

//speedbike
/datum/riding/space/speedbike
keytype = null
Expand Down
7 changes: 7 additions & 0 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1733,3 +1733,10 @@
/obj/item/weapon/circuitboard/machine/computer/sat_control
)
crate_name= "shield control board crate"

/datum/supply_pack/misc/bicycle
name = "Bicycle"
cost = 1000000
contains = list(/obj/vehicle/bicycle)
crate_name = "Bicycle Crate"
crate_type = /obj/structure/closet/crate/large
29 changes: 29 additions & 0 deletions code/modules/vehicles/bicycle.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/obj/vehicle/bicycle
name = "bicycle"
desc = "Keep away from electricity."
icon_state = "bicycle"
var/easter_egg_chance = 1

var/static/list/bike_music = list('sound/misc/bike1.mid',
'sound/misc/bike2.mid',
'sound/misc/bike3.mid')
/obj/vehicle/bicycle/New()
..()
riding_datum = new/datum/riding/bicycle
/obj/vehicle/bicycle/buckle_mob(mob/living/M, force = 0, check_loc = 1)
if(prob(easter_egg_chance) || (SSevent.holidays && SSevent.holidays[APRIL_FOOLS]))
M << sound(pick(bike_music), repeat = 1, wait = 0, volume = 80, channel = 42)
. = ..()

/obj/vehicle/bicycle/unbuckle_mob(mob/living/buckled_mob,force = 0)
if(buckled_mob)
buckled_mob << sound(null, repeat = 0, wait = 0, volume = 80, channel = 42)
. =..()

/obj/vehicle/bicycle/tesla_act() // :::^^^)))
name = "fried bicycle"
desc = "Well spent."
riding_datum = null
color = rgb(63, 23, 4)
for(var/m in buckled_mobs)
unbuckle_mob(m,1)
Binary file modified icons/obj/vehicles.dmi
Binary file not shown.
Binary file added sound/misc/bike1.mid
Binary file not shown.
Binary file added sound/misc/bike2.mid
Binary file not shown.
Binary file added sound/misc/bike3.mid
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2027,6 +2027,7 @@
#include "code\modules\uplink\uplink.dm"
#include "code\modules\uplink\uplink_item.dm"
#include "code\modules\vehicles\atv.dm"
#include "code\modules\vehicles\bicycle.dm"
#include "code\modules\vehicles\pimpin_ride.dm"
#include "code\modules\vehicles\scooter.dm"
#include "code\modules\vehicles\secway.dm"
Expand Down

0 comments on commit 93f9b71

Please sign in to comment.