[READY]VEHICLE REFACTOR - Riding datums --> Components, Vehicles --> /obj/vehicle, staging for mech overhaul later on
This commit is contained in:
committed by
CitadelStationBot
parent
6217206bae
commit
66c66f0bd7
@@ -890,8 +890,11 @@
|
||||
if(!is_type_in_typecache(M, can_ride_typecache))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount [src]...</span>")
|
||||
return
|
||||
if(!riding_datum)
|
||||
riding_datum = new /datum/riding/human(src)
|
||||
var/datum/component/riding/human/riding_datum = LoadComponent(/datum/component/riding/human)
|
||||
riding_datum.ride_check_rider_incapacitated = TRUE
|
||||
riding_datum.ride_check_ridden_incapacitated = TRUE
|
||||
riding_datum.ride_check_rider_restrained = TRUE
|
||||
riding_datum.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(-6, 4), TEXT_WEST = list( 6, 4)))
|
||||
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)) || buckled || (M.stat != CONSCIOUS))
|
||||
return
|
||||
visible_message("<span class='notice'>[M] starts to climb onto [src]...</span>")
|
||||
@@ -908,13 +911,6 @@
|
||||
else
|
||||
visible_message("<span class='warning'>[M] fails to climb onto [src]!</span>")
|
||||
|
||||
/mob/living/carbon/human/unbuckle_mob(mob/living/M, force=FALSE)
|
||||
if(iscarbon(M))
|
||||
if(riding_datum)
|
||||
riding_datum.unequip_buckle_inhands(M)
|
||||
riding_datum.restore_position(M)
|
||||
. = ..(M, force)
|
||||
|
||||
/mob/living/carbon/human/species
|
||||
var/race = null
|
||||
|
||||
|
||||
@@ -188,12 +188,8 @@
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.a_intent == INTENT_DISARM)
|
||||
if(H.buckled_mobs && (src in H.buckled_mobs) && H.riding_datum)
|
||||
H.riding_datum.force_dismount(src)
|
||||
dna.species.spec_attack_hand(H, src)
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_paw(mob/living/carbon/monkey/M)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
|
||||
@@ -58,11 +58,6 @@
|
||||
//End bloody footprints
|
||||
S.step_action()
|
||||
|
||||
/mob/living/carbon/human/Moved()
|
||||
. = ..()
|
||||
if(buckled_mobs && buckled_mobs.len && riding_datum)
|
||||
riding_datum.on_vehicle_move()
|
||||
|
||||
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee.
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user