mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] Vim, but ready for merge now (#7067)
* Vim, but ready for merge now (#60334) Minature little mecha for critters (tiny simple animals) to ride around in. Comes with headlights, and the ability to chime or buzz (in case you cannot speak gal com) Old PR #59736 I got the sprites for it now! * Vim, but ready for merge now Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
@@ -34,3 +34,9 @@
|
||||
#define CLOWN_CANNON_INACTIVE 0
|
||||
#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
|
||||
|
||||
@@ -282,6 +282,24 @@ Contains:
|
||||
flash_protect = FLASH_PROTECTION_NONE
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 100, RAD = 20, FIRE = 50, ACID = 65)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_notice("You can start constructing a critter sized mecha with a [span_bold("cyborg leg")].")
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva/attackby(obj/item/attacked_with, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!istype(attacked_with, /obj/item/bodypart/l_leg/robot) && !istype(attacked_with, /obj/item/bodypart/r_leg/robot))
|
||||
return
|
||||
if(ismob(loc))
|
||||
user.balloon_alert(user, "drop the helmet first!")
|
||||
return
|
||||
user.balloon_alert(user, "leg attached")
|
||||
new /obj/item/bot_assembly/vim(loc)
|
||||
qdel(attacked_with)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/freedom
|
||||
name = "eagle helmet"
|
||||
desc = "An advanced, space-proof helmet. It appears to be modeled after an old-world eagle."
|
||||
|
||||
@@ -526,3 +526,55 @@
|
||||
new /obj/item/assembly/prox_sensor(Tsec)
|
||||
to_chat(user, span_notice("You detach the proximity sensor from [src]."))
|
||||
build_step--
|
||||
|
||||
//Vim Assembly
|
||||
/obj/item/bot_assembly/vim
|
||||
name = "incomplete vim assembly"
|
||||
desc = "A space helmet with a leg attached to it. Looks like it needs another leg, if it is to become something."
|
||||
icon_state = "vim_0"
|
||||
created_name = "\improper Vim"
|
||||
|
||||
/obj/item/bot_assembly/vim/attackby(obj/item/part, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(build_step)
|
||||
if(ASSEMBLY_FIRST_STEP)
|
||||
if(istype(part, /obj/item/bodypart/l_leg/robot) || istype(part, /obj/item/bodypart/r_leg/robot))
|
||||
if(!user.temporarilyRemoveItemFromInventory(part))
|
||||
return
|
||||
balloon_alert(user, "leg attached")
|
||||
icon_state = "vim_1"
|
||||
desc = "Some kind of incomplete mechanism. It seems to be missing the headlights."
|
||||
qdel(part)
|
||||
build_step++
|
||||
|
||||
if(ASSEMBLY_SECOND_STEP)
|
||||
if(istype(part, /obj/item/flashlight))
|
||||
if(!user.temporarilyRemoveItemFromInventory(part))
|
||||
return
|
||||
balloon_alert(user, "flashlight added")
|
||||
icon_state = "vim_2"
|
||||
desc = "Some kind of incomplete mechanism. The flashlight is added, but not secured."
|
||||
qdel(part)
|
||||
build_step++
|
||||
|
||||
if(ASSEMBLY_THIRD_STEP)
|
||||
if(part.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
balloon_alert(user, "securing flashlight...")
|
||||
if(!part.use_tool(src, user, 4 SECONDS, volume=100))
|
||||
return
|
||||
balloon_alert(user, "flashlight secured")
|
||||
icon_state = "vim_3"
|
||||
desc = "Some kind of incomplete mechanism. It seems nearly completed, and just needs a voice assembly."
|
||||
build_step++
|
||||
|
||||
if(ASSEMBLY_FOURTH_STEP)
|
||||
if(istype(part, /obj/item/assembly/voice))
|
||||
if(!can_finish_build(part, user))
|
||||
return
|
||||
balloon_alert(user, "assembly finished")
|
||||
var/obj/vehicle/sealed/car/vim/new_vim = new(drop_location())
|
||||
new_vim.name = created_name
|
||||
qdel(part)
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* ## VIM!!!!!!!
|
||||
*
|
||||
* It's a teenie minature 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 = "An minature exosuit from Nanotrasen, developed to let the irreplacable station pets live a little longer."
|
||||
icon_state = "vim"
|
||||
max_integrity = 50
|
||||
armor = list(MELEE = 70, BULLET = 40, LASER = 40, ENERGY = 0, BOMB = 30, BIO = 0, RAD = 0, FIRE = 80, ACID = 80)
|
||||
enter_delay = 20
|
||||
movedelay = 0.6
|
||||
engine_sound_length = 0.3 SECONDS
|
||||
light_system = MOVABLE_LIGHT_DIRECTIONAL
|
||||
light_range = 4
|
||||
light_power = 2
|
||||
light_on = FALSE
|
||||
engine_sound = 'sound/effects/servostep.ogg'
|
||||
///TRUE while the vim is being welded
|
||||
var/being_repaired = FALSE
|
||||
COOLDOWN_DECLARE(sound_cooldown)
|
||||
|
||||
/obj/vehicle/sealed/car/vim/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_notice("[src] can be repaired with a welder.")
|
||||
|
||||
/obj/vehicle/sealed/car/vim/obj_destruction(damage_flag)
|
||||
new /obj/effect/decal/cleanable/oil(get_turf(src))
|
||||
do_sparks(5, TRUE, src)
|
||||
visible_message(span_boldannounce("[src] blows apart!"))
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/sealed/car/vim/mob_try_enter(mob/entering)
|
||||
if(!isanimal(entering))
|
||||
return FALSE
|
||||
var/mob/living/simple_animal/animal = entering
|
||||
if(animal.mob_size != MOB_SIZE_TINY)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/sealed/car/vim/welder_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
. = TRUE
|
||||
if(!tool.tool_start_check(user))
|
||||
return
|
||||
if(being_repaired)
|
||||
user.balloon_alert(user, "already being repaired!")
|
||||
return
|
||||
if(obj_integrity == max_integrity)
|
||||
user.balloon_alert(user, "already fully repaired!")
|
||||
return
|
||||
|
||||
user.balloon_alert(user, "repairing [src]...")
|
||||
audible_message(span_hear("You hear welding."))
|
||||
being_repaired = TRUE
|
||||
if(!tool.use_tool(src, user, 3 SECONDS, volume=50))
|
||||
being_repaired = FALSE
|
||||
user.balloon_alert(user, "interrupted!")
|
||||
return
|
||||
being_repaired = FALSE
|
||||
|
||||
obj_integrity = min(obj_integrity + VIM_HEAL_AMOUNT, max_integrity)
|
||||
user.balloon_alert(user, "[obj_integrity == max_integrity ? "fully " : ""]repaired [src]")
|
||||
|
||||
/obj/vehicle/sealed/car/vim/mob_enter(mob/newoccupant, silent = FALSE)
|
||||
. = ..()
|
||||
update_appearance()
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, TRUE)
|
||||
if(obj_integrity == max_integrity)
|
||||
SEND_SOUND(newoccupant, sound('sound/mecha/nominal.ogg',volume=50))
|
||||
|
||||
/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
|
||||
@@ -216,6 +216,7 @@
|
||||
to_chat(owner, span_notice("You flip the switch for the vehicle's headlights."))
|
||||
vehicle_entered_target.headlights_toggle = !vehicle_entered_target.headlights_toggle
|
||||
vehicle_entered_target.set_light_on(vehicle_entered_target.headlights_toggle)
|
||||
vehicle_entered_target.update_appearance()
|
||||
playsound(owner, vehicle_entered_target.headlights_toggle ? 'sound/weapons/magin.ogg' : 'sound/weapons/magout.ogg', 40, TRUE)
|
||||
|
||||
/datum/action/vehicle/sealed/dump_kidnapped_mobs
|
||||
@@ -311,3 +312,40 @@
|
||||
vehicle.grinding = TRUE
|
||||
vehicle.icon_state = "[initial(vehicle.icon_state)]-grind"
|
||||
addtimer(CALLBACK(vehicle, /obj/vehicle/ridden/scooter/skateboard/.proc/grind), 2)
|
||||
|
||||
//VIM ACTION DATUMS
|
||||
|
||||
/datum/action/vehicle/sealed/climb_out/vim
|
||||
name = "Eject From Mech"
|
||||
icon_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon_state = "mech_eject"
|
||||
|
||||
/datum/action/vehicle/sealed/noise
|
||||
var/sound_path = 'sound/items/carhorn.ogg'
|
||||
var/sound_message = "makes a sound."
|
||||
|
||||
/datum/action/vehicle/sealed/noise/Trigger()
|
||||
var/obj/vehicle/sealed/car/vim/vim_mecha = vehicle_entered_target
|
||||
if(!COOLDOWN_FINISHED(vim_mecha, sound_cooldown))
|
||||
vim_mecha.balloon_alert(owner, "on cooldown!")
|
||||
return
|
||||
COOLDOWN_START(vim_mecha, sound_cooldown, VIM_SOUND_COOLDOWN)
|
||||
vehicle_entered_target.visible_message(span_notice("[vehicle_entered_target] [sound_message]"))
|
||||
playsound(vim_mecha, sound_path, 75)
|
||||
|
||||
/datum/action/vehicle/sealed/noise/chime
|
||||
name = "Chime!"
|
||||
desc = "Affirmative!"
|
||||
button_icon_state = "vim_chime"
|
||||
sound_path = 'sound/machines/chime.ogg'
|
||||
sound_message = "chimes!"
|
||||
|
||||
/datum/action/vehicle/sealed/noise/buzz
|
||||
name = "Buzz."
|
||||
desc = "Negative!"
|
||||
button_icon_state = "vim_buzz"
|
||||
sound_path = 'sound/machines/buzz-sigh.ogg'
|
||||
sound_message = "buzzes."
|
||||
|
||||
/datum/action/vehicle/sealed/headlights/vim
|
||||
button_icon_state = "vim_headlights"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 78 KiB |
@@ -3552,6 +3552,7 @@
|
||||
#include "code\modules\vehicles\wheelchair.dm"
|
||||
#include "code\modules\vehicles\cars\car.dm"
|
||||
#include "code\modules\vehicles\cars\clowncar.dm"
|
||||
#include "code\modules\vehicles\cars\vim.dm"
|
||||
#include "code\modules\vehicles\mecha\_mecha.dm"
|
||||
#include "code\modules\vehicles\mecha\mech_bay.dm"
|
||||
#include "code\modules\vehicles\mecha\mech_fabricator.dm"
|
||||
|
||||
Reference in New Issue
Block a user