Files
Paradise/code/__DEFINES/vehicle_defines.dm
aaad036c7c Only small and tiny simplemobs can go on skateboards, shoot people off them [BALANCE PRE APPROVED] (#26091)
* Only small and tiny simplemobs can go on skateboards, shoot people off them

* Update code/datums/components/riding/riding_vehicle.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>

---------

Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
2024-07-02 00:14:09 +00:00

40 lines
1.9 KiB
Plaintext

//Vehicle control flags. control flags describe access to actions in a vehicle.
///controls the vehicles movement
#define VEHICLE_CONTROL_DRIVE (1<<0)
///Can't leave vehicle voluntarily, has to resist.
#define VEHICLE_CONTROL_KIDNAPPED (1<<1)
///melee attacks/shoves a vehicle may have
#define VEHICLE_CONTROL_MELEE (1<<2)
///using equipment/weapons on the vehicle
#define VEHICLE_CONTROL_EQUIPMENT (1<<3)
///changing around settings and the like.
#define VEHICLE_CONTROL_SETTINGS (1<<4)
///ez define for giving a single pilot mech all the flags it needs.
#define FULL_MECHA_CONTROL ALL
//Ridden vehicle flags
/// Does our vehicle require arms to operate? Also used for piggybacking on humans to reserve arms on the rider
#define RIDER_NEEDS_ARMS (1<<0)
// As above but only reserves 1 arm instead of 2
#define RIDER_NEEDS_ARM (1<<1)
/// Do we need legs to ride this (checks against TRAIT_FLOORED)
#define RIDER_NEEDS_LEGS (1<<2)
/// If the rider is disabled or loses their needed limbs, do they fall off?
#define UNBUCKLE_DISABLED_RIDER (1<<3)
/// Do we need a carbon, a silicon, or a small mob, to ride the vehicle?
#define RIDER_CARBON_OR_SILICON_NO_LARGE_MOBS (1<<4)
/// The vehicle being ridden requires pixel offsets for all directions
#define RIDING_OFFSET_ALL "ALL"
///Broken down, here's what this does:
/// divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
/// The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
/// Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
/// The whole result is then clamped to within the range above.
/// Not very readable but it works
#define DELAY_TO_GLIDE_SIZE(delay) (clamp(((world.icon_size / max((delay) / world.tick_lag, 1))), 1, 32))