Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions code/modules/vehicles/interior/interactable/seats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
var/mob_old_x = 0
var/buckle_offset_y = 0
var/mob_old_y = 0
var/allways_undense = FALSE

/obj/structure/bed/chair/vehicle/Initialize()
. = ..()
Expand Down Expand Up @@ -384,24 +385,34 @@
if(buckle_offset_y != 0)
M.pixel_y = mob_old_y
mob_old_y = 0

for(var/obj/structure/bed/chair/vehicle/VS in get_turf(src))
if(VS != src)
//if both seats on same tile have buckled mob, we become dense, otherwise, not dense.
if(buckled_mob)
if(VS.buckled_mob)
REMOVE_TRAIT(buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
REMOVE_TRAIT(VS.buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
if(allways_undense)
ADD_TRAIT(buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
else
for(var/obj/structure/bed/chair/vehicle/VS in get_turf(src))
if(VS != src)
//if both seats on same tile have buckled mob, we become dense, otherwise, not dense.
if(buckled_mob)
if(VS.buckled_mob)
REMOVE_TRAIT(buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
REMOVE_TRAIT(VS.buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
else
ADD_TRAIT(buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
else
ADD_TRAIT(buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
else
if(VS.buckled_mob)
ADD_TRAIT(VS.buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
REMOVE_TRAIT(M, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
break
if(VS.buckled_mob)
ADD_TRAIT(VS.buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
REMOVE_TRAIT(M, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
break



handle_rotation()

/obj/structure/bed/chair/vehicle/unbuckle()
if(buckled_mob && buckled_mob.buckled == src)
REMOVE_TRAIT(buckled_mob, TRAIT_UNDENSE, DOUBLE_SEATS_TRAIT)
. = ..()


//attack handling

/obj/structure/bed/chair/vehicle/attack_alien(mob/living/user)
Expand Down
1 change: 1 addition & 0 deletions code/modules/vehicles/van/rt01.dm
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@

/obj/structure/bed/chair/vehicle/comfy
icon = 'icons/obj/vehicles/interiors/rt01_general.dmi'
allways_undense = TRUE

/obj/structure/bed/chair/vehicle/comfy/alt
icon_state = "alt_vehicle_seat"
Expand Down
Loading