Force LF line endings with gitattributes and convert repo (#52266)

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
This commit is contained in:
jdawg1290
2020-07-16 03:02:40 +03:00
committed by GitHub
co-authored by Aleksej Komarov
parent 39e8bd721f
commit 62676e72a8
1133 changed files with 266492 additions and 266454 deletions
+72 -72
View File
@@ -1,72 +1,72 @@
//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'
var/allowed_turf = /turf/open/lava
resistance_flags = LAVA_PROOF | FIRE_PROOF
can_buckle = TRUE
legs_required = 0
arms_required = 0
/obj/vehicle/ridden/lavaboat/Initialize()
. = ..()
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.keytype = /obj/item/oar
D.allowed_turf_typecache = typecacheof(allowed_turf)
/obj/item/oar
name = "oar"
icon = 'icons/obj/vehicles.dmi'
icon_state = "oar"
inhand_icon_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, "<span class='notice'>You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.</span>")
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, TRUE)
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
//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'
var/allowed_turf = /turf/open/lava
resistance_flags = LAVA_PROOF | FIRE_PROOF
can_buckle = TRUE
legs_required = 0
arms_required = 0
/obj/vehicle/ridden/lavaboat/Initialize()
. = ..()
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.keytype = /obj/item/oar
D.allowed_turf_typecache = typecacheof(allowed_turf)
/obj/item/oar
name = "oar"
icon = 'icons/obj/vehicles.dmi'
icon_state = "oar"
inhand_icon_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, "<span class='notice'>You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.</span>")
playsound(user.loc, 'sound/effects/glassbr1.ogg', 100, TRUE)
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
+106 -106
View File
@@ -1,106 +1,106 @@
/obj/vehicle/ridden
name = "ridden vehicle"
can_buckle = TRUE
max_buckled_mobs = 1
buckle_lying = FALSE
default_driver_move = FALSE
var/legs_required = 2
var/arms_required = 1 //why not?
var/fall_off_if_missing_arms = FALSE //heh...
var/message_cooldown = 0
/obj/vehicle/ridden/Initialize()
. = ..()
LoadComponent(/datum/component/riding)
/obj/vehicle/ridden/examine(mob/user)
. = ..()
if(key_type)
if(!inserted_key)
. += "<span class='notice'>Put a key inside it by clicking it with the key.</span>"
else
. += "<span class='notice'>Alt-click [src] to remove the key.</span>"
/obj/vehicle/ridden/generate_action_type(actiontype)
var/datum/action/vehicle/ridden/A = ..()
. = A
if(istype(A))
A.vehicle_ridden_target = src
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
remove_occupant(M)
return ..()
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
add_occupant(M)
return ..()
/obj/vehicle/ridden/attackby(obj/item/I, mob/user, params)
if(key_type && !is_key(inserted_key) && is_key(I))
if(user.transferItemToLoc(I, src))
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
if(inserted_key) //just in case there's an invalid key
inserted_key.forceMove(drop_location())
inserted_key = I
else
to_chat(user, "<span class='warning'>[I] seems to be stuck to your hand!</span>")
return
return ..()
/obj/vehicle/ridden/AltClick(mob/user)
if(inserted_key && user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
if(!is_occupant(user))
to_chat(user, "<span class='warning'>You must be riding the [src] to remove [src]'s key!</span>")
return
to_chat(user, "<span class='notice'>You remove \the [inserted_key] from \the [src].</span>")
inserted_key.forceMove(drop_location())
user.put_in_hands(inserted_key)
inserted_key = null
return ..()
/obj/vehicle/ridden/driver_move(mob/user, direction)
if(key_type && !is_key(inserted_key))
if(message_cooldown < world.time)
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
message_cooldown = world.time + 5 SECONDS
return FALSE
if(legs_required)
var/how_many_legs = user.get_num_legs()
if(how_many_legs < legs_required)
if(message_cooldown < world.time)
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_legs ? " your leg[how_many_legs > 1 ? "s" : null]" : "out legs"]...</span>")
message_cooldown = world.time + 5 SECONDS
return FALSE
if(arms_required)
var/how_many_arms = user.get_num_arms()
if(how_many_arms < arms_required)
if(fall_off_if_missing_arms)
unbuckle_mob(user, TRUE)
user.visible_message("<span class='danger'>[user] falls off \the [src].</span>",\
"<span class='danger'>You fall off \the [src] while trying to operate it without [arms_required ? "both arms":"an arm"]!</span>")
if(isliving(user))
var/mob/living/L = user
L.Stun(30)
return FALSE
if(message_cooldown < world.time)
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_arms ? " your arm[how_many_arms > 1 ? "s" : null]" : "out arms"]...</span>")
message_cooldown = world.time + 5 SECONDS
return FALSE
var/datum/component/riding/R = GetComponent(/datum/component/riding)
R.handle_ride(user, direction)
return ..()
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
if(!in_range(user, src) || !in_range(M, src))
return FALSE
. = ..(M, user, FALSE)
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!force && occupant_amount() >= max_occupants)
return FALSE
return ..()
/obj/vehicle/ridden/zap_act(zap_str, zap_flags, shocked_targets)
zap_buckle_check(zap_str)
. = ..()
/obj/vehicle/ridden
name = "ridden vehicle"
can_buckle = TRUE
max_buckled_mobs = 1
buckle_lying = FALSE
default_driver_move = FALSE
var/legs_required = 2
var/arms_required = 1 //why not?
var/fall_off_if_missing_arms = FALSE //heh...
var/message_cooldown = 0
/obj/vehicle/ridden/Initialize()
. = ..()
LoadComponent(/datum/component/riding)
/obj/vehicle/ridden/examine(mob/user)
. = ..()
if(key_type)
if(!inserted_key)
. += "<span class='notice'>Put a key inside it by clicking it with the key.</span>"
else
. += "<span class='notice'>Alt-click [src] to remove the key.</span>"
/obj/vehicle/ridden/generate_action_type(actiontype)
var/datum/action/vehicle/ridden/A = ..()
. = A
if(istype(A))
A.vehicle_ridden_target = src
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
remove_occupant(M)
return ..()
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
add_occupant(M)
return ..()
/obj/vehicle/ridden/attackby(obj/item/I, mob/user, params)
if(key_type && !is_key(inserted_key) && is_key(I))
if(user.transferItemToLoc(I, src))
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
if(inserted_key) //just in case there's an invalid key
inserted_key.forceMove(drop_location())
inserted_key = I
else
to_chat(user, "<span class='warning'>[I] seems to be stuck to your hand!</span>")
return
return ..()
/obj/vehicle/ridden/AltClick(mob/user)
if(inserted_key && user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
if(!is_occupant(user))
to_chat(user, "<span class='warning'>You must be riding the [src] to remove [src]'s key!</span>")
return
to_chat(user, "<span class='notice'>You remove \the [inserted_key] from \the [src].</span>")
inserted_key.forceMove(drop_location())
user.put_in_hands(inserted_key)
inserted_key = null
return ..()
/obj/vehicle/ridden/driver_move(mob/user, direction)
if(key_type && !is_key(inserted_key))
if(message_cooldown < world.time)
to_chat(user, "<span class='warning'>[src] has no key inserted!</span>")
message_cooldown = world.time + 5 SECONDS
return FALSE
if(legs_required)
var/how_many_legs = user.get_num_legs()
if(how_many_legs < legs_required)
if(message_cooldown < world.time)
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_legs ? " your leg[how_many_legs > 1 ? "s" : null]" : "out legs"]...</span>")
message_cooldown = world.time + 5 SECONDS
return FALSE
if(arms_required)
var/how_many_arms = user.get_num_arms()
if(how_many_arms < arms_required)
if(fall_off_if_missing_arms)
unbuckle_mob(user, TRUE)
user.visible_message("<span class='danger'>[user] falls off \the [src].</span>",\
"<span class='danger'>You fall off \the [src] while trying to operate it without [arms_required ? "both arms":"an arm"]!</span>")
if(isliving(user))
var/mob/living/L = user
L.Stun(30)
return FALSE
if(message_cooldown < world.time)
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_arms ? " your arm[how_many_arms > 1 ? "s" : null]" : "out arms"]...</span>")
message_cooldown = world.time + 5 SECONDS
return FALSE
var/datum/component/riding/R = GetComponent(/datum/component/riding)
R.handle_ride(user, direction)
return ..()
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
if(!in_range(user, src) || !in_range(M, src))
return FALSE
. = ..(M, user, FALSE)
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!force && occupant_amount() >= max_occupants)
return FALSE
return ..()
/obj/vehicle/ridden/zap_act(zap_str, zap_flags, shocked_targets)
zap_buckle_check(zap_str)
. = ..()
+230 -230
View File
@@ -1,230 +1,230 @@
//VEHICLE DEFAULT HANDLING
/obj/vehicle/proc/generate_actions()
return
/obj/vehicle/proc/generate_action_type(actiontype)
var/datum/action/vehicle/A = new actiontype
if(!istype(A))
return
A.vehicle_target = src
return A
/obj/vehicle/proc/initialize_passenger_action_type(actiontype)
autogrant_actions_passenger += actiontype
for(var/i in occupants)
grant_passenger_actions(i) //refresh
/obj/vehicle/proc/initialize_controller_action_type(actiontype, control_flag)
LAZYINITLIST(autogrant_actions_controller["[control_flag]"])
autogrant_actions_controller["[control_flag]"] += actiontype
for(var/i in occupants)
grant_controller_actions(i) //refresh
/obj/vehicle/proc/grant_action_type_to_mob(actiontype, mob/m)
if(isnull(occupants[m]) || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
return TRUE
var/datum/action/action = generate_action_type(actiontype)
action.Grant(m)
occupant_actions[m][action.type] = action
return TRUE
/obj/vehicle/proc/remove_action_type_from_mob(actiontype, mob/m)
if(isnull(occupants[m]) || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
var/datum/action/action = occupant_actions[m][actiontype]
action.Remove(m)
occupant_actions[m] -= actiontype
return TRUE
/obj/vehicle/proc/grant_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
grant_action_type_to_mob(v, M)
/obj/vehicle/proc/remove_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
remove_action_type_from_mob(v, M)
/obj/vehicle/proc/grant_controller_actions(mob/M)
if(!istype(M) || isnull(occupants[M]))
return FALSE
for(var/i in GLOB.bitflags)
if(occupants[M] & i)
grant_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/remove_controller_actions(mob/M)
if(!istype(M) || isnull(occupants[M]))
return FALSE
for(var/i in GLOB.bitflags)
remove_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/grant_controller_actions_by_flag(mob/M, flag)
if(!istype(M))
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
grant_action_type_to_mob(v, M)
return TRUE
/obj/vehicle/proc/remove_controller_actions_by_flag(mob/M, flag)
if(!istype(M))
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
remove_action_type_from_mob(v, M)
return TRUE
/obj/vehicle/proc/cleanup_actions_for_mob(mob/M)
if(!istype(M))
return FALSE
for(var/path in occupant_actions[M])
stack_trace("Leftover action type [path] in vehicle type [type] for mob type [M.type] - THIS SHOULD NOT BE HAPPENING!")
var/datum/action/action = occupant_actions[M][path]
action.Remove(M)
occupant_actions[M] -= path
occupant_actions -= M
return TRUE
//ACTION DATUMS
/datum/action/vehicle
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
icon_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_icon_state = "vehicle_eject"
var/obj/vehicle/vehicle_target
/datum/action/vehicle/sealed
var/obj/vehicle/sealed/vehicle_entered_target
/datum/action/vehicle/sealed/climb_out
name = "Climb Out"
desc = "Climb out of your vehicle!"
button_icon_state = "car_eject"
/datum/action/vehicle/sealed/climb_out/Trigger()
if(..() && istype(vehicle_entered_target))
vehicle_entered_target.mob_try_exit(owner, owner)
/datum/action/vehicle/ridden
var/obj/vehicle/ridden/vehicle_ridden_target
/datum/action/vehicle/sealed/remove_key
name = "Remove key"
desc = "Take your key out of the vehicle's ignition."
button_icon_state = "car_removekey"
/datum/action/vehicle/sealed/remove_key/Trigger()
vehicle_entered_target.remove_key(owner)
//CLOWN CAR ACTION DATUMS
/datum/action/vehicle/sealed/horn
name = "Honk Horn"
desc = "Honk your classy horn."
button_icon_state = "car_horn"
var/hornsound = 'sound/items/carhorn.ogg'
var/last_honk_time
/datum/action/vehicle/sealed/horn/Trigger()
if(world.time - last_honk_time > 20)
vehicle_entered_target.visible_message("<span class='danger'>[vehicle_entered_target] loudly honks!</span>")
to_chat(owner, "<span class='notice'>You press the vehicle's horn.</span>")
playsound(vehicle_entered_target, hornsound, 75)
last_honk_time = world.time
/datum/action/vehicle/sealed/horn/clowncar/Trigger()
if(world.time - last_honk_time > 20)
vehicle_entered_target.visible_message("<span class='danger'>[vehicle_entered_target] loudly honks!</span>")
to_chat(owner, "<span class='notice'>You press the vehicle's horn.</span>")
last_honk_time = world.time
if(vehicle_target.inserted_key)
vehicle_target.inserted_key.attack_self(owner) //The key plays a sound
else
playsound(vehicle_entered_target, hornsound, 75)
/datum/action/vehicle/sealed/dump_kidnapped_mobs
name = "Dump Kidnapped Mobs"
desc = "Dump all objects and people in your car on the floor."
button_icon_state = "car_dump"
/datum/action/vehicle/sealed/dump_kidnapped_mobs/Trigger()
vehicle_entered_target.visible_message("<span class='danger'>[vehicle_entered_target] starts dumping the people inside of it.</span>")
vehicle_entered_target.DumpSpecificMobs(VEHICLE_CONTROL_KIDNAPPED)
/datum/action/vehicle/sealed/roll_the_dice
name = "Press Colorful Button"
desc = "Press one of those colorful buttons on your display panel!"
button_icon_state = "car_rtd"
/datum/action/vehicle/sealed/roll_the_dice/Trigger()
if(istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar))
var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target
C.RollTheDice(owner)
/datum/action/vehicle/sealed/cannon
name = "Toggle Siege Mode"
desc = "Destroy them with their own fodder!"
button_icon_state = "car_cannon"
/datum/action/vehicle/sealed/cannon/Trigger()
if(istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar))
var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target
if(C.cannonbusy)
to_chat(owner, "<span class='notice'>Please wait for the vehicle to finish its current action first.</span>")
C.ToggleCannon()
/datum/action/vehicle/sealed/thank
name = "Thank the Clown Car Driver"
desc = "They're just doing their job."
button_icon_state = "car_thanktheclown"
var/last_thank_time
/datum/action/vehicle/sealed/thank/Trigger()
if(istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar))
var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target
if(world.time >= last_thank_time + 60)
var/mob/living/carbon/human/clown = pick(C.return_drivers())
owner.say("Thank you for the fun ride, [clown.name]!")
last_thank_time = world.time
C.ThanksCounter()
/datum/action/vehicle/ridden/scooter/skateboard/ollie
name = "Ollie"
desc = "Get some air! Land on a table to do a gnarly grind."
button_icon_state = "skateboard_ollie"
///Cooldown to next jump
var/next_ollie
/datum/action/vehicle/ridden/scooter/skateboard/ollie/Trigger()
if(world.time > next_ollie)
var/obj/vehicle/ridden/scooter/skateboard/V = vehicle_target
if (V.grinding)
return
var/mob/living/L = owner
var/turf/landing_turf = get_step(V.loc, V.dir)
L.adjustStaminaLoss(V.instability*2)
if (L.getStaminaLoss() >= 100)
playsound(src, 'sound/effects/bang.ogg', 20, TRUE)
V.unbuckle_mob(L)
L.throw_at(landing_turf, 2, 2)
L.Paralyze(40)
V.visible_message("<span class='danger'>[L] misses the landing and falls on [L.p_their()] face!</span>")
else
L.spin(4, 1)
animate(L, pixel_y = -6, time = 4)
animate(V, pixel_y = -6, time = 3)
playsound(V, 'sound/vehicles/skateboard_ollie.ogg', 50, TRUE)
passtable_on(L, VEHICLE_TRAIT)
V.pass_flags |= PASSTABLE
L.Move(landing_turf, vehicle_target.dir)
passtable_off(L, VEHICLE_TRAIT)
V.pass_flags &= ~PASSTABLE
if(locate(/obj/structure/table) in V.loc.contents)
V.grinding = TRUE
V.icon_state = "[V.board_icon]-grind"
addtimer(CALLBACK(V, /obj/vehicle/ridden/scooter/skateboard/.proc/grind), 2)
next_ollie = world.time + 5
//VEHICLE DEFAULT HANDLING
/obj/vehicle/proc/generate_actions()
return
/obj/vehicle/proc/generate_action_type(actiontype)
var/datum/action/vehicle/A = new actiontype
if(!istype(A))
return
A.vehicle_target = src
return A
/obj/vehicle/proc/initialize_passenger_action_type(actiontype)
autogrant_actions_passenger += actiontype
for(var/i in occupants)
grant_passenger_actions(i) //refresh
/obj/vehicle/proc/initialize_controller_action_type(actiontype, control_flag)
LAZYINITLIST(autogrant_actions_controller["[control_flag]"])
autogrant_actions_controller["[control_flag]"] += actiontype
for(var/i in occupants)
grant_controller_actions(i) //refresh
/obj/vehicle/proc/grant_action_type_to_mob(actiontype, mob/m)
if(isnull(occupants[m]) || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
return TRUE
var/datum/action/action = generate_action_type(actiontype)
action.Grant(m)
occupant_actions[m][action.type] = action
return TRUE
/obj/vehicle/proc/remove_action_type_from_mob(actiontype, mob/m)
if(isnull(occupants[m]) || !actiontype)
return FALSE
LAZYINITLIST(occupant_actions[m])
if(occupant_actions[m][actiontype])
var/datum/action/action = occupant_actions[m][actiontype]
action.Remove(m)
occupant_actions[m] -= actiontype
return TRUE
/obj/vehicle/proc/grant_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
grant_action_type_to_mob(v, M)
/obj/vehicle/proc/remove_passenger_actions(mob/M)
for(var/v in autogrant_actions_passenger)
remove_action_type_from_mob(v, M)
/obj/vehicle/proc/grant_controller_actions(mob/M)
if(!istype(M) || isnull(occupants[M]))
return FALSE
for(var/i in GLOB.bitflags)
if(occupants[M] & i)
grant_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/remove_controller_actions(mob/M)
if(!istype(M) || isnull(occupants[M]))
return FALSE
for(var/i in GLOB.bitflags)
remove_controller_actions_by_flag(M, i)
return TRUE
/obj/vehicle/proc/grant_controller_actions_by_flag(mob/M, flag)
if(!istype(M))
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
grant_action_type_to_mob(v, M)
return TRUE
/obj/vehicle/proc/remove_controller_actions_by_flag(mob/M, flag)
if(!istype(M))
return FALSE
for(var/v in autogrant_actions_controller["[flag]"])
remove_action_type_from_mob(v, M)
return TRUE
/obj/vehicle/proc/cleanup_actions_for_mob(mob/M)
if(!istype(M))
return FALSE
for(var/path in occupant_actions[M])
stack_trace("Leftover action type [path] in vehicle type [type] for mob type [M.type] - THIS SHOULD NOT BE HAPPENING!")
var/datum/action/action = occupant_actions[M][path]
action.Remove(M)
occupant_actions[M] -= path
occupant_actions -= M
return TRUE
//ACTION DATUMS
/datum/action/vehicle
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUN | AB_CHECK_CONSCIOUS
icon_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_icon_state = "vehicle_eject"
var/obj/vehicle/vehicle_target
/datum/action/vehicle/sealed
var/obj/vehicle/sealed/vehicle_entered_target
/datum/action/vehicle/sealed/climb_out
name = "Climb Out"
desc = "Climb out of your vehicle!"
button_icon_state = "car_eject"
/datum/action/vehicle/sealed/climb_out/Trigger()
if(..() && istype(vehicle_entered_target))
vehicle_entered_target.mob_try_exit(owner, owner)
/datum/action/vehicle/ridden
var/obj/vehicle/ridden/vehicle_ridden_target
/datum/action/vehicle/sealed/remove_key
name = "Remove key"
desc = "Take your key out of the vehicle's ignition."
button_icon_state = "car_removekey"
/datum/action/vehicle/sealed/remove_key/Trigger()
vehicle_entered_target.remove_key(owner)
//CLOWN CAR ACTION DATUMS
/datum/action/vehicle/sealed/horn
name = "Honk Horn"
desc = "Honk your classy horn."
button_icon_state = "car_horn"
var/hornsound = 'sound/items/carhorn.ogg'
var/last_honk_time
/datum/action/vehicle/sealed/horn/Trigger()
if(world.time - last_honk_time > 20)
vehicle_entered_target.visible_message("<span class='danger'>[vehicle_entered_target] loudly honks!</span>")
to_chat(owner, "<span class='notice'>You press the vehicle's horn.</span>")
playsound(vehicle_entered_target, hornsound, 75)
last_honk_time = world.time
/datum/action/vehicle/sealed/horn/clowncar/Trigger()
if(world.time - last_honk_time > 20)
vehicle_entered_target.visible_message("<span class='danger'>[vehicle_entered_target] loudly honks!</span>")
to_chat(owner, "<span class='notice'>You press the vehicle's horn.</span>")
last_honk_time = world.time
if(vehicle_target.inserted_key)
vehicle_target.inserted_key.attack_self(owner) //The key plays a sound
else
playsound(vehicle_entered_target, hornsound, 75)
/datum/action/vehicle/sealed/dump_kidnapped_mobs
name = "Dump Kidnapped Mobs"
desc = "Dump all objects and people in your car on the floor."
button_icon_state = "car_dump"
/datum/action/vehicle/sealed/dump_kidnapped_mobs/Trigger()
vehicle_entered_target.visible_message("<span class='danger'>[vehicle_entered_target] starts dumping the people inside of it.</span>")
vehicle_entered_target.DumpSpecificMobs(VEHICLE_CONTROL_KIDNAPPED)
/datum/action/vehicle/sealed/roll_the_dice
name = "Press Colorful Button"
desc = "Press one of those colorful buttons on your display panel!"
button_icon_state = "car_rtd"
/datum/action/vehicle/sealed/roll_the_dice/Trigger()
if(istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar))
var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target
C.RollTheDice(owner)
/datum/action/vehicle/sealed/cannon
name = "Toggle Siege Mode"
desc = "Destroy them with their own fodder!"
button_icon_state = "car_cannon"
/datum/action/vehicle/sealed/cannon/Trigger()
if(istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar))
var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target
if(C.cannonbusy)
to_chat(owner, "<span class='notice'>Please wait for the vehicle to finish its current action first.</span>")
C.ToggleCannon()
/datum/action/vehicle/sealed/thank
name = "Thank the Clown Car Driver"
desc = "They're just doing their job."
button_icon_state = "car_thanktheclown"
var/last_thank_time
/datum/action/vehicle/sealed/thank/Trigger()
if(istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar))
var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target
if(world.time >= last_thank_time + 60)
var/mob/living/carbon/human/clown = pick(C.return_drivers())
owner.say("Thank you for the fun ride, [clown.name]!")
last_thank_time = world.time
C.ThanksCounter()
/datum/action/vehicle/ridden/scooter/skateboard/ollie
name = "Ollie"
desc = "Get some air! Land on a table to do a gnarly grind."
button_icon_state = "skateboard_ollie"
///Cooldown to next jump
var/next_ollie
/datum/action/vehicle/ridden/scooter/skateboard/ollie/Trigger()
if(world.time > next_ollie)
var/obj/vehicle/ridden/scooter/skateboard/V = vehicle_target
if (V.grinding)
return
var/mob/living/L = owner
var/turf/landing_turf = get_step(V.loc, V.dir)
L.adjustStaminaLoss(V.instability*2)
if (L.getStaminaLoss() >= 100)
playsound(src, 'sound/effects/bang.ogg', 20, TRUE)
V.unbuckle_mob(L)
L.throw_at(landing_turf, 2, 2)
L.Paralyze(40)
V.visible_message("<span class='danger'>[L] misses the landing and falls on [L.p_their()] face!</span>")
else
L.spin(4, 1)
animate(L, pixel_y = -6, time = 4)
animate(V, pixel_y = -6, time = 3)
playsound(V, 'sound/vehicles/skateboard_ollie.ogg', 50, TRUE)
passtable_on(L, VEHICLE_TRAIT)
V.pass_flags |= PASSTABLE
L.Move(landing_turf, vehicle_target.dir)
passtable_off(L, VEHICLE_TRAIT)
V.pass_flags &= ~PASSTABLE
if(locate(/obj/structure/table) in V.loc.contents)
V.grinding = TRUE
V.icon_state = "[V.board_icon]-grind"
addtimer(CALLBACK(V, /obj/vehicle/ridden/scooter/skateboard/.proc/grind), 2)
next_ollie = world.time + 5
+73 -73
View File
@@ -1,73 +1,73 @@
/obj/item/key
name = "key"
desc = "A small grey key."
icon = 'icons/obj/vehicles.dmi'
icon_state = "key"
w_class = WEIGHT_CLASS_TINY
/obj/item/key/security
desc = "A keyring with a small steel key, and a rubber stun baton accessory."
icon_state = "keysec"
/obj/item/key/security/suicide_act(mob/living/carbon/user)
if(!user.emote("spin")) //In the off chance that someone attempts this suicide while under the effects of mime's bane they deserve the silliness.
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] ear and starts [user.p_their()] motor! It looks like [user.p_theyre()] trying to commit suicide... But [user.p_they()] sputters and stalls out! </span>")
playsound(src, 'sound/misc/sadtrombone.ogg', 50, TRUE, -1)
return SHAME
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] ear and starts [user.p_their()] motor! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.say("Vroom vroom!!", forced="secway key suicide") //Not doing a shamestate here, because even if they fail to speak they're spinning.
addtimer(CALLBACK(user, /mob/living/.proc/gib), 20)
return MANUAL_SUICIDE
/obj/item/key/janitor
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
icon_state = "keyjanitor"
/obj/item/key/janitor/suicide_act(mob/living/carbon/user)
switch(user.mind.get_skill_level(/datum/skill/cleaning))
if(SKILL_LEVEL_NONE to SKILL_LEVEL_NOVICE) //Their mind is too weak to ascend as a janny
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and is trying to become one with the janicart, but has no idea where to start! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.gib()
return MANUAL_SUICIDE
if(SKILL_LEVEL_APPRENTICE to SKILL_LEVEL_JOURNEYMAN) //At least they tried
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and has inefficiently become one with the janicart! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.AddElement(/datum/element/cleaning)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 51)
return MANUAL_SUICIDE
if(SKILL_LEVEL_EXPERT to SKILL_LEVEL_MASTER) //They are worthy enough, but can it go even further beyond?
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and has skillfully become one with the janicart! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.AddElement(/datum/element/cleaning)
for(var/i in 1 to 100)
addtimer(CALLBACK(user, /atom/proc/add_atom_colour, (i % 2)? "#a245bb" : "#7a7d82", ADMIN_COLOUR_PRIORITY), i)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 101)
return MANUAL_SUICIDE
if(SKILL_LEVEL_LEGENDARY to INFINITY) //Holy shit, look at that janny go!
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and has epically become one with the janicart, and they're even in overdrive mode! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.AddElement(/datum/element/cleaning)
playsound(src, 'sound//magic/lightning_chargeup.ogg', 50, TRUE, -1)
user.reagents.add_reagent(/datum/reagent/drug/methamphetamine, 10) //Gotta go fast!
for(var/i in 1 to 150)
addtimer(CALLBACK(user, /atom/proc/add_atom_colour, (i % 2)? "#a245bb" : "#7a7d82", ADMIN_COLOUR_PRIORITY), i)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 151)
return MANUAL_SUICIDE
/obj/item/key/proc/manual_suicide(mob/living/user)
if(user)
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
user.visible_message("<span class='suicide'>[user] forgot [user.p_they()] isn't actually a janicart! That's a paddlin'!</span>")
if(user.mind.get_skill_level(/datum/skill/cleaning) >= SKILL_LEVEL_LEGENDARY) //Janny janny janny janny janny
playsound(src, 'sound/effects/adminhelp.ogg', 50, TRUE, -1)
user.adjustOxyLoss(200)
user.death(0)
/obj/item/key/lasso
name = "bone lasso"
desc = "Perfect for taming all kinds of supernatural beasts! (Warning: only perfect for taming one kind of supernatural beast.)"
force = 12
icon_state = "lasso"
inhand_icon_state = "chain"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/whip.ogg'
slot_flags = ITEM_SLOT_BELT
/obj/item/key
name = "key"
desc = "A small grey key."
icon = 'icons/obj/vehicles.dmi'
icon_state = "key"
w_class = WEIGHT_CLASS_TINY
/obj/item/key/security
desc = "A keyring with a small steel key, and a rubber stun baton accessory."
icon_state = "keysec"
/obj/item/key/security/suicide_act(mob/living/carbon/user)
if(!user.emote("spin")) //In the off chance that someone attempts this suicide while under the effects of mime's bane they deserve the silliness.
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] ear and starts [user.p_their()] motor! It looks like [user.p_theyre()] trying to commit suicide... But [user.p_they()] sputters and stalls out! </span>")
playsound(src, 'sound/misc/sadtrombone.ogg', 50, TRUE, -1)
return SHAME
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] ear and starts [user.p_their()] motor! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.say("Vroom vroom!!", forced="secway key suicide") //Not doing a shamestate here, because even if they fail to speak they're spinning.
addtimer(CALLBACK(user, /mob/living/.proc/gib), 20)
return MANUAL_SUICIDE
/obj/item/key/janitor
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
icon_state = "keyjanitor"
/obj/item/key/janitor/suicide_act(mob/living/carbon/user)
switch(user.mind.get_skill_level(/datum/skill/cleaning))
if(SKILL_LEVEL_NONE to SKILL_LEVEL_NOVICE) //Their mind is too weak to ascend as a janny
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and is trying to become one with the janicart, but has no idea where to start! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.gib()
return MANUAL_SUICIDE
if(SKILL_LEVEL_APPRENTICE to SKILL_LEVEL_JOURNEYMAN) //At least they tried
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and has inefficiently become one with the janicart! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.AddElement(/datum/element/cleaning)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 51)
return MANUAL_SUICIDE
if(SKILL_LEVEL_EXPERT to SKILL_LEVEL_MASTER) //They are worthy enough, but can it go even further beyond?
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and has skillfully become one with the janicart! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.AddElement(/datum/element/cleaning)
for(var/i in 1 to 100)
addtimer(CALLBACK(user, /atom/proc/add_atom_colour, (i % 2)? "#a245bb" : "#7a7d82", ADMIN_COLOUR_PRIORITY), i)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 101)
return MANUAL_SUICIDE
if(SKILL_LEVEL_LEGENDARY to INFINITY) //Holy shit, look at that janny go!
user.visible_message("<span class='suicide'>[user] is putting \the [src] in [user.p_their()] mouth and has epically become one with the janicart, and they're even in overdrive mode! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.AddElement(/datum/element/cleaning)
playsound(src, 'sound//magic/lightning_chargeup.ogg', 50, TRUE, -1)
user.reagents.add_reagent(/datum/reagent/drug/methamphetamine, 10) //Gotta go fast!
for(var/i in 1 to 150)
addtimer(CALLBACK(user, /atom/proc/add_atom_colour, (i % 2)? "#a245bb" : "#7a7d82", ADMIN_COLOUR_PRIORITY), i)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 151)
return MANUAL_SUICIDE
/obj/item/key/proc/manual_suicide(mob/living/user)
if(user)
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
user.visible_message("<span class='suicide'>[user] forgot [user.p_they()] isn't actually a janicart! That's a paddlin'!</span>")
if(user.mind.get_skill_level(/datum/skill/cleaning) >= SKILL_LEVEL_LEGENDARY) //Janny janny janny janny janny
playsound(src, 'sound/effects/adminhelp.ogg', 50, TRUE, -1)
user.adjustOxyLoss(200)
user.death(0)
/obj/item/key/lasso
name = "bone lasso"
desc = "Perfect for taming all kinds of supernatural beasts! (Warning: only perfect for taming one kind of supernatural beast.)"
force = 12
icon_state = "lasso"
inhand_icon_state = "chain"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
hitsound = 'sound/weapons/whip.ogg'
slot_flags = ITEM_SLOT_BELT