Alien Ruin fix, various cherrypicked upstream fixes

Also adds new buildmode
This commit is contained in:
Poojawa
2018-09-13 22:55:11 -05:00
parent 46e805af28
commit 42db44b39e
63 changed files with 3437 additions and 2219 deletions
+18 -8
View File
@@ -1,18 +1,34 @@
/obj/vehicle/sealed/car
layer = ABOVE_MOB_LAYER
anchored = TRUE
default_driver_move = FALSE
var/car_traits = NONE //Bitflag for special behavior such as kidnapping
var/engine_sound = 'sound/vehicles/carrev.ogg'
var/last_enginesound_time
var/engine_sound_length = 20 //Set this to the length of the engine sound
var/escape_time = 200 //Time it takes to break out of the car
/obj/vehicle/sealed/car/Initialize()
. = ..()
LoadComponent(/datum/component/riding)
/obj/vehicle/sealed/car/generate_actions()
. = ..()
initialize_controller_action_type(/datum/action/vehicle/sealed/remove_key, VEHICLE_CONTROL_DRIVE)
if(car_traits & CAN_KIDNAP)
initialize_controller_action_type(/datum/action/vehicle/sealed/DumpKidnappedMobs, VEHICLE_CONTROL_DRIVE)
/obj/vehicle/sealed/car/driver_move(mob/user, direction)
if(key_type && !is_key(inserted_key))
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
return FALSE
var/datum/component/riding/R = GetComponent(/datum/component/riding)
R.handle_ride(user, direction)
if(world.time < last_enginesound_time + engine_sound_length)
return
last_enginesound_time = world.time
playsound(src, engine_sound, 100, TRUE)
/obj/vehicle/sealed/car/MouseDrop_T(atom/dropping, mob/M)
if(!M.canmove || M.stat || M.restrained())
return FALSE
@@ -33,12 +49,6 @@
mob_exit(M, silent)
return TRUE
/obj/vehicle/sealed/car/after_move(direction)
if(world.time < last_enginesound_time + engine_sound_length)
return
last_enginesound_time = world.time
playsound(src, engine_sound, 100, TRUE)
/obj/vehicle/sealed/car/attacked_by(obj/item/I, mob/living/user)
if(!I.force)
return
@@ -52,7 +62,7 @@
if(!(car_traits & CAN_KIDNAP))
return
if(occupants[user])
return
return
to_chat(user, "<span class='notice'>You start opening [src]'s trunk.</span>")
if(do_after(user, 30))
if(return_amount_of_controllers_with_flag(VEHICLE_CONTROL_KIDNAPPED))
@@ -75,4 +85,4 @@
if(!silent)
M.visible_message("<span class='warning'>[M] is forced into \the [src]!</span>")
M.forceMove(src)
add_occupant(M, VEHICLE_CONTROL_KIDNAPPED)
add_occupant(M, VEHICLE_CONTROL_KIDNAPPED)
+1 -1
View File
@@ -127,4 +127,4 @@
icon_state = initial(icon_state)
/obj/vehicle/sealed/car/clowncar/proc/StopDroppingOil()
droppingoil = FALSE
droppingoil = FALSE