Files
e0aa218843 Shell May Cry: A comprehensive rework of synthetics. (#20721)
https://www.youtube.com/watch?v=9mPvZ96pHJI

A pull request commissioned by the Synthetic Lore Team to
comprehensively rework synthetics (read: IPCs) and how they work in
Aurora. The objective is to make IPCs as unique as possible from humans,
upgrading the robotic feel and atmosphere, while also preserving a good
sense of balance in-game.

Key features:

- A comprehensive expansion of synthetic organs, all of which now
fulfill a purpose: hydraulics, cooling units, power systems, actuators,
diagnostics units.
- Customizable organs with benefits and drawbacks, such as with cooling
units and power systems.
- Unique ways to repair the organs and more involved steps.
- Unique damage mechanics - every organ has wiring and electronics which
affect its functioning, and they are defended by plating which provides
natural armour.
- Improved and immersive diagnostics.
- Unique features, benefits, and drawbacks for every IPC frame.
- A rework of the positronic brain, which can be either destroyed or
shut down, alongside effects caused by low integrity.
- A rework of how EMPs affect IPC organs.
- Non-binary damage states for each organ.

To-do:

- [x] Finish the unique features for each frame.
- [x] Look into if mechanical synthskin is possible.
- [x] Power system.
- [x] Posibrain mechanics.
- [ ] Passive cooling expansion.
- [x] EMP mechanics.
- [x] Repair mechanics.
- [x] Mob weight mechanics.
- [ ] Gurney for heavy mobs.
- [x] New augments.
- [ ] IPC tag scanning and flashing.

---------

Signed-off-by: Werner <1331699+Arrow768@users.noreply.github.com>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: Geeves <22774890+Geevies@users.noreply.github.com>
Co-authored-by: Werner <1331699+Arrow768@users.noreply.github.com>
2025-12-21 16:26:23 +00:00

167 lines
4.4 KiB
Plaintext

/obj/item/minigunpack
name = "backpack power source"
desc = "The massive external power source for the gatling gun."
icon = 'icons/obj/minigun.dmi'
icon_state = "holstered"
item_state = "holstered"
contained_sprite = 1
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 6, TECH_MAGNET = 4, TECH_ILLEGAL = 7)
action_button_name = "Deploy the Gatling Machine Gun"
var/obj/item/gun/projectile/automatic/rifle/minigun/gun
var/armed = FALSE
var/obj/item/ammo_magazine/ammo_magazine
var/magazine_type = /obj/item/ammo_magazine/minigun
/obj/item/minigunpack/update_icon()
..()
if(armed)
icon_state = "notholstered"
item_state = "notholstered"
else
icon_state = "holstered"
item_state = "holstered"
/obj/item/minigunpack/Initialize()
. = ..()
gun = make_gun()
gun.source = src
ammo_magazine = new magazine_type(src)
gun.magazine_type = ammo_magazine
gun.ammo_magazine = ammo_magazine
gun.forceMove(src)
/obj/item/minigunpack/proc/make_gun()
return new /obj/item/gun/projectile/automatic/rifle/minigun()
/obj/item/minigunpack/ui_action_click()
if(src in usr)
toggle_gun()
/obj/item/minigunpack/verb/toggle_gun()
set name = "Deploy the gatling machine gun"
set category = "Object"
var/mob/living/carbon/human/user
if(istype(usr,/mob/living/carbon/human))
user = usr
else
return
if(!user)
return
if (user.back!= src)
to_chat(user, SPAN_WARNING("\The [src] must be worn to deploy \the [gun]!"))
return
if(use_check_and_message(user))
return
if(!gun)
to_chat(user, SPAN_WARNING("There is no weapon attached the \the [src]!"))
if(armed)
to_chat(user, SPAN_WARNING("\The [src] has been already deployed!"))
else
if(!user.put_in_hands(gun))
to_chat(user, SPAN_WARNING("You need a free hand to hold \the [gun]!"))
return
armed = TRUE
update_icon()
user.update_inv_back()
/obj/item/minigunpack/equipped(mob/user, slot)
..()
if(slot != slot_back)
remove_gun()
user.update_inv_back()
/obj/item/minigunpack/proc/remove_gun()
if(!gun)
return
if(ismob(gun.loc))
var/mob/M = gun.loc
if(M.drop_from_inventory(gun, src))
update_icon()
else
gun.forceMove(src)
update_icon()
armed = FALSE
return
/obj/item/minigunpack/Destroy()
if(gun)
qdel(gun)
gun = null
if(ammo_magazine)
qdel(ammo_magazine)
ammo_magazine = null
return ..()
/obj/item/minigunpack/attackby(obj/item/attacking_item, mob/user, params)
if(attacking_item == gun)
remove_gun()
return 1
else
return ..()
/obj/item/gun/projectile/automatic/rifle/minigun
name = "gatling machine gun"
desc = "A six-barrel rotary machine gun with an incredible rate of fire. Requires a bulky backpack power source to use."
slot_flags = 0
icon = 'icons/obj/minigun.dmi'
icon_state = "minigun"
item_state = "minigun"
contained_sprite = 1
caliber = "a762"
magazine_type = null
max_shells = 1000
fire_sound = 'sound/weapons/gunshot/gunshot_saw.ogg'
needspin = FALSE
origin_tech = null
firemodes = list(
list(mode_name="short bursts", can_autofire=0, burst=6, move_delay=8, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(3, 6, 9)),
list(mode_name="long bursts", can_autofire=0, burst=12, move_delay=9, burst_accuracy = list(0,-1,-1,-2,-2,-2,-3,-3), dispersion = list(8)),
list(mode_name="full auto", can_autofire=1, burst=1, fire_delay=5, fire_delay_wielded=3, one_hand_fa_penalty=12, burst_accuracy = list(0,-1,-1,-2,-2,-2,-3,-3), dispersion = list(5, 10, 15, 20, 25))
)
var/obj/item/minigunpack/source
/obj/item/gun/projectile/automatic/rifle/minigun/special_check(var/mob/user)
if(!wielded)
to_chat(user, SPAN_DANGER("You cannot fire this weapon with just one hand!"))
return FALSE
if (user.back!= source)
to_chat(user, SPAN_WARNING("\The [source] must be worn to fire \the [src]!"))
return FALSE
return ..()
/obj/item/gun/projectile/automatic/rifle/minigun/load_ammo(var/obj/item/A, mob/user)
return
/obj/item/gun/projectile/automatic/rifle/minigun/unload_ammo(mob/user, allow_dump = TRUE, drop_mag = FALSE)
return
/obj/item/gun/projectile/automatic/rifle/minigun/dropped(mob/user)
..()
if(source)
to_chat(user, SPAN_NOTICE("\The [src] snaps back onto \the [source]."))
INVOKE_ASYNC(source, TYPE_PROC_REF(/obj/item/minigunpack, remove_gun))
source.update_icon()
user.update_inv_back()
/obj/item/gun/projectile/automatic/rifle/minigun/Move()
. = ..()
if(loc != source.loc)
INVOKE_ASYNC(source, TYPE_PROC_REF(/obj/item/minigunpack, remove_gun))