mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Add concealed weapon bay (#41516)
This provides roboticists with an item that broadens their play style by introducing a stealth element. The concealed weapon bay is an item that attaches to Ripleys or Odysseuses and allows them to equip one mecha weapon. A mecha can only have one attached. Examining the mecha will not reveal the attached weapon (although the raising message still shows). They cost 3 TC because they don't allow roboticists to make mechas much more dangerous than the ones they can already make and because roboticists will still need to have researched the weaponry to attach to the mechas. I made the sprite all by myself.
This commit is contained in:
committed by
yogstation13-bot
parent
d99082c433
commit
bd1fd2fe11
@@ -41,6 +41,16 @@
|
||||
chassis = null
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/try_attach_part(mob/user, obj/mecha/M)
|
||||
if(can_attach(M))
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
return FALSE
|
||||
attach(M)
|
||||
user.visible_message("[user] attaches [src] to [M].", "<span class='notice'>You attach [src] to [M].</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='warning'>You are unable to attach [src] to [M]!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
log_message("Critical failure", LOG_MECHA, color="red")
|
||||
|
||||
|
||||
14
code/game/mecha/equipment/tools/weapon_bay.dm
Normal file
14
code/game/mecha/equipment/tools/weapon_bay.dm
Normal file
@@ -0,0 +1,14 @@
|
||||
/obj/item/mecha_parts/concealed_weapon_bay
|
||||
name = "concealed weapon bay"
|
||||
desc = "A compartment that allows a non-combat mecha to equip one weapon while hiding the weapon from plain sight."
|
||||
icon = 'icons/mecha/mecha_equipment.dmi'
|
||||
icon_state = "mecha_weapon_bay"
|
||||
|
||||
/obj/item/mecha_parts/concealed_weapon_bay/try_attach_part(mob/user, obj/mecha/M)
|
||||
if(istype(M, /obj/mecha/combat))
|
||||
to_chat(user, "<span class='warning'>[M] can already hold weapons!</span>")
|
||||
return
|
||||
if(locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents)
|
||||
to_chat(user, "<span class='warning'>[M] already has a concealed weapon bay!</span>")
|
||||
return
|
||||
..()
|
||||
@@ -10,11 +10,14 @@
|
||||
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
|
||||
var/kickback = TRUE //Will using this weapon in no grav push mecha back.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/M)
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(istype(M, /obj/mecha/combat))
|
||||
return TRUE
|
||||
if((locate(/obj/item/mecha_parts/concealed_weapon_bay) in M.contents) && !(locate(/obj/item/mecha_parts/mecha_equipment/weapon) in M.equipment))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/proc/get_shot_amount()
|
||||
return projectiles_per_shot
|
||||
|
||||
@@ -273,9 +273,12 @@
|
||||
to_chat(user, "It's heavily damaged.")
|
||||
else
|
||||
to_chat(user, "It's falling apart.")
|
||||
if(equipment && equipment.len)
|
||||
var/hide_weapon = locate(/obj/item/mecha_parts/concealed_weapon_bay) in contents
|
||||
var/hidden_weapon = hide_weapon ? (locate(/obj/item/mecha_parts/mecha_equipment/weapon) in equipment) : null
|
||||
var/list/visible_equipment = equipment - hidden_weapon
|
||||
if(visible_equipment.len)
|
||||
to_chat(user, "It's equipped with:")
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/ME in visible_equipment)
|
||||
to_chat(user, "[icon2html(ME, user)] \A [ME].")
|
||||
|
||||
//processing internal damage, temperature, air regulation, alert updates, lights power use.
|
||||
|
||||
@@ -83,6 +83,12 @@
|
||||
M.trackers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/try_attach_part(mob/user, obj/mecha/M)
|
||||
if(!..())
|
||||
return
|
||||
M.trackers += src
|
||||
M.diag_hud_set_mechtracking()
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/in_mecha()
|
||||
if(ismecha(loc))
|
||||
return loc
|
||||
|
||||
@@ -164,17 +164,6 @@
|
||||
to_chat(user, "[src]-[W] interface initialization failed.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
|
||||
var/obj/item/mecha_parts/mecha_equipment/E = W
|
||||
spawn()
|
||||
if(E.can_attach(src))
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
E.attach(src)
|
||||
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You were unable to attach [W] to [src]!</span>")
|
||||
return
|
||||
if(W.GetID())
|
||||
if(add_req_access || maint_access)
|
||||
if(internals_access_allowed(user))
|
||||
@@ -260,13 +249,9 @@
|
||||
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")
|
||||
return 1
|
||||
|
||||
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
to_chat(user, "<span class='warning'>\the [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
trackers += W
|
||||
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
|
||||
diag_hud_set_mechtracking()
|
||||
else if(istype(W, /obj/item/mecha_parts))
|
||||
var/obj/item/mecha_parts/P = W
|
||||
P.try_attach_part(user, src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
flags_1 = CONDUCT_1
|
||||
|
||||
/obj/item/mecha_parts/proc/try_attach_part(mob/user, obj/mecha/M) //For attaching parts to a finished mech
|
||||
if(!user.transferItemToLoc(src, M))
|
||||
to_chat(user, "<span class='warning'>\The [src] is stuck to your hand, you cannot put it in \the [M]!</span>")
|
||||
return FALSE
|
||||
user.visible_message("[user] attaches [src] to [M].", "<span class='notice'>You attach [src] to [M].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/mecha_parts/part/try_attach_part(mob/user, obj/mecha/M)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/chassis
|
||||
name = "Mecha Chassis"
|
||||
icon_state = "backbone"
|
||||
|
||||
@@ -1553,6 +1553,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
cost = 20
|
||||
restricted_roles = list("Clown")
|
||||
|
||||
/datum/uplink_item/role_restricted/concealed_weapon_bay
|
||||
name = "Concealed Weapon Bay"
|
||||
desc = "A modification for non-combat mechas that allows them to equip one piece of equipment designed for combat mechs. \
|
||||
It also hides the equipped weapon from plain sight. \
|
||||
Only one can fit on a mecha."
|
||||
item = /obj/item/mecha_parts/concealed_weapon_bay
|
||||
cost = 3
|
||||
restricted_roles = list("Roboticist", "Research Director")
|
||||
|
||||
// Pointless
|
||||
/datum/uplink_item/badass
|
||||
category = "(Pointless) Badassery"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -691,6 +691,7 @@
|
||||
#include "code\game\mecha\equipment\tools\medical_tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\mining_tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\other_tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\weapon_bay.dm"
|
||||
#include "code\game\mecha\equipment\tools\work_tools.dm"
|
||||
#include "code\game\mecha\equipment\weapons\weapons.dm"
|
||||
#include "code\game\mecha\medical\medical.dm"
|
||||
|
||||
Reference in New Issue
Block a user