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

Add 2 new cade types #17049

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions code/datums/components/remote_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@

/// called by control click, allow to interact with the target
/datum/component/remote_control/proc/remote_interact(mob/user, atom/target, params)
if(!istype(target, /obj/structure/barricade/plasteel))
if(!istype(target, /obj/structure/barricade/folding))
return
var/obj/structure/barricade/plasteel/cade = target
var/obj/structure/barricade/folding/cade = target
if(!controlled.Adjacent(cade))
return
cade.toggle_open()
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/quickdeploy_cade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
return TRUE

/obj/item/quikdeploy/cade
thing_to_deploy = /obj/structure/barricade/metal
thing_to_deploy = /obj/structure/barricade/solid
icon_state = "metal"
delay = 3 SECONDS

Expand Down Expand Up @@ -63,5 +63,5 @@
return TRUE

/obj/item/quikdeploy/cade/plasteel
thing_to_deploy = /obj/structure/barricade/plasteel
thing_to_deploy = /obj/structure/barricade/folding
icon_state = "plasteel"
40 changes: 32 additions & 8 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
* Metal
*/
GLOBAL_LIST_INIT(metal_recipes, list ( \
new/datum/stack_recipe("metal barricade", /obj/structure/barricade/metal, 4, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_METAL), \
new/datum/stack_recipe("metal barricade", /obj/structure/barricade/solid, 4, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_METAL), \
new/datum/stack_recipe("barbed wire", /obj/item/stack/barbed_wire, 1, 1, 20, time = 1 SECONDS, crafting_flags = NONE, skill_req = SKILL_CONSTRUCTION_METAL), \
new/datum/stack_recipe("razor wire", /obj/item/stack/razorwire, 4, 2, 20, time = 5 SECONDS, crafting_flags = NONE, skill_req = SKILL_CONSTRUCTION_METAL), \
new/datum/stack_recipe("folding metal barricade", /obj/structure/barricade/folding/metal, 6, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_METAL), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/frame/apc, 2, crafting_flags = NONE), \
new/datum/stack_recipe("wall girder", /obj/structure/girder, 8, time = 10 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_ADVANCED), \
Expand Down Expand Up @@ -55,7 +56,8 @@ GLOBAL_LIST_INIT(metal_radial_images, list(
"recipes" = image('icons/obj/structures/barricades/misc.dmi', icon_state = "plus"),
"barricade" = image('icons/obj/structures/barricades/metal.dmi', icon_state = "metal_0"),
"razorwire" = image('icons/obj/structures/barricades/barbedwire.dmi', icon_state = "barbedwire_assembly"),
"barbedwire" = image('icons/obj/stack_objects.dmi', icon_state = "barbed_wire")
"barbedwire" = image('icons/obj/stack_objects.dmi', icon_state = "barbed_wire"),
"foldingmetal" = image('icons/obj/structures/barricades/metal.dmi', icon_state = "folding_metal_0"),
))

/obj/item/stack/sheet/metal
Expand Down Expand Up @@ -100,18 +102,24 @@ GLOBAL_LIST_INIT(metal_radial_images, list(
if("recipes")
return TRUE
if("barricade")
create_object(user, new/datum/stack_recipe("metal barricade", /obj/structure/barricade/metal, 4, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_METAL), 1)
create_object(user, new/datum/stack_recipe("metal barricade", /obj/structure/barricade/solid, 4, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_METAL), 1)
if("barbedwire")
create_object(user, new/datum/stack_recipe("barbed wire", /obj/item/stack/barbed_wire, 1, 1, 20, time = 1 SECONDS, crafting_flags = NONE, skill_req = SKILL_CONSTRUCTION_METAL), 1)
if("razorwire")
create_object(user, new/datum/stack_recipe("razor wire", /obj/item/stack/razorwire, 4, 2, 20, time = 5 SECONDS, crafting_flags = NONE, skill_req = SKILL_CONSTRUCTION_METAL), 1)

if("foldingmetal")
create_object(user, new/datum/stack_recipe("folding metal barricade", /obj/structure/barricade/folding/metal, 6, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_METAL), 1)
return FALSE

/*
* Plasteel
*/

GLOBAL_LIST_INIT(plasteel_radial_images, list(
"folding" = image('icons/obj/structures/barricades/plasteel.dmi', icon_state = "plasteel_0"),
"normal" = image('icons/obj/structures/barricades/plasteel.dmi', icon_state = "new_plasteel_0"),
))

/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
Expand All @@ -124,14 +132,30 @@ GLOBAL_LIST_INIT(metal_radial_images, list(
merge_type = /obj/item/stack/sheet/plasteel
number_of_extra_variants = 3

/obj/item/stack/sheet/plasteel/attack_self(mob/user)
. = ..()
create_object(user, new/datum/stack_recipe("plasteel barricade", /obj/structure/barricade/plasteel, 5, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_PLASTEEL), 1)

GLOBAL_LIST_INIT(plasteel_recipes, list( \
new/datum/stack_recipe("plasteel barricade", /obj/structure/barricade/plasteel, 5, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_PLASTEEL), \
new/datum/stack_recipe("folding plasteel barricade", /obj/structure/barricade/folding, 5, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_PLASTEEL), \
new/datum/stack_recipe("plasteel barricade", /obj/structure/barricade/solid/plasteel, 3, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_PLASTEEL), \
))

/obj/item/stack/sheet/plasteel/select_radial(mob/user)
if(user.get_active_held_item() != src)
return
if(!can_interact(user))
return TRUE

add_fingerprint(usr, "topic")

var/choice = show_radial_menu(user, src, GLOB.plasteel_radial_images, require_near = TRUE)

switch (choice)
if("folding")
create_object(user, new/datum/stack_recipe("folding plasteel barricade", /obj/structure/barricade/folding, 5, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_CHECK_DIRECTION | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_PLASTEEL), 1)
if("normal")
create_object(user, new/datum/stack_recipe("plasteel barricade", /obj/structure/barricade/solid/plasteel, 3, time = 8 SECONDS, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND, skill_req = SKILL_CONSTRUCTION_PLASTEEL), 1)

return FALSE

/obj/item/stack/sheet/plasteel/get_main_recipes()
. = ..()
. += GLOB.plasteel_recipes
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
item_flags = IS_DEPLOYABLE
strappable = FALSE
///The item this deploys into
var/deployable_item = /obj/structure/barricade/metal/deployable
var/deployable_item = /obj/structure/barricade/solid/deployable
///Time to deploy
var/deploy_time = 1 SECONDS
///Time to undeploy
Expand Down
Loading
Loading