mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #6965 from VOREStation/aro-fighters
Creates 2 new mech equipments and space fighters
This commit is contained in:
@@ -88,6 +88,9 @@ What is the naming convention for planes or layers?
|
||||
#define BELOW_MOB_LAYER 3.9 // Should be converted to plane swaps
|
||||
#define ABOVE_MOB_LAYER 4.1 // Should be converted to plane swaps
|
||||
|
||||
// Invisible things plane
|
||||
#define CLOAKED_PLANE -15
|
||||
|
||||
// Top plane (in the sense that it's the highest in 'the world' and not a UI element)
|
||||
#define ABOVE_PLANE -10
|
||||
|
||||
|
||||
@@ -396,7 +396,9 @@
|
||||
|
||||
#define VIS_BUILDMODE 22
|
||||
|
||||
#define VIS_COUNT 22 //Must be highest number from above.
|
||||
#define VIS_CLOAKED 23
|
||||
|
||||
#define VIS_COUNT 23 //Must be highest number from above.
|
||||
|
||||
//Some mob icon layering defines
|
||||
#define BODY_LAYER -100
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#undef VIS_COUNT
|
||||
|
||||
#define VIS_CH_STATUS_R 23
|
||||
#define VIS_CH_HEALTH_VR 24
|
||||
#define VIS_CH_BACKUP 25
|
||||
#define VIS_CH_VANTAG 26
|
||||
#define VIS_CH_STATUS_R 24
|
||||
#define VIS_CH_HEALTH_VR 25
|
||||
#define VIS_CH_BACKUP 26
|
||||
#define VIS_CH_VANTAG 27
|
||||
|
||||
#define VIS_AUGMENTED 27
|
||||
#define VIS_AUGMENTED 28
|
||||
|
||||
#define VIS_COUNT 27
|
||||
#define VIS_COUNT 28
|
||||
|
||||
//Protean organs
|
||||
#define O_ORCH "orchestrator"
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
var/datum/riding/riding_datum //VOREStation Add - Moved from /obj/vehicle
|
||||
var/does_spin = TRUE // Does the atom spin when thrown (of course it does :P)
|
||||
var/movement_type = NONE
|
||||
|
||||
var/cloaked = FALSE //If we're cloaked or not
|
||||
var/image/cloaked_selfimage //The image we use for our client to let them see where we are
|
||||
|
||||
/atom/movable/Destroy()
|
||||
. = ..()
|
||||
@@ -516,3 +519,93 @@
|
||||
// Called when touching a lava tile.
|
||||
/atom/movable/proc/lava_act()
|
||||
fire_act(null, 10000, 1000)
|
||||
|
||||
|
||||
// Procs to cloak/uncloak
|
||||
/atom/movable/proc/cloak()
|
||||
if(cloaked)
|
||||
return FALSE
|
||||
cloaked = TRUE
|
||||
. = TRUE // We did work
|
||||
|
||||
var/static/animation_time = 1 SECOND
|
||||
cloaked_selfimage = get_cloaked_selfimage()
|
||||
|
||||
//Wheeee
|
||||
cloak_animation(animation_time)
|
||||
|
||||
//Needs to be last so people can actually see the effect before we become invisible
|
||||
plane = CLOAKED_PLANE
|
||||
|
||||
/atom/movable/proc/uncloak()
|
||||
if(!cloaked)
|
||||
return FALSE
|
||||
cloaked = FALSE
|
||||
. = TRUE // We did work
|
||||
|
||||
var/static/animation_time = 1 SECOND
|
||||
QDEL_NULL(cloaked_selfimage)
|
||||
|
||||
//Needs to be first so people can actually see the effect, so become uninvisible first
|
||||
plane = initial(plane)
|
||||
|
||||
//Oooooo
|
||||
uncloak_animation(animation_time)
|
||||
|
||||
|
||||
// Animations for cloaking/uncloaking
|
||||
/atom/movable/proc/cloak_animation(var/length = 1 SECOND)
|
||||
//Save these
|
||||
var/initial_alpha = alpha
|
||||
|
||||
//Animate alpha fade
|
||||
animate(src, alpha = 0, time = length)
|
||||
|
||||
//Animate a cloaking effect
|
||||
var/our_filter = filters.len+1 //Filters don't appear to have a type that can be stored in a var and accessed. This is how the DM reference does it.
|
||||
filters += filter(type="wave", x = 0, y = 16, size = 0, offset = 0, flags = WAVE_SIDEWAYS)
|
||||
animate(filters[our_filter], offset = 1, size = 8, time = length, flags = ANIMATION_PARALLEL)
|
||||
|
||||
//Wait for animations to finish
|
||||
sleep(length+5)
|
||||
|
||||
//Remove those
|
||||
filters -= filters[our_filter]
|
||||
|
||||
//Back to original alpha
|
||||
alpha = initial_alpha
|
||||
|
||||
/atom/movable/proc/uncloak_animation(var/length = 1 SECOND)
|
||||
//Save these
|
||||
var/initial_alpha = alpha
|
||||
|
||||
//Put us back to normal, but no alpha
|
||||
alpha = 0
|
||||
|
||||
//Animate alpha fade up
|
||||
animate(src, alpha = initial_alpha, time = length)
|
||||
|
||||
//Animate a cloaking effect
|
||||
var/our_filter = filters.len+1 //Filters don't appear to have a type that can be stored in a var and accessed. This is how the DM reference does it.
|
||||
filters += filter(type="wave", x=0, y = 16, size = 8, offset = 1, flags = WAVE_SIDEWAYS)
|
||||
animate(filters[our_filter], offset = 0, size = 0, time = length, flags = ANIMATION_PARALLEL)
|
||||
|
||||
//Wait for animations to finish
|
||||
sleep(length+5)
|
||||
|
||||
//Remove those
|
||||
filters -= filters[our_filter]
|
||||
|
||||
|
||||
// So cloaked things can see themselves, if necessary
|
||||
/atom/movable/proc/get_cloaked_selfimage()
|
||||
var/icon/selficon = icon(icon, icon_state)
|
||||
selficon.MapColors(0,0,0, 0,0,0, 0,0,0, 1,1,1) //White
|
||||
var/image/selfimage = image(selficon)
|
||||
selfimage.color = "#0000FF"
|
||||
selfimage.alpha = 100
|
||||
selfimage.layer = initial(layer)
|
||||
selfimage.plane = initial(plane)
|
||||
selfimage.loc = src
|
||||
|
||||
return selfimage
|
||||
|
||||
381
code/game/mecha/combat/fighter_vr.dm
Normal file
381
code/game/mecha/combat/fighter_vr.dm
Normal file
@@ -0,0 +1,381 @@
|
||||
#define NOGRAV_FIGHTER_DAMAGE 20
|
||||
|
||||
/obj/mecha/combat/fighter
|
||||
name = "Delete me, nerd!!"
|
||||
desc = "The base type of fightercraft. Don't spawn this one!"
|
||||
|
||||
var/datum/effect/effect/system/ion_trail_follow/ion_trail
|
||||
var/stabilization_enabled = TRUE //If our anti-space-drift is on
|
||||
var/ground_capable = FALSE //If we can fly over normal turfs and not just space
|
||||
|
||||
icon = 'icons/mecha/mecha64x64.dmi'
|
||||
|
||||
icon_state = ""
|
||||
initial_icon = ""
|
||||
|
||||
step_in = 2 //Fast
|
||||
|
||||
health = 400
|
||||
maxhealth = 400
|
||||
|
||||
infra_luminosity = 6
|
||||
|
||||
opacity = FALSE
|
||||
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/gunpod
|
||||
|
||||
stomp_sound = 'sound/machines/generator/generator_end.ogg'
|
||||
swivel_sound = 'sound/machines/hiss.ogg'
|
||||
|
||||
bound_height = 64
|
||||
bound_width = 64
|
||||
|
||||
max_hull_equip = 2
|
||||
max_weapon_equip = 2
|
||||
max_utility_equip = 1
|
||||
max_universal_equip = 1
|
||||
max_special_equip = 1
|
||||
|
||||
/obj/mecha/combat/fighter/Initialize()
|
||||
. = ..()
|
||||
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
ion_trail.set_up(src)
|
||||
ion_trail.stop()
|
||||
|
||||
/obj/mecha/combat/fighter/moved_inside(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
consider_gravity()
|
||||
|
||||
/obj/mecha/combat/fighter/go_out()
|
||||
. = ..()
|
||||
consider_gravity()
|
||||
|
||||
//Modified phazon code
|
||||
/obj/mecha/combat/fighter/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["toggle_stabilization"])
|
||||
stabilization_enabled = !stabilization_enabled
|
||||
send_byjax(src.occupant,"exosuit.browser","stabilization_command","[stabilization_enabled?"Dis":"En"]able thruster stabilization")
|
||||
src.occupant_message("<span class='notice'>Thruster stabilization [stabilization_enabled? "enabled" : "disabled"].</span>")
|
||||
return
|
||||
|
||||
/obj/mecha/combat/fighter/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Special</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_stabilization=1'><span id="stabilization_command">[stabilization_enabled?"Dis":"En"]able thruster stabilization</span></a><br>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/fighter/can_ztravel()
|
||||
return (stabilization_enabled && has_charge(step_energy_drain))
|
||||
|
||||
// No space drifting
|
||||
/obj/mecha/combat/fighter/check_for_support()
|
||||
if (stabilization_enabled)
|
||||
return 1
|
||||
|
||||
return ..()
|
||||
|
||||
// No falling if we've got our boosters on
|
||||
/obj/mecha/combat/fighter/can_fall()
|
||||
return (stabilization_enabled && has_charge(step_energy_drain))
|
||||
|
||||
/obj/mecha/combat/fighter/proc/consider_gravity(var/moved = FALSE)
|
||||
var/gravity = has_gravity()
|
||||
if(gravity && ground_capable && occupant)
|
||||
start_hover()
|
||||
else if((!gravity && ground_capable) || !occupant)
|
||||
stop_hover()
|
||||
else if(moved && gravity && !ground_capable)
|
||||
occupant_message("Collision alert! Vehicle not rated for use in gravity!")
|
||||
take_damage(NOGRAV_FIGHTER_DAMAGE, "brute")
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
|
||||
|
||||
/obj/mecha/combat/fighter/handle_equipment_movement()
|
||||
. = ..()
|
||||
consider_gravity(TRUE)
|
||||
|
||||
/obj/mecha/combat/fighter/proc/start_hover()
|
||||
if(!ion_trail.on) //We'll just use this to store if we're floating or not
|
||||
ion_trail.start()
|
||||
var/amplitude = 2 //maximum displacement from original position
|
||||
var/period = 36 //time taken for the mob to go up >> down >> original position, in deciseconds. Should be multiple of 4
|
||||
|
||||
var/top = old_y + amplitude
|
||||
var/bottom = old_y - amplitude
|
||||
var/half_period = period / 2
|
||||
var/quarter_period = period / 4
|
||||
|
||||
animate(src, pixel_y = top, time = quarter_period, easing = SINE_EASING | EASE_OUT, loop = -1) //up
|
||||
animate(pixel_y = bottom, time = half_period, easing = SINE_EASING, loop = -1) //down
|
||||
animate(pixel_y = old_y, time = quarter_period, easing = SINE_EASING | EASE_IN, loop = -1) //back
|
||||
|
||||
/obj/mecha/combat/fighter/proc/stop_hover()
|
||||
if(ion_trail.on)
|
||||
ion_trail.stop()
|
||||
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
|
||||
|
||||
/obj/mecha/combat/fighter/check_for_support()
|
||||
if (has_charge(step_energy_drain) && stabilization_enabled)
|
||||
return 1
|
||||
|
||||
var/list/things = orange(1, src)
|
||||
|
||||
if(locate(/obj/structure/grille in things) || locate(/obj/structure/lattice in things) || locate(/turf/simulated in things) || locate(/turf/unsimulated in things))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/mecha/combat/fighter/play_entered_noise(var/mob/who)
|
||||
if(hasInternalDamage())
|
||||
who << sound('sound/mecha/fighter_entered_bad.ogg',volume=50)
|
||||
else
|
||||
who << sound('sound/mecha/fighter_entered.ogg',volume=50)
|
||||
|
||||
////////////// Equipment //////////////
|
||||
|
||||
// For 64x64 fighters
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/fighter64
|
||||
shield_type = /obj/item/shield_projector/rectangle/mecha/fighter64
|
||||
/obj/item/shield_projector/rectangle/mecha/fighter64
|
||||
shift_x = 16
|
||||
shift_y = 16
|
||||
|
||||
|
||||
////////////// Gunpod //////////////
|
||||
|
||||
/obj/mecha/combat/fighter/gunpod
|
||||
name = "Gunpod"
|
||||
desc = "Small mounted weapons platform capable of space and surface combat. More like a flying tank than a dedicated fightercraft."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "gunpod"
|
||||
initial_icon = "gunpod"
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/gunpod)
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/gunpod
|
||||
|
||||
step_in = 3 //Slightly slower than others
|
||||
|
||||
ground_capable = TRUE
|
||||
|
||||
// Paint colors! Null if not set.
|
||||
var/stripe1_color
|
||||
var/stripe2_color
|
||||
var/image/stripe1_overlay
|
||||
var/image/stripe2_overlay
|
||||
|
||||
/obj/mecha/combat/fighter/gunpod/loaded/Initialize() //Loaded version with gans
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/fighter/gunpod/recon/Initialize() //Blinky
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/teleporter(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/fighter/gunpod/update_icon()
|
||||
cut_overlays()
|
||||
..()
|
||||
|
||||
if(stripe1_color)
|
||||
stripe1_overlay = image("gunpod_stripes1")
|
||||
stripe1_overlay.color = stripe1_color
|
||||
add_overlay(stripe1_overlay)
|
||||
if(stripe2_overlay)
|
||||
stripe2_overlay = image("gunpod_stripes2")
|
||||
stripe2_overlay.color = stripe2_color
|
||||
add_overlay(stripe2_overlay)
|
||||
|
||||
/obj/mecha/combat/fighter/gunpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/device/multitool) && state == 1)
|
||||
var/new_paint_location = input("Please select a target zone.", "Paint Zone", null) as null|anything in list("Fore Stripe", "Aft Stripe", "CANCEL")
|
||||
if(new_paint_location && new_paint_location != "CANCEL")
|
||||
var/new_paint_color = input("Please select a paint color.", "Paint Color", null) as color|null
|
||||
if(new_paint_color)
|
||||
switch(new_paint_location)
|
||||
if("Fore Stripe")
|
||||
stripe1_color = new_paint_color
|
||||
if("Aft Stripe")
|
||||
stripe2_color = new_paint_color
|
||||
|
||||
update_icon()
|
||||
else ..()
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/gunpod
|
||||
name = "Gunpod wreckage"
|
||||
desc = "Remains of some unfortunate gunpod. Completely unrepairable."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "gunpod-broken"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
/datum/category_item/catalogue/technology/gunpod
|
||||
name = "Voidcraft - Gunpod"
|
||||
desc = "This is a small space-capable fightercraft that has an arrowhead design. Can hold up to one pilot, \
|
||||
and sometimes one or two passengers, with the right modifications made. \
|
||||
Typically used as small fighter craft, the gunpod can't carry much of a payload, though it's still capable of holding it's own."
|
||||
value = CATALOGUER_REWARD_MEDIUM
|
||||
|
||||
|
||||
////////////// Baron //////////////
|
||||
|
||||
/obj/mecha/combat/fighter/baron
|
||||
name = "Baron"
|
||||
desc = "A conventional space superiority fighter, one-seater. Not capable of ground operations."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "baron"
|
||||
initial_icon = "baron"
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/baron)
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/baron
|
||||
|
||||
ground_capable = FALSE
|
||||
|
||||
/obj/mecha/combat/fighter/baron/loaded/Initialize() //Loaded version with gans
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/omni_shield/fighter64
|
||||
ME.attach(src)
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/baron
|
||||
name = "Baron wreckage"
|
||||
desc = "Remains of some unfortunate fighter. Completely unrepairable."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "baron-broken"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
/datum/category_item/catalogue/technology/baron
|
||||
name = "Voidcraft - Baron"
|
||||
desc = "This is a small space fightercraft that has an arrowhead design. Can hold up to one pilot. \
|
||||
Unlike some fighters, this one is not designed for atmospheric operation, and is only capable of performing \
|
||||
maneuvers in the vacuum of space. Attempting to operate it in an atmosphere is not recommended."
|
||||
value = CATALOGUER_REWARD_MEDIUM
|
||||
|
||||
|
||||
////////////// Scoralis //////////////
|
||||
|
||||
/obj/mecha/combat/fighter/scoralis
|
||||
name = "scoralis"
|
||||
desc = "An imported space fighter with integral cloaking device. Beware the power consumption, though. Not capable of ground operations."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "scoralis"
|
||||
initial_icon = "scoralis"
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/scoralis)
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/scoralis
|
||||
|
||||
ground_capable = FALSE
|
||||
|
||||
/obj/mecha/combat/fighter/scoralis/loaded/Initialize() //Loaded version with gans
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/cloak
|
||||
ME.attach(src)
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/scoralis
|
||||
name = "scoralis wreckage"
|
||||
desc = "Remains of some unfortunate fighter. Completely unrepairable."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "scoralis-broken"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
/datum/category_item/catalogue/technology/scoralis
|
||||
name = "Voidcraft - Scoralis"
|
||||
desc = "An import model fightercraft, this one contains an integral cloaking device that renders the fighter invisible \
|
||||
to the naked eye. Still detectable on thermal sensors, the craft can maneuver in close to ill-equipped foes and strike unseen. \
|
||||
Not rated for atmospheric travel, this craft excels at hit and run tactics, as it will likely need to recharge batteries between each 'hit'."
|
||||
value = CATALOGUER_REWARD_MEDIUM
|
||||
|
||||
////////////// Allure //////////////
|
||||
|
||||
/obj/mecha/combat/fighter/allure
|
||||
name = "allure"
|
||||
desc = "A fighter of Zorren design, it's blocky appearance is made up for by it's stout armor and finely decorated hull paint."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "allure"
|
||||
initial_icon = "allure"
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/allure)
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/allure
|
||||
|
||||
ground_capable = FALSE
|
||||
|
||||
health = 500
|
||||
maxhealth = 500
|
||||
|
||||
/obj/mecha/combat/fighter/allure/loaded/Initialize() //Loaded version with gans
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/cloak
|
||||
ME.attach(src)
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/allure
|
||||
name = "allure wreckage"
|
||||
desc = "Remains of some unfortunate fighter. Completely unrepairable."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "allure-broken"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
/datum/category_item/catalogue/technology/allure
|
||||
name = "Voidcraft - Allure"
|
||||
desc = "A space superiority fighter of zorren design, many would comment that the blocky shape hinders aesthetic appeal. However, Zorren are \
|
||||
often found painting their hulls in intricate designs of purple and gold, and this craft is no exception to the rule. Some individual seems to have \
|
||||
decorated it finely. Import craft like this one often ship with no weapons, though the Zorren saw fit to integrate a cloaking device."
|
||||
value = CATALOGUER_REWARD_MEDIUM
|
||||
|
||||
////////////// Pinnace //////////////
|
||||
|
||||
/obj/mecha/combat/fighter/pinnace
|
||||
name = "pinnace"
|
||||
desc = "A cramped ship's boat, capable of atmospheric and space flight. Not capable of mounting weapons. Capable of fitting one pilot and one passenger."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "pinnace"
|
||||
initial_icon = "pinnace"
|
||||
|
||||
max_hull_equip = 1
|
||||
max_weapon_equip = 0
|
||||
max_utility_equip = 0
|
||||
max_universal_equip = 0
|
||||
max_special_equip = 1
|
||||
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/pinnace)
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/pinnace
|
||||
|
||||
ground_capable = TRUE
|
||||
|
||||
/obj/mecha/combat/fighter/pinnace/loaded/Initialize() //Loaded version with gans
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
|
||||
ME.attach(src)
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/pinnace
|
||||
name = "pinnace wreckage"
|
||||
desc = "Remains of some unfortunate ship's boat. Completely unrepairable."
|
||||
icon = 'icons/mecha/fighters64x64_vr.dmi'
|
||||
icon_state = "pinnace-broken"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
/datum/category_item/catalogue/technology/pinnace
|
||||
name = "Voidcraft - Pinnace"
|
||||
desc = "A very small boat, usually used as a tender at very close ranges. The lack of a bluespace \
|
||||
drive means that it can't get too far from it's parent ship. Though the pinnace is typically unarmed, \
|
||||
it is capable of atmospheric flight and escaping most pursuing fighters by diving into the atmosphere of \
|
||||
nearby planets to seek cover."
|
||||
value = CATALOGUER_REWARD_MEDIUM
|
||||
|
||||
#undef NOGRAV_FIGHTER_DAMAGE
|
||||
70
code/game/mecha/equipment/tools/cloak.dm
Normal file
70
code/game/mecha/equipment/tools/cloak.dm
Normal file
@@ -0,0 +1,70 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak
|
||||
name = "cloaking device"
|
||||
desc = "Integrated cloaking system. High power usage, but does render you invisible to the naked eye. Doesn't prevent noise, however."
|
||||
icon_state = "tesla"
|
||||
origin_tech = list(TECH_MAGNET = 5, TECH_DATA = 5)
|
||||
equip_cooldown = 2 SECONDS
|
||||
energy_drain = 300
|
||||
range = 0
|
||||
|
||||
equip_type = EQUIP_SPECIAL
|
||||
|
||||
var/datum/global_iterator/mecha_cloak/cloak_iterator
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/Initialize()
|
||||
. = ..()
|
||||
cloak_iterator = new /datum/global_iterator/mecha_cloak(list(src),0)
|
||||
cloak_iterator.set_delay(equip_cooldown)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/Destroy()
|
||||
qdel_null(cloak_iterator)
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/detach()
|
||||
qdel_null(cloak_iterator)
|
||||
if(!equip_ready) //We were running
|
||||
stop_cloak()
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/get_equip_info()
|
||||
if(!chassis)
|
||||
return
|
||||
return "<span style=\"color:[equip_ready ? "#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_cloak=1'>[equip_ready ? "A" : "Dea"]ctivate</a>"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_cloak"])
|
||||
if(equip_ready)
|
||||
start_cloak()
|
||||
else
|
||||
stop_cloak()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/proc/start_cloak()
|
||||
if(chassis)
|
||||
chassis.cloak()
|
||||
log_message("Activated.")
|
||||
cloak_iterator.start()
|
||||
set_ready_state(0)
|
||||
playsound(get_turf(src), 'sound/effects/EMPulse.ogg', 100, 1)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cloak/proc/stop_cloak()
|
||||
if(chassis)
|
||||
chassis.uncloak()
|
||||
log_message("Deactivated.")
|
||||
cloak_iterator.stop()
|
||||
set_ready_state(1)
|
||||
playsound(get_turf(src), 'sound/effects/EMPulse.ogg', 100, 1)
|
||||
|
||||
// These things are so silly
|
||||
/datum/global_iterator/mecha_cloak/process(var/obj/item/mecha_parts/mecha_equipment/cloak/cloak)
|
||||
//Removed from chassis
|
||||
if(!cloak.chassis)
|
||||
stop()
|
||||
cloak.stop_cloak()
|
||||
return
|
||||
//Ran out of power
|
||||
if(!cloak.chassis.use_power(cloak.energy_drain))
|
||||
stop()
|
||||
cloak.stop_cloak()
|
||||
return
|
||||
97
code/game/mecha/equipment/tools/shield_omni.dm
Normal file
97
code/game/mecha/equipment/tools/shield_omni.dm
Normal file
@@ -0,0 +1,97 @@
|
||||
#define OMNI_SHIELD_DRAIN 30
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield
|
||||
name = "omni shield"
|
||||
desc = "A shield generator that forms an ennlosing, omnidirectional shield around the exosuit."
|
||||
icon_state = "shield"
|
||||
origin_tech = list(TECH_PHORON = 3, TECH_MAGNET = 6, TECH_ILLEGAL = 4)
|
||||
equip_cooldown = 5
|
||||
energy_drain = OMNI_SHIELD_DRAIN
|
||||
range = 0
|
||||
|
||||
var/obj/item/shield_projector/shields = null
|
||||
var/shield_type = /obj/item/shield_projector/rectangle/mecha
|
||||
|
||||
equip_type = EQUIP_HULL
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/critfail()
|
||||
..()
|
||||
shields.adjust_health(-200)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/Destroy()
|
||||
QDEL_NULL(shields)
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/attach(obj/mecha/M as obj)
|
||||
. = ..()
|
||||
if(chassis)
|
||||
shields = new shield_type(chassis)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/detach()
|
||||
if(chassis)
|
||||
QDEL_NULL(shields)
|
||||
. = ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/handle_movement_action()
|
||||
if(chassis && shields)
|
||||
shields.update_shield_positions()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/proc/toggle_shield()
|
||||
..()
|
||||
if(shields)
|
||||
shields.set_on(!shields.active)
|
||||
if(shields.active)
|
||||
set_ready_state(0)
|
||||
log_message("Activated.")
|
||||
else
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_omnishield"])
|
||||
toggle_shield()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/omni_shield/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_omnishield=1'>[shields?.active?"Dea":"A"]ctivate</a>"
|
||||
|
||||
|
||||
////// The shield projector object
|
||||
/obj/item/shield_projector/rectangle/mecha
|
||||
shield_health = 200
|
||||
max_shield_health = 200
|
||||
shield_regen_delay = 10 SECONDS
|
||||
shield_regen_amount = 10
|
||||
size_x = 1
|
||||
size_y = 1
|
||||
|
||||
var/shift_x = 0
|
||||
var/shift_y = 0
|
||||
|
||||
var/obj/mecha/my_mech = null
|
||||
|
||||
/obj/item/shield_projector/rectangle/mecha/Initialize()
|
||||
. = ..()
|
||||
my_mech = loc
|
||||
GLOB.moved_event.register(my_mech, src, /obj/item/shield_projector/proc/update_shield_positions)
|
||||
|
||||
/obj/item/shield_projector/rectangle/mecha/Destroy()
|
||||
GLOB.moved_event.unregister(my_mech, src, /obj/item/shield_projector/proc/update_shield_positions)
|
||||
my_mech = null
|
||||
..()
|
||||
|
||||
/obj/item/shield_projector/rectangle/mecha/create_shield()
|
||||
. = ..()
|
||||
if(shift_x || shift_y)
|
||||
var/obj/effect/directional_shield/newshield = active_shields[active_shields.len]
|
||||
newshield.pixel_x = shift_x
|
||||
newshield.pixel_y = shift_y
|
||||
|
||||
/obj/item/shield_projector/rectangle/mecha/adjust_health(amount)
|
||||
. = ..()
|
||||
my_mech.use_power(OMNI_SHIELD_DRAIN)
|
||||
if(!active && shield_health < shield_regen_amount)
|
||||
my_mech.use_power(OMNI_SHIELD_DRAIN * 4)
|
||||
|
||||
#undef OMNI_SHIELD_DRAIN
|
||||
@@ -1260,26 +1260,32 @@
|
||||
src.icon_state = src.reset_icon()
|
||||
set_dir(dir_in)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
if(!hasInternalDamage()) //Otherwise it's not nominal!
|
||||
switch(mech_faction)
|
||||
if(MECH_FACTION_NT)//The good guys category
|
||||
if(firstactivation)//First time = long activation sound
|
||||
firstactivation = 1
|
||||
src.occupant << sound('sound/mecha/LongNanoActivation.ogg',volume=50)
|
||||
else
|
||||
src.occupant << sound('sound/mecha/nominalnano.ogg',volume=50)
|
||||
if(MECH_FACTION_SYNDI)//Bad guys
|
||||
if(firstactivation)
|
||||
firstactivation = 1
|
||||
src.occupant << sound('sound/mecha/LongSyndiActivation.ogg',volume=50)
|
||||
else
|
||||
src.occupant << sound('sound/mecha/nominalsyndi.ogg',volume=50)
|
||||
else//Everyone else gets the normal noise
|
||||
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
if(occupant.client && cloaked_selfimage)
|
||||
occupant.client.images += cloaked_selfimage
|
||||
play_entered_noise(occupant)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/mecha/proc/play_entered_noise(var/mob/who)
|
||||
if(!hasInternalDamage()) //Otherwise it's not nominal!
|
||||
switch(mech_faction)
|
||||
if(MECH_FACTION_NT)//The good guys category
|
||||
if(firstactivation)//First time = long activation sound
|
||||
firstactivation = 1
|
||||
who << sound('sound/mecha/LongNanoActivation.ogg',volume=50)
|
||||
else
|
||||
who << sound('sound/mecha/nominalnano.ogg',volume=50)
|
||||
if(MECH_FACTION_SYNDI)//Bad guys
|
||||
if(firstactivation)
|
||||
firstactivation = 1
|
||||
who << sound('sound/mecha/LongSyndiActivation.ogg',volume=50)
|
||||
else
|
||||
who << sound('sound/mecha/nominalsyndi.ogg',volume=50)
|
||||
else//Everyone else gets the normal noise
|
||||
who << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
|
||||
|
||||
/obj/mecha/verb/view_stats()
|
||||
set name = "View Stats"
|
||||
set category = "Exosuit Interface"
|
||||
@@ -1323,45 +1329,21 @@
|
||||
else
|
||||
return
|
||||
if(mob_container.forceMove(src.loc))//ejecting mob container
|
||||
/*
|
||||
if(ishuman(occupant) && (return_pressure() > HAZARD_HIGH_PRESSURE))
|
||||
use_internal_tank = 0
|
||||
var/datum/gas_mixture/environment = get_turf_air()
|
||||
if(environment)
|
||||
var/env_pressure = environment.return_pressure()
|
||||
var/pressure_delta = (cabin.return_pressure() - env_pressure)
|
||||
//Can not have a pressure delta that would cause environment pressure > tank pressure
|
||||
|
||||
var/transfer_moles = 0
|
||||
if(pressure_delta > 0)
|
||||
transfer_moles = pressure_delta*environment.volume/(cabin.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = cabin.air_contents.remove(transfer_moles)
|
||||
loc.assume_air(removed)
|
||||
|
||||
occupant.SetStunned(5)
|
||||
occupant.SetWeakened(5)
|
||||
to_chat(occupant, "You were blown out of the mech!")
|
||||
*/
|
||||
src.log_message("[mob_container] moved out.")
|
||||
log_message("[mob_container] moved out.")
|
||||
occupant.reset_view()
|
||||
/*
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
*/
|
||||
src.occupant << browse(null, "window=exosuit")
|
||||
occupant << browse(null, "window=exosuit")
|
||||
if(occupant.client && cloaked_selfimage)
|
||||
occupant.client.images -= cloaked_selfimage
|
||||
if(istype(mob_container, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/mmi = mob_container
|
||||
if(mmi.brainmob)
|
||||
occupant.loc = mmi
|
||||
mmi.mecha = null
|
||||
src.occupant.canmove = 0
|
||||
src.occupant = null
|
||||
src.icon_state = src.reset_icon()+"-open"
|
||||
src.set_dir(dir_in)
|
||||
src.verbs -= /obj/mecha/verb/eject
|
||||
occupant.canmove = 0
|
||||
occupant = null
|
||||
icon_state = src.reset_icon()+"-open"
|
||||
set_dir(dir_in)
|
||||
verbs -= /obj/mecha/verb/eject
|
||||
return
|
||||
|
||||
/////////////////////////
|
||||
@@ -2070,6 +2052,17 @@
|
||||
|
||||
/////////////
|
||||
|
||||
/obj/mecha/cloak()
|
||||
. = ..()
|
||||
if(occupant && occupant.client && cloaked_selfimage)
|
||||
occupant.client.images += cloaked_selfimage
|
||||
|
||||
/obj/mecha/uncloak()
|
||||
if(occupant && occupant.client && cloaked_selfimage)
|
||||
occupant.client.images -= cloaked_selfimage
|
||||
return ..()
|
||||
|
||||
|
||||
//debug
|
||||
/*
|
||||
/obj/mecha/verb/test_int_damage()
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
/obj/mecha/working/hoverpod/gunpod
|
||||
name = "Gunpod"
|
||||
desc = "A more advanced (and angrier) variant of the hoverpod."
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/gunpod)
|
||||
icon = 'icons/mecha/mecha64x64.dmi'
|
||||
icon_state = "gunpod"
|
||||
initial_icon = "gunpod"
|
||||
internal_damage_threshold = 90
|
||||
step_in = 2
|
||||
step_energy_drain = 5
|
||||
max_temperature = 20000
|
||||
health = 400
|
||||
maxhealth = 400
|
||||
infra_luminosity = 6
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/gunpod
|
||||
cargo_capacity = 3
|
||||
max_equip = 3
|
||||
|
||||
opacity = FALSE
|
||||
|
||||
stomp_sound = 'sound/machines/generator/generator_end.ogg'
|
||||
swivel_sound = 'sound/machines/hiss.ogg'
|
||||
|
||||
// Paint colors! Null if not set.
|
||||
var/stripe1_color
|
||||
var/stripe2_color
|
||||
var/image/stripe1_overlay
|
||||
var/image/stripe2_overlay
|
||||
|
||||
bound_height = 64
|
||||
bound_width = 64
|
||||
|
||||
max_hull_equip = 2
|
||||
max_weapon_equip = 2
|
||||
max_utility_equip = 1
|
||||
max_universal_equip = 1
|
||||
max_special_equip = 1
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
ME.attach(src)
|
||||
|
||||
update_icon() //In case we were mapped in with paint
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/heavy/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/combat_shield
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/agile/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/repair_droid
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/handle_equipment_movement()
|
||||
. = ..()
|
||||
if(has_gravity())
|
||||
start_hover()
|
||||
else
|
||||
stop_hover()
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/proc/start_hover()
|
||||
if(!ion_trail.on)
|
||||
ion_trail.start()
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/proc/stop_hover()
|
||||
if(ion_trail.on)
|
||||
ion_trail.stop()
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/check_for_support()
|
||||
if (has_charge(step_energy_drain) && stabilization_enabled)
|
||||
return 1
|
||||
|
||||
var/list/things = orange(1, src)
|
||||
|
||||
if(locate(/obj/structure/grille in things) || locate(/obj/structure/lattice in things) || locate(/turf/simulated in things) || locate(/turf/unsimulated in things))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/update_icon()
|
||||
cut_overlays()
|
||||
..()
|
||||
|
||||
if(stripe1_color)
|
||||
stripe1_overlay = image("gunpod_stripes1")
|
||||
stripe1_overlay.color = stripe1_color
|
||||
add_overlay(stripe1_overlay)
|
||||
if(stripe2_overlay)
|
||||
stripe2_overlay = image("gunpod_stripes2")
|
||||
stripe2_overlay.color = stripe2_color
|
||||
add_overlay(stripe2_overlay)
|
||||
|
||||
/obj/mecha/working/hoverpod/gunpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/device/multitool) && state == 1)
|
||||
var/new_paint_location = input("Please select a target zone.", "Paint Zone", null) as null|anything in list("Fore Stripe", "Aft Stripe", "CANCEL")
|
||||
if(new_paint_location && new_paint_location != "CANCEL")
|
||||
var/new_paint_color = input("Please select a paint color.", "Paint Color", null) as color|null
|
||||
if(new_paint_color)
|
||||
switch(new_paint_location)
|
||||
if("Fore Stripe")
|
||||
stripe1_color = new_paint_color
|
||||
if("Aft Stripe")
|
||||
stripe2_color = new_paint_color
|
||||
|
||||
update_icon()
|
||||
else ..()
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/gunpod
|
||||
name = "Gunpod wreckage"
|
||||
desc = "Remains of some unfortunate gunpod. Completely unrepairable."
|
||||
icon = 'icons/mecha/mecha64x64.dmi'
|
||||
icon_state = "gunpod-broken"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
|
||||
/datum/category_item/catalogue/technology/gunpod
|
||||
name = "Voidcraft - Gunpod"
|
||||
desc = "This is a small space-capable fightercraft that has an arrowhead design. Can hold up to one pilot, \
|
||||
and sometimes one or two passengers, with the right modifications made. \
|
||||
Typically used as small fighter craft, the gunpod can't carry much of a payload, though it's still capable of holding it's own."
|
||||
value = CATALOGUER_REWARD_MEDIUM
|
||||
@@ -67,7 +67,7 @@
|
||||
if(timer > 0)
|
||||
timer--
|
||||
if(timer == 20)
|
||||
uncloak()
|
||||
reveal()
|
||||
if(corpse)
|
||||
new /obj/effect/effect/smoke/chem(corpse.loc)
|
||||
qdel(corpse)
|
||||
@@ -86,7 +86,7 @@
|
||||
makeacorpse(watchowner)
|
||||
return
|
||||
|
||||
/obj/item/weapon/deadringer/proc/uncloak()
|
||||
/obj/item/weapon/deadringer/proc/reveal()
|
||||
if(watchowner)
|
||||
watchowner.alpha = 255
|
||||
playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1)
|
||||
|
||||
@@ -437,7 +437,7 @@ BLIND // can't see anything
|
||||
toggleable = 1
|
||||
action_button_name = "Toggle Goggles"
|
||||
vision_flags = SEE_MOBS
|
||||
enables_planes = list(VIS_FULLBRIGHT)
|
||||
enables_planes = list(VIS_FULLBRIGHT, VIS_CLOAKED)
|
||||
flash_protection = FLASH_PROTECTION_REDUCED
|
||||
|
||||
emp_act(severity)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
..() //Creates the plane_holder lazily
|
||||
plane_holder.set_vis(VIS_GHOSTS, ghostvision)
|
||||
plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness)
|
||||
plane_holder.set_vis(VIS_CLOAKED, TRUE)
|
||||
plane_holder.set_vis(VIS_AI_EYE, TRUE)
|
||||
plane_holder.set_vis(VIS_AUGMENTED, TRUE) //VOREStation Add - GHOST VISION IS AUGMENTED
|
||||
plane = PLANE_GHOSTS
|
||||
|
||||
@@ -47,29 +47,12 @@
|
||||
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/hit_and_run
|
||||
|
||||
var/cloaked = FALSE
|
||||
var/cloaked_alpha = 45 // Lower = Harder to see.
|
||||
var/cloaked_bonus_damage = 30 // This is added on top of the normal melee damage.
|
||||
var/cloaked_weaken_amount = 3 // How long to stun for.
|
||||
var/cloak_cooldown = 10 SECONDS // Amount of time needed to re-cloak after losing it.
|
||||
var/last_uncloak = 0 // world.time
|
||||
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/lurker/proc/cloak()
|
||||
if(cloaked)
|
||||
return
|
||||
animate(src, alpha = cloaked_alpha, time = 1 SECOND)
|
||||
cloaked = TRUE
|
||||
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/lurker/proc/uncloak()
|
||||
last_uncloak = world.time // This is assigned even if it isn't cloaked already, to 'reset' the timer if the spider is continously getting attacked.
|
||||
if(!cloaked)
|
||||
return
|
||||
animate(src, alpha = initial(alpha), time = 1 SECOND)
|
||||
cloaked = FALSE
|
||||
|
||||
|
||||
// Check if cloaking if possible.
|
||||
/mob/living/simple_mob/animal/giant_spider/lurker/proc/can_cloak()
|
||||
if(stat)
|
||||
@@ -79,7 +62,6 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
// Called by things that break cloaks, like Technomancer wards.
|
||||
/mob/living/simple_mob/animal/giant_spider/lurker/break_cloak()
|
||||
uncloak()
|
||||
|
||||
@@ -74,4 +74,7 @@
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(isturf(T))
|
||||
update_client_z(T.z)
|
||||
update_client_z(T.z)
|
||||
|
||||
if(cloaked && cloaked_selfimage)
|
||||
client.images += cloaked_selfimage
|
||||
@@ -1202,3 +1202,25 @@ mob/proc/yank_out_object()
|
||||
/mob/onTransitZ(old_z, new_z)
|
||||
..()
|
||||
update_client_z(new_z)
|
||||
|
||||
/mob/cloak()
|
||||
. = ..()
|
||||
if(client && cloaked_selfimage)
|
||||
client.images += cloaked_selfimage
|
||||
|
||||
/mob/uncloak()
|
||||
if(client && cloaked_selfimage)
|
||||
client.images -= cloaked_selfimage
|
||||
return ..()
|
||||
|
||||
/mob/get_cloaked_selfimage()
|
||||
var/icon/selficon = getCompoundIcon(src)
|
||||
selficon.MapColors(0,0,0, 0,0,0, 0,0,0, 1,1,1) //White
|
||||
var/image/selfimage = image(selficon)
|
||||
selfimage.color = "#0000FF"
|
||||
selfimage.alpha = 100
|
||||
selfimage.layer = initial(layer)
|
||||
selfimage.plane = initial(plane)
|
||||
selfimage.loc = src
|
||||
|
||||
return selfimage
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
plane_masters[VIS_TURFS] = new /obj/screen/plane_master/main{plane = TURF_PLANE}
|
||||
plane_masters[VIS_OBJS] = new /obj/screen/plane_master/main{plane = OBJ_PLANE}
|
||||
plane_masters[VIS_MOBS] = new /obj/screen/plane_master/main{plane = MOB_PLANE}
|
||||
plane_masters[VIS_CLOAKED] = new /obj/screen/plane_master/cloaked //Cloaked atoms!
|
||||
|
||||
..()
|
||||
|
||||
@@ -178,6 +179,13 @@
|
||||
plane = PLANE_GHOSTS
|
||||
desired_alpha = 127 //When enabled, they're like half-transparent
|
||||
|
||||
/////////////////
|
||||
//Cloaked atoms are visible to ghosts (or for other reasons?)
|
||||
/obj/screen/plane_master/cloaked
|
||||
plane = CLOAKED_PLANE
|
||||
desired_alpha = 80
|
||||
color = "#0000FF"
|
||||
|
||||
/////////////////
|
||||
//The main game planes start normal and visible
|
||||
/obj/screen/plane_master/main
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
illegal = TRUE
|
||||
access = 999
|
||||
tick_flags = NIF_ACTIVETICK
|
||||
planes_enabled = list(VIS_FULLBRIGHT)
|
||||
planes_enabled = list(VIS_FULLBRIGHT, VIS_CLOAKED)
|
||||
vision_flags = (NIF_V_THERMALS)
|
||||
incompatible_with = list(NIF_MESONS,NIF_MATERIAL,NIF_NIGHTVIS)
|
||||
|
||||
|
||||
@@ -538,6 +538,13 @@
|
||||
req_tech = list(TECH_BLUESPACE = 10, TECH_MAGNET = 5)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
|
||||
/datum/design/item/mecha/teleporter
|
||||
name = "Cloaking Device"
|
||||
desc = "A device that renders the exosuit invisible to the naked eye, though not to thermal detection. Uses large amounts of energy."
|
||||
id = "mech_cloaking"
|
||||
req_tech = list(TECH_BLUESPACE = 10, TECH_MAGNET = 5)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/cloak
|
||||
|
||||
/datum/design/item/mecha/rcd
|
||||
name = "RCD"
|
||||
desc = "An exosuit-mounted rapid construction device."
|
||||
@@ -570,6 +577,14 @@
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 8000, "gold" = 2000, "silver" = 3000, "phoron" = 5000, "glass" = 3750)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/combat_shield
|
||||
|
||||
/datum/design/item/mecha/omni_shield
|
||||
name = "Omni Shield"
|
||||
desc = "Integral shield projector. Can only protect the exosuit, but has no weak angles."
|
||||
id = "mech_shield_omni"
|
||||
req_tech = list(TECH_PHORON = 3, TECH_MAGNET = 6, TECH_ILLEGAL = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 8000, "gold" = 2000, "silver" = 3000, "phoron" = 5000, "glass" = 3750)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/omni_shield
|
||||
|
||||
/datum/design/item/mecha/crisis_drone
|
||||
name = "Crisis Drone"
|
||||
desc = "Deploys a small medical drone capable of patching small wounds in order to stabilize nearby patients."
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
for(var/obj/effect/directional_shield/S in active_shields)
|
||||
active_shields -= S
|
||||
qdel(S)
|
||||
set_light(0)
|
||||
active = FALSE
|
||||
|
||||
/obj/item/shield_projector/proc/update_shield_positions()
|
||||
@@ -179,13 +180,18 @@
|
||||
if(always_on)
|
||||
to_chat(user, "<span class='warning'>You can't seem to deactivate \the [src].</span>")
|
||||
return
|
||||
|
||||
destroy_shields()
|
||||
set_on(FALSE)
|
||||
else
|
||||
set_dir(user.dir) // Needed for linear shields.
|
||||
create_shields()
|
||||
set_on(TRUE)
|
||||
visible_message("<span class='notice'>\The [user] [!active ? "de":""]activates \the [src].</span>")
|
||||
|
||||
/obj/item/shield_projector/proc/set_on(var/on)
|
||||
if(isnull(on))
|
||||
return
|
||||
|
||||
on ? create_shields() : destroy_shields() // Harmless if called when in the wrong state.
|
||||
|
||||
/obj/item/shield_projector/process()
|
||||
if(shield_health < max_shield_health && ( (last_damaged_time + shield_regen_delay) < world.time) )
|
||||
adjust_health(shield_regen_amount)
|
||||
|
||||
BIN
icons/mecha/fighters64x64_vr.dmi
Normal file
BIN
icons/mecha/fighters64x64_vr.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 37 KiB |
BIN
sound/mecha/fighter_entered.ogg
Normal file
BIN
sound/mecha/fighter_entered.ogg
Normal file
Binary file not shown.
BIN
sound/mecha/fighter_entered_bad.ogg
Normal file
BIN
sound/mecha/fighter_entered_bad.ogg
Normal file
Binary file not shown.
@@ -907,6 +907,7 @@
|
||||
#include "code\game\mecha\mecha_wreckage.dm"
|
||||
#include "code\game\mecha\combat\combat.dm"
|
||||
#include "code\game\mecha\combat\durand.dm"
|
||||
#include "code\game\mecha\combat\fighter_vr.dm"
|
||||
#include "code\game\mecha\combat\gorilla.dm"
|
||||
#include "code\game\mecha\combat\gygax.dm"
|
||||
#include "code\game\mecha\combat\marauder.dm"
|
||||
@@ -918,6 +919,7 @@
|
||||
#include "code\game\mecha\equipment\tools\cable_layer.dm"
|
||||
#include "code\game\mecha\equipment\tools\catapult.dm"
|
||||
#include "code\game\mecha\equipment\tools\clamp.dm"
|
||||
#include "code\game\mecha\equipment\tools\cloak.dm"
|
||||
#include "code\game\mecha\equipment\tools\drill.dm"
|
||||
#include "code\game\mecha\equipment\tools\energy_relay.dm"
|
||||
#include "code\game\mecha\equipment\tools\extinguisher.dm"
|
||||
@@ -932,6 +934,7 @@
|
||||
#include "code\game\mecha\equipment\tools\rcd.dm"
|
||||
#include "code\game\mecha\equipment\tools\repair_droid.dm"
|
||||
#include "code\game\mecha\equipment\tools\shield.dm"
|
||||
#include "code\game\mecha\equipment\tools\shield_omni.dm"
|
||||
#include "code\game\mecha\equipment\tools\sleeper.dm"
|
||||
#include "code\game\mecha\equipment\tools\speedboost.dm"
|
||||
#include "code\game\mecha\equipment\tools\syringe_gun.dm"
|
||||
@@ -966,7 +969,6 @@
|
||||
#include "code\game\mecha\micro\micro_equipment.dm"
|
||||
#include "code\game\mecha\micro\security.dm"
|
||||
#include "code\game\mecha\micro\utility.dm"
|
||||
#include "code\game\mecha\space\gunpod_vr.dm"
|
||||
#include "code\game\mecha\space\hoverpod.dm"
|
||||
#include "code\game\mecha\space\shuttle.dm"
|
||||
#include "code\game\mecha\working\ripley.dm"
|
||||
|
||||
Reference in New Issue
Block a user