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

Mech Customization feature upgrade #714

Merged
merged 6 commits into from
Feb 3, 2024
Merged
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
16 changes: 2 additions & 14 deletions code/datums/supplypacks/nonessent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,23 +250,11 @@

/decl/hierarchy/supply_pack/nonessent/exosuit_mod
num_contained = 1
name = "Mod - \"Firestarter\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/flames_red)
name = "Customization exosuit modkit"
contains = list(/obj/item/device/kit/mech)
cost = 50
containername = "heavy exosuit modkit crate"

/decl/hierarchy/supply_pack/nonessent/exosuit_mod/chrome
name = "Mod - \"Burning Chrome\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/flames_blue)

/decl/hierarchy/supply_pack/nonessent/exosuit_mod/military
name = "Mod - \"Guerilla\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/camouflage)

/decl/hierarchy/supply_pack/nonessent/exosuit_mod/alpine
name = "Mod - \"Alpine\" exosuit modkit"
contains = list(/obj/item/device/kit/paint/camouflage/forest)

/decl/hierarchy/supply_pack/nonessent/aromatherapy
name = "Rec - Aromatherapy"
contains = list(
Expand Down
2 changes: 1 addition & 1 deletion code/datums/trading/goods.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Sells devices, odds and ends, and medical stuff
origin = "Drugstore"
possible_origins = list("Buy 'n Save", "Drug Carnival", "C&B", "Fentles", "Dr. Goods", "Beevees", "McGillicuddy's")
possible_trading_items = list(/obj/item/device/flashlight = TRADER_ALL,
/obj/item/device/kit/paint = TRADER_SUBTYPES_ONLY,
/obj/item/device/kit/mech = TRADER_SUBTYPES_ONLY,
/obj/item/aicard = TRADER_THIS_TYPE,
/obj/item/device/binoculars = TRADER_THIS_TYPE,
/obj/item/device/cable_painter = TRADER_THIS_TYPE,
Expand Down
133 changes: 38 additions & 95 deletions code/game/objects/items/paintkit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
var/new_desc = "An exosuit." //How is the new exosuit described?
var/new_icon = "ripley" //What base icon will the new exosuit use?
var/new_icon_file
var/uses = 1 // Uses before the kit deletes itself.

/obj/item/device/kit/examine(mob/user)
. = ..()
to_chat(user, "It has [uses] use\s left.")

/obj/item/device/kit/inherit_custom_item_data(var/datum/custom_item/citem)
new_name = citem.item_name
Expand All @@ -18,18 +13,14 @@
new_icon_file = CUSTOM_ITEM_OBJ
. = src

/obj/item/device/kit/proc/use(var/amt, var/mob/user)
uses -= amt
/obj/item/device/kit/proc/use(var/mob/user)
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)
if(uses<1)
qdel(src)

// Root hardsuit kit defines.
// Icons for modified hardsuits need to be in the proper .dmis because suit cyclers may cock them up.
/obj/item/device/kit/suit
name = "voidsuit modification kit"
desc = "A kit for modifying a voidsuit."
uses = 2
var/new_light_overlay
var/new_mob_icon_file

Expand Down Expand Up @@ -80,93 +71,45 @@
return ..()

// Mechs are handled in their attackby (mech_interaction.dm).
/obj/item/device/kit/paint
name = "exosuit customisation kit"
/obj/item/device/kit/mech
name = "exosuit customization kit"
desc = "A kit containing all the needed tools and parts to repaint a exosuit."
var/removable = null

/obj/item/device/kit/paint/examine(mob/user)
new_icon_file = 'icons/mecha/mech_decals.dmi'
var/current_decal = "cammo2" //По умолчанию
var/list/mech_decales = list(
"flames_red",
"flames_blue",
"cammo2",
"cammo1",
"red_stripes",
"white_stripes",
"black_stripes",
"green_stripes",
)

/obj/item/device/kit/mech/attack_self(mob/user)//Тыкаем по самому киту дабы вызвать список того, какую декаль хотим на меха
choose_decal(user)

/obj/item/device/kit/mech/examine(mob/user)
. = ..()
to_chat(user, "This kit will add a '[new_name]' decal to a exosuit'.")

// exosuit kits.
/obj/item/device/kit/paint/use(amt, mob/user)
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)

/obj/item/device/kit/paint/flames_red
name = "\"Firestarter\" exosuit customisation kit"
new_icon = "flames_red"

/obj/item/device/kit/paint/flames_blue
name = "\"Burning Chrome\" exosuit customisation kit"
new_icon = "flames_blue"


