[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
@@ -379,12 +379,11 @@
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/post_buckle_mob(mob/living/M)
|
||||
if(M in buckled_mobs) //post buckling
|
||||
M.pixel_y = initial(M.pixel_y) + 9
|
||||
if(M.layer < layer)
|
||||
M.layer = layer + 0.01
|
||||
M.pixel_y = initial(M.pixel_y) + 9
|
||||
if(M.layer < layer)
|
||||
M.layer = layer + 0.01
|
||||
|
||||
else //post unbuckling
|
||||
/mob/living/simple_animal/bot/mulebot/post_unbuckle_mob(mob/living/M)
|
||||
load = null
|
||||
M.layer = initial(M.layer)
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
@@ -521,37 +521,26 @@
|
||||
client.screen |= l_hand
|
||||
|
||||
//ANIMAL RIDING
|
||||
/mob/living/simple_animal/unbuckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1)
|
||||
if(riding_datum)
|
||||
riding_datum.restore_position(buckled_mob)
|
||||
. = ..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/user_buckle_mob(mob/living/M, mob/user)
|
||||
GET_COMPONENT(riding_datum, /datum/component/riding)
|
||||
if(riding_datum)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
for(var/atom/movable/A in get_turf(src))
|
||||
if(A != src && A != M && A.density)
|
||||
return
|
||||
M.loc = get_turf(src)
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
riding_datum.ridden = src
|
||||
M.forceMove(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/relaymove(mob/user, direction)
|
||||
GET_COMPONENT(riding_datum, /datum/component/riding)
|
||||
if(tame && riding_datum)
|
||||
riding_datum.handle_ride(user, direction)
|
||||
|
||||
/mob/living/simple_animal/Moved()
|
||||
. = ..()
|
||||
if(riding_datum)
|
||||
riding_datum.on_vehicle_move()
|
||||
|
||||
|
||||
/mob/living/simple_animal/buckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1)
|
||||
. = ..()
|
||||
riding_datum = new/datum/riding/animal
|
||||
|
||||
LoadComponent(/datum/component/riding)
|
||||
|
||||
/mob/living/simple_animal/proc/toggle_ai(togglestatus)
|
||||
if (AIStatus != togglestatus)
|
||||
|
||||
Reference in New Issue
Block a user