Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP-Gygax, and adds the factional mech conversion kits to cargo #3918

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions code/game/mecha/combat/gygax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,39 @@
return
cell = new /obj/item/stock_parts/cell/bluespace(src)

/obj/mecha/combat/gygax/inteq
name = "\improper Basenji"
desc = "A lightweight security exosuit, modified to IRMG standards. The leg actuators have been maxed out, allowing for powerful short ranged charges."
icon_state = "inteqgygax"
/obj/mecha/combat/gygax/charger
name = "\improper Modified Gygax"
desc = "A lightweight security exosuit, this one seems to have been modified for short high speed charges instead of enhanced speed."
charge_break_walls = TRUE
charge_toss_structures = TRUE
charge_toss_mobs = TRUE

/obj/mecha/combat/gygax/charger/inteq
name = "\improper Basenji"
desc = "A lightweight security exosuit, modified to IRMG standards. The leg actuators have been maxed out, allowing for powerful short ranged charges captable of breaking walls and other obstacles."
icon_state = "inteqgygax"

/obj/mecha/combat/gygax/charger/mp
name = "\improper MP-Gygax"
desc = "A mass produced variant of the popular Gygax exosuit model. This model has had its armor plating reduced to reduce production costs. The leg actuators have been modified to take advantage of the consequently lighter frame, allowing for swift charges over moderate distances without heavily taxing the power supply."
armor = list("melee" = 25, "bullet" = 30, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
icon_state = "mpgygax"
charge_break_walls = FALSE
charge_toss_structures = FALSE
charge_distance = 6
charge_cooldown = 8
charge_power_consume = 100
charge_windup = 0

/obj/mecha/combat/gygax/charger/nt/loaded/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion(src)
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/thrusters/ion(src)
ME.attach(src)

/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
..()
overload_action.Grant(user, src)
Expand All @@ -65,11 +90,11 @@
..()
overload_action.Remove(user)

/obj/mecha/combat/gygax/inteq/GrantActions(mob/living/user, human_occupant = 0)
/obj/mecha/combat/gygax/charger/GrantActions(mob/living/user, human_occupant = 0)
..()
overload_action.Remove(user)
charge_action.Grant(user,src)

/obj/mecha/combat/gygax/inteq/RemoveActions(mob/living/user, human_occupant)
/obj/mecha/combat/gygax/charger/RemoveActions(mob/living/user, human_occupant)
. = ..()
charge_action.Remove(user)
10 changes: 8 additions & 2 deletions code/game/mecha/equipment/tools/work_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,13 @@

/obj/item/mecha_parts/mecha_equipment/conversion_kit/inteq_gygax
name = "IRMG Basenji Conversion Kit"
desc = "An IRMG-custom conversion kit for a Gygax combat exosuit, to convert it to the specialized Pyrnese breaching exosuit."
desc = "An IRMG-custom conversion kit for a Gygax combat exosuit, to convert it to the specialized Basenji breaching exosuit."
source_mech = list(/obj/mecha/combat/gygax,/obj/mecha/combat/gygax/dark)
result_mech = /obj/mecha/combat/gygax/inteq
result_mech = /obj/mecha/combat/gygax/charger/inteq

/obj/item/mecha_parts/mecha_equipment/conversion_kit/mp_gygax
name = "MP-Gygax Conversion Kit"
desc = "A NT made conversion kit for a Gygax combat exosuit, to convert it to the lightweight MP-Gygax skirmishing exosuit."
source_mech = list(/obj/mecha/combat/gygax,/obj/mecha/combat/gygax/dark)
result_mech = /obj/mecha/combat/gygax/charger/mp

8 changes: 7 additions & 1 deletion code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
///Vars for mech charges
var/charging = FALSE
var/charge_ready = TRUE
var/charge_windup = 0.5
var/charge_cooldown = 50
var/charge_power_consume = 200
var/charge_distance = 5
Expand Down Expand Up @@ -609,6 +610,11 @@
occupant_message("<span class='warning'>Unable to move while in zoom mode!</span>")
last_message = world.time
return 0
if(charging)
if(world.time - last_message > 20)
occupant_message(span_warning("You can't change direction while charging!"))
last_message = world.time
return 0
if(!cell)
if(world.time - last_message > 20)
occupant_message("<span class='warning'>Missing power cell.</span>")
Expand Down Expand Up @@ -1259,7 +1265,7 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
Shake(15, 15, 1 SECONDS)
var/obj/effect/temp_visual/decoy/new_decoy = new /obj/effect/temp_visual/decoy(loc,src)
animate(new_decoy, alpha = 0, color = "#5a5858", transform = matrix()*2, time = 2)
addtimer(CALLBACK(src,PROC_REF(handle_charge)),0.5 SECONDS, TIMER_STOPPABLE)
addtimer(CALLBACK(src,PROC_REF(handle_charge)), charge_windup SECONDS, TIMER_STOPPABLE)

/obj/mecha/proc/handle_charge()
var/turf/mecha_loc = get_turf(src)
Expand Down
26 changes: 26 additions & 0 deletions code/game/mecha/mecha_construction_paths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
////////////////////////////////
/datum/component/construction/mecha
var/base_icon
// if we need to override the icon for a different one from the base. Step determines when the override occurs.
var/override_icon
var/override_step = list()

// Component typepaths.
// most must be defined unless
Expand Down Expand Up @@ -52,6 +55,11 @@
// "[base_icon][index - 1]"
// For example, Ripley's step 1 icon_state is "ripley0".
var/atom/parent_atom = parent
if(override_icon && ((index-1) in override_step))
if(!steps[index]["icon_state"] && base_icon)
parent_atom.icon_state = "[override_icon][index - 1]"
return

if(!steps[index]["icon_state"] && base_icon)
parent_atom.icon_state = "[base_icon][index - 1]"

Expand Down Expand Up @@ -420,6 +428,24 @@
outer_plating=/obj/item/mecha_parts/part/gygax_armor
outer_plating_amount=1

/datum/component/construction/unordered/mecha_chassis/mpgygax
result = /datum/component/construction/mecha/gygax/mp
steps = list(
/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_left_arm,
/obj/item/mecha_parts/part/gygax_right_arm,
/obj/item/mecha_parts/part/gygax_left_leg,
/obj/item/mecha_parts/part/gygax_right_leg,
/obj/item/mecha_parts/part/gygax_head
)

/datum/component/construction/mecha/gygax/mp
result = /obj/mecha/combat/gygax/charger/mp

outer_plating = /obj/item/mecha_parts/part/mpgygax_armor
override_icon = "mpgygax"
override_step = list(21,22)

/datum/component/construction/mecha/gygax/action(datum/source, atom/used_atom, mob/user)
return INVOKE_ASYNC(src, PROC_REF(check_step), used_atom, user)

Expand Down
10 changes: 10 additions & 0 deletions code/game/mecha/mecha_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@
desc = "A set of armor plates designed for the Gygax. Designed to effectively deflect damage with a lightweight construction."
icon_state = "gygax_armor"

/obj/item/mecha_parts/chassis/mp_gygax
name = "\improper MP-Gygax chassis"
construct_type = /datum/component/construction/unordered/mecha_chassis/mpgygax

/obj/item/mecha_parts/part/mpgygax_armor
gender = PLURAL
name = "\improper MP-Gygax armor plates"
desc = "A set of stripped down armor plates designed for the MP-Gygax. Designed to moderately deflect damage with a lightweight construction."
icon_state = "mpgygax_armor"


//////////// Durand

Expand Down
56 changes: 55 additions & 1 deletion code/modules/cargo/packs/mechs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ Build Your Own Suit
)
crate_name = "Gygax Construction Kit"