/*
//[inf]
//Ripley
/obj/item/device/kit/paint/ripley
name = "\"Classic\" APLU customisation kit"
new_name = "APLU \"Classic\""
new_desc = "A very retro APLU unit; didn't they retire these back in 2287?"
new_icon = "ripley-old"
allowed_types = list("ripley")

/obj/item/device/kit/paint/ripley/death
name = "\"Reaper\" APLU customisation kit"
new_name = "APLU \"Reaper\""
new_desc = "A terrifying, grim power loader. Why do those clamps have spikes?"
new_icon = "deathripley"
allowed_types = list("ripley","firefighter")

// Durand kits.
/obj/item/device/kit/paint/durand
name = "\"Classic\" Durand customisation kit"
new_name = "Durand \"Classic\""
new_desc = "An older model of Durand combat exosuit. This model was retired for rotating a pilot's torso 180 degrees."
new_icon = "old_durand"
allowed_types = list("durand")

/obj/item/device/kit/paint/durand/seraph
name = "\"Cherubim\" Durand customisation kit"
new_name = "Durand \"Cherubim\""
new_desc = "A Durand combat exosuit modelled after ancient Earth entertainment. Your heart goes doki-doki just looking at it."
new_icon = "old_durand"

/obj/item/device/kit/paint/durand/phazon
name = "\"Sypher\" Durand customisation kit"
new_name = "Durand \"Sypher\""
new_desc = "A Durand combat exosuit with some very stylish neons and decals. Seems to blur slightly at the edges; probably an optical illusion."
new_icon = "phazon"

// Gygax kits.
/obj/item/device/kit/paint/gygax
name = "\"Jester\" Gygax customisation kit"
new_name = "Gygax \"Jester\""
new_desc = "A Gygax exosuit modelled after the infamous combat-troubadors of Earth's distant past. Terrifying to behold."
new_icon = "honker"
allowed_types = list("gygax")

/obj/item/device/kit/paint/gygax/darkgygax
name = "\"Silhouette\" Gygax customisation kit"
new_name = "Gygax \"Silhouette\""
new_desc = "An ominous Gygax exosuit modelled after the fictional corporate 'death squads' that were popular in pulp action-thrillers back in 2280s."
new_icon = "darkgygax"

/obj/item/device/kit/paint/gygax/recitence
name = "\"Gaoler\" Gygax customisation kit"
new_name = "Durand \"Gaoler\""
new_desc = "A bulky silver Gygax exosuit. The extra armour appears to be painted on, but it's very shiny."
new_icon = "recitence"

//[/inf]
*/
/obj/item/device/kit/paint/camouflage
name = "\"Guerilla\" exosuit customisation kit"
desc = "The exact same pattern the 76th Armored Gauntlet used in the Gaia war, now available for general use."
new_icon = "cammo1"

/obj/item/device/kit/paint/camouflage/forest
name = "\"Alpine\" exosuit customisation kit"
new_icon = "cammo2"
desc = "A muted pattern for alpine environments. Don't miss the forest for the trees!"
/obj/item/device/kit/mech/proc/choose_decal(mob/user)
set name = "Choose decal"
set desc = "Choose mech decal."
set category = "Object"
set src in usr

if(usr.incapacitated())
return
var/new_decal = input(usr, "Choose a decal.", name, current_decal) as null|anything in mech_decales
if (usr.incapacitated())
return
change_decal(new_decal, usr)

/obj/item/device/kit/mech/proc/change_decal(var/new_decal, mob/user)
current_decal = new_decal
new_name = new_decal
to_chat(user, SPAN_NOTICE("You set \the [src] to customize with [new_decal]."))
playsound(src, 'sound/weapons/flipblade.ogg', 30, 1)
2 changes: 1 addition & 1 deletion code/modules/item_worth/worths_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ var/list/worths = list(
/obj/item/device/dociler = 490,
/obj/item/device/bot_controller = 50,
/obj/item/device/mmi = 1200,
/obj/item/device/kit/paint = 500,
/obj/item/device/kit/mech = 500,
/obj/item/device/kit = 100,
/obj/item/aicard = 6000,
/obj/item/device/chameleon = 4000,
Expand Down
9 changes: 3 additions & 6 deletions code/modules/mechs/mech_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -375,17 +375,14 @@
to_chat(user, SPAN_WARNING("\The [thing] could not be installed in that hardpoint."))
return

else if(istype(thing, /obj/item/device/kit/paint))
else if(istype(thing, /obj/item/device/kit/mech))
user.visible_message(SPAN_NOTICE("\The [user] opens \the [thing] and spends some quality time customising \the [src]."))
var/obj/item/device/kit/paint/P = thing
SetName(P.new_name)
desc = P.new_desc
var/obj/item/device/kit/mech/P = thing
for(var/obj/item/mech_component/comp in list(arms, legs, head, body))
comp.decal = P.new_icon
comp.decal = P.current_decal
if(P.new_icon_file)
icon = P.new_icon_file
queue_icon_update()
P.use(1, user)
return 1

else
Expand Down
Binary file modified icons/mecha/mech_decals.dmi
Binary file not shown.
1 change: 0 additions & 1 deletion infinity/customs/elloncake.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/obj/item/device/kit/suit/elloncake
name = "Xri'luz's voidsuit modification kit"
desc = "A kit for modifying a voidsuit."
uses = 2
new_icon_file = CUSTOM_ITEM_OBJ
new_mob_icon_file = CUSTOM_ITEM_MOB
new_name = "skrellian exosuit operator"
Expand Down
1 change: 0 additions & 1 deletion infinity/customs/taushai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
/obj/item/device/kit/suit/taushai
name = "taj scavenger's voidsuit modification kit"
desc = "A kit for modifying a voidsuit."
uses = 2
new_icon_file = CUSTOM_ITEM_OBJ
new_mob_icon_file = CUSTOM_ITEM_MOB
new_name = "scavenger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,7 @@
/obj/item/storage/toolbox/mechanical,
/obj/item/storage/toolbox/mechanical,
/obj/item/device/integrated_circuit_printer/upgraded,
/obj/item/device/kit/mech,
/turf/simulated/floor/tiled/techfloor/grid,
/area/map_template/colony/engineering)
"fe" = (
Expand Down
2 changes: 2 additions & 0 deletions maps/sierra/sierra-3.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -27887,6 +27887,8 @@
pixel_x = -3;
pixel_y = 5
},
/obj/item/device/paint_sprayer,
/obj/item/device/kit/mech,
/turf/simulated/floor/tiled/white,
/area/assembly/robotics)
"aRN" = (
Expand Down
Loading