mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-27 23:29:10 +01:00
Merge branch 'release' of https://github.com/VOREStation/VOREStation into izac-voreupdate
All conflicts resolved Signed-off-by: izac112 <izac10@live.com>
This commit is contained in:
@@ -207,14 +207,11 @@
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/security/engine/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
return
|
||||
|
||||
to_chat(user, "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition.")
|
||||
to_chat(user, "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The power light is [on ? "on" : "off"]."
|
||||
. += "There are[key ? "" : " no"] keys in the ignition."
|
||||
. += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%"
|
||||
|
||||
/obj/vehicle/train/security/engine/verb/start_engine()
|
||||
set name = "Start engine"
|
||||
|
||||
@@ -192,14 +192,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/engine/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
return
|
||||
|
||||
to_chat(user, "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition.")
|
||||
to_chat(user, "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%")
|
||||
. = ..()
|
||||
if(ishuman(user) && Adjacent(user))
|
||||
. += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition."
|
||||
. += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%"
|
||||
|
||||
/obj/vehicle/train/engine/verb/start_engine()
|
||||
set name = "Start engine"
|
||||
|
||||
@@ -45,19 +45,18 @@
|
||||
icon_state = "quad_keys"
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/vehicle/train/engine/quadbike/Move(var/turf/destination)
|
||||
var/turf/T = get_turf(src)
|
||||
..() //Move it move it, so we can test it test it.
|
||||
if(T != get_turf(src) && !istype(destination, T.type)) //Did we move at all, and are we changing turf types?
|
||||
if(istype(destination, /turf/simulated/floor/water))
|
||||
/obj/vehicle/train/engine/quadbike/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..() //Move it move it, so we can test it test it.
|
||||
if(!istype(loc, old_loc.type) && !istype(old_loc, loc.type)) //Did we move at all, and are we changing turf types?
|
||||
if(istype(loc, /turf/simulated/floor/water))
|
||||
speed_mod = outdoors_speed_mod * 4 //It kind of floats due to its tires, but it is slow.
|
||||
else if(istype(destination, /turf/simulated/floor/outdoors/rocks))
|
||||
else if(istype(loc, /turf/simulated/floor/outdoors/rocks))
|
||||
speed_mod = initial(speed_mod) //Rocks are good, rocks are solid.
|
||||
else if(istype(destination, /turf/simulated/floor/outdoors/dirt) || istype(destination, /turf/simulated/floor/outdoors/grass))
|
||||
else if(istype(loc, /turf/simulated/floor/outdoors/dirt) || istype(loc, /turf/simulated/floor/outdoors/grass))
|
||||
speed_mod = outdoors_speed_mod //Dirt and grass are the outdoors bench mark.
|
||||
else if(istype(destination, /turf/simulated/floor/outdoors/mud))
|
||||
else if(istype(loc, /turf/simulated/floor/outdoors/mud))
|
||||
speed_mod = outdoors_speed_mod * 1.5 //Gets us roughly 1. Mud may be fun, but it's not the best.
|
||||
else if(istype(destination, /turf/simulated/floor/outdoors/snow))
|
||||
else if(istype(loc, /turf/simulated/floor/outdoors/snow))
|
||||
speed_mod = outdoors_speed_mod * 1.7 //Roughly a 1.25. Snow is coarse and wet and gets everywhere, especially your electric motors.
|
||||
else
|
||||
speed_mod = initial(speed_mod)
|
||||
@@ -193,8 +192,8 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/vehicle/train/trolley/trailer/Move()
|
||||
..()
|
||||
/obj/vehicle/train/trolley/trailer/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(lead)
|
||||
switch(dir) //Due to being a Big Boy sprite, it has to have special pixel shifting to look 'normal'.
|
||||
if(1)
|
||||
|
||||
@@ -205,14 +205,11 @@
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/rover/engine/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
return
|
||||
|
||||
to_chat(user, "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition.")
|
||||
to_chat(user, "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%")
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "The power light is [on ? "on" : "off"]."
|
||||
. += "There are[key ? "" : " no"] keys in the ignition."
|
||||
. += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%"
|
||||
|
||||
/obj/vehicle/train/rover/engine/verb/start_engine()
|
||||
set name = "Start engine"
|
||||
|
||||
@@ -29,14 +29,11 @@
|
||||
|
||||
/obj/vehicle/train/Move()
|
||||
var/old_loc = get_turf(src)
|
||||
if(..())
|
||||
if((. = ..()))
|
||||
if(tow)
|
||||
tow.Move(old_loc)
|
||||
return 1
|
||||
else
|
||||
if(lead)
|
||||
unattach()
|
||||
return 0
|
||||
else if(lead)
|
||||
unattach()
|
||||
|
||||
/obj/vehicle/train/Bump(atom/Obstacle)
|
||||
if(!istype(Obstacle, /atom/movable))
|
||||
|
||||
@@ -66,54 +66,29 @@
|
||||
|
||||
/obj/vehicle/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
|
||||
. = ..(buckled_mob, force)
|
||||
buckled_mob.update_water()
|
||||
buckled_mob?.update_water()
|
||||
if(riding_datum)
|
||||
riding_datum.restore_position(buckled_mob)
|
||||
riding_datum.handle_vehicle_offsets() // So the person in back goes to the front.
|
||||
|
||||
/obj/vehicle/set_dir(newdir)
|
||||
..(newdir)
|
||||
if(riding_datum)
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
/obj/vehicle/Move(var/newloc, var/direction, var/movetime)
|
||||
if(world.time < l_move_time + move_delay) //This AND the riding datum move speed limit?
|
||||
return
|
||||
|
||||
//MOVEMENT
|
||||
/obj/vehicle/relaymove(mob/user, direction)
|
||||
if(riding_datum)
|
||||
riding_datum.handle_ride(user, direction)
|
||||
if(mechanical && on && powered && cell.charge < charge_use)
|
||||
turn_off()
|
||||
return
|
||||
|
||||
/obj/vehicle/Moved()
|
||||
. = ..()
|
||||
if(riding_datum)
|
||||
riding_datum.handle_vehicle_layer()
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
|
||||
/obj/vehicle/Move()
|
||||
if(world.time > l_move_time + move_delay)
|
||||
var/old_loc = get_turf(src)
|
||||
if(mechanical && on && powered && cell.charge < charge_use)
|
||||
turn_off()
|
||||
if(mechanical && on && powered)
|
||||
cell.use(charge_use)
|
||||
|
||||
var/init_anc = anchored
|
||||
anchored = 0
|
||||
if(!..())
|
||||
anchored = init_anc
|
||||
return 0
|
||||
|
||||
set_dir(get_dir(old_loc, loc))
|
||||
anchored = init_anc
|
||||
|
||||
if(mechanical && on && powered)
|
||||
cell.use(charge_use)
|
||||
|
||||
//Dummy loads do not have to be moved as they are just an overlay
|
||||
//See load_object() proc in cargo_trains.dm for an example
|
||||
if(load && !istype(load, /datum/vehicle_dummy_load))
|
||||
load.forceMove(loc)
|
||||
load.set_dir(dir)
|
||||
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
//Dummy loads do not have to be moved as they are just an overlay
|
||||
//See load_object() proc in cargo_trains.dm for an example
|
||||
//Also mobs are buckled to the vehicle and get moved in atom/movable/Move's call to take care of that
|
||||
if(load && !(load in buckled_mobs) && !istype(load, /datum/vehicle_dummy_load))
|
||||
load.forceMove(loc)
|
||||
|
||||
/obj/vehicle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/hand_labeler))
|
||||
|
||||
Reference in New Issue
Block a user