mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
+37






![tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)


Alexis
GitHub
tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
ArcaneMusic
MrMelbert
Rhials
rageguy505
LemonInTheDark
John Willard
Aliceee2ch
Time-Green
Tsar-Salat
SmArtKar
Maxipat
SyncIt21
deltanedas
SimplyLogan
loganuk
Leland Kemble
FalloutFalcon
Roxy
Lucy
siliconOpossum
Isratosh
TheRyeGuyWhoWillNowDie
Neocloudy
Alexander V.
ElGitificador
Twaticus
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bloop
Cameron Lennox
Tim
Iamgoofball
Layzu666
Arturlang
_0Steven
mrmanlikesbt
Ben10Omintrix
John F. Kennedy
Cursor
Josh
Josh Powell
Yobrocharlie
Hardly3D
shayoki
LT3
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
159 lines
5.5 KiB
Plaintext
159 lines
5.5 KiB
Plaintext
/**
|
|
* ## VIM!!!!!!!
|
|
*
|
|
* It's a teenie miniature mecha... for critters!
|
|
* For the critters that cannot be understood, there is a sound creator in the mecha. It also has headlights.
|
|
*/
|
|
/obj/vehicle/sealed/car/vim
|
|
name = "\improper Vim"
|
|
desc = "A miniature exosuit from Nanotrasen, developed to let the irreplaceable station pets live a little longer."
|
|
icon_state = "vim"
|
|
max_integrity = 50
|
|
armor_type = /datum/armor/car_vim
|
|
enter_delay = 20
|
|
movedelay = 0.6
|
|
engine_sound_length = 0.3 SECONDS
|
|
light_system = OVERLAY_LIGHT_DIRECTIONAL
|
|
light_range = 4
|
|
light_power = 1.5
|
|
light_on = FALSE
|
|
engine_sound = 'sound/effects/servostep.ogg'
|
|
interaction_flags_mouse_drop = NONE
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7)
|
|
///Maximum size of a mob trying to enter the mech
|
|
var/maximum_mob_size = MOB_SIZE_SMALL
|
|
COOLDOWN_DECLARE(sound_cooldown)
|
|
|
|
/datum/armor/car_vim
|
|
melee = 70
|
|
bullet = 40
|
|
laser = 40
|
|
bomb = 30
|
|
fire = 80
|
|
acid = 80
|
|
|
|
/obj/vehicle/sealed/car/vim/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent( \
|
|
/datum/component/shell, \
|
|
unremovable_circuit_components = list(new /obj/item/circuit_component/vim), \
|
|
capacity = SHELL_CAPACITY_SMALL, \
|
|
)
|
|
|
|
/obj/vehicle/sealed/car/vim/examine(mob/user)
|
|
. = ..()
|
|
. += span_notice("[src] can be repaired with a welder.")
|
|
|
|
/obj/vehicle/sealed/car/vim/atom_destruction(damage_flag)
|
|
new /obj/effect/decal/cleanable/blood/oil(get_turf(src))
|
|
do_sparks(5, TRUE, src)
|
|
visible_message(span_bolddanger("[src] blows apart!"))
|
|
return ..()
|
|
|
|
/obj/vehicle/sealed/car/vim/mob_try_enter(mob/entering)
|
|
if(!isanimal_or_basicmob(entering))
|
|
return FALSE
|
|
var/mob/living/animal_or_basic = entering
|
|
if(animal_or_basic.mob_size > maximum_mob_size)
|
|
entering.balloon_alert(entering, "can't fit inside!")
|
|
return FALSE
|
|
return ..()
|
|
|
|
/obj/vehicle/sealed/car/vim/welder_act(mob/living/user, obj/item/W)
|
|
if(user.combat_mode)
|
|
return
|
|
. = TRUE
|
|
if(DOING_INTERACTION(user, src))
|
|
balloon_alert(user, "you're already repairing it!")
|
|
return
|
|
if(atom_integrity >= max_integrity)
|
|
balloon_alert(user, "it's not damaged!")
|
|
return
|
|
if(!W.tool_start_check(user, amount=1, heat_required = HIGH_TEMPERATURE_REQUIRED))
|
|
return
|
|
user.balloon_alert_to_viewers("started welding [src]", "started repairing [src]")
|
|
audible_message(span_hear("You hear welding."))
|
|
var/did_the_thing
|
|
while(atom_integrity < max_integrity)
|
|
if(W.use_tool(src, user, 2.5 SECONDS, volume=50))
|
|
did_the_thing = TRUE
|
|
atom_integrity += min(VIM_HEAL_AMOUNT, (max_integrity - atom_integrity))
|
|
audible_message(span_hear("You hear welding."))
|
|
else
|
|
break
|
|
if(did_the_thing)
|
|
user.balloon_alert_to_viewers("[(atom_integrity >= max_integrity) ? "fully" : "partially"] repaired [src]")
|
|
else
|
|
user.balloon_alert_to_viewers("stopped welding [src]", "interrupted the repair!")
|
|
|
|
/obj/vehicle/sealed/car/vim/mob_enter(mob/newoccupant, silent = FALSE)
|
|
. = ..()
|
|
update_appearance()
|
|
playsound(src, 'sound/machines/windowdoor.ogg', 50, TRUE)
|
|
if(atom_integrity == max_integrity)
|
|
SEND_SOUND(newoccupant, sound('sound/vehicles/mecha/nominal.ogg',volume=50))
|
|
|
|
/obj/vehicle/sealed/car/vim/mob_try_exit(mob/pilot, mob/user, silent = FALSE, randomstep = FALSE)
|
|
. = ..()
|
|
update_appearance()
|
|
|
|
/obj/vehicle/sealed/car/vim/generate_actions()
|
|
initialize_controller_action_type(/datum/action/vehicle/sealed/climb_out/vim, VEHICLE_CONTROL_DRIVE)
|
|
initialize_controller_action_type(/datum/action/vehicle/sealed/noise/chime, VEHICLE_CONTROL_DRIVE)
|
|
initialize_controller_action_type(/datum/action/vehicle/sealed/noise/buzz, VEHICLE_CONTROL_DRIVE)
|
|
initialize_controller_action_type(/datum/action/vehicle/sealed/headlights/vim, VEHICLE_CONTROL_DRIVE)
|
|
|
|
/obj/vehicle/sealed/car/vim/update_overlays()
|
|
. = ..()
|
|
var/static/piloted_overlay
|
|
var/static/headlights_overlay
|
|
if(isnull(piloted_overlay))
|
|
piloted_overlay = iconstate2appearance(icon, "vim_piloted")
|
|
headlights_overlay = iconstate2appearance(icon, "vim_headlights")
|
|
|
|
var/list/drivers = return_drivers()
|
|
if(drivers.len)
|
|
. += piloted_overlay
|
|
if(headlights_toggle)
|
|
. += headlights_overlay
|
|
|
|
/obj/item/circuit_component/vim
|
|
display_name = "Vim"
|
|
desc = "A miniature exosuit from Nanotrasen, developed to let the irreplaceable station pets live a little longer."
|
|
|
|
/// Sent when the mech chimes.
|
|
var/datum/port/output/chime
|
|
/// Sent when the mech buzzes.
|
|
var/datum/port/output/buzz
|
|
/// Whether the mech headlights are currently on.
|
|
var/datum/port/output/are_headlights_on
|
|
|
|
/obj/item/circuit_component/vim/populate_ports()
|
|
are_headlights_on = add_output_port("Are Headlights On", PORT_TYPE_BOOLEAN)
|
|
chime = add_output_port("On Chime Used", PORT_TYPE_SIGNAL)
|
|
buzz = add_output_port("On Buzz Used", PORT_TYPE_SIGNAL)
|
|
|
|
/obj/item/circuit_component/vim/register_shell(atom/movable/shell)
|
|
. = ..()
|
|
RegisterSignal(shell, COMSIG_VIM_HEADLIGHTS_TOGGLED, PROC_REF(on_headlights_toggle))
|
|
RegisterSignal(shell, COMSIG_VIM_CHIME_USED, PROC_REF(on_chime_used))
|
|
RegisterSignal(shell, COMSIG_VIM_BUZZ_USED, PROC_REF(on_buzz_used))
|
|
|
|
/obj/item/circuit_component/vim/unregister_shell(atom/movable/shell)
|
|
. = ..()
|
|
UnregisterSignal(shell, COMSIG_VIM_HEADLIGHTS_TOGGLED)
|
|
UnregisterSignal(shell, COMSIG_VIM_CHIME_USED)
|
|
UnregisterSignal(shell, COMSIG_VIM_BUZZ_USED)
|
|
|
|
/obj/item/circuit_component/vim/proc/on_headlights_toggle(datum/source, headlights_on)
|
|
SIGNAL_HANDLER
|
|
are_headlights_on.set_output(headlights_on)
|
|
|
|
/obj/item/circuit_component/vim/proc/on_chime_used()
|
|
SIGNAL_HANDLER
|
|
chime.set_output(COMPONENT_SIGNAL)
|
|
|
|
/obj/item/circuit_component/vim/proc/on_buzz_used()
|
|
SIGNAL_HANDLER
|
|
buzz.set_output(COMPONENT_SIGNAL)
|