mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 12:56:10 +01:00
387cee9243
Extends and reworks how various extended information text (desc_info, desc_build, desc_upgrades) are handled to make object interactions and mechanics A.) much more clearly documented in-game and B.) much easier to support from the back-end. Almost certainly a candidate for test merge. Assembly/Disassembly instructions are noticeably sporadic, largely due to our current lack of a unified framework. That's a future thing I'd like to attack so that it can be handled programmatically, but for now I only targeted the biggest culprits as I came across them. --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
112 lines
2.8 KiB
Plaintext
112 lines
2.8 KiB
Plaintext
/obj/vehicle/bike/wasp_torpedo
|
|
name = "wasp torpedo"
|
|
desc = "A manned torpedo used by the Al'mariist space forces."
|
|
icon = 'icons/obj/wasp_torpedo.dmi'
|
|
icon_state = "torpedo_off"
|
|
|
|
health = 300
|
|
maxhealth = 300
|
|
|
|
fire_dam_coeff = 0.5
|
|
brute_dam_coeff = 0.4
|
|
|
|
mob_offset_y = 1
|
|
|
|
bike_icon = "torpedo"
|
|
dir = EAST
|
|
|
|
land_speed = 3
|
|
space_speed = 1
|
|
|
|
storage_type = null
|
|
|
|
pixel_y = -16
|
|
pixel_x = -16
|
|
|
|
ion_type = /datum/effect_system/ion_trail/explosion
|
|
|
|
var/primmed = FALSE
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/mechanics_hints(mob/user, distance, is_adjacent)
|
|
. += ..()
|
|
// Not the fun kind of bike. Don't inherit.
|
|
. += "Click-drag yourself onto the torpedo to climb onto it."
|
|
. += "CTRL-click the torpedo to toggle the engine."
|
|
. += "ALT-click to toggle the kickstand which prevents movement by driving and dragging."
|
|
. += "Click the resist button or type \"resist\" in the command bar at the bottom of your screen to get off the torpedo."
|
|
. += "CTRL-SHIFT-click to cause it to charge and detonate on impact."
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/collide_act(var/atom/movable/AM)
|
|
if(!AM.density)
|
|
return
|
|
if(!primmed)
|
|
return
|
|
|
|
torpedo_explosion()
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/proc/torpedo_explosion()
|
|
STOP_PROCESSING(SSfast_process, src)
|
|
primmed = FALSE
|
|
if(prob(25) && buckled) //has a chance of being thrown off when it explodes
|
|
if(ishuman(buckled))
|
|
var/mob/living/carbon/human/C = buckled
|
|
C.visible_message(SPAN_DANGER ("\The [C] is thrown off from \the [src]!"))
|
|
unload(C)
|
|
C.throw_at(get_edge_target_turf(loc, loc.dir), 5, 1)
|
|
C.apply_effect(2, WEAKEN)
|
|
if(buckled)
|
|
unload(buckled)
|
|
if(ishuman(buckled))
|
|
var/mob/living/carbon/human/V = buckled
|
|
V.apply_effect(2, WEAKEN)
|
|
explosion(loc, 1, 2, 4, 8)
|
|
visible_message(SPAN_DANGER ("\The [src] detonates!"))
|
|
qdel(src)
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/proc/prime(var/mob/user)
|
|
if(primmed)
|
|
if(user)
|
|
to_chat(src, SPAN_WARNING("The priming button is jammed. There is no turning back now."))
|
|
return
|
|
if(!on)
|
|
turn_on()
|
|
kickstand = FALSE
|
|
visible_message(SPAN_DANGER ("\The [src] begins to beep omnisouly before charging!"))
|
|
playsound(get_turf(src), 'sound/items/countdown.ogg', 75, 1, -3)
|
|
primmed = TRUE
|
|
land_speed = 1
|
|
space_speed = 1
|
|
START_PROCESSING(SSprocessing, src)
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/CtrlShiftClick(var/mob/user)
|
|
prime(user)
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/process()
|
|
if(!primmed)
|
|
return
|
|
Move(get_step(src, dir))
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/turn_off()
|
|
if(primmed)
|
|
return
|
|
..()
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
|
|
. = ..()
|
|
if(. != BULLET_ACT_HIT)
|
|
return .
|
|
|
|
if(hitting_projectile.get_structure_damage())
|
|
if(prob(10))
|
|
torpedo_explosion()
|
|
|
|
/obj/vehicle/bike/wasp_torpedo/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
torpedo_explosion()
|
|
return
|
|
if(2.0)
|
|
if(prob(50))
|
|
torpedo_explosion()
|
|
..()
|