Files
GS13NG/code/modules/vehicles/vehicle.dm
T
Poojawa 0bca862419 Overhauls and 2/28 sync (#244)
* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures

* lazy fix for bleeding edgy (#252)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures
2017-02-28 09:30:49 -06:00

109 lines
2.4 KiB
Plaintext

/obj/vehicle
name = "vehicle"
desc = "A basic vehicle, vroom"
icon = 'icons/obj/vehicles.dmi'
icon_state = "fuckyou"
density = 1
anchored = 0
can_buckle = 1
buckle_lying = 0
obj_integrity = 300
max_integrity = 300
armor = list(melee = 30, bullet = 30, laser = 30, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 60, acid = 60)
var/auto_door_open = TRUE
var/view_range = 7
var/datum/riding/riding_datum = null
/obj/vehicle/Destroy()
QDEL_NULL(riding_datum)
return ..()
/obj/vehicle/update_icon()
return
/obj/item/key
name = "key"
desc = "A small grey key."
icon = 'icons/obj/vehicles.dmi'
icon_state = "key"
w_class = WEIGHT_CLASS_TINY
//BUCKLE HOOKS
/obj/vehicle/unbuckle_mob(mob/living/buckled_mob,force = 0)
if(riding_datum)
riding_datum.restore_position(buckled_mob)
. = ..()
/obj/vehicle/user_buckle_mob(mob/living/M, mob/user)
if(user.incapacitated())
return
for(var/atom/movable/A in get_turf(src))
if(A.density)
if(A != src && A != M)
return
M.loc = get_turf(src)
..()
if(user.client)
user.client.change_view(view_range)
if(riding_datum)
riding_datum.ridden = src
riding_datum.handle_vehicle_offsets()
//MOVEMENT
/obj/vehicle/relaymove(mob/user, direction)
if(riding_datum)
riding_datum.handle_ride(user, direction)
/obj/vehicle/Moved()
. = ..()
if(riding_datum)
riding_datum.handle_vehicle_layer()
riding_datum.handle_vehicle_offsets()
/obj/vehicle/Bump(atom/movable/M)
. = ..()
if(auto_door_open)
if(istype(M, /obj/machinery/door) && has_buckled_mobs())
for(var/m in buckled_mobs)
M.Bumped(m)
/obj/vehicle/Process_Spacemove(direction)
if(has_gravity())
return 1
if(pulledby && (pulledby.loc != loc))
return 1
return 0
/obj/vehicle/space
pressure_resistance = INFINITY
/obj/vehicle/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 20)
return 0
. = ..()
/obj/vehicle/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
/obj/vehicle/examine(mob/user)
..()
if(!(resistance_flags & INDESTRUCTIBLE))
if(resistance_flags & ON_FIRE)
user << "<span class='warning'>It's on fire!</span>"
var/healthpercent = (obj_integrity/max_integrity) * 100
switch(healthpercent)
if(50 to 99)
user << "It looks slightly damaged."
if(25 to 50)
user << "It appears heavily damaged."
if(0 to 25)
user << "<span class='warning'>It's falling apart!</span>"