Files
kiwistation/code/modules/vehicles/secway.dm
T
Qustinnus a394ccdc2b Material datum chairs & tables and applies materials to all items (Now with less pain for mining & RnD) (#46525)
removes materials list from items, uses custom_materials instead. This might introduce some bugs so we should testmerge this for a while (and Ill test stuff locally as much as I can)

this also adds material crafting to sheets. Test case being chairs. In the future we can add stuff like tables, walls, doors etc.

also applies materials to everything, with fixes, which can close #46299
2019-10-08 11:06:02 -04:00

55 lines
1.9 KiB
Plaintext

/obj/vehicle/ridden/secway
name = "secway"
desc = "A brave security cyborg gave its life to help you look like a complete tool."
icon_state = "secway"
max_integrity = 60
armor = list("melee" = 10, "bullet" = 0, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60)
key_type = /obj/item/key/security
integrity_failure = 0.5
/obj/vehicle/ridden/secway/Initialize()
. = ..()
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
D.vehicle_move_delay = 1.75
D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(0, 4), TEXT_WEST = list( 0, 4)))
/obj/vehicle/ridden/secway/obj_break()
START_PROCESSING(SSobj, src)
return ..()
/obj/vehicle/ridden/secway/process()
if(obj_integrity >= integrity_failure * max_integrity)
return PROCESS_KILL
if(prob(20))
return
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(0, src)
smoke.start()
/obj/vehicle/ridden/secway/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour == TOOL_WELDER && user.a_intent != INTENT_HARM)
if(obj_integrity < max_integrity)
if(W.use_tool(src, user, 0, volume = 50, amount = 1))
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>", "<span class='notice'>You repair some damage to \the [src].</span>")
obj_integrity += min(10, max_integrity-obj_integrity)
if(obj_integrity == max_integrity)
to_chat(user, "<span class='notice'>It looks to be fully repaired now.</span>")
return TRUE
return ..()
/obj/vehicle/ridden/secway/obj_destruction()
explosion(src, -1, 0, 2, 4, flame_range = 3)
return ..()
/obj/vehicle/ridden/secway/Destroy()
STOP_PROCESSING(SSobj,src)
return ..()
/obj/vehicle/ridden/secway/bullet_act(obj/projectile/P)
if(prob(60) && buckled_mobs)
for(var/mob/M in buckled_mobs)
M.bullet_act(P)
return TRUE
return ..()