diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm new file mode 100644 index 00000000000..ce1003d33a8 --- /dev/null +++ b/code/__DEFINES/construction.dm @@ -0,0 +1,7 @@ +/*ALL DEFINES RELATED TO CONSTRUCTION, CONSTRUCTING THINGS, OR CONSTRUCTED OBJECTS GO HERE*/ + +//Defines for construction states + +//plastic flaps construction states +#define PLASTIC_FLAPS_NORMAL 0 +#define PLASTIC_FLAPS_DETACHED 1 diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index ff754661c19..e4eda250cf9 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1173,7 +1173,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /datum/supply_packs/materials/plastic30 name = "30 Plastic Sheets Crate" - contains = list(/obj/item/stack/sheet/mineral/plastic) + contains = list(/obj/item/stack/sheet/plastic) amount = 30 cost = 25 containername = "plastic sheets crate" diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index e77c665f040..ef9781f9a0d 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -5,7 +5,6 @@ Mineral Sheets - Diamond - Uranium - Plasma - - Plastic - Gold - Silver - Bananium @@ -77,23 +76,6 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \ new/datum/stack_recipe("Xenomorph Statue", /obj/structure/statue/plasma/xeno, 5, one_per_turf = 1, on_floor = 1), \ ) -var/global/list/datum/stack_recipe/plastic_recipes = list ( \ - new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \ - new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \ - new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \ - new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \ - new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \ - new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \ - new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \ - new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \ - new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \ - new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \ - new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \ - new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \ - ) - var/global/list/datum/stack_recipe/bananium_recipes = list ( \ new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \ null, \ @@ -196,19 +178,6 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \ atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10) qdel(src) -/obj/item/stack/sheet/mineral/plastic - name = "Plastic" - icon_state = "sheet-plastic" - origin_tech = "materials=3" - -/obj/item/stack/sheet/mineral/plastic/New() - ..() - recipes = plastic_recipes - -/obj/item/stack/sheet/mineral/plastic/cyborg - name = "plastic sheets" - icon_state = "sheet-plastic" - /obj/item/stack/sheet/mineral/gold name = "gold" icon_state = "sheet-gold" diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 514a0bcdf76..63ef81839df 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -4,7 +4,9 @@ * Plasteel * Wood * Cloth + * Plastic * Cardboard + * Runed Metal (cult) */ /* @@ -290,3 +292,39 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \ throw_speed = 1 throw_range = 3 origin_tech = "materials=2;biotech=2" + +var/global/list/datum/stack_recipe/plastic_recipes = list ( \ + new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \ + new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \ + new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \ + new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \ + new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \ + new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \ + new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \ + new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \ + new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \ + new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \ + new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \ + new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \ + new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \ + ) + +/obj/item/stack/sheet/plastic + name = "plastic" + desc = "Compress dinosaur over millions of years, then refine, split and mold, and voila! You have plastic." + singular_name = "plastic sheet" + icon_state = "sheet-plastic" + throwforce = 7 + origin_tech = "materials=1;biotech=1" + +/obj/item/stack/sheet/plastic/New() + recipes = plastic_recipes + . = ..() + +/obj/item/stack/sheet/plastic/fifty + amount = 50 + +/obj/item/stack/sheet/plastic/five + amount = 5 diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 37c88241173..86c1d2503b0 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -175,7 +175,7 @@ var/global/list/breach_burn_descriptors = list( //Handles repairs (and also upgrades). /obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal)) + if(istype(W,/obj/item/stack/sheet/plastic) || istype(W,/obj/item/stack/sheet/metal)) if(istype(src.loc,/mob/living)) to_chat(user, "\red How do you intend to patch a hardsuit while someone is wearing it?") @@ -188,10 +188,10 @@ var/global/list/breach_burn_descriptors = list( var/obj/item/stack/sheet/P = W if(P.amount < 3) P.use(P.amount) - repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? P.amount : (P.amount*2) ), user) + repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/plastic) ? P.amount : (P.amount*2) ), user) else P.use(3) - repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? 3 : 5), user) + repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/plastic) ? 3 : 5), user) return else if(istype(W, /obj/item/weapon/weldingtool)) diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index d8111a3fed0..5698db29a0e 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -286,7 +286,7 @@ time = 150 reqs = list(/obj/item/stack/rods = 3, /obj/item/stack/cable_coil = 10, - /obj/item/stack/sheet/mineral/plastic = 3, + /obj/item/stack/sheet/plastic = 3, /obj/item/stack/sheet/wood = 5) tools = list(/obj/item/weapon/weldingtool, /obj/item/weapon/screwdriver) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index 2a77dcd8965..d0e9b27eb5a 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -392,7 +392,7 @@ name = "plasticine" hue = "#222288" mineral_results = list( - /obj/item/stack/sheet/mineral/plastic = 1 + /obj/item/stack/sheet/plastic = 1 ) /datum/spacevine_mutation/mineral/wood diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 75270faf0e0..89c55a65f98 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -179,7 +179,7 @@ con_type = "glass bottle" max_define = MAX_GLASS mat_ratio = RATIO_GLASS - else if(istype(S, /obj/item/stack/sheet/mineral/plastic)) + else if(istype(S, /obj/item/stack/sheet/plastic)) con_type = "plastic bottle" max_define = MAX_PLAST mat_ratio = RATIO_PLAST diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index fdc1ace289c..14e05f0c7be 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -15,7 +15,7 @@ req_access = list(access_engine, access_robotics) ventcrawler = 2 magpulse = 1 - + default_language = "Drone" // We need to keep track of a few module items so we don't need to do list operations @@ -23,7 +23,7 @@ var/obj/item/stack/sheet/metal/cyborg/stack_metal = null var/obj/item/stack/sheet/wood/stack_wood = null var/obj/item/stack/sheet/glass/cyborg/stack_glass = null - var/obj/item/stack/sheet/mineral/plastic/cyborg/stack_plastic = null + var/obj/item/stack/sheet/plastic/stack_plastic = null var/obj/item/weapon/matter_decompiler/decompiler = null //Used for self-mailing. @@ -43,7 +43,7 @@ remove_language("Galactic Common") add_language("Drone Talk", 1) add_language("Drone", 1) - + // Disable the microphone wire on Drones if(radio) radio.wires.CutWireIndex(WIRE_TRANSMIT) @@ -70,7 +70,7 @@ stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module stack_wood = locate(/obj/item/stack/sheet/wood) in src.module stack_glass = locate(/obj/item/stack/sheet/glass/cyborg) in src.module - stack_plastic = locate(/obj/item/stack/sheet/mineral/plastic/cyborg) in src.module + stack_plastic = locate(/obj/item/stack/sheet/plastic) in src.module //Grab decompiler. decompiler = locate(/obj/item/weapon/matter_decompiler) in src.module diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 9ae7acecff3..b691099d0f3 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -46,7 +46,7 @@ // /obj/item/weapon/paper_bundle, /obj/item/weapon/card/id ) - + /obj/item/weapon/gripper/New() ..() can_hold = typecacheof(can_hold) @@ -374,7 +374,7 @@ stack = stack_wood if("plastic") if(!stack_plastic) - stack_plastic = new /obj/item/stack/sheet/mineral/plastic/cyborg(src.module) + stack_plastic = new /obj/item/stack/sheet/plastic(src.module) stack_plastic.amount = 1 stack = stack_plastic diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index b97deb0ae8f..3bdcfd5c029 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -101,7 +101,7 @@ result_amount = 1 /datum/chemical_reaction/plastication/on_reaction(datum/reagents/holder) - var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/mineral/plastic + var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/plastic M.amount = 10 M.forceMove(get_turf(holder.my_atom)) diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 5e57fb4eff9..cef2bea0c3e 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -789,6 +789,54 @@ /mob/living/silicon/robot/drone, /mob/living/simple_animal/bot/mulebot ) + var/state = PLASTIC_FLAPS_NORMAL + var/can_deconstruct = TRUE + +/obj/structure/plasticflaps/examine(mob/user) + . = ..() + switch(state) + if(PLASTIC_FLAPS_NORMAL) + to_chat(user, "[src] are screwed to the floor.") + if(PLASTIC_FLAPS_DETACHED) + to_chat(user, "[src] are no longer screwed to the floor, and the flaps can be sliced apart.") + +/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params) + add_fingerprint(user) + if(isscrewdriver(W)) + if(state == PLASTIC_FLAPS_NORMAL) + playsound(loc, W.usesound, 100, 1) + user.visible_message("[user] unscrews [src] from the floor.", "You start to unscrew [src] from the floor...", "You hear rustling noises.") + if(do_after(user, 180*W.toolspeed, target = src)) + if(state != PLASTIC_FLAPS_NORMAL) + return + state = PLASTIC_FLAPS_DETACHED + anchored = FALSE + to_chat(user, "You unscrew [src] from the floor.") + else if(state == PLASTIC_FLAPS_DETACHED) + playsound(loc, W.usesound, 100, 1) + user.visible_message("[user] screws [src] to the floor.", "You start to screw [src] to the floor...", "You hear rustling noises.") + if(do_after(user, 40*W.toolspeed, target = src)) + if(state != PLASTIC_FLAPS_DETACHED) + return + state = PLASTIC_FLAPS_NORMAL + anchored = TRUE + to_chat(user, "You screw [src] from the floor.") + else if(iswelder(W)) + if(state == PLASTIC_FLAPS_DETACHED) + var/obj/item/weapon/weldingtool/WT = W + if(!WT.remove_fuel(0, user)) + return + playsound(loc, WT.usesound, 100, 1) + user.visible_message("[user] slices apart [src].", "You start to slice apart [src].", "You hear welding.") + if(do_after(user, 120*WT.toolspeed, target = src)) + if(state != PLASTIC_FLAPS_DETACHED) + return + to_chat(user, "You slice apart [src].") + var/obj/item/stack/sheet/plastic/five/P = new(loc) + P.add_fingerprint(user) + qdel(src) + else + . = ..() /obj/structure/plasticflaps/CanPass(atom/A, turf/T) if(istype(A) && A.checkpass(PASSGLASS)) @@ -844,6 +892,11 @@ if(prob(5)) qdel(src) +/obj/structure/plasticflaps/proc/deconstruct(disassembled = TRUE) + if(can_deconstruct) + new /obj/item/stack/sheet/plastic/five(loc) + qdel(src) + /obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates name = "\improper Airtight plastic flaps" desc = "Heavy duty, airtight, plastic flaps." diff --git a/paradise.dme b/paradise.dme index 258cabc1507..00c60a948e1 100644 --- a/paradise.dme +++ b/paradise.dme @@ -21,6 +21,7 @@ #include "code\__DEFINES\bots.dm" #include "code\__DEFINES\clothing.dm" #include "code\__DEFINES\combat.dm" +#include "code\__DEFINES\construction.dm" #include "code\__DEFINES\crafting.dm" #include "code\__DEFINES\error_handler.dm" #include "code\__DEFINES\flags.dm"