mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into OrganRefactor
This commit is contained in:
@@ -89,4 +89,70 @@
|
||||
victim.apply_effect(6, STUTTER, 0)
|
||||
victim.take_organ_damage(10)
|
||||
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/bike
|
||||
name = "bicycle"
|
||||
desc = "Two wheels of FURY!"
|
||||
//placeholder until i get a bike sprite
|
||||
icon = 'icons/vehicles/motorcycle.dmi'
|
||||
icon_state = "motorcycle_4dir"
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/bike/relaymove(mob/user, direction)
|
||||
if(propelled)
|
||||
return 0
|
||||
|
||||
if(!Process_Spacemove(direction) || !has_gravity(src.loc) || !isturf(loc)) //bikes in space.
|
||||
return 0
|
||||
|
||||
if(world.time < move_delay)
|
||||
return
|
||||
|
||||
var/calculated_move_delay
|
||||
calculated_move_delay = 0 //bikes are infact sport bikes
|
||||
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.incapacitated())
|
||||
unbuckle_mob() //if the rider is incapacitated, unbuckle them (they can't balance so they fall off)
|
||||
return 0
|
||||
|
||||
var/mob/living/thedriver = user
|
||||
var/mob_delay = thedriver.movement_delay()
|
||||
if(mob_delay > 0)
|
||||
calculated_move_delay += mob_delay
|
||||
|
||||
if(ishuman(buckled_mob))
|
||||
var/mob/living/carbon/human/driver = user
|
||||
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
||||
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
|
||||
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
|
||||
calculated_move_delay += 0.5 //I can ride my bike with no handlebars... (but it's slower)
|
||||
|
||||
for(var/organ_name in list("l_leg","r_leg","l_foot","r_foot"))
|
||||
var/obj/item/organ/external/E = driver.get_organ(organ_name)
|
||||
if(!E || (E.status & ORGAN_DESTROYED))
|
||||
return 0 //Bikes need both feet/legs to work. missing even one makes it so you can't ride the bike
|
||||
else if(E.status & ORGAN_SPLINTED)
|
||||
calculated_move_delay += 0.5
|
||||
else if(E.status & ORGAN_BROKEN)
|
||||
calculated_move_delay += 1.5
|
||||
|
||||
move_delay = world.time
|
||||
move_delay += calculated_move_delay
|
||||
|
||||
if(!buckled_mob.Move(get_step(buckled_mob, direction), direction))
|
||||
loc = buckled_mob.loc //we gotta go back
|
||||
last_move = buckled_mob.last_move
|
||||
inertia_dir = last_move
|
||||
buckled_mob.inertia_dir = last_move
|
||||
. = 0
|
||||
|
||||
else
|
||||
. = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/handle_rotation()
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/vehicles/motorcycle.dmi', icon_state = "motorcycle_overlay_4d", layer = FLY_LAYER, dir = src.dir)
|
||||
overlays += O
|
||||
if(buckled_mob)
|
||||
buckled_mob.dir = dir
|
||||
Reference in New Issue
Block a user