aaaaa
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
desc = "A keyring with a small steel key, and a fancy blue and gold fob."
|
||||
icon_state = "magic_keys"
|
||||
|
||||
|
||||
/obj/vehicle/firebird
|
||||
name = "Firebird"
|
||||
desc = "A Pontiac Firebird Trans Am with skulls and crossbones on the hood, dark blue paint, and gold trim. No magic required for this baby."
|
||||
@@ -13,6 +14,53 @@
|
||||
layer = LYING_MOB_LAYER
|
||||
spacemove = TRUE
|
||||
var/playingrunningsound = FALSE //for engine loop
|
||||
var/boostactive = FALSE
|
||||
var/datum/action/firebird_boost/F
|
||||
|
||||
/datum/action/firebird_boost
|
||||
name = "Speed Boost"
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUNNED
|
||||
button_icon_state = "firebird_boost"
|
||||
background_icon_state = "bg_spell"
|
||||
var/boosting = FALSE //whether boost is active
|
||||
var/cooldown = FALSE //whether cooldown is active
|
||||
|
||||
/datum/action/firebird_boost/Trigger(mob/living/carbon/human/H)
|
||||
if(!H.buckled)
|
||||
return
|
||||
var/obj/vehicle/firebird/buckled_obj
|
||||
buckled_obj = H.buckled
|
||||
if(cooldown = FALSE)
|
||||
boosting = TRUE
|
||||
cooldown = TRUE
|
||||
buckled_obj.boostactive = TRUE
|
||||
addtimer(src, "deactivate_boost", 20)
|
||||
addtimer(src, "reset_cooldown", 100)
|
||||
|
||||
/datum/action/firebird_boost/IsAvailable()
|
||||
if(..())
|
||||
if(cooldown = TRUE)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/action/firebird_boost/proc/deactivate_boost(mob/living/carbon/human/H)
|
||||
boosting = FALSE
|
||||
var/obj/vehicle/firebird/buckled_obj
|
||||
buckled_obj = H.buckled
|
||||
buckled_obj.boostactive = FALSE
|
||||
|
||||
/datum/action/firebird_boost/proc/reset_cooldown()
|
||||
cooldown = FALSE
|
||||
|
||||
/obj/vehicle/firebird/user_buckle_mob(mob/living/M, mob/user)
|
||||
..()
|
||||
F = new
|
||||
F.Grant(M)
|
||||
|
||||
/obj/vehicle/firebird/unbuckle_mob(mob/living/buckled_mob,force = 0)
|
||||
..()
|
||||
if(F)
|
||||
F.Remove(buckled_mob)
|
||||
|
||||
/obj/effect/overlay/temp/firebird_trail
|
||||
name = "exhaust fumes"
|
||||
@@ -32,8 +80,6 @@
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/firebird_firetrail/proc/IgniteTile()
|
||||
if(locate(/obj/vehicle/firebird in get_turf(src)))
|
||||
return
|
||||
new /obj/effect/hotspot(get_turf(src))
|
||||
|
||||
/obj/effect/overlay/temp/firebird_firetrail/New(loc,move_dir)
|
||||
@@ -48,10 +94,12 @@
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/firebird/Move(newloc,move_dir)
|
||||
if(has_buckled_mobs())
|
||||
PoolOrNew(/obj/effect/overlay/temp/firebird_firetrail,list(loc,move_dir))
|
||||
PoolOrNew(/obj/effect/overlay/temp/firebird_trail,list(loc,move_dir))
|
||||
var/turf/oldLoc = loc
|
||||
. = ..()
|
||||
if(has_buckled_mobs() && oldLoc != loc)
|
||||
PoolOrNew(/obj/effect/overlay/temp/firebird_trail,list(oldLoc,move_dir))
|
||||
if(boostactive)
|
||||
PoolOrNew(/obj/effect/overlay/temp/firebird_firetrail,list(oldLoc,move_dir))
|
||||
|
||||
/obj/vehicle/firebird/handle_vehicle_offsets()
|
||||
if(has_buckled_mobs())
|
||||
|
||||
Reference in New Issue
Block a user