diff --git a/_maps/map_files/NebulaStation/NebulaStation.dmm b/_maps/map_files/NebulaStation/NebulaStation.dmm index 0760f2c0f9a..b78624b8eea 100644 --- a/_maps/map_files/NebulaStation/NebulaStation.dmm +++ b/_maps/map_files/NebulaStation/NebulaStation.dmm @@ -50110,7 +50110,7 @@ /turf/open/floor/iron/dark/textured, /area/station/security/prison/garden) "hrX" = ( -/obj/vehicle/sealed/car/vim, +/obj/vehicle/sealed/mecha/vim, /obj/effect/turf_decal/bot_white, /obj/effect/decal/cleanable/confetti, /obj/structure/marker_beacon/yellow, diff --git a/code/__DEFINES/dcs/signals/signals_object.dm b/code/__DEFINES/dcs/signals/signals_object.dm index b3dbc04a26e..e319f14e47c 100644 --- a/code/__DEFINES/dcs/signals/signals_object.dm +++ b/code/__DEFINES/dcs/signals/signals_object.dm @@ -467,15 +467,6 @@ ///sent to the projectile when successfully embedding into something: (new_item, victim) #define COMSIG_PROJECTILE_ON_EMBEDDED "projectile_on_embedded" -// /obj/vehicle/sealed/car/vim signals - -///from /datum/action/vehicle/sealed/noise/chime/Trigger(): () -#define COMSIG_VIM_CHIME_USED "vim_chime_used" -///from /datum/action/vehicle/sealed/noise/buzz/Trigger(): () -#define COMSIG_VIM_BUZZ_USED "vim_buzz_used" -///from /datum/action/vehicle/sealed/headlights/vim/Trigger(): (headlights_on) -#define COMSIG_VIM_HEADLIGHTS_TOGGLED "vim_headlights_toggled" - ///from /datum/computer_file/program/messenger/proc/receive_message #define COMSIG_COMPUTER_RECEIVED_MESSAGE "computer_received_message" ///from /datum/computer_file/program/virtual_pet/proc/handle_level_up diff --git a/code/__DEFINES/exosuit_fab.dm b/code/__DEFINES/exosuit_fab.dm index 4cc21f210d6..a9ab7623b91 100644 --- a/code/__DEFINES/exosuit_fab.dm +++ b/code/__DEFINES/exosuit_fab.dm @@ -35,6 +35,8 @@ #define EXOSUIT_MODULE_MARAUDER (1<<10) /// Module is compatible with Paddy models #define EXOSUIT_MODULE_PADDY (1<<11) +/// Module is compatible with VIM models +#define EXOSUIT_MODULE_VIM (1<<12) /// Module is compatible with "Working" Exosuit models - Ripley and Clarke #define EXOSUIT_MODULE_WORKING (EXOSUIT_MODULE_RIPLEY | EXOSUIT_MODULE_CLARKE) diff --git a/code/__DEFINES/vehicles.dm b/code/__DEFINES/vehicles.dm index 06635c5e55b..44fb9847dea 100644 --- a/code/__DEFINES/vehicles.dm +++ b/code/__DEFINES/vehicles.dm @@ -43,8 +43,3 @@ #define CLOWN_CANNON_BUSY 1 #define CLOWN_CANNON_READY 2 -//Vim defines -///cooldown between uses of the sound maker -#define VIM_SOUND_COOLDOWN (1 SECONDS) -///how much vim heals per weld -#define VIM_HEAL_AMOUNT 20 diff --git a/code/datums/components/crafting/robot.dm b/code/datums/components/crafting/robot.dm index dd1972b3fe8..df84afa318f 100644 --- a/code/datums/components/crafting/robot.dm +++ b/code/datums/components/crafting/robot.dm @@ -120,7 +120,7 @@ /datum/crafting_recipe/vim name = "Vim" - result = /obj/vehicle/sealed/car/vim + result = /obj/vehicle/sealed/mecha/vim reqs = list( /obj/item/clothing/head/helmet/space/eva = 1, /obj/item/bodypart/leg/left/robot = 1, diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 7934d9ab858..b29484fb77a 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -678,7 +678,7 @@ if(!can_finish_build(tool, user)) return ITEM_INTERACT_BLOCKING balloon_alert(user, "assembly finished") - var/obj/vehicle/sealed/car/vim/new_vim = new(drop_location()) + var/obj/vehicle/sealed/mecha/vim/new_vim = new(drop_location()) new_vim.name = created_name qdel(tool) qdel(src) diff --git a/code/modules/vehicles/cars/vim.dm b/code/modules/vehicles/cars/vim.dm deleted file mode 100644 index a3b8b85adff..00000000000 --- a/code/modules/vehicles/cars/vim.dm +++ /dev/null @@ -1,158 +0,0 @@ -/** - * ## 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) diff --git a/code/modules/vehicles/mecha/miniature/vim.dm b/code/modules/vehicles/mecha/miniature/vim.dm new file mode 100644 index 00000000000..13bb19a1801 --- /dev/null +++ b/code/modules/vehicles/mecha/miniature/vim.dm @@ -0,0 +1,86 @@ +/** + * ## 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/mecha/vim + name = "\improper Vim" + desc = "A miniature exosuit from Nanotrasen, developed to let the irreplaceable station pets live a little longer." + icon_state = "vim" + base_icon_state = "vim" + max_integrity = 50 + armor_type = /datum/armor/mecha_vim + enter_delay = 2 SECONDS + movedelay = 0.6 + light_system = OVERLAY_LIGHT_DIRECTIONAL + light_range = 4 + light_power = 1.5 + light_on = FALSE + custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 0.55, /datum/material/glass = SMALL_MATERIAL_AMOUNT * 0.7) + stepsound = 'sound/effects/servostep.ogg' + pivot_step = TRUE + step_energy_drain = 4 + mecha_flags = CAN_STRAFE | HAS_LIGHTS | IS_ENCLOSED + mech_type = EXOSUIT_MODULE_VIM + interaction_flags_mouse_drop = NONE + move_force = MOVE_FORCE_EXTREMELY_WEAK + move_resist = MOVE_FORCE_VERY_WEAK + density = FALSE + pass_flags = PASSVEHICLE | PASSMOB | PASSTABLE + pass_flags_self = PASSVEHICLE | PASSMOB | PASSTABLE + inertia_force_weight = 0.5 // lighter than other mechs and people + accesses = list(ACCESS_MECH_ENGINE, ACCESS_MECH_SCIENCE, ACCESS_MECH_MINING) + ui_theme = PDA_THEME_CAT // since the mech is for pets ~NYAAAA~ + equip_by_category = list( + MECHA_L_ARM = null, // armless mech + MECHA_R_ARM = null, + MECHA_UTILITY = list(), + MECHA_POWER = list(), + MECHA_ARMOR = list(), + ) + max_equip_by_category = list( + MECHA_L_ARM = 0, // armless mech + MECHA_R_ARM = 0, + MECHA_UTILITY = 3, + MECHA_POWER = 1, + MECHA_ARMOR = 1, + ) + ///Maximum size of a mob trying to enter the mech + var/maximum_mob_size = MOB_SIZE_SMALL + COOLDOWN_DECLARE(sound_cooldown) + +/datum/armor/mecha_vim + melee = 70 + bullet = 40 + laser = 40 + bomb = 30 + fire = 80 + acid = 80 + +/obj/vehicle/sealed/mecha/vim/mob_try_enter(mob/entering) + if(issilicon(entering)) + entering.balloon_alert(entering, "can't fit inside!") + 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 + + mob_enter(entering) + moved_inside(entering) + +/obj/vehicle/sealed/mecha/vim/generate_actions() + . = ..() + 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) + +/obj/vehicle/sealed/mecha/vim/toggle_lights(forced_state = null, mob/user) + . = ..() + update_appearance() + +/obj/vehicle/sealed/mecha/vim/update_overlays() + . = ..() + if(mecha_flags & LIGHTS_ON) + . += mutable_appearance(icon, "vim_headlights") diff --git a/code/modules/vehicles/vehicle_actions.dm b/code/modules/vehicles/vehicle_actions.dm index 5c395243caf..b186195678e 100644 --- a/code/modules/vehicles/vehicle_actions.dm +++ b/code/modules/vehicles/vehicle_actions.dm @@ -440,6 +440,8 @@ addtimer(CALLBACK(board, TYPE_PROC_REF(/obj/vehicle/ridden/scooter/skateboard, pick_up_board), rider, TRUE), 0.5 SECONDS) // so the board can still handle "picking it up" +///cooldown between uses of the sound maker +#define VIM_SOUND_COOLDOWN (1 SECONDS) //VIM ACTION DATUMS @@ -456,7 +458,7 @@ . = ..() if(!.) return FALSE - var/obj/vehicle/sealed/car/vim/vim_mecha = vehicle_entered_target + var/obj/vehicle/sealed/mecha/vim/vim_mecha = vehicle_entered_target if(!COOLDOWN_FINISHED(vim_mecha, sound_cooldown)) vim_mecha.balloon_alert(owner, "on cooldown!") return FALSE @@ -472,10 +474,6 @@ sound_path = 'sound/machines/chime.ogg' sound_message = "chimes!" -/datum/action/vehicle/sealed/noise/chime/Trigger(mob/clicker, trigger_flags) - if(..()) - SEND_SIGNAL(vehicle_entered_target, COMSIG_VIM_CHIME_USED) - /datum/action/vehicle/sealed/noise/buzz name = "Buzz." desc = "Negative!" @@ -483,15 +481,4 @@ sound_path = 'sound/machines/buzz/buzz-sigh.ogg' sound_message = "buzzes." -/datum/action/vehicle/sealed/noise/buzz/Trigger(mob/clicker, trigger_flags) - if(..()) - SEND_SIGNAL(vehicle_entered_target, COMSIG_VIM_BUZZ_USED) - -/datum/action/vehicle/sealed/headlights/vim - button_icon_state = "vim_headlights" - -/datum/action/vehicle/sealed/headlights/vim/Trigger(mob/clicker, trigger_flags) - . = ..() - if(!.) - return - SEND_SIGNAL(vehicle_entered_target, COMSIG_VIM_HEADLIGHTS_TOGGLED, vehicle_entered_target.headlights_toggle) +#undef VIM_SOUND_COOLDOWN diff --git a/icons/mob/actions/actions_vehicle.dmi b/icons/mob/actions/actions_vehicle.dmi index 3ad64040513..3a7fd645550 100644 Binary files a/icons/mob/actions/actions_vehicle.dmi and b/icons/mob/actions/actions_vehicle.dmi differ diff --git a/icons/mob/rideables/mecha.dmi b/icons/mob/rideables/mecha.dmi index d21037c49ab..7e1480aad35 100644 Binary files a/icons/mob/rideables/mecha.dmi and b/icons/mob/rideables/mecha.dmi differ diff --git a/icons/mob/rideables/vehicles.dmi b/icons/mob/rideables/vehicles.dmi index c97cb85e275..dfae5e2b76e 100644 Binary files a/icons/mob/rideables/vehicles.dmi and b/icons/mob/rideables/vehicles.dmi differ diff --git a/tgstation.dme b/tgstation.dme index dbf5c85039a..fb417168f4b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6769,7 +6769,6 @@ #include "code\modules\vehicles\cars\car.dm" #include "code\modules\vehicles\cars\clowncar.dm" #include "code\modules\vehicles\cars\speedwagon.dm" -#include "code\modules\vehicles\cars\vim.dm" #include "code\modules\vehicles\cars\golfcart\golfcart.dm" #include "code\modules\vehicles\cars\golfcart\golfcart_rear.dm" #include "code\modules\vehicles\mecha\_mecha.dm" @@ -6806,6 +6805,7 @@ #include "code\modules\vehicles\mecha\equipment\weapons\mecha_ammo.dm" #include "code\modules\vehicles\mecha\equipment\weapons\weapons.dm" #include "code\modules\vehicles\mecha\medical\odysseus.dm" +#include "code\modules\vehicles\mecha\miniature\vim.dm" #include "code\modules\vehicles\mecha\working\clarke.dm" #include "code\modules\vehicles\mecha\working\ripley.dm" #include "code\modules\vending\assist.dm" diff --git a/tools/UpdatePaths/Scripts/96571_VIMs_to_mechs.txt b/tools/UpdatePaths/Scripts/96571_VIMs_to_mechs.txt new file mode 100644 index 00000000000..0a2d30050fa --- /dev/null +++ b/tools/UpdatePaths/Scripts/96571_VIMs_to_mechs.txt @@ -0,0 +1 @@ +/obj/vehicle/sealed/mecha/vim : /obj/vehicle/sealed/car/vim{@OLD}