Skip to content

Commit

Permalink
Feat: fix, tweak and upgrade exosiuts. update mercenary uplink exosui…
Browse files Browse the repository at this point in the history
…ts (#685)

Данный ПР - сборник новвоведений в мехах, которые больше касаются нюки и
ОБР.
-Теперь, нюка может вызвать меха (Максимум 2 единицы) только при войне.
Цена меха - 400 ТК.
-ОБР получили своего меха, с автодробовиком на 9 патронов(UPD 16
патронов)(Имеется выбор между Слагами/Манстоперами/Горохом) и
лазеркэнаном. В остальном, это мех нюки.
EDITED: ОБР получило 2 экземпляра продвинутой ионки с доп режимом, что
садит меху щиты и замедляет в 2.5 раз на 10 секунд.
-Исправлен повторяющийся спрайт у катапульты.
-На будущее, создана заготовка наплечного ракетомёта на меха (Не гибает,
в будущем будет установлен на меха дедов).
-Как приятный бонус, исправлен баг, позволяющий бесконечно объявлять
войну.
(Да, я в курсе что на втором скрине по пизде пошла иконка катапульты, я
это уже исправил, а новые скрины делать лень)

![image](https://github.com/ss220-space/Baystation12/assets/88627712/97cf1c38-16e1-4d6c-8d3f-ef0a11205e6f)


![image](https://github.com/ss220-space/Baystation12/assets/88627712/79b1ef6a-0638-4b2e-801c-966da72c2304)

![image](https://github.com/ss220-space/Baystation12/assets/88627712/5d2355bd-7604-474c-992c-dfda24dbf25f)
(https://youtu.be/Ke9i88DyWvk)
  • Loading branch information
AmShegars authored Dec 19, 2023
1 parent c4672eb commit d7c0f66
Show file tree
Hide file tree
Showing 19 changed files with 243 additions and 32 deletions.
2 changes: 2 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3720,6 +3720,7 @@
#include "infinity\code\modules\materials\definitions\materials_other.dm"
#include "infinity\code\modules\mechs\armour.dm"
#include "infinity\code\modules\mechs\guns.dm"
#include "infinity\code\modules\mechs\premade\ert.dm"
#include "infinity\code\modules\mechs\premade\merc.dm"
#include "infinity\code\modules\mob\animations.dm"
#include "infinity\code\modules\mob\floating_message.dm"
Expand Down Expand Up @@ -3811,6 +3812,7 @@
#include "infinity\code\modules\projectiles\gun.dm"
#include "infinity\code\modules\projectiles\ammunition\boxes.dm"
#include "infinity\code\modules\projectiles\ammunition\bullets.dm"
#include "infinity\code\modules\projectiles\guns\energy\advanced_ion_rifle.dm"
#include "infinity\code\modules\projectiles\guns\energy\laser.dm"
#include "infinity\code\modules\projectiles\guns\energy\laser_handmade.dm"
#include "infinity\code\modules\projectiles\guns\energy\secure.dm"
Expand Down
4 changes: 3 additions & 1 deletion code/__defines/antagonists.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define ANTAG_SERVANT "servant"
#define ANTAG_APPRENTICE "apprentice"
#define ANTAG_WIZARD "Space Wizard"
#define ANTAG_WIZARD "Space Wizard"
GLOBAL_VAR_INIT(max_mech, 0)
GLOBAL_VAR_INIT(war_declared, FALSE)
1 change: 0 additions & 1 deletion code/datums/uplink/uplink_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ var/datum/uplink/uplink = new()
var/list/datum/antagonist/antag_roles = list("Exclude", MODE_DEITY) // Antag roles this item is displayed to. If empty, display to all. If it includes 'Exclude", anybody except this role can view it

/datum/uplink_item/item
var/static/MAX_MECH = 1
var/path = null

/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
Expand Down
19 changes: 18 additions & 1 deletion code/modules/mechs/equipment/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
var/cooldown = 3.5 SECONDS //Time until we can recharge again after a blocked impact
var/overheat_cooldown = 50 SECONDS //[INF](500) Огромное окно для пробития меха.
var/OVERHEAT = FALSE
var/slowdown_constant = 2.5 //How much legs (and hands) get slower (move_delay/action_delay/turn_delay * slowndown_constant)
var/cooldown_time = 10 SECONDS //How long mech have movement slowdown after overheat
restricted_hardpoints = list(HARDPOINT_BACK)
restricted_software = list(MECH_SOFTWARE_WEAPONS)

Expand Down Expand Up @@ -92,13 +94,16 @@
var/difference = damage - charge
charge = Clamp(charge - damage, 0, max_charge)
last_recharge = world.time
if(difference >= 0)
if(difference >= 0) //[INF] OVERHEAT/перегрев
toggle()
OVERHEAT = TRUE
src.visible_message("The mech's computer flashes: WARNING! Shield overheat detected!","The mech's computer beeps, reporting a shield error!",0)
playsound(owner.loc,'sound/mecha/shield_deflector_fail.ogg',60,0)
update_icon()
last_overheat = world.time
if(damage==300)
src.visible_message("Critical overheat, energy emergency redirected to cooling systems.","Critical overheat, energy emergency redirected to cooling systems.",0)
owner.Slowdown_mech(slowdown_constant, cooldown_time) //[INF] Замедлит меха в slowdown_constant раз на cooldown_time время
delayed_toggle()
return difference
else return 0
Expand All @@ -120,6 +125,18 @@
OVERHEAT = TRUE
delayed_toggle()

//Slodown protocol
/mob/living/exosuit/proc/Slowdown_mech(var/slowdown_constant, var/cooldown_time)
set waitfor = 0
legs.move_delay = legs.move_delay * slowdown_constant
legs.turn_delay = legs.turn_delay * slowdown_constant
arms.action_delay = arms.action_delay * slowdown_constant
sleep(cooldown_time)
legs.move_delay = legs.move_delay / slowdown_constant
legs.turn_delay = legs.turn_delay / slowdown_constant
arms.action_delay = arms.action_delay / slowdown_constant


/obj/item/mech_equipment/shields/proc/toggle()
if(charge == -1)
charge = 0
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mechs/equipment/utility.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
/obj/item/mech_equipment/catapult
name = "gravitational catapult"
desc = "An exosuit-mounted gravitational catapult."
icon_state = "mech_clamp"
icon_state = "mech_catapult"
restricted_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND)
restricted_software = list(MECH_SOFTWARE_UTILITY)
var/mode = CATAPULT_SINGLE
Expand Down
1 change: 0 additions & 1 deletion code/modules/mechs/premade/_premade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

/mob/living/exosuit/premade/proc/spawn_mech_equipment()
set waitfor = FALSE
install_system(new /obj/item/mech_equipment/light(src), HARDPOINT_HEAD)

/mob/living/exosuit/premade/random
name = "mismatched exosuit"
Expand Down
1 change: 1 addition & 0 deletions code/modules/mechs/premade/heavy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
install_system(new /obj/item/mech_equipment/mounted_system/taser/laser(src), HARDPOINT_LEFT_HAND)
install_system(new /obj/item/mech_equipment/mounted_system/taser/ion(src), HARDPOINT_RIGHT_HAND)
install_system(new /obj/item/mech_equipment/shields(src), HARDPOINT_BACK)
install_system(new /obj/item/mech_equipment/light(src), HARDPOINT_HEAD)

/obj/item/mech_component/manipulators/heavy
name = "heavy arms"
Expand Down
1 change: 1 addition & 0 deletions code/modules/mechs/premade/powerloader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
..()
install_system(new /obj/item/mech_equipment/drill/steel(src), HARDPOINT_LEFT_HAND)
install_system(new /obj/item/mech_equipment/clamp(src), HARDPOINT_RIGHT_HAND)
install_system(new /obj/item/mech_equipment/light(src), HARDPOINT_HEAD)

/mob/living/exosuit/premade/powerloader/mechete/Initialize()
. = ..()
Expand Down
10 changes: 1 addition & 9 deletions code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ obj/item/gun/energy/retro
is_serial = 1
s_gun = "LC"


/obj/item/gun/energy/laser/assault
name = "Laser assault rifle"
desc = "An advanced fully automatic laser rifle, dubbed LAR-1. Capable of firing in several firemodes."
Expand All @@ -125,15 +126,6 @@ obj/item/gun/energy/retro
)


/obj/item/gun/energy/lasercannon/mounted
name = "mounted laser cannon"
self_recharge = 1
use_external_power = 1
recharge_time = 10
accuracy = 0 //mounted laser cannons don't need any help, thanks
one_hand_penalty = 0
has_safety = FALSE

/obj/item/gun/energy/xray
name = "G56E x-ray carbine"
desc = "A high-power laser gun capable of emitting concentrated x-ray blasts, that are able to penetrate laser-resistant armor much more readily than standard photonic beams."
Expand Down
Binary file modified icons/mecha/mech_equipment.dmi
Binary file not shown.
Binary file modified icons/mecha/mech_weapon_overlays.dmi
Binary file not shown.
Binary file modified icons/obj/guns/railgun_old_heavy.dmi
Binary file not shown.
17 changes: 10 additions & 7 deletions infinity/code/datums/uplink/badassery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,19 @@
name = "Combat Mech"
var/static/BOUGHT_MECH = 0
desc = "A terrible and at the same time beautiful combat mech to destroy all living things in your way. Comes with special plasma rifle, machinegun and shielding drone. Also, it is almoust EMP-proof!"
item_cost = 300
item_cost = 400
antag_roles = list(MODE_MERCENARY)

/datum/uplink_item/item/badassery/mech/get_goods(var/obj/item/device/uplink/U, var/loc)
if(MAX_MECH <= 0)
U.visible_message("[U.loc] Превышен лимит бронетехники для данной миссии. Обьявите войну для дополнительной единицы.\"")
return new /obj/item/stack/telecrystal(loc, 300)
MAX_MECH--
if(++BOUGHT_MECH == 2)
command_announcement.Announce("В секторе была замечена телепортация большого количества бронетехники Мародёров Горлекса.", "Показания датчиков [station_name()]" , msg_sanitized = 1, zlevels = GLOB.using_map.station_levels)
if(!GLOB.war_declared)
U.visible_message("[U.loc] Война не обьявлена, бронетехника не может быть вызвана. Обьявите войну для получения доступа к бронетехнике.\"")
return new /obj/item/stack/telecrystal(loc, 400)
if(GLOB.max_mech <= 0)
U.visible_message("[U.loc] Превышен лимит бронетехники для данной миссии.\"")
return new /obj/item/stack/telecrystal(loc, 400)
GLOB.max_mech--
U.visible_message("[U.loc] Запрос на бронетехнику Горлекса обработан, единица телепортирована на ваше местоположение.\"")
command_announcement.Announce("В секторе была замечена телепортация бронетехники Мародёров Горлекса.", "Показания датчиков [station_name()]" , msg_sanitized = 1, zlevels = GLOB.using_map.station_levels)
return new /mob/living/exosuit/premade/merc(loc)

/datum/uplink_item/item/badassery/tobacco
Expand Down
5 changes: 3 additions & 2 deletions infinity/code/datums/uplink/services.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
antag_roles = list(MODE_MERCENARY)

/datum/uplink_item/item/services/assault_declaration/get_goods(var/obj/item/device/uplink/U, var/loc)
if(world.time > 10 MINUTES)
if(world.time > 10 MINUTES || GLOB.war_declared)
U.visible_message("[U.loc] buzzez and declares, \"Unable to teleport telecrystals.\"")
return 0
command_announcement.Announce("В секторе была замечена телепортация большого объема телекристаллов, использующихся Горлекскими Мародерами. Рекомендуется вызвать поддержку с ЦК для урегулирования ситуации.", "Показания датчиков [station_name()]" , msg_sanitized = 1, zlevels = GLOB.using_map.station_levels)
MAX_MECH++
GLOB.max_mech = 2
GLOB.war_declared = TRUE
return new /obj/item/stack/telecrystal(loc, 781)
9 changes: 4 additions & 5 deletions infinity/code/modules/mechs/armour.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
name = "tactical combat plating"
desc = "Special combat plating, designed for operating in field of battle."
armor = list(
melee = ARMOR_MELEE_VERY_HIGH,
bullet = ARMOR_BALLISTIC_RIFLE,
laser = ARMOR_LASER_RIFLES,
energy = ARMOR_ENERGY_STRONG,
melee = ARMOR_MELEE_MAJOR + 5, //55
bullet = ARMOR_BALLISTIC_RESISTANT, //65
laser = ARMOR_LASER_MAJOR, //55
energy = ARMOR_ENERGY_STRONG, //EMP dont work actually
bomb = ARMOR_BOMB_RESISTANT,
rad = ARMOR_RAD_RESISTANT,
bio = ARMOR_BIO_SHIELDED
)
origin_tech = list(TECH_MATERIAL = 7)
95 changes: 94 additions & 1 deletion infinity/code/modules/mechs/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
has_safety = FALSE
one_hand_penalty= 0

//Mech machinegun START
/obj/item/gun/energy/machingegun/mounted/mech
name = "mech machingegun"
desc = "You shouldn't see this!"
desc = "This one connected by ammunition belt to the mech."
icon = 'icons/obj/guns/saw.dmi'
icon_state = "l6closed50"
item_state = "l6closedmag"
Expand All @@ -38,3 +39,95 @@
desc = "An exosuit-mounted machinegun. Handle with care."
icon_state = "mech_scatter"
holding_type = /obj/item/gun/energy/machingegun/mounted/mech
//Mech machinegun END

//Mech autoshotgun START
/obj/item/gun/energy/shotgun/mounted/mech
name = "mech autoshotgun"
desc = "This one connected by ammunition belt to the mech."
icon = 'icons/obj/guns/saw.dmi'
icon_state = "l6closed50"
item_state = "l6closedmag"
projectile_type = /obj/item/projectile/bullet/shotgun
firemodes = list(
list(mode_name="Beanbang", projectile_type=/obj/item/projectile/bullet/shotgun/beanbag),
list(mode_name="Manstoppers", projectile_type=/obj/item/projectile/bullet/shotgun/manstopper),
list(mode_name="Slugs", projectile_type=/obj/item/projectile/bullet/shotgun),
)
max_shots = 16
multi_aim = 1
fire_delay=15
autofire_enabled=1
burst=3
accuracy = 2
bulk = GUN_BULK_RIFLE
w_class = ITEM_SIZE_HUGE
one_hand_penalty= 0
self_recharge = TRUE
recharge_time = 10
use_external_power = TRUE
has_safety = FALSE
charge_cost = 60

/obj/item/mech_equipment/mounted_system/taser/shotgun
name = "mounted automatic shotgun"
desc = "An exosuit-mounted automatic shotgun. Handle with care."
icon_state = "mech_shotgun"
holding_type = /obj/item/gun/energy/shotgun/mounted/mech
//Mech autoshotgun END

/obj/item/mech_equipment/mounted_system/taser/advanced //Mech elecrolaser for shoulders
restricted_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND,HARDPOINT_LEFT_SHOULDER,HARDPOINT_RIGHT_SHOULDER)

//Lasercanon START

/obj/item/mech_equipment/mounted_system/taser/laser/Ert //Mech laser canon (Danger shit)
name = "\improper CH-PS \"Anigilator\" laser"
desc = "An exosuit-mounted laser rifle. Handle with care."
icon_state = "mech_lasercarbine"
holding_type = /obj/item/gun/energy/lasercannon/mounted

/obj/item/gun/energy/lasercannon/mounted
name = "mounted laser cannon"
self_recharge = 1
use_external_power = 1
recharge_time = 40
accuracy = 5
charge_cost = 100
fire_delay = 30
accuracy = 4 //mounted laser cannons don't need any help, thanks
one_hand_penalty = 0
has_safety = FALSE
//Lasercanon END

//MechRPG START
/obj/item/mech_equipment/mounted_system/taser/rocketlauncher
name = "Advanced mech rocket launcher"
desc = "An exosuit-mounted rocket launcher, placed on shoulder"
icon_state = "mech_missilerack"
restricted_hardpoints = list(HARDPOINT_LEFT_SHOULDER,HARDPOINT_RIGHT_SHOULDER)
holding_type = /obj/item/gun/energy/rocketlauncher/mounted

/obj/item/gun/energy/rocketlauncher/mounted
self_recharge = 1
use_external_power = 1
recharge_time = 100
fire_delay=40
accuracy = 1
one_hand_penalty = 0
has_safety = FALSE

/obj/item/gun/energy/rocketlauncher
name = "Mech rocketlauncher"
desc = "Most dangerous mech weapon off all"
icon_state = "mech_missilerack"
has_safety = FALSE
projectile_type = /obj/item/projectile/Mechmissle

/obj/item/projectile/Mechmissle
icon_state = "missile"
throwforce = 15

/obj/item/projectile/Mechmissle/on_impact(var/atom/target, var/blocked = 0)
explosion(target, 0, 2, 2, 4)
//MechRPG END
85 changes: 85 additions & 0 deletions infinity/code/modules/mechs/premade/ert.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/mob/living/exosuit/premade/ert
name = "Nanotrasen special combat mech"
desc = "A sleek, modern combat exosuit created by Nanotrasen for specific missions."

/mob/living/exosuit/premade/ert/Initialize()
if(!arms)
arms = new /obj/item/mech_component/manipulators/ert(src)
arms.color = COLOR_CYAN_BLUE
if(!legs)
legs = new /obj/item/mech_component/propulsion/merc(src)
legs.color = COLOR_CYAN_BLUE
if(!head)
head = new /obj/item/mech_component/sensors/merc(src)
head.color = COLOR_WHITE
if(!body)
body = new /obj/item/mech_component/chassis/merc(src)
body.color = COLOR_WHITE

. = ..()

/mob/living/exosuit/premade/ert/spawn_mech_equipment()
..()
install_system(new /obj/item/mech_equipment/mounted_system/taser/laser/Ert(src), HARDPOINT_RIGHT_HAND)
install_system(new /obj/item/mech_equipment/mounted_system/taser/shotgun(src), HARDPOINT_LEFT_HAND)
install_system(new /obj/item/mech_equipment/shields(src), HARDPOINT_BACK)
install_system(new /obj/item/mech_equipment/light(src), HARDPOINT_RIGHT_SHOULDER)
install_system(new /obj/item/mech_equipment/flash(src), HARDPOINT_LEFT_SHOULDER)

/obj/item/mech_component/manipulators/ert
name = "Nanotrasen combat arms"
exosuit_desc_string = "flexible, advanced manipulators"
icon_state = "combat_arms"
melee_damage = 40
action_delay = 10
power_use = 50

/obj/item/mech_component/propulsion/ert
name = "Nanotrasen combat legs"
exosuit_desc_string = "sleek hydraulic legs"
icon_state = "combat_legs"
move_delay = 3
turn_delay = 3
power_use = 20

/obj/item/mech_component/sensors/ert
name = "Nanotrasen combat sensors"
gender = PLURAL
exosuit_desc_string = "high-resolution thermal sensors"
icon_state = "combat_head"
vision_flags = SEE_MOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING
power_use = 200

/obj/item/mech_component/sensors/ert/prebuild()
..()
software = new(src)
software.installed_software = list(MECH_SOFTWARE_WEAPONS,MECH_SOFTWARE_UTILITY)


/obj/item/mech_component/chassis/ert
name = "sealed exosuit chassis"
hatch_descriptor = "canopy"
pilot_coverage = 100
exosuit_desc_string = "an armoured chassis"
icon_state = "combat_body"
power_use = 40

/obj/item/mech_component/chassis/ert/prebuild()
. = ..()
QDEL_NULL(cell)
cell = new /obj/item/cell/hyper(src)
m_armour = new /obj/item/robot_parts/robot_component/armour/exosuit/combat/syndie(src)


/obj/item/mech_component/chassis/ert/Initialize()
pilot_positions = list(
list(
"[NORTH]" = list("x" = 8, "y" = 8),
"[SOUTH]" = list("x" = 8, "y" = 8),
"[EAST]" = list("x" = 4, "y" = 8),
"[WEST]" = list("x" = 12, "y" = 8)
)
)

. = ..()
Loading

0 comments on commit d7c0f66

Please sign in to comment.