/datum/supply_pack/mech/mpgygax_parts
name = "MP-Gygax construction kit"
desc = "A set of parts for a mass produced version of the famous Gygax exosuit model. The armor plating was reduced to cut costs for mass production, but the lighter weight allows the MP-Gygax's modified servos to perform swift moderate distance charges without heavily taxing the power supply. "
cost = 8000
contains = list(
/obj/item/mecha_parts/chassis/mp_gygax,
/obj/item/mecha_parts/part/gygax_head,
/obj/item/mecha_parts/part/gygax_torso,
/obj/item/mecha_parts/part/gygax_left_arm,
/obj/item/mecha_parts/part/gygax_right_arm,
/obj/item/mecha_parts/part/gygax_left_leg,
/obj/item/mecha_parts/part/gygax_right_leg,
/obj/item/mecha_parts/part/mpgygax_armor,
/obj/item/circuitboard/mecha/gygax/peripherals,
/obj/item/circuitboard/mecha/gygax/main,
/obj/item/circuitboard/mecha/gygax/targeting
)
crate_name = "MP-Gygax Construction Kit"
faction = /datum/faction/nt
faction_locked = TRUE

/datum/supply_pack/mech/durand_parts
name = "Durand construction kit"
desc = "The kit to a bulky suit most frequently used by the CLIP Minutemen, older models tend to find themselves disassembled and sold off."
Expand Down Expand Up @@ -207,11 +228,44 @@ Mech Equipment
/datum/supply_pack/mech/equipment/ripley_upgrade
name = "APLU upgrade kit"
desc = "Contains an APLU MK II upgrade kit. The upgrade will replace the cockpit with a spaceworthy canopy, but the added weight makes it slower."
cost = 1500
cost = 500
contains = list(
/obj/item/mecha_parts/mecha_equipment/conversion_kit/ripley
)

