mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
Merge pull request #6734 from uraniummeltdown/plastic
Plastic is not a mineral anymore, plastic flaps can be constructed/deconstructed
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
|
||||
|
||||
/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("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "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, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "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, "<span class='notice'>You screw [src] from the floor.</span>")
|
||||
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("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
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."
|
||||
|
||||
Reference in New Issue
Block a user