/datum/supply_pack/mech/equipment/ripley_upgrade/clip
name = "CLIP Ripley MK-IV upgrade kit"
desc = "Contains a CLIP-custom APLU MK-IV upgrade kit. The upgrade will replace the cockpit with a lightweight spaceworthy canopy, and parts to overclock the leg servos. Maintains the speed of the MK-1, but consumes more power."
cost = 500
contains = list(
/obj/item/mecha_parts/mecha_equipment/conversion_kit/ripley/clip
)
faction = /datum/faction/clip
faction_discount = 0
faction_locked = TRUE

/datum/supply_pack/mech/equipment/paladin_upgrade
name = "CLIP Durand Paladin upgrade kit"
desc = "Contains a CLIP-custom conversion kit for a Durand combat exosuit, to convert it to the specialized Paladin anti-xenofauna exosuit. Features an electrical replusion field that repels any melee attacks, but loses the ability to defend against ranged projectiles."
cost = 500
contains = list(
/obj/item/mecha_parts/mecha_equipment/conversion_kit/paladin
)
faction = /datum/faction/clip
faction_discount = 0
faction_locked = TRUE

/datum/supply_pack/mech/equipment/basenji_upgrade
name = "IRMG Basenji upgrade kit"
desc = "Contains an IRMG-custom conversion kit for a Gygax combat exosuit, to convert it to the specialized Basenji breaching exosuit. The upgrade will overclock the Gygax's leg actuators, allowing for short ranged charges capable of smashing through most obstacles."
cost = 500
contains = list(
/obj/item/mecha_parts/mecha_equipment/conversion_kit/inteq_gygax
)
faction = /datum/faction/inteq
faction_discount = 0
faction_locked = TRUE

/datum/supply_pack/mech/equipment/melee_armor_booster
name = "Exosuit CCW armor kit"
desc = "A \"close combat weaponry\" module designed to deflect melee attacks."
Expand Down
Binary file modified icons/mecha/mech_construct.dmi
Binary file not shown.
Binary file modified icons/mecha/mech_construction.dmi
Binary file not shown.
Binary file modified icons/mecha/mecha.dmi
Binary file not shown.
Loading