diff --git a/_maps/map_files/Delta/delta.dmm b/_maps/map_files/Delta/delta.dmm index a89ac854596..72894abf662 100644 --- a/_maps/map_files/Delta/delta.dmm +++ b/_maps/map_files/Delta/delta.dmm @@ -55331,7 +55331,7 @@ }, /area/crew_quarters/captain) "bUZ" = ( -/obj/structure/displaycase/captains_laser, +/obj/structure/displaycase/captain, /turf/simulated/floor/plasteel{ icon_state = "grimy" }, @@ -91580,7 +91580,7 @@ dir = 1; on = 1 }, -/obj/structure/lamarr, +/obj/structure/displaycase/labcage, /obj/effect/decal/warning_stripes/yellow, /turf/simulated/floor/plasteel, /area/crew_quarters/hor) diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index 02acdb8fe7e..3b3270fe6c0 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -33441,7 +33441,6 @@ "bgD" = ( /obj/item/book/manual/security_space_law, /obj/machinery/newscaster{ - hitstaken = 1; pixel_y = -32 }, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ @@ -43111,7 +43110,7 @@ layer = 4; pixel_y = 32 }, -/obj/structure/displaycase/captains_laser, +/obj/structure/displaycase/captain, /turf/simulated/floor/wood, /area/crew_quarters/captain{ name = "\improper Captain's Quarters" @@ -75994,7 +75993,7 @@ name = "Aft Maintenance" }) "cze" = ( -/obj/structure/lamarr, +/obj/structure/displaycase/labcage, /obj/machinery/light/small{ dir = 1 }, @@ -94675,8 +94674,7 @@ }) "dds" = ( /obj/machinery/atmospherics/unary/outlet_injector/on{ - dir = 1; - unacidable = 1 + dir = 1 }, /turf/simulated/floor/plasteel, /area/toxins/xenobiology{ diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm index 41d298fffb1..be40fb0f2ab 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_clown_planet.dmm @@ -968,7 +968,7 @@ /turf/simulated/floor/mineral/bananium/lubed, /area/ruin/powered/clownplanet) "bD" = ( -/obj/effect/decal/mecha_wreckage/honker, +/obj/structure/mecha_wreckage/honker, /obj/structure/disposalpipe/segment{ dir = 4; invisibility = 101 diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm index 44ea41cb8b5..3d8d22218f6 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_biodome_winter.dmm @@ -167,7 +167,7 @@ /turf/simulated/floor/wood, /area/ruin/powered/snow_cabin) "aL" = ( -/obj/structure/displaycase/lavaland_winter, +/obj/structure/displaycase/captain, /turf/simulated/floor/wood, /area/ruin/powered/snow_cabin) "aM" = ( diff --git a/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm b/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm index ae055f8bc63..2a5c0eae533 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/mechtransport.dmm @@ -91,7 +91,7 @@ }, /area/ruin/powered) "s" = ( -/obj/effect/decal/mecha_wreckage/phazon, +/obj/structure/mecha_wreckage/phazon, /turf/simulated/shuttle/floor{ tag = "icon-floor2"; icon_state = "floor2" @@ -104,14 +104,14 @@ }, /area/ruin/powered) "u" = ( -/obj/effect/decal/mecha_wreckage/ripley/firefighter, +/obj/structure/mecha_wreckage/ripley/firefighter, /turf/simulated/shuttle/floor{ tag = "icon-floor2"; icon_state = "floor2" }, /area/ruin/powered) "v" = ( -/obj/effect/decal/mecha_wreckage/ripley, +/obj/structure/mecha_wreckage/ripley, /turf/simulated/shuttle/floor{ tag = "icon-floor2"; icon_state = "floor2" @@ -150,7 +150,7 @@ }, /area/ruin/powered) "A" = ( -/obj/effect/decal/mecha_wreckage/durand, +/obj/structure/mecha_wreckage/durand, /turf/simulated/shuttle/floor{ tag = "icon-floor2"; icon_state = "floor2" @@ -194,7 +194,7 @@ /turf/simulated/floor/plating/airless, /area/ruin/powered) "J" = ( -/obj/effect/decal/mecha_wreckage/odysseus, +/obj/structure/mecha_wreckage/odysseus, /turf/simulated/shuttle/floor{ tag = "icon-floor2"; icon_state = "floor2" @@ -205,7 +205,7 @@ /turf/space, /area/space/nearstation) "L" = ( -/obj/effect/decal/mecha_wreckage/gygax, +/obj/structure/mecha_wreckage/gygax, /turf/simulated/shuttle/floor{ tag = "icon-floor3"; icon_state = "floor3" diff --git a/_maps/map_files/RandomZLevels/blackmarketpackers.dmm b/_maps/map_files/RandomZLevels/blackmarketpackers.dmm index 77e09164224..af52a542c18 100644 --- a/_maps/map_files/RandomZLevels/blackmarketpackers.dmm +++ b/_maps/map_files/RandomZLevels/blackmarketpackers.dmm @@ -3156,7 +3156,7 @@ }, /area/awaymission/BMPship/Aft) "ia" = ( -/obj/effect/decal/mecha_wreckage/ripley, +/obj/structure/mecha_wreckage/ripley, /turf/simulated/floor/plating/airless, /area/awaymission) "ib" = ( diff --git a/_maps/map_files/RandomZLevels/centcomAway.dmm b/_maps/map_files/RandomZLevels/centcomAway.dmm index e64c25da157..27ddb6f8a93 100644 --- a/_maps/map_files/RandomZLevels/centcomAway.dmm +++ b/_maps/map_files/RandomZLevels/centcomAway.dmm @@ -3483,7 +3483,7 @@ }, /area/awaymission/centcomAway/general) "iP" = ( -/obj/effect/decal/mecha_wreckage/ripley, +/obj/structure/mecha_wreckage/ripley, /turf/simulated/floor/plasteel{ icon_state = "dark" }, @@ -4924,7 +4924,7 @@ }, /area/awaymission/centcomAway/general) "lW" = ( -/obj/effect/decal/mecha_wreckage/seraph, +/obj/structure/mecha_wreckage/seraph, /turf/simulated/floor/plasteel{ tag = "icon-vault (NORTHEAST)"; icon_state = "vault"; diff --git a/_maps/map_files/RandomZLevels/moonoutpost19.dmm b/_maps/map_files/RandomZLevels/moonoutpost19.dmm index 8bbc6b2fead..affcac8c979 100644 --- a/_maps/map_files/RandomZLevels/moonoutpost19.dmm +++ b/_maps/map_files/RandomZLevels/moonoutpost19.dmm @@ -3053,8 +3053,7 @@ id = "awayxenobio"; name = "Acid-Proof mounted igniter"; pixel_x = 0; - pixel_y = 25; - unacidable = 1 + pixel_y = 25 }, /obj/structure/alien/weeds{ icon_state = "weeds1" @@ -3189,8 +3188,7 @@ /obj/machinery/door/poddoor/preopen{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; - name = "Acid-Proof containment chamber blast door"; - unacidable = 1 + name = "Acid-Proof containment chamber blast door" }, /obj/structure/cable, /obj/structure/grille, @@ -3325,8 +3323,7 @@ /obj/machinery/door/poddoor{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaybiohazard"; - name = "Acid-Proof biohazard containment door"; - unacidable = 1 + name = "Acid-Proof biohazard containment door" }, /obj/structure/window/full/reinforced, /turf/simulated/floor/plating, @@ -3680,8 +3677,7 @@ /obj/machinery/door/poddoor/preopen{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; - name = "Acid-Proof containment chamber blast door"; - unacidable = 1 + name = "Acid-Proof containment chamber blast door" }, /obj/structure/grille, /obj/structure/window/full/reinforced, @@ -3929,8 +3925,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ desc = "A one meter section of pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof Pipe"; - unacidable = 1 + name = "Acid-Proof Pipe" }, /obj/item/stack/rods, /obj/item/stack/cable_coil{ @@ -3951,14 +3946,12 @@ /obj/machinery/door/poddoor/preopen{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; - name = "Acid-Proof containment chamber blast door"; - unacidable = 1 + name = "Acid-Proof containment chamber blast door" }, /obj/machinery/atmospherics/pipe/simple/visible{ desc = "A one meter section of pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof Pipe"; - unacidable = 1 + name = "Acid-Proof Pipe" }, /obj/item/stack/rods, /obj/item/stack/cable_coil{ @@ -3983,8 +3976,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ desc = "A one meter section of pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof Pipe"; - unacidable = 1 + name = "Acid-Proof Pipe" }, /obj/structure/alien/weeds{ icon_state = "weeds1" @@ -3998,8 +3990,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ desc = "A one meter section of pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof Pipe"; - unacidable = 1 + name = "Acid-Proof Pipe" }, /obj/structure/alien/weeds{ icon_state = "weeds1" @@ -4016,8 +4007,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ desc = "A one meter section of pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof Pipe"; - unacidable = 1 + name = "Acid-Proof Pipe" }, /obj/structure/alien/weeds{ icon_state = "weeds1" @@ -4032,8 +4022,7 @@ /obj/machinery/atmospherics/pipe/simple/visible{ desc = "A one meter section of pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof Pipe"; - unacidable = 1 + name = "Acid-Proof Pipe" }, /obj/structure/alien/weeds, /obj/structure/alien/resin/wall, @@ -4048,8 +4037,7 @@ dir = 8; icon_state = "on"; name = "Acid-Proof Air Injector"; - on = 1; - unacidable = 1 + on = 1 }, /obj/structure/alien/weeds, /turf/simulated/floor/engine, @@ -4258,8 +4246,7 @@ /obj/machinery/door/poddoor/preopen{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; - name = "Acid-Proof containment chamber blast door"; - unacidable = 1 + name = "Acid-Proof containment chamber blast door" }, /obj/item/stack/cable_coil/cut{ amount = 1; @@ -4567,14 +4554,12 @@ /obj/structure/disposalpipe/segment{ desc = "An underfloor disposal pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof disposal pipe"; - unacidable = 1 + name = "Acid-Proof disposal pipe" }, /obj/machinery/door/poddoor/preopen{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; - name = "Acid-Proof containment chamber blast door"; - unacidable = 1 + name = "Acid-Proof containment chamber blast door" }, /obj/structure/cable, /obj/structure/grille, @@ -4588,8 +4573,7 @@ /obj/structure/disposalpipe/segment{ desc = "An underfloor disposal pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof disposal pipe"; - unacidable = 1 + name = "Acid-Proof disposal pipe" }, /obj/structure/alien/weeds, /obj/structure/alien/resin/wall, @@ -4603,8 +4587,7 @@ desc = "An underfloor disposal pipe. This one has been applied with an acid-proof coating."; dir = 2; icon_state = "pipe-c"; - name = "Acid-Proof disposal pipe"; - unacidable = 1 + name = "Acid-Proof disposal pipe" }, /obj/structure/alien/weeds{ icon_state = "weeds2" @@ -4672,8 +4655,7 @@ /obj/structure/disposalpipe/trunk{ desc = "An underfloor disposal pipe. This one has been applied with an acid-proof coating."; dir = 4; - name = "Acid-Proof disposal pipe"; - unacidable = 1 + name = "Acid-Proof disposal pipe" }, /obj/structure/alien/weeds, /obj/effect/decal/warning_stripes/west, @@ -4831,8 +4813,7 @@ "gN" = ( /obj/structure/disposalpipe/segment{ desc = "An underfloor disposal pipe. This one has been applied with an acid-proof coating."; - name = "Acid-Proof disposal pipe"; - unacidable = 1 + name = "Acid-Proof disposal pipe" }, /obj/structure/alien/weeds{ icon_state = "weeds1" @@ -4847,8 +4828,7 @@ /obj/machinery/door/poddoor/preopen{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaylab"; - name = "Acid-Proof containment chamber blast door"; - unacidable = 1 + name = "Acid-Proof containment chamber blast door" }, /obj/structure/cable{ icon_state = "0-2"; @@ -5030,14 +5010,12 @@ /obj/structure/disposaloutlet{ desc = "An outlet for the pneumatic disposal system. This one has been applied with an acid-proof coating."; dir = 1; - name = "Acid-Proof disposal outlet"; - unacidable = 1 + name = "Acid-Proof disposal outlet" }, /obj/structure/disposalpipe/trunk{ desc = "An underfloor disposal pipe. This one has been applied with an acid-proof coating."; dir = 1; - name = "Acid-Proof disposal pipe"; - unacidable = 1 + name = "Acid-Proof disposal pipe" }, /obj/structure/alien/weeds{ icon_state = "weeds1" @@ -5073,8 +5051,7 @@ id = "awayxenobio"; name = "Acid-Proof mounted igniter"; pixel_x = 0; - pixel_y = -25; - unacidable = 1 + pixel_y = -25 }, /obj/structure/alien/weeds{ icon_state = "weeds2" @@ -5589,8 +5566,7 @@ /obj/machinery/door/poddoor{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaybiohazard"; - name = "Acid-Proof biohazard containment door"; - unacidable = 1 + name = "Acid-Proof biohazard containment door" }, /obj/effect/decal/warning_stripes/yellow, /turf/simulated/floor/plasteel{ @@ -5792,8 +5768,7 @@ /obj/machinery/door/poddoor{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaybiohazard"; - name = "Acid-Proof biohazard containment door"; - unacidable = 1 + name = "Acid-Proof biohazard containment door" }, /obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/effect/decal/warning_stripes/yellow, @@ -5809,8 +5784,7 @@ /obj/machinery/door/poddoor{ desc = "A heavy duty blast door that opens mechanically. This one has been applied with an acid-proof coating."; id_tag = "Awaybiohazard"; - name = "Acid-Proof biohazard containment door"; - unacidable = 1 + name = "Acid-Proof biohazard containment door" }, /obj/effect/decal/warning_stripes/yellow, /turf/simulated/floor/plasteel{ diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm index b83e173d404..e120366dd54 100644 --- a/_maps/map_files/cyberiad/cyberiad.dmm +++ b/_maps/map_files/cyberiad/cyberiad.dmm @@ -42190,7 +42190,7 @@ /turf/simulated/floor/plasteel, /area/crew_quarters/locker) "bAc" = ( -/obj/structure/displaycase/captains_laser, +/obj/structure/displaycase/captain, /turf/simulated/floor/wood, /area/crew_quarters/captain) "bAd" = ( @@ -56043,7 +56043,7 @@ }, /area/crew_quarters/hor) "bYB" = ( -/obj/structure/lamarr, +/obj/structure/displaycase/labcage, /obj/effect/decal/warning_stripes/east, /turf/simulated/floor/plasteel{ icon_state = "white" diff --git a/_maps/map_files/cyberiad/z2.dmm b/_maps/map_files/cyberiad/z2.dmm index ffb4f0fbc7f..684365ada39 100644 --- a/_maps/map_files/cyberiad/z2.dmm +++ b/_maps/map_files/cyberiad/z2.dmm @@ -9138,7 +9138,7 @@ }, /area/admin) "vH" = ( -/obj/effect/decal/mecha_wreckage/phazon, +/obj/structure/mecha_wreckage/phazon, /turf/unsimulated/floor{ tag = "icon-floor"; icon_state = "floor" diff --git a/_maps/map_files/templates/shelter_2.dmm b/_maps/map_files/templates/shelter_2.dmm index 281a1f43433..9bed101da97 100644 --- a/_maps/map_files/templates/shelter_2.dmm +++ b/_maps/map_files/templates/shelter_2.dmm @@ -126,8 +126,8 @@ dir = 1 }, /obj/structure/displaycase{ + alert = 0; desc = "A display case containing an expensive forgery, probably."; - locked = 1; pixel_y = -4; req_access_txt = "48"; start_showpiece_type = /obj/item/fakeartefact diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 1d535f5dd9c..0c1b0a35426 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -12,6 +12,8 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) /obj/machinery/atmospherics anchored = 1 layer = GAS_PIPE_HIDDEN_LAYER //under wires + resistance_flags = FIRE_PROOF + max_integrity = 200 plane = FLOOR_PLANE idle_power_usage = 0 active_power_usage = 0 @@ -31,8 +33,8 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) var/image/pipe_image /obj/machinery/atmospherics/New() - if(!armor) - armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100) + if (!armor) + armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70) ..() if(!pipe_color) @@ -213,7 +215,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) user.throw_at(general_direction, pressures/10, pressures/50) /obj/machinery/atmospherics/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) if(can_unwrench) if(stored) stored.forceMove(get_turf(src)) @@ -336,6 +338,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new()) /obj/machinery/atmospherics/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) deconstruct(FALSE) + return ..() /obj/machinery/atmospherics/update_remote_sight(mob/user) user.sight |= (SEE_TURFS|BLIND) diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 6bb16cb36c9..e2dd952213a 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -107,11 +107,11 @@ to_chat(user, "You reverse the circulator's valve settings. The inlet of the circulator is now on the [get_inlet_side(dir)] side.") desc = "A gas circulator pump and heat exchanger. Its input port is on the [get_inlet_side(dir)] side, and its output port is on the [get_outlet_side(dir)] side." else - ..() + return ..() /obj/machinery/atmospherics/binary/circulator/update_icon() ..() - + if(stat & (BROKEN|NOPOWER)) icon_state = "circ[side]-p" else if(last_pressure_delta > 0) diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm index f9da99544b5..0f36a749722 100644 --- a/code/ATMOSPHERICS/components/binary_devices/valve.dm +++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm @@ -17,7 +17,7 @@ /obj/machinery/atmospherics/binary/valve/update_icon(animation) ..() - + if(animation) flick("valve[src.open][!src.open]",src) else @@ -146,7 +146,7 @@ if(istype(W, /obj/item/multitool)) update_multitool_menu(user) return 1 - ..() + return ..() /obj/machinery/atmospherics/binary/valve/digital/multitool_menu(var/mob/user,var/obj/item/multitool/P) return {" diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm index e4afcadc7fa..0eface28b85 100644 --- a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm @@ -10,7 +10,6 @@ var/obj/machinery/atmospherics/unary/heat_exchanger/partner = null var/update_cycle - burn_state = LAVA_PROOF /obj/machinery/atmospherics/unary/heat_exchanger/update_icon() ..() diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm index 5302a99caa1..a312a28b36e 100644 --- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm @@ -4,6 +4,8 @@ use_power = IDLE_POWER_USE layer = GAS_SCRUBBER_LAYER + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF //really helpful in building gas chambers for xenomorphs + can_unwrench = 1 name = "air injector" @@ -39,7 +41,7 @@ /obj/machinery/atmospherics/unary/outlet_injector/update_icon() ..() - + if(!powered()) icon_state = "off" else diff --git a/code/ATMOSPHERICS/components/unary_devices/tank.dm b/code/ATMOSPHERICS/components/unary_devices/tank.dm index deb194af6e7..cb82417033b 100644 --- a/code/ATMOSPHERICS/components/unary_devices/tank.dm +++ b/code/ATMOSPHERICS/components/unary_devices/tank.dm @@ -5,6 +5,8 @@ name = "pressure tank" desc = "A large vessel containing pressurized gas." + max_integrity = 800 + var/volume = 10000 //in liters, 1 meters by 1 meters by 2 meters ~tweaked it a little to simulate a pressure tank without needing to recode them yet density = 1 diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 60e0448dfbd..1b920002227 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -333,6 +333,16 @@ /obj/machinery/atmospherics/unary/vent_pump/can_crawl_through() return !welded +/obj/machinery/atmospherics/unary/vent_pump/attack_alien(mob/user) + if(!welded || !(do_after(user, 20, target = src))) + return + user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the vent.", "You hear loud scraping noises.") + welded = FALSE + update_icon() + pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) + pipe_image.plane = ABOVE_HUD_PLANE + playsound(loc, 'sound/weapons/bladeslice.ogg', 100, TRUE) + /obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 5844407e777..5fcf7817a30 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -382,6 +382,16 @@ /obj/machinery/atmospherics/unary/vent_scrubber/can_crawl_through() return !welded +/obj/machinery/atmospherics/unary/vent_scrubber/attack_alien(mob/user) + if(!welded || !(do_after(user, 20, target = src))) + return + user.visible_message("[user] furiously claws at [src]!", "You manage to clear away the stuff blocking the scrubber.", "You hear loud scraping noises.") + welded = FALSE + update_icon() + pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) + pipe_image.plane = ABOVE_HUD_PLANE + playsound(loc, 'sound/weapons/bladeslice.ogg', 100, TRUE) + /obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/W as obj, var/mob/user as mob, params) if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W diff --git a/code/ATMOSPHERICS/pipes/pipe.dm b/code/ATMOSPHERICS/pipes/pipe.dm index 038180cdd7d..0b7e3a34723 100644 --- a/code/ATMOSPHERICS/pipes/pipe.dm +++ b/code/ATMOSPHERICS/pipes/pipe.dm @@ -5,6 +5,7 @@ force = 20 use_power = NO_POWER_USE can_unwrench = 1 + damage_deflection = 12 var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called //Buckling diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm index 1f40bdae665..35df3c60d23 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm @@ -12,6 +12,7 @@ color = "#404040" buckle_lying = TRUE var/icon_temperature = T20C //stop small changes in temperature causing icon refresh + resistance_flags = LAVA_PROOF | FIRE_PROOF /obj/machinery/atmospherics/pipe/simple/heat_exchanging/process_atmos() var/environment_temperature = 0 diff --git a/code/LINDA/LINDA_fire.dm b/code/LINDA/LINDA_fire.dm index 00fddd5b1f0..9467f7a3742 100644 --- a/code/LINDA/LINDA_fire.dm +++ b/code/LINDA/LINDA_fire.dm @@ -47,7 +47,6 @@ /obj/effect/hotspot anchored = 1 mouse_opacity = MOUSE_OPACITY_TRANSPARENT - unacidable = 1//So you can't melt fire with acid. icon = 'icons/goonstation/effects/fire.dmi' icon_state = "1" layer = MASSIVE_OBJ_LAYER @@ -194,6 +193,9 @@ if(isliving(L)) L.fire_act() +/obj/effect/hotspot/singularity_pull() + return + /obj/effect/hotspot/fake // Largely for the fireflash procs below fake = TRUE burn_time = 30 diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index d8e051e600e..956930aae70 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -102,6 +102,9 @@ #define BODY_ZONE_PRECISE_L_FOOT "l_foot" #define BODY_ZONE_PRECISE_R_FOOT "r_foot" +//We will round to this value in damage calculations. +#define DAMAGE_PRECISION 0.1 + //Gun Stuff #define SAWN_INTACT 0 #define SAWN_OFF 1 diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index fa62fd7af4f..fc5b6eb74b9 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -32,6 +32,15 @@ #define PLASTIC_FLAPS_NORMAL 0 #define PLASTIC_FLAPS_DETACHED 1 + +//ai core defines +#define EMPTY_CORE 0 +#define CIRCUIT_CORE 1 +#define SCREWED_CORE 2 +#define CABLED_CORE 3 +#define GLASS_CORE 4 +#define AI_READY_CORE 5 + //other construction-related things //windows affected by nar-sie turn this color. diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index e3169ded7fa..ea9eb45dfcd 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -14,6 +14,7 @@ #define ABSTRACT 64 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way #define ON_BORDER 128 // item has priority to check when entering or leaving #define PREVENT_CLICK_UNDER 256 +#define NODECONSTRUCT 512 #define EARBANGPROTECT 1024 @@ -131,13 +132,11 @@ #define AFFECT_ORGANIC_ORGAN 2 #define AFFECT_ALL_ORGANS 3 -//Fire stuff, for burn_state -#define LAVA_PROOF -2 -#define FIRE_PROOF -1 -#define FLAMMABLE 0 -#define ON_FIRE 1 - //Fire and Acid stuff, for resistance_flags +#define LAVA_PROOF (1<<0) +#define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat) +#define FLAMMABLE (1<<2) +#define ON_FIRE (1<<3) #define UNACIDABLE (1<<4) //acid can't even appear on it, let alone melt it. #define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it. #define INDESTRUCTIBLE (1<<6) //doesn't take damage diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 5f9e2b463ff..33ce299c540 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -12,6 +12,8 @@ #define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct)) //Objects +#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs + #define isitem(A) (istype(A, /obj/item)) #define ismachinery(A) (istype(A, /obj/machinery)) diff --git a/code/__DEFINES/mecha.dm b/code/__DEFINES/mecha.dm new file mode 100644 index 00000000000..e8955e64b50 --- /dev/null +++ b/code/__DEFINES/mecha.dm @@ -0,0 +1,22 @@ +#define MECHA_INT_FIRE (1<<0) +#define MECHA_INT_TEMP_CONTROL (1<<1) +#define MECHA_INT_SHORT_CIRCUIT (1<<2) +#define MECHA_INT_TANK_BREACH (1<<3) +#define MECHA_INT_CONTROL_LOST (1<<4) + +#define MECHA_MELEE (1<<0) +#define MECHA_RANGED (1<<1) + +#define MECHAMOVE_RAND (1<<0) +#define MECHAMOVE_TURN (1<<1) +#define MECHAMOVE_STEP (1<<2) + +#define MECHA_FRONT_ARMOUR 1 +#define MECHA_SIDE_ARMOUR 2 +#define MECHA_BACK_ARMOUR 3 + +#define MECHA_LOCKED 0 +#define MECHA_SECURE_BOLTS 1 +#define MECHA_LOOSE_BOLTS 2 +#define MECHA_OPEN_HATCH 3 +#define MECHA_UNSECURE_CELL 4 \ No newline at end of file diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 739b059f3bd..dc9b8674c69 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -11,9 +11,7 @@ icon = 'icons/mob/screen_gen.dmi' layer = HUD_LAYER plane = HUD_PLANE - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. var/datum/hud/hud = null appearance_flags = NO_CLIENT_COLOR diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index d4ef3799610..47857ee4fa1 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -56,8 +56,9 @@ target = A AttackingTarget() -/atom/proc/attack_animal(mob/user as mob) +/atom/proc/attack_animal(mob/user) return + /mob/living/RestrainedClickOn(var/atom/A) return @@ -65,18 +66,20 @@ Aliens Defaults to same as monkey in most places */ -/mob/living/carbon/alien/UnarmedAttack(var/atom/A) +/mob/living/carbon/alien/UnarmedAttack(atom/A) A.attack_alien(src) -/atom/proc/attack_alien(mob/user as mob) + +/atom/proc/attack_alien(mob/living/carbon/alien/user) attack_hand(user) - return -/mob/living/carbon/alien/RestrainedClickOn(var/atom/A) + +/mob/living/carbon/alien/RestrainedClickOn(atom/A) return // Babby aliens -/mob/living/carbon/alien/larva/UnarmedAttack(var/atom/A) +/mob/living/carbon/alien/larva/UnarmedAttack(atom/A) A.attack_larva(src) -/atom/proc/attack_larva(mob/user as mob) + +/atom/proc/attack_larva(mob/user) return diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm new file mode 100644 index 00000000000..f86c8540af5 --- /dev/null +++ b/code/controllers/subsystem/acid.dm @@ -0,0 +1,36 @@ +SUBSYSTEM_DEF(acid) + name = "Acid" + priority = FIRE_PRIORITY_ACID + flags = SS_NO_INIT|SS_BACKGROUND + runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME + + var/list/currentrun = list() + var/list/processing = list() + +/datum/controller/subsystem/acid/stat_entry() + ..("P:[processing.len]") + + +/datum/controller/subsystem/acid/fire(resumed = 0) + if(!resumed) + src.currentrun = processing.Copy() + + //cache for sanic speed (lists are references anyways) + var/list/currentrun = src.currentrun + + while(currentrun.len) + var/obj/O = currentrun[currentrun.len] + currentrun.len-- + if(!O || QDELETED(O)) + processing -= O + if(MC_TICK_CHECK) + return + continue + + if(O.acid_level && O.acid_processing()) + else + O.cut_overlay(GLOB.acid_overlay, TRUE) + processing -= O + + if(MC_TICK_CHECK) + return \ No newline at end of file diff --git a/code/controllers/subsystem/fires.dm b/code/controllers/subsystem/fires.dm index ce66405e1c9..aafc5ed48d5 100644 --- a/code/controllers/subsystem/fires.dm +++ b/code/controllers/subsystem/fires.dm @@ -27,11 +27,11 @@ SUBSYSTEM_DEF(fires) return continue - if(O.burn_state == ON_FIRE) - if(O.burn_world_time < world.time) - O.burn() - else - processing -= O + if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun + if(!(O.resistance_flags & FIRE_PROOF)) + O.take_damage(20, BURN, "fire", 0) + else + O.extinguish() if(MC_TICK_CHECK) return diff --git a/code/datums/beam.dm b/code/datums/beam.dm index befe5c0765a..ac585d07197 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -119,6 +119,12 @@ owner = null return ..() +/obj/effect/ebeam/singularity_pull() + return + +/obj/effect/ebeam/singularity_act() + return + /obj/effect/ebeam/deadly/Crossed(atom/A, oldloc) ..() A.ex_act(1) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index b510434f467..f19f8100553 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -7,6 +7,12 @@ var/ranged_mousepointer var/mob/living/ranged_ability_user +/obj/effect/proc_holder/singularity_act() + return + +/obj/effect/proc_holder/singularity_pull() + return + var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin verb for now /obj/effect/proc_holder/proc/InterceptClickOn(mob/living/user, params, atom/A) diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index 10695595c75..3103d8d5e5d 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -78,7 +78,7 @@ density = 0 anchored = 1 invisibility = 60 - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/dummy/spell_jaunt/Destroy() // Eject contents if deleted somehow @@ -99,5 +99,6 @@ /obj/effect/dummy/spell_jaunt/ex_act(blah) return + /obj/effect/dummy/spell_jaunt/bullet_act(blah) return \ No newline at end of file diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index a201617682d..5220fd83a6d 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -5,6 +5,12 @@ #define MAX_FLAG 65535 +/proc/is_wire_tool(obj/item/I) + if(ismultitool(I)) + return TRUE + if(iswirecutter(I)) + return TRUE + var/list/same_wires = list() // 12 colours, if you're adding more than 12 wires then add more colours here var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink") diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 2e8b11938ec..b6c64a22fbd 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -164,6 +164,10 @@ SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir) dir = newdir +///Handle melee attack by a mech +/atom/proc/mech_melee_attack(obj/mecha/M) + return + /atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) SEND_SIGNAL(src, COMSIG_ATOM_HULK_ATTACK, user) if(does_attack_animation) @@ -239,6 +243,7 @@ return /atom/proc/bullet_act(obj/item/projectile/P, def_zone) + SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone) . = P.on_hit(src, 0, def_zone) /atom/proc/in_contents_of(container)//can take class or object instance as argument @@ -323,6 +328,7 @@ SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, B) /atom/proc/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + SEND_SIGNAL(src, COMSIG_ATOM_FIRE_ACT, exposed_temperature, exposed_volume) if(reagents) reagents.temperature_reagents(exposed_temperature) @@ -716,8 +722,16 @@ var/list/blood_splatter_icons = list() /atom/proc/singularity_act() return -/atom/proc/singularity_pull() - return +/atom/proc/singularity_pull(obj/singularity/S, current_size) + SEND_SIGNAL(src, COMSIG_ATOM_SING_PULL, S, current_size) + +/** + * Respond to acid being used on our atom + * + * Default behaviour is to send COMSIG_ATOM_ACID_ACT and return + */ +/atom/proc/acid_act(acidpwr, acid_volume) + SEND_SIGNAL(src, COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume) /atom/proc/narsie_act() return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index bfb2eb1d214..6ff1c35e6db 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -325,7 +325,7 @@ if(!QDELETED(hit_atom)) return hit_atom.hitby(src) -/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked, datum/thrownthing/throwingdatum) +/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked, datum/thrownthing/throwingdatum) if(!anchored && hitpush && (!throwingdatum || (throwingdatum.force >= (move_resist * MOVE_FORCE_PUSH_RATIO)))) step(src, AM.dir) ..() diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 1370b64ecc7..4352e48ffe1 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -295,8 +295,9 @@ ~~~~~~~~~~~~~~~~~~~~~*/ /obj/mecha/proc/diag_hud_set_mechhealth() var/image/holder = hud_list[DIAG_MECH_HUD] - holder.icon_state = "huddiag[RoundDiagBar(health/initial(health))]" - + var/icon/I = icon(icon, icon_state, dir) + holder.pixel_y = I.Height() - world.icon_size + holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]" /obj/mecha/proc/diag_hud_set_mechcell() var/image/holder = hud_list[DIAG_BATT_HUD] diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index b95d3afc3f7..77771d48596 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -210,7 +210,7 @@ to_chat(user, "The maintenance panel is locked.") return default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", item) - + return if(exchange_parts(user, item)) return @@ -233,27 +233,27 @@ item.forceMove(src) user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!") return - else if(!istype(item, /obj/item/grab)) + if(istype(item, /obj/item/grab)) + var/obj/item/grab/G = item + if(!ismob(G.affecting)) + return + if(src.occupant) + to_chat(user, "The scanner is already occupied!") + return + if(G.affecting.abiotic()) + to_chat(user, "Subject cannot have abiotic items on.") + return + if(G.affecting.has_buckled_mobs()) //mob attached to us + to_chat(user, "will not fit into the [src] because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") + return + if(panel_open) + to_chat(usr, "Close the maintenance panel first.") + return + put_in(G.affecting) + src.add_fingerprint(user) + qdel(G) return - var/obj/item/grab/G = item - if(!ismob(G.affecting)) - return - if(src.occupant) - to_chat(user, "The scanner is already occupied!") - return - if(G.affecting.abiotic()) - to_chat(user, "Subject cannot have abiotic items on.") - return - if(G.affecting.has_buckled_mobs()) //mob attached to us - to_chat(user, "will not fit into the [src] because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") - return - if(panel_open) - to_chat(usr, "Close the maintenance panel first.") - return - put_in(G.affecting) - src.add_fingerprint(user) - qdel(G) - return + return ..() /obj/machinery/dna_scannernew/relaymove(mob/user as mob) if(user.incapacitated()) @@ -286,44 +286,18 @@ src.occupant.forceMove(src.loc) src.occupant = null src.icon_state = "scanner_open" - return /obj/machinery/dna_scannernew/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - ex_act(severity) - //Foreach goto(35) - //SN src = null - qdel(src) - return - if(2.0) - if(prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - ex_act(severity) - //Foreach goto(108) - //SN src = null - qdel(src) - return - if(3.0) - if(prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - ex_act(severity) - //Foreach goto(181) - //SN src = null - qdel(src) - return - else - return + if(occupant) + occupant.ex_act(severity) + ..() -/obj/machinery/dna_scannernew/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - qdel(src) +/obj/machinery/dna_scannernew/handle_atom_del(atom/A) + ..() + if(A == occupant) + occupant = null + updateUsrDialog() + update_icon() // Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations /obj/machinery/dna_scannernew/proc/radiation_check() @@ -379,26 +353,7 @@ SSnanoui.update_uis(src) // update all UIs attached to src() return else - ..() - return - -/obj/machinery/computer/scan_consolenew/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - qdel(src) - return - if(2.0) - if(prob(50)) - //SN src = null - qdel(src) - return - else - return - -/obj/machinery/computer/scan_consolenew/blob_act() - if(prob(75)) - qdel(src) + return ..() /obj/machinery/computer/scan_consolenew/New() ..() diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 4d6a4933ee1..f94a9a3fbfd 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -7,7 +7,7 @@ /mob/living/simple_animal/hostile/blob icon = 'icons/mob/blob.dmi' pass_flags = PASSBLOB - faction = list("blob") + faction = list(ROLE_BLOB) atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 maxbodytemp = 360 @@ -21,7 +21,14 @@ color = a_color /mob/living/simple_animal/hostile/blob/blob_act() - return + if(stat != DEAD && health < maxHealth) + for(var/i in 1 to 2) + var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed + if(overmind) + H.color = overmind.blob_reagent_datum.complementary_color + else + H.color = "#000000" + adjustHealth(-maxHealth * 0.0125) //////////////// @@ -185,9 +192,6 @@ adjustBruteLoss(0.2) // If you are at full health, you won't lose health. You'll need it. However the moment anybody sneezes on you, the decaying will begin. adjustFireLoss(0.2) -/mob/living/simple_animal/hostile/blob/blobbernaut/blob_act() - return - /mob/living/simple_animal/hostile/blob/blobbernaut/New() ..() if(name == "blobbernaut") diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 91c6df639e5..354f28a45b7 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -2,10 +2,10 @@ name = "blob core" icon = 'icons/mob/blob.dmi' icon_state = "blank_blob" - health = 200 + max_integrity = 400 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 90) fire_resist = 2 point_return = -1 - var/mob/camera/blob/overmind = null // the blob core's overmind var/overmind_get_delay = 0 // we don't want to constantly try to find an overmind, do it every 5 minutes var/resource_delay = 0 var/point_rate = 2 @@ -46,17 +46,15 @@ GLOB.poi_list.Remove(src) return ..() -/obj/structure/blob/core/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - return +/obj/structure/blob/core/ex_act(severity) + var/damage = 50 - 10 * severity //remember, the core takes half brute damage, so this is 20/15/10 damage based on severity + take_damage(damage, BRUTE, "bomb", 0) -/obj/structure/blob/core/update_icon() - if(health <= 0) - qdel(src) - return - // update_icon is called when health changes so... call update_health in the overmind - if(overmind) - overmind.update_health() - return +/obj/structure/blob/core/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, overmind_reagent_trigger = 1) + . = ..() + if(obj_integrity > 0) + if(overmind) //we should have an overmind, but... + overmind.update_health_hud() /obj/structure/blob/core/RegenHealth() return // Don't regen, we handle it in Life() @@ -68,9 +66,9 @@ if(resource_delay <= world.time) resource_delay = world.time + 10 // 1 second overmind.add_points(point_rate) - health = min(initial(health), health + 1) + obj_integrity = min(max_integrity, obj_integrity + 1) if(overmind) - overmind.update_health() + overmind.update_health_hud() if(overmind) for(var/i = 1; i < 8; i += i) Pulse(0, i, overmind.blob_reagent_datum.color) diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm index fd6aa8c9f4a..a8fdc03ec96 100644 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ b/code/game/gamemodes/blob/blobs/factory.dm @@ -2,17 +2,11 @@ name = "factory blob" icon = 'icons/mob/blob.dmi' icon_state = "blob_factory" - health = 100 - fire_resist = 2 + max_integrity = 200 point_return = 18 var/list/spores = list() var/max_spores = 3 var/spore_delay = 0 - var/mob/camera/blob/overmind - -/obj/structure/blob/factory/update_icon() - if(health <= 0) - qdel(src) /obj/structure/blob/factory/Destroy() for(var/mob/living/simple_animal/hostile/blob/blobspore/spore in spores) diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm index 4a2699802c1..7d21bcc7946 100644 --- a/code/game/gamemodes/blob/blobs/node.dm +++ b/code/game/gamemodes/blob/blobs/node.dm @@ -2,10 +2,9 @@ name = "blob node" icon = 'icons/mob/blob.dmi' icon_state = "blank_blob" - health = 100 - fire_resist = 2 + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 65, "acid" = 90) point_return = 18 - var/mob/camera/blob/overmind /obj/structure/blob/node/New(loc, var/h = 100) blob_nodes += src @@ -21,9 +20,6 @@ var/image/C = new('icons/mob/blob.dmi', "blob_node_overlay") src.overlays += C -/obj/structure/blob/node/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - return - /obj/structure/blob/node/Destroy() blob_nodes -= src STOP_PROCESSING(SSobj, src) @@ -36,11 +32,5 @@ else for(var/i = 1; i < 8; i += i) Pulse(5, i, color) - health = min(initial(health), health + 1) - color = null - -/obj/structure/blob/node/update_icon() - if(health <= 0) - qdel(src) - return - return \ No newline at end of file + obj_integrity = min(max_integrity, obj_integrity + 1) + color = null \ No newline at end of file diff --git a/code/game/gamemodes/blob/blobs/resource.dm b/code/game/gamemodes/blob/blobs/resource.dm index 14c240f681b..4ef14ed4963 100644 --- a/code/game/gamemodes/blob/blobs/resource.dm +++ b/code/game/gamemodes/blob/blobs/resource.dm @@ -2,16 +2,10 @@ name = "resource blob" icon = 'icons/mob/blob.dmi' icon_state = "blob_resource" - health = 30 - fire_resist = 2 + max_integrity = 60 point_return = 12 - var/mob/camera/blob/overmind = null var/resource_delay = 0 -/obj/structure/blob/resource/update_icon() - if(health <= 0) - qdel(src) - /obj/structure/blob/resource/run_action() if(resource_delay > world.time) return diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm index 0e74e601957..d35aaccea37 100644 --- a/code/game/gamemodes/blob/blobs/shield.dm +++ b/code/game/gamemodes/blob/blobs/shield.dm @@ -1,24 +1,30 @@ /obj/structure/blob/shield name = "strong blob" icon = 'icons/mob/blob.dmi' - icon_state = "blob_idle" + icon_state = "blob_shield" desc = "Some blob creature thingy" - health = 75 - fire_resist = 2 - point_return = 4 - var/maxHealth = 75 + max_integrity = 150 + brute_resist = 0.25 + explosion_block = 3 + atmosblock = TRUE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) /obj/structure/blob/shield/core point_return = 0 /obj/structure/blob/shield/update_icon() - if(health <= 0) - qdel(src) - return - return - -/obj/structure/blob/shield/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - return + ..() + if(obj_integrity < max_integrity * 0.5) + icon_state = "[initial(icon_state)]_damaged" + name = "weakened [initial(name)]" + desc = "A wall of twitching tendrils." + atmosblock = FALSE + else + icon_state = initial(icon_state) + name = initial(name) + desc = initial(desc) + atmosblock = TRUE + air_update_turf(1) /obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target, height=0) if(istype(mover) && mover.checkpass(PASSBLOB)) return 1 @@ -27,10 +33,10 @@ /obj/structure/blob/shield/reflective name = "reflective blob" desc = "A solid wall of slightly twitching tendrils with a reflective glow." - icon_state = "blob_idle_glow" - brute_resist = 0 - health = 50 - maxHealth = 50 + icon_state = "blob_glow" + max_integrity = 100 + brute_resist = 0.5 + explosion_block = 2 point_return = 9 flags_2 = CHECK_RICOCHET_1 var/reflect_chance = 80 //80% chance to reflect @@ -54,7 +60,4 @@ else playsound(src, P.hitsound, 50, 1) visible_message("[src] is hit by \a [P]!") - take_damage(P.damage, P.damage_type) - -/obj/structure/blob/shield/reflective/bullet_act() - return + take_damage(P.damage, P.damage_type) \ No newline at end of file diff --git a/code/game/gamemodes/blob/blobs/storage.dm b/code/game/gamemodes/blob/blobs/storage.dm index 00f6d7b4e0c..0f3225e8362 100644 --- a/code/game/gamemodes/blob/blobs/storage.dm +++ b/code/game/gamemodes/blob/blobs/storage.dm @@ -2,15 +2,14 @@ name = "storage blob" icon = 'icons/mob/blob.dmi' icon_state = "blob_resource" - health = 30 + max_integrity = 30 fire_resist = 2 point_return = 12 - var/mob/camera/blob/overmind = null -/obj/structure/blob/storage/update_icon() - if(health <= 0 && !QDELETED(src)) +/obj/structure/blob/storage/obj_destruction(damage_flag) + if(overmind) overmind.max_blob_points -= 50 - qdel(src) + ..() /obj/structure/blob/storage/proc/update_max_blob_points(var/new_point_increase) if(overmind) diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index d4d9dc15c58..140ead3a947 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -9,7 +9,7 @@ lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE pass_flags = PASSBLOB - faction = list("blob") + faction = list(ROLE_BLOB) var/obj/structure/blob/core/blob_core = null // The blob overmind's core var/blob_points = 0 @@ -45,11 +45,11 @@ ..() sync_mind() blob_help() - update_health() + update_health_hud() -/mob/camera/blob/proc/update_health() +/mob/camera/blob/update_health_hud() if(blob_core) - hud_used.blobhealthdisplay.maptext = "
[round(blob_core.health)]
" + hud_used.blobhealthdisplay.maptext = "
[round(blob_core.obj_integrity)]
" /mob/camera/blob/proc/add_points(var/points) if(points != 0) @@ -90,14 +90,14 @@ /mob/camera/blob/emote(act, m_type = 1, message = null, force) return -/mob/camera/blob/blob_act() +/mob/camera/blob/blob_act(obj/structure/blob/B) return /mob/camera/blob/Stat() ..() if(statpanel("Status")) if(blob_core) - stat(null, "Core Health: [blob_core.health]") + stat(null, "Core Health: [blob_core.obj_integrity]") stat(null, "Power Stored: [blob_points]/[max_blob_points]") /mob/camera/blob/Move(var/NewLoc, var/Dir = 0) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index dfe28336631..d4c429a6f53 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -76,7 +76,7 @@ return - else if(S.health < S.maxHealth * 0.5) + else if(S.obj_integrity < S.max_integrity * 0.5) to_chat(src, "This shield blob is too damaged to be modified properly!") return @@ -333,7 +333,7 @@ last_attack = world.time OB.expand(T, 0, blob_reagent_datum.color) for(var/mob/living/L in T) - if("blob" in L.faction) //no friendly fire + if(ROLE_BLOB in L.faction) //no friendly/dead fire continue var/mob_protection = L.get_permeability_protection() blob_reagent_datum.reaction_mob(L, TOUCH, 25, 1, mob_protection) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 890728d9069..37251cabbf2 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -7,29 +7,35 @@ density = 0 opacity = 0 anchored = 1 + max_integrity = 30 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70) var/point_return = 0 //How many points the blob gets back when it removes a blob of that type. If less than 0, blob cannot be removed. - var/health = 30 var/health_timestamp = 0 - var/brute_resist = 4 - var/fire_resist = 1 - + var/brute_resist = 0.5 //multiplies brute damage by this + var/fire_resist = 1 //multiplies burn damage by this + var/atmosblock = FALSE //if the blob blocks atmos and heat spread + var/mob/camera/blob/overmind /obj/structure/blob/New(loc) + ..() blobs += src - src.dir = pick(1, 2, 4, 8) - src.update_icon() - ..(loc) - for(var/atom/A in loc) - A.blob_act(src) - return - + setDir(pick(cardinal)) + update_icon() + if(atmosblock) + air_update_turf(1) + ConsumeTile() /obj/structure/blob/Destroy() + if(atmosblock) + atmosblock = FALSE + air_update_turf(1) blobs -= src if(isturf(loc)) //Necessary because Expand() is retarded and spawns a blob and then deletes it playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) return ..() +/obj/structure/blob/BlockSuperconductivity() + return atmosblock /obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) @@ -38,6 +44,9 @@ return 1 return 0 +/obj/structure/blob/CanAtmosPass(turf/T) + return !atmosblock + /obj/structure/blob/CanAStarPass(ID, dir, caller) . = 0 if(ismovableatom(caller)) @@ -48,12 +57,7 @@ Life() return -/obj/structure/blob/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - ..() - var/damage = Clamp(0.01 * exposed_temperature, 0, 4) - take_damage(damage, BURN) - -/obj/structure/blob/blob_act() +/obj/structure/blob/blob_act(obj/structure/blob/B) return /obj/structure/blob/proc/Life() @@ -63,8 +67,8 @@ // All blobs heal over time when pulsed, but it has a cool down if(health_timestamp > world.time) return 0 - if(health < initial(health)) - health++ + if(obj_integrity < max_integrity) + obj_integrity = min(max_integrity, obj_integrity + 1) update_icon() health_timestamp = world.time + 10 // 1 seconds @@ -103,9 +107,15 @@ /obj/structure/blob/proc/run_action() return 0 +/obj/structure/blob/proc/ConsumeTile() + for(var/atom/A in loc) + A.blob_act(src) + if(iswallturf(loc)) + loc.blob_act(src) //don't ask how a wall got on top of the core, just eat it /obj/structure/blob/proc/expand(var/turf/T = null, var/prob = 1, var/a_color) - if(prob && !prob(health)) return + if(prob && !prob(obj_integrity)) + return if(istype(T, /turf/space) && prob(75)) return if(!T) var/list/dirs = list(1,2,4,8) @@ -117,7 +127,7 @@ else T = null if(!T) return 0 - var/obj/structure/blob/normal/B = new /obj/structure/blob/normal(src.loc, min(src.health, 30)) + var/obj/structure/blob/normal/B = new /obj/structure/blob/normal(src.loc, min(obj_integrity, 30)) B.color = a_color B.density = 1 if(T.Enter(B,src))//Attempt to move into the tile @@ -132,64 +142,53 @@ A.blob_act(src) return 1 -/obj/structure/blob/ex_act(severity) - ..() - var/damage = 150 - 20 * severity - take_damage(damage, BRUTE) - -/obj/structure/blob/bullet_act(var/obj/item/projectile/Proj) - ..() - take_damage(Proj.damage, Proj.damage_type) - return 0 - /obj/structure/blob/Crossed(var/mob/living/L, oldloc) ..() L.blob_act(src) /obj/structure/blob/tesla_act(power) ..() - take_damage(power/400, BURN) + take_damage(power / 400, BURN, "energy") /obj/structure/blob/hulk_damage() return 15 -/obj/structure/blob/attackby(var/obj/item/W, var/mob/living/user, params) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) - visible_message("[user] has attacked the [src.name] with \the [W]!") - if(W.damtype == BURN) - playsound(src.loc, 'sound/items/welder.ogg', 100, 1) - take_damage(W.force, W.damtype) - -/obj/structure/blob/attack_animal(mob/living/simple_animal/M as mob) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) - visible_message("\The [M] has attacked the [src.name]!") - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - take_damage(damage, BRUTE) - return - -/obj/structure/blob/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) - visible_message("[M] has slashed the [src.name]!") - var/damage = rand(15, 30) - take_damage(damage, BRUTE) - return - -/obj/structure/blob/take_damage(damage, damage_type) - if(!damage || damage_type == STAMINA) // Avoid divide by zero errors +/obj/structure/blob/attack_animal(mob/living/simple_animal/M) + if(ROLE_BLOB in M.faction) //sorry, but you can't kill the blob as a blobbernaut return + ..() + +/obj/structure/blob/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - damage /= max(brute_resist, 1) + if(damage_amount) + playsound(src.loc, 'sound/effects/attackblob.ogg', 50, TRUE) + else + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - damage /= max(fire_resist, 1) - health -= damage - update_icon() + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) + +/obj/structure/blob/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + switch(damage_type) + if(BRUTE) + damage_amount *= brute_resist + if(BURN) + damage_amount *= fire_resist + if(CLONE) + else + return 0 + var/armor_protection = 0 + if(damage_flag) + armor_protection = armor[damage_flag] + damage_amount = round(damage_amount * (100 - armor_protection)*0.01, 0.1) + if(overmind && damage_flag) + damage_amount = overmind.blob_reagent_datum.damage_reaction(src, damage_amount, damage_type, damage_flag) + return damage_amount + +/obj/structure/blob/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + if(. && obj_integrity > 0) + update_icon() /obj/structure/blob/proc/change_to(var/type) if(!ispath(type)) @@ -220,26 +219,24 @@ /obj/structure/blob/normal icon_state = "blob" light_range = 0 - health = 21 + obj_integrity = 21 //doesn't start at full health + max_integrity = 25 + brute_resist = 0.25 /obj/structure/blob/normal/update_icon() - if(health <= 0) - qdel(src) - else if(health <= 15) + ..() + if(obj_integrity <= 15) icon_state = "blob_damaged" + name = "fragile blob" + desc = "A thin lattice of slightly twitching tendrils." + brute_resist = 0.5 + else if(overmind) + icon_state = "blob" + name = "blob" + desc = "A thick wall of writhing tendrils." + brute_resist = 0.25 else icon_state = "blob" - -/* // Used to create the glow sprites. Remember to set the animate loop to 1, instead of infinite! - -var/datum/blob_colour/B = new() - -/datum/blob_colour/New() - ..() - var/icon/I = 'icons/mob/blob.dmi' - I += rgb(35, 35, 0) - if(isfile("icons/mob/blob_result.dmi")) - fdel("icons/mob/blob_result.dmi") - fcopy(I, "icons/mob/blob_result.dmi") - -*/ + name = "dead blob" + desc = "A thick wall of lifeless tendrils." + brute_resist = 0.25 \ No newline at end of file diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index ad754c496c6..d225ac6886a 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -422,7 +422,7 @@ desc = "A huge, bulky mass of pressure and temperature-resistant organic tissue, evolved to facilitate space travel." flags = STOPSPRESSUREDMAGE | NODROP | DROPDEL allowed = list(/obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/tank/oxygen) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) //No armor at all. + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) //No armor at all /obj/item/clothing/suit/space/changeling/New() ..() @@ -440,7 +440,7 @@ icon_state = "lingspacehelmet" desc = "A covering of pressure and temperature-resistant organic tissue with a glass-like chitin front." flags = BLOCKHAIR | STOPSPRESSUREDMAGE | NODROP | DROPDEL - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) /***************************************\ @@ -469,7 +469,7 @@ icon_state = "lingarmor" flags = NODROP | DROPDEL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - armor = list(melee = 40, bullet = 40, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0) + armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 20, "bomb" = 10, "bio" = 4, "rad" = 0, "fire" = 90, "acid" = 90) flags_inv = HIDEJUMPSUIT cold_protection = 0 heat_protection = 0 @@ -485,5 +485,5 @@ desc = "A tough, hard covering of black chitin with transparent chitin in front." icon_state = "lingarmorhelmet" flags = BLOCKHAIR | NODROP | DROPDEL - armor = list(melee = 30, bullet = 30, laser = 40, energy = 20, bomb = 10, bio = 4, rad = 0) + armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 20, "bomb" = 10, "bio" = 4, "rad" = 0, "fire" = 90, "acid" = 90) flags_inv = HIDEEARS diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index 068092dde0d..867328c40b3 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -24,7 +24,7 @@ for(var/obj/machinery/light/L in range(4, user)) L.on = 1 - L.broken() + L.break_light_tube() feedback_add_details("changeling_powers","RS") return 1 @@ -40,6 +40,6 @@ /datum/action/changeling/dissonant_shriek/sting_action(var/mob/user) for(var/obj/machinery/light/L in range(5, usr)) L.on = 1 - L.broken() + L.break_light_tube() empulse(get_turf(user), 2, 4, 1) return 1 diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 0d70822dd01..74d7a1889e7 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -67,7 +67,7 @@ desc = "A hood worn by the followers of a cult." flags_inv = HIDEFACE flags_cover = HEADCOVERSEYES - armor = list(melee = 30, bullet = 10, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 30, bullet = 10, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 0, fire = 10, acid = 10) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT @@ -85,7 +85,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS hoodtype = /obj/item/clothing/head/hooded/culthood allowed = list(/obj/item/tome,/obj/item/melee/cultblade) - armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 40, "energy" = 20, "bomb" = 25, "bio" = 10, "rad" = 0, "fire" = 10, "acid" = 10) flags_inv = HIDEJUMPSUIT /obj/item/clothing/suit/hooded/cultrobes/alt @@ -101,7 +101,7 @@ flags = BLOCKHAIR flags_inv = HIDEFACE flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - armor = list(melee = 30, bullet = 30, laser = 30, energy = 20, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 30, "laser" = 50, "energy" = 20, "bomb" = 25, "bio" = 10, "rad" = 0, "fire" = 10, "acid" = 10) /obj/item/clothing/suit/magusred name = "magus robes" @@ -110,7 +110,7 @@ item_state = "magusred" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/tome,/obj/item/melee/cultblade) - armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) + armor = list("melee" = 50, "bullet" = 30, "laser" = 50, "energy" = 20, "bomb" = 25, "bio" = 10, "rad" = 0, "fire" = 10, "acid" = 10) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT /obj/item/clothing/head/helmet/space/cult @@ -118,7 +118,7 @@ desc = "A space worthy helmet used by the followers of a cult." icon_state = "cult_helmet" item_state = "cult_helmet" - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 70, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 40, "acid" = 75) /obj/item/clothing/suit/space/cult name = "cult armor" @@ -128,7 +128,7 @@ w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/tome,/obj/item/melee/cultblade,/obj/item/tank) slowdown = 1 - armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 70, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 40, "acid" = 75) /obj/item/clothing/suit/hooded/cultrobes/cult_shield name = "empowered cultist robe" @@ -136,7 +136,7 @@ icon_state = "cult_armour" item_state = "cult_armour" w_class = WEIGHT_CLASS_BULKY - armor = list(melee = 50, bullet = 40, laser = 50, energy = 30, bomb = 50, bio = 30, rad = 30) + armor = list("melee" = 50, "bullet" = 40, "laser" = 50, "energy" = 30, "bomb" = 50, "bio" = 30, "rad" = 30, "fire" = 50, "acid" = 60) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/tome,/obj/item/melee/cultblade) var/current_charges = 3 @@ -146,7 +146,7 @@ name = "empowered cultist robe" desc = "Empowered garb which creates a powerful shield around the user." icon_state = "cult_hoodalt" - armor = list(melee = 50, bullet = 40, laser = 50, energy = 30, bomb = 50, bio = 30, rad = 30) + armor = list("melee" = 40, "bullet" = 30, "laser" = 40,"energy" = 20, "bomb" = 25, "bio" = 10, "rad" = 0, "fire" = 10, "acid" = 10) body_parts_covered = HEAD flags_inv = HIDEFACE flags_cover = HEADCOVERSEYES @@ -179,7 +179,7 @@ flags_inv = HIDEJUMPSUIT allowed = list(/obj/item/tome,/obj/item/melee/cultblade) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - armor = list(melee = -50, bullet = -50, laser = -100, energy = -50, bomb = -50, bio = -50, rad = -50) + armor = list("melee" = -45, "bullet" = -45, "laser" = -45,"energy" = -45, "bomb" = -45, "bio" = -45, "rad" = -45, "fire" = 0, "acid" = 0) slowdown = -1 hoodtype = /obj/item/clothing/head/hooded/berserkerhood @@ -190,7 +190,7 @@ icon_state = "culthood" flags_inv = HIDEFACE flags_cover = HEADCOVERSEYES - armor = list(melee = -100, bullet = -100, laser = -100, energy = -100, bomb = -100, bio = -100, rad = -100) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) /obj/item/whetstone/cult name = "eldritch whetstone" @@ -358,7 +358,7 @@ item_state = "cultrobesalt" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/tome,/obj/item/melee/cultblade) - armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0) + armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0, fire = 10, acid = 10) flags_inv = HIDEJUMPSUIT flags = NODROP | DROPDEL diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index dcf869a3578..c599f7b2291 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -29,23 +29,21 @@ //Cult versions cuase fuck map conflicts /obj/structure/cult/functional + max_integrity = 100 var/cooldowntime = 0 - var/health = 100 var/death_message = "The structure falls apart." //The message shown when the structure is destroyed var/death_sound = 'sound/items/bikehorn.ogg' var/heathen_message = "You're a huge nerd, go away. Also, a coder forgot to put a message here." var/selection_title = "Oops" var/selection_prompt = "Choose your weapon, nerdwad" var/creation_delay = 2400 - var/list/choosable_items = list( - "A coder forgot to set this" = /obj/item/grown/bananapeel - ) + var/list/choosable_items = list("A coder forgot to set this" = /obj/item/grown/bananapeel) var/creation_message = "A dank smoke comes out, and you pass out. When you come to, you notice a %ITEM%!" -/obj/structure/cult/functional/proc/destroy_structure() +/obj/structure/cult/functional/obj_destruction() visible_message(death_message) playsound(src, death_sound, 50, 1) - qdel(src) + ..() /obj/structure/cult/functional/examine(mob/user) . = ..() @@ -54,10 +52,6 @@ . += "\The [src] is [anchored ? "":"not "]secured to the floor." /obj/structure/cult/functional/attackby(obj/I, mob/user, params) - if(HULK in user.mutations) - to_chat(user, "You cannot seem to manipulate this structure with your bulky hands!") - return - if(istype(I, /obj/item/tome) && iscultist(user)) anchored = !anchored to_chat(user, "You [anchored ? "":"un"]secure \the [src] [anchored ? "to":"from"] the floor.") @@ -66,30 +60,16 @@ icon_state = "[initial(icon_state)]_off" else icon_state = initial(icon_state) - else - return ..() - -/obj/structure/cult/functional/proc/updatehealth() - if(health <= 0) - destroy_structure() - -/obj/structure/cult/functional/take_damage(damage, damage_type = BRUTE) - if(damage_type == BRUTE || damage_type == BURN) - health -= damage - updatehealth() - -/obj/structure/cult/functional/attackby(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - playsound(loc, I.hitsound, 80, 1) - -/obj/structure/cult/functional/bullet_act(var/obj/item/projectile/P) - take_damage(P.damage, P.damage_type) + return + return ..() /obj/structure/cult/functional/attack_hand(mob/living/user) if(!iscultist(user)) to_chat(user, "[heathen_message]") return + if(HULK in user.mutations) + to_chat(user, "You cannot seem to manipulate this structure with your bulky hands!") + return if(!anchored) to_chat(user, "You need to anchor [src] to the floor with a tome first.") return @@ -115,7 +95,7 @@ name = "altar" desc = "A bloodstained altar dedicated to a cult." icon_state = "talismanaltar" - health = 150 //Sturdy + max_integrity = 150 //Sturdy death_message = "The altar breaks into splinters, releasing a cascade of spirits into the air!" death_sound = 'sound/effects/altar_break.ogg' heathen_message = "There is a foreboding aura to the altar and you want nothing to do with it." @@ -129,7 +109,7 @@ name = "daemon forge" desc = "A forge used in crafting the unholy weapons used by the armies of a cult." icon_state = "forge" - health = 300 //Made of metal + max_integrity = 300 //Made of metal death_message = "The forge falls apart, its lava cooling and winking away!" death_sound = 'sound/effects/forge_destroy.ogg' heathen_message = "Your hand feels like it's melting off as you try to touch the forge." @@ -163,8 +143,7 @@ C.apply_damage(30, BURN, "head") //30 fire damage because it's FUCKING LAVA head.disfigure() //Your face is unrecognizable because it's FUCKING LAVA return 1 - else - ..() + return ..() var/list/blacklisted_pylon_turfs = typecacheof(list( /turf/simulated/floor/engine/cult, @@ -182,7 +161,7 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( icon_state = "pylon" light_range = 5 light_color = "#3e0000" - health = 50 //Very fragile + max_integrity = 50 //Very fragile death_message = "The pylon's crystal vibrates and glows fiercely before violently shattering!" death_sound = 'sound/effects/pylon_shatter.ogg' @@ -252,7 +231,7 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( name = "archives" desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl." icon_state = "tomealtar" - health = 125 //Slightly sturdy + max_integrity = 125 //Slightly sturdy death_message = "The desk breaks apart, its books falling to the floor." death_sound = 'sound/effects/wood_break.ogg' heathen_message = "What do you hope to seek?" @@ -268,9 +247,14 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( icon = 'icons/obj/cult.dmi' icon_state = "hole" density = 1 - unacidable = 1 anchored = 1.0 +/obj/effect/gateway/singularity_act() + return + +/obj/effect/gateway/singularity_pull() + return + /obj/effect/gateway/Bumped(mob/M as mob|obj) spawn(0) return diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 4f647e2d576..59c6ac50e15 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -18,9 +18,9 @@ To draw a rune, use an arcane tome. anchored = 1 icon = 'icons/obj/rune.dmi' icon_state = "1" + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF var/visibility = 0 var/view_range = 7 - unacidable = 1 layer = TURF_LAYER var/invocation = "Aiy ele-mayo!" //This is said by cultists when the rune is invoked. @@ -63,7 +63,7 @@ To draw a rune, use an arcane tome. to_chat(user, "You carefully erase the [lowertext(cultist_name)] rune.") qdel(src) return - else if(istype(I, /obj/item/nullrod)) + if(istype(I, /obj/item/nullrod)) if(iscultist(user))//cultist..what are doing..cultist..staph... user.drop_item() user.visible_message("[I] suddenly glows with white light, forcing [user] to drop it in pain!", \ @@ -72,6 +72,7 @@ To draw a rune, use an arcane tome. to_chat(user,"You disrupt the magic of [src] with [I].") qdel(src) return + return ..() /obj/effect/rune/attack_hand(mob/living/user) if(!iscultist(user)) @@ -541,14 +542,12 @@ var/list/teleport_runes = list() if(do_after(user, 50, target = src)) //Prevents accidental erasures. log_game("Summon Narsie rune erased by [key_name(user)] with a tome") message_admins("[key_name_admin(user)] erased a Narsie rune with a tome") - ..() - return - else - if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. - log_game("Summon Narsie rune erased by [key_name(user)] using a null rod") - message_admins("[key_name_admin(user)] erased a Narsie rune with a null rod") - ..() - return + return + if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. + log_game("Summon Narsie rune erased by [key_name(user)] using a null rod") + message_admins("[key_name_admin(user)] erased a Narsie rune with a null rod") + return + return ..() @@ -579,14 +578,12 @@ var/list/teleport_runes = list() if(do_after(user, 50, target = src)) //Prevents accidental erasures. log_game("Summon demon rune erased by [key_name(user)] with a tome") message_admins("[key_name_admin(user)] erased a demon rune with a tome") - ..() - return - else - if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. - log_game("Summon demon rune erased by [key_name(user)] using a null rod") - message_admins("[key_name_admin(user)] erased a demon rune with a null rod") - ..() - return + return + if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. + log_game("Summon demon rune erased by [key_name(user)] using a null rod") + message_admins("[key_name_admin(user)] erased a demon rune with a null rod") + return + return ..() /obj/effect/rune/slaughter/invoke(var/list/invokers) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index f55d0ef7520..5dafcee72a7 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -160,9 +160,10 @@ /obj/effect/meteor/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/pickaxe)) + make_debris() qdel(src) return - ..() + return ..() /obj/effect/meteor/proc/make_debris() for(var/throws = dropamt, throws > 0, throws--) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 539df377b71..2d3ce8d0968 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -14,15 +14,15 @@ item_state = "armor" blood_overlay_type = "armor" origin_tech = "magnets=7;biotech=4;powerstorage=4;abductor=4" - armor = list(melee = 15, bullet = 15, laser = 15, energy = 15, bomb = 15, bio = 15, rad = 15) + armor = list("melee" = 15, "bullet" = 15, "laser" = 15, "energy" = 15, "bomb" = 15, "bio" = 15, "rad" = 15, "fire" = 70, "acid" = 70) actions_types = list(/datum/action/item_action/hands_free/activate) allowed = list(/obj/item/abductor, /obj/item/abductor_baton, /obj/item/melee/baton, /obj/item/gun/energy, /obj/item/restraints/handcuffs) var/mode = VEST_STEALTH var/stealth_active = 0 var/combat_cooldown = 10 var/datum/icon_snapshot/disguise - var/stealth_armor = list(melee = 15, bullet = 15, laser = 15, energy = 15, bomb = 15, bio = 15, rad = 15) - var/combat_armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 50, rad = 50) + var/stealth_armor = list("melee" = 15, "bullet" = 15, "laser" = 15, "energy" = 15, "bomb" = 15, "bio" = 15, "rad" = 15, "fire" = 70, "acid" = 70) + var/combat_armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 50, "bio" = 50, "rad" = 50, "fire" = 90, "acid" = 90) sprite_sheets = null /obj/item/clothing/suit/armor/abductor/vest/proc/toggle_nodrop() @@ -692,7 +692,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} for(var/i = 1, i <= framestackamount, i++) new framestack(get_turf(src)) qdel(src) - return + return if(istype(I, /obj/item/stack/sheet/mineral/abductor)) var/obj/item/stack/sheet/P = I if(P.get_amount() < 1) @@ -714,6 +714,8 @@ Congratulations! You are now trained for invasive xenobiology research!"} P.use(1) new /obj/machinery/optable/abductor(loc) qdel(src) + return + return ..() /obj/structure/table/abductor name = "alien table" diff --git a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm index 25b9025a764..951ee6806de 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm @@ -12,6 +12,7 @@ icon = 'icons/obj/abductor.dmi' icon_state = "camera" + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/machinery/computer/camera_advanced/abductor/New() GLOB.abductor_equipment.Add(src) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/console.dm b/code/game/gamemodes/miniantags/abduction/machinery/console.dm index 3598a5775a7..b162103c88b 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/console.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/console.dm @@ -1,6 +1,7 @@ //Common /obj/machinery/abductor + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/team = 0 /obj/machinery/abductor/New() diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index fd7e7892cd4..04dda244a0c 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -200,6 +200,20 @@ icon_state = "experiment" add_fingerprint(user) qdel(G) + return + return ..() + +/obj/machinery/abductor/experiment/ex_act(severity) + if(occupant) + occupant.ex_act(severity) + ..() + +/obj/machinery/abductor/experiment/handle_atom_del(atom/A) + ..() + if(A == occupant) + occupant = null + updateUsrDialog() + update_icon() /obj/machinery/abductor/experiment/proc/eject_abductee() if(!occupant) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index 6ea14557e06..d87ba8c057f 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -177,6 +177,15 @@ S.DisIntegrate(src) return TRUE +/obj/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) + if(resistance_flags & INDESTRUCTIBLE) + return FALSE + for(var/mob/living/L in contents) + if(!issilicon(L) && !isbrain(L)) + to_chat(S, "An organism has been detected inside this object. Aborting.") + return FALSE + return ..() + /obj/item/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) S.Integrate(src) return FALSE @@ -466,10 +475,10 @@ icon_state = "ui_light" layer = MOB_LAYER anchored = 1 - unacidable = 1 light_range = 1 mouse_opacity = MOUSE_OPACITY_ICON - var/health = 30 + max_integrity = 30 + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF light_color = LIGHT_COLOR_CYAN var/lon_range = 1 @@ -477,6 +486,13 @@ . = ..() set_light(lon_range) +/obj/structure/swarmer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + playsound(src, 'sound/weapons/egloves.ogg', 80, TRUE) + if(BURN) + playsound(src, 'sound/items/welder.ogg', 100, TRUE) + /obj/structure/swarmer/disintegration icon_state = "disintegrate" @@ -499,43 +515,8 @@ spawn(5) qdel(src) -/obj/structure/swarmer/take_damage(damage) - health -= damage - if(health <= 0) - qdel(src) - -/obj/structure/swarmer/bullet_act(obj/item/projectile/Proj) - if(Proj.damage) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - take_damage(Proj.damage) - ..() - -/obj/structure/swarmer/attackby(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item)) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - take_damage(I.force) - return - -/obj/structure/swarmer/ex_act() - qdel(src) - return - -/obj/structure/swarmer/blob_act() - qdel(src) - return - /obj/structure/swarmer/emp_act() qdel(src) - return -/obj/structure/swarmer/attack_animal(mob/living/user) - if(isanimal(user)) - var/mob/living/simple_animal/S = user - S.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - if(S.melee_damage_type == BRUTE || S.melee_damage_type == BURN) - take_damage(rand(S.melee_damage_lower, S.melee_damage_upper)) - return /obj/structure/swarmer/trap name = "swarmer trap" @@ -543,7 +524,7 @@ icon_state = "trap" light_range = 1 light_color = LIGHT_COLOR_CYAN - health = 10 + max_integrity = 10 /obj/structure/swarmer/trap/Crossed(var/atom/movable/AM, oldloc) if(isliving(AM)) @@ -584,7 +565,7 @@ icon_state = "barricade" light_range = 1 light_color = LIGHT_COLOR_CYAN - health = 50 + max_integrity = 50 density = 1 anchored = 1 diff --git a/code/game/gamemodes/miniantags/guardian/types/ranged.dm b/code/game/gamemodes/miniantags/guardian/types/ranged.dm index 871d7be1183..496e31d1bd3 100644 --- a/code/game/gamemodes/miniantags/guardian/types/ranged.dm +++ b/code/game/gamemodes/miniantags/guardian/types/ranged.dm @@ -101,6 +101,11 @@ var/mob/living/spawner invisibility = 1 +/obj/effect/snare/singularity_act() + return + +/obj/effect/snare/singularity_pull() + return /obj/item/effect/snare/Crossed(AM as mob|obj, oldloc) if(isliving(AM)) diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index e363c849eb9..b761af6db92 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -76,8 +76,8 @@ /mob/living/simple_animal/revenant/ex_act(severity) return 1 //Immune to the effects of explosions. -/mob/living/simple_animal/revenant/blob_act() - return 1 //blah blah blobs aren't in tune with the spirit world, or something. +/mob/living/simple_animal/revenant/blob_act(obj/structure/blob/B) + return //blah blah blobs aren't in tune with the spirit world, or something. /mob/living/simple_animal/revenant/singularity_act() return //don't walk into the singularity expecting to find corpses, okay? diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm index 1ea0539620a..ab54f6991b1 100644 --- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm +++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm @@ -156,7 +156,7 @@ density = 0 anchored = 1 invisibility = 60 - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/dummy/slaughter/relaymove(mob/user, direction) forceMove(get_step(src,direction)) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index b11c43299ad..1c4956d096e 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -6,6 +6,7 @@ var/bomb_set icon = 'icons/obj/stationobjs.dmi' icon_state = "nuclearbomb0" density = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/deployable = 0 var/extended = 0 var/lighthack = 0 @@ -20,7 +21,6 @@ var/bomb_set var/lastentered var/is_syndicate = 0 use_power = NO_POWER_USE - unacidable = 1 var/previous_level = "" var/datum/wires/nuclearbomb/wires = null @@ -76,7 +76,7 @@ var/bomb_set if(panel_open && (istype(O, /obj/item/multitool) || istype(O, /obj/item/wirecutters))) return attack_hand(user) - + if(istype(O, /obj/item/disk/nuclear)) if(extended) if(!user.drop_item()) @@ -88,7 +88,7 @@ var/bomb_set return attack_hand(user) else to_chat(user, "You need to deploy \the [src] first. Right click on the sprite, select 'Make Deployable' then click on \the [src] with an empty hand.") - return + return if(anchored) switch(removal_stage) @@ -157,7 +157,8 @@ var/bomb_set anchored = 0 removal_stage = 5 return - ..() + return + return ..() /obj/machinery/nuclearbomb/attack_ghost(mob/user as mob) if(extended) @@ -333,15 +334,10 @@ var/bomb_set SSnanoui.update_uis(src) -/obj/machinery/nuclearbomb/ex_act(severity) - return - -/obj/machinery/nuclearbomb/blob_act() +/obj/machinery/nuclearbomb/blob_act(obj/structure/blob/B) if(timing == -1.0) return - else - return ..() - return + qdel(src) /obj/machinery/nuclearbomb/tesla_act(power, explosive) ..() @@ -405,7 +401,9 @@ var/bomb_set name = "nuclear authentication disk" desc = "Better keep this safe." icon_state = "nucleardisk" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0) + max_integrity = 250 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/disk/nuclear/unrestricted desc = "Seems to have been stripped of its safeties, you better not lose it." diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 57be7349aa7..251c32716bb 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -9,6 +9,7 @@ throw_speed = 4 throw_range = 20 materials = list(MAT_METAL=500) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/obj/item/disk/nuclear/the_disk = null var/active = 0 var/shows_nuke_timer = TRUE @@ -163,13 +164,13 @@ var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in item_names if(!targetitem) return - + var/list/target_candidates = get_all_of_type(item_paths[targetitem], subtypes = TRUE) for(var/obj/item/candidate in target_candidates) if(!is_admin_level((get_turf(candidate)).z)) target = candidate break - + if(!target) to_chat(usr, "Failed to locate [targetitem]!") return diff --git a/code/game/gamemodes/shadowling/shadowling_items.dm b/code/game/gamemodes/shadowling/shadowling_items.dm index 69f5688829c..431d986bfcd 100644 --- a/code/game/gamemodes/shadowling/shadowling_items.dm +++ b/code/game/gamemodes/shadowling/shadowling_items.dm @@ -8,7 +8,7 @@ flags = ABSTRACT | NODROP has_sensor = 0 displays_id = 0 - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/clothing/suit/space/shadowling @@ -21,10 +21,10 @@ min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT flags_inv = HIDEGLOVES | HIDESHOES | HIDEJUMPSUIT slowdown = 0 - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF heat_protection = null //You didn't expect a light-sensitive creature to have heat resistance, did you? max_heat_protection_temperature = null - armor = list(melee = 25, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100) + armor = list(melee = 25, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 100, acid = 100) flags = ABSTRACT | NODROP | THICKMATERIAL | STOPSPRESSUREDMAGE @@ -32,7 +32,7 @@ name = "chitin feet" desc = "Charred-looking feet. They have minature hooks that latch onto flooring." icon_state = "golem" - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags = NOSLIP | ABSTRACT | NODROP @@ -43,7 +43,7 @@ item_state = "golem" origin_tech = null siemens_coefficient = 0 - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags = ABSTRACT | NODROP @@ -54,7 +54,7 @@ item_state = null origin_tech = null siemens_coefficient = 0 - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags = ABSTRACT | NODROP @@ -68,7 +68,7 @@ heat_protection = HEAD max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT origin_tech = null - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags = ABSTRACT | NODROP | STOPSPRESSUREDMAGE /obj/item/clothing/glasses/shadowling @@ -78,7 +78,7 @@ icon_state = null item_state = null origin_tech = null - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flash_protect = -1 vision_flags = SEE_MOBS lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 1eedc354f5e..67f42b81285 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -142,7 +142,6 @@ icon = 'icons/obj/biomass.dmi' icon_state = "rift" density = 1 - unacidable = 1 anchored = 1.0 var/spawn_path = /mob/living/simple_animal/cow //defaulty cows to prevent unintentional narsies var/spawn_amt_left = 20 @@ -173,7 +172,13 @@ user.visible_message("[user] seals \the [src] with \the [I].") qdel(src) return - ..() + return ..() + +/obj/effect/rend/singularity_pull() + return + +/obj/effect/rend/singularity_pull() + return /obj/item/veilrender/vealrender name = "veal render" @@ -637,7 +642,7 @@ var/global/list/multiverse = list() if(M.stat != DEAD) to_chat(user, "This artifact can only affect the dead!") return - + if((!M.mind || !M.client) && !M.grab_ghost()) to_chat(user,"There is no soul connected to this body...") return @@ -773,8 +778,8 @@ var/global/list/multiverse = list() var/obj/item/link = null var/cooldown_time = 30 //3s var/cooldown = 0 - burntime = 0 - burn_state = FLAMMABLE + max_integrity = 10 + resistance_flags = FLAMMABLE /obj/item/voodoo/attackby(obj/item/I as obj, mob/user as mob, params) if(target && cooldown < world.time) @@ -801,7 +806,8 @@ var/global/list/multiverse = list() link = I to_chat(user, "You attach [I] to the doll.") update_targets() - ..() + return + return ..() /obj/item/voodoo/check_eye(mob/user as mob) if(loc != user) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 088088ee365..0b24362cf1c 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -616,6 +616,7 @@ to_chat(user, "You feed the contract back into the spellbook, refunding your points.") uses+=2 qdel(O) + return if(istype(O, /obj/item/antag_spawner/slaughter_demon)) to_chat(user, "On second thought, maybe summoning a demon is a bad idea. You refund your points.") @@ -630,6 +631,7 @@ if(!isnull(BB.limit)) BB.limit++ qdel(O) + return if(istype(O, /obj/item/antag_spawner/morph)) to_chat(user, "On second thought, maybe awakening a morph is a bad idea. You refund your points.") @@ -638,6 +640,8 @@ if(!isnull(OB.limit)) OB.limit++ qdel(O) + return + return ..() /obj/item/spellbook/proc/GetCategoryHeader(category) var/dat = "" diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 849f54169f5..feaf1c7972d 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -24,7 +24,6 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0) /datum/job/captain/announce(mob/living/carbon/human/H) . = ..() captain_announcement.Announce("All hands, Captain [H.real_name] on deck!") - updateDisplaycase(H) /datum/outfit/job/captain name = "Captain" diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index 727d70392bd..a6bf80f5fe3 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -8,7 +8,8 @@ use_power = IDLE_POWER_USE current_heat_capacity = 1000 layer = 3 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100) + max_integrity = 300 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30) /obj/machinery/atmospherics/unary/cold_sink/freezer/New() ..() @@ -76,8 +77,8 @@ break build_network() update_icon() - else - return ..() + return + return ..() /obj/machinery/atmospherics/unary/cold_sink/freezer/update_icon() if(panel_open) @@ -168,7 +169,8 @@ anchored = 1.0 layer = 3 current_heat_capacity = 1000 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100) + max_integrity = 300 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30) /obj/machinery/atmospherics/unary/heat_reservoir/heater/New() ..() @@ -242,8 +244,8 @@ break build_network() update_icon() - else - return ..() + return + return ..() /obj/machinery/atmospherics/unary/heat_reservoir/heater/update_icon() if(panel_open) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index de15a26264a..c8bdeb37ac4 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -35,27 +35,6 @@ victim = null return ..() -/obj/machinery/optable/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - qdel(src) - return - if(2.0) - if(prob(50)) - //SN src = null - qdel(src) - return - if(3.0) - if(prob(25)) - src.density = 0 - else - return - -/obj/machinery/optable/blob_act() - if(prob(75)) - qdel(src) - /obj/machinery/optable/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) if(user.a_intent == INTENT_HARM) ..(user, TRUE) diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 1b7ca14f941..817d56cb47a 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -5,19 +5,20 @@ icon_state = "pdapainter" density = 1 anchored = 1 + max_integrity = 200 var/obj/item/pda/storedpda = null var/list/colorlist = list() /obj/machinery/pdapainter/update_icon() - overlays.Cut() + cut_overlays() if(stat & BROKEN) icon_state = "[initial(icon_state)]-broken" return if(storedpda) - overlays += "[initial(icon_state)]-closed" + add_overlay("[initial(icon_state)]-closed") if(powered()) icon_state = initial(icon_state) @@ -43,6 +44,21 @@ QDEL_NULL(storedpda) return ..() +/obj/machinery/pdapainter/on_deconstruction() + if(storedpda) + storedpda.forceMove(loc) + storedpda = null + +/obj/machinery/pdapainter/ex_act(severity) + if(storedpda) + storedpda.ex_act(severity) + ..() + +/obj/machinery/pdapainter/handle_atom_del(atom/A) + if(A == storedpda) + storedpda = null + update_icon() + /obj/machinery/pdapainter/attackby(obj/item/I, mob/user, params) if(default_unfasten_wrench(user, I)) power_change() @@ -59,9 +75,32 @@ P.forceMove(src) P.add_fingerprint(user) update_icon() + else if(iswelder(I) && user.a_intent != INTENT_HARM) + var/obj/item/weldingtool/WT = I + if(stat & BROKEN) + if(WT.remove_fuel(0,user)) + user.visible_message("[user] is repairing [src].", \ + "You begin repairing [src]...", \ + "You hear welding.") + playsound(loc, WT.usesound, 40, 1) + if(do_after(user,40*WT.toolspeed, 1, target = src)) + if(!WT.isOn() || !(stat & BROKEN)) + return + to_chat(user, "You repair [src].") + playsound(loc, 'sound/items/welder2.ogg', 50, 1) + stat &= ~BROKEN + obj_integrity = max_integrity + update_icon() + else + to_chat(user, "[src] does not need repairs.") else return ..() +/obj/machinery/pdapainter/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) + stat |= BROKEN + update_icon() /obj/machinery/pdapainter/attack_hand(mob/user as mob) if(..()) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index aefe99213e1..323f70f9564 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -264,15 +264,6 @@ add_fingerprint(usr) return 1 -/obj/machinery/sleeper/blob_act() - if(prob(75)) - var/atom/movable/A = occupant - go_out() - A.blob_act() - qdel(src) - return - - /obj/machinery/sleeper/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/glass)) if(!beaker) @@ -355,27 +346,7 @@ /obj/machinery/sleeper/ex_act(severity) if(filtering) toggle_filter() - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(loc) - A.ex_act(severity) - qdel(src) - return - if(2.0) - if(prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(loc) - A.ex_act(severity) - qdel(src) - return - if(3.0) - if(prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(loc) - A.ex_act(severity) - qdel(src) - return + ..() /obj/machinery/sleeper/emp_act(severity) if(filtering) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 1fb4c505170..290682c1a97 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -172,47 +172,22 @@ A.forceMove(loc) /obj/machinery/bodyscanner/ex_act(severity) - switch(severity) - if(1) - for(var/atom/movable/A in src) - A.forceMove(loc) - A.ex_act(severity) - qdel(src) - return - if(2) - if(prob(50)) - for(var/atom/movable/A in src) - A.forceMove(loc) - A.ex_act(severity) - qdel(src) - return - if(3) - if(prob(25)) - for(var/atom/movable/A in src) - A.forceMove(loc) - A.ex_act(severity) - qdel(src) - return + if(occupant) + occupant.ex_act(severity) + ..() -/obj/machinery/bodyscanner/blob_act() - if(prob(50)) - var/atom/movable/A = occupant - go_out() - A.blob_act() - qdel(src) +/obj/machinery/bodyscanner/handle_atom_del(atom/A) + ..() + if(A == occupant) + occupant = null + updateUsrDialog() + update_icon() /obj/machinery/bodyscanner/narsie_act() go_out() new /obj/effect/gibspawner/generic(get_turf(loc)) //I REPLACE YOUR TECHNOLOGY WITH FLESH! qdel(src) -/obj/machinery/bodyscanner/attack_animal(mob/living/simple_animal/M)//Stop putting hostile mobs in things guise - if(M.environment_smash) - M.do_attack_animation(src) - visible_message("[M.name] smashes [src] apart!") - go_out() - qdel(src) - /obj/machinery/bodyscanner/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 71202f8c536..12ad51c8b28 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -5,7 +5,8 @@ layer = 3 plane = FLOOR_PLANE anchored = 1.0 - armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0) + max_integrity = 200 + armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) var/uses = 20 var/disabled = TRUE var/lethal = 0 @@ -36,21 +37,18 @@ return if(istype(user, /mob/living/silicon)) return attack_hand(user) - else // trying to unlock the interface - if(allowed(usr)) - locked = !locked - to_chat(user, "You [locked ? "lock" : "unlock"] the device.") - if(locked) - if(user.machine == src) - user.unset_machine() - user << browse(null, "window=ai_slipper") - else - if(user.machine == src) - attack_hand(usr) + if(allowed(usr)) // trying to unlock the interface + locked = !locked + to_chat(user, "You [locked ? "lock" : "unlock"] the device.") + if(locked) + if(user.machine == src) + user.unset_machine() + user << browse(null, "window=ai_slipper") else - to_chat(user, "Access denied.") - return - return + if(user.machine == src) + attack_hand(usr) + return + return ..() /obj/machinery/ai_slipper/proc/ToggleOn() if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 8a445814ca2..d13406eee99 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -80,7 +80,10 @@ active_power_usage = 8 power_channel = ENVIRON req_one_access = list(access_atmospherics, access_engine_equip) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100) + max_integrity = 250 + integrity_failure = 80 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) + resistance_flags = FIRE_PROOF siemens_strength = 1 var/alarm_id = null var/frequency = ATMOS_VENTSCRUB @@ -1032,6 +1035,19 @@ spawn(rand(0,15)) update_icon() +/obj/machinery/alarm/obj_break(damage_flag) + ..() + update_icon() + +/obj/machinery/alarm/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 2) + var/obj/item/I = new /obj/item/airalarm_electronics(loc) + if(!disassembled) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 3) + qdel(src) + /obj/machinery/alarm/examine(mob/user) . = ..() if(buildstage < 2) diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 1d0b8dde152..f0c6a81820f 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -1,6 +1,7 @@ /obj/machinery/air_sensor icon = 'icons/obj/stationobjs.dmi' icon_state = "gsensor1" + resistance_flags = FIRE_PROOF name = "gas sensor" req_one_access_txt = "24;10" @@ -81,8 +82,8 @@ new /obj/item/pipe_gsensor(src.loc) qdel(src) return 1 - if(..()) - return 1 + return + return ..() /obj/machinery/air_sensor/process_atmos() if(on) @@ -181,8 +182,8 @@ /obj/machinery/computer/general_air_control/attackby(I as obj, user as mob, params) if(istype(I, /obj/item/multitool)) update_multitool_menu(user) - if(..()) return 1 + return ..() /obj/machinery/computer/general_air_control/receive_signal(datum/signal/signal) @@ -385,8 +386,8 @@ /obj/machinery/computer/general_air_control/large_tank_control/attackby(I as obj, user as mob) if(istype(I, /obj/item/multitool)) update_multitool_menu(user) - if(..()) return 1 + return ..() /obj/machinery/computer/general_air_control/large_tank_control/multitool_menu(mob/user, obj/item/multitool/P) @@ -597,8 +598,8 @@ /obj/machinery/computer/general_air_control/fuel_injection/attackby(I as obj, user as mob, params) if(istype(I, /obj/item/multitool)) update_multitool_menu(user) - if(..()) return 1 + return ..() /obj/machinery/computer/general_air_control/fuel_injection/process() if(automation) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 9a6bf73de11..3210e899876 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -48,9 +48,10 @@ var/datum/canister_icons/canister_icon_container = new() icon = 'icons/obj/atmos.dmi' icon_state = "yellow" density = 1 - var/health = 100.0 flags = CONDUCT - armor = list(melee = 50, bullet = 50, laser = 50, energy = 100, bomb = 10, bio = 100, rad = 100) + armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 50) + max_integrity = 250 + integrity_failure = 100 var/menu = 0 //used by nanoui: 0 = main menu, 1 = relabel @@ -246,30 +247,54 @@ update_flag /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() if(exposed_temperature > temperature_resistance) - health -= 5 - healthcheck() + take_damage(5, BURN, 0) -/obj/machinery/portable_atmospherics/canister/proc/healthcheck() - if(destroyed) - return 1 +/obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) + canister_break() + if(disassembled) + new /obj/item/stack/sheet/metal (loc, 10) + else + new /obj/item/stack/sheet/metal (loc, 5) + qdel(src) - if(src.health <= 10) - var/atom/location = src.loc - location.assume_air(air_contents) - air_update_turf() +/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag) + if((stat & BROKEN) || (flags & NODECONSTRUCT)) + return + canister_break() - src.destroyed = 1 - playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3) - src.density = 0 - update_icon() - - if(src.holding) - src.holding.loc = src.loc - src.holding = null - - return 1 +/obj/machinery/portable_atmospherics/canister/attackby(obj/item/I, mob/user, params) + if(user.a_intent != INTENT_HARM && iswelder(I)) + var/obj/item/weldingtool/WT = I + if(stat & BROKEN) + if(!WT.remove_fuel(0, user)) + return + playsound(loc, WT.usesound, 40, 1) + to_chat(user, "You begin cutting [src] apart...") + if(do_after(user, 30, target = src)) + deconstruct(TRUE) + else + to_chat(user, "You cannot slice [src] apart when it isn't broken.") + return TRUE else - return 1 + return ..() + +/obj/machinery/portable_atmospherics/canister/proc/canister_break() + disconnect() + var/datum/gas_mixture/expelled_gas = air_contents.remove(air_contents.total_moles()) + var/turf/T = get_turf(src) + T.assume_air(expelled_gas) + air_update_turf() + + stat |= BROKEN + density = FALSE + playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) + update_icon() + + if(holding) + holding.forceMove(T) + holding = null /obj/machinery/portable_atmospherics/canister/process_atmos() if(destroyed) @@ -326,51 +351,6 @@ update_flag return GM.return_pressure() return 0 -/obj/machinery/portable_atmospherics/canister/blob_act() - src.health -= 200 - healthcheck() - return - -/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - if(Proj.damage) - src.health -= round(Proj.damage / 2) - healthcheck() - ..() - -/obj/machinery/portable_atmospherics/canister/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - user.changeNext_move(CLICK_CD_MELEE) - if(iswelder(W) && src.destroyed) - if(weld(W, user)) - to_chat(user, "You salvage whats left of \the [src]") - var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src.loc) - M.amount = 3 - qdel(src) - return - - if(!istype(W, /obj/item/wrench) && !istype(W, /obj/item/tank) && !istype(W, /obj/item/analyzer) && !istype(W, /obj/item/pda)) - visible_message("[user] hits the [src] with a [W]!") - src.health -= W.force - src.add_fingerprint(user) - healthcheck() - - if(istype(user, /mob/living/silicon/robot) && istype(W, /obj/item/tank/jetpack)) - var/datum/gas_mixture/thejetpack = W:air_contents - var/env_pressure = thejetpack.return_pressure() - var/pressure_delta = min(10*ONE_ATMOSPHERE - env_pressure, (air_contents.return_pressure() - env_pressure)/2) - //Can not have a pressure delta that would cause environment pressure > tank pressure - var/transfer_moles = 0 - if((air_contents.temperature > 0) && (pressure_delta > 0)) - transfer_moles = pressure_delta*thejetpack.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)//Actually transfer the gas - var/datum/gas_mixture/removed = air_contents.remove(transfer_moles) - thejetpack.merge(removed) - to_chat(user, "You pulse-pressurize your jetpack from the tank.") - return - - ..() - - SSnanoui.update_uis(src) // Update all NanoUIs attached to src - /obj/machinery/portable_atmospherics/canister/replace_tank(mob/living/user, close_valve) . = ..() if(.) @@ -385,9 +365,6 @@ update_flag src.add_hiddenprint(user) return src.attack_hand(user) -/obj/machinery/portable_atmospherics/canister/attack_alien(mob/living/carbon/alien/humanoid/user) - return - /obj/machinery/portable_atmospherics/canister/attack_ghost(var/mob/user as mob) return src.ui_interact(user) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index f7e1dc15240..90601f61bfb 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -8,7 +8,8 @@ var/obj/machinery/atmospherics/pipe/target = null anchored = TRUE - armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100) + max_integrity = 150 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 40, "acid" = 0) power_channel = ENVIRON var/frequency = ATMOS_DISTRO_FREQ var/id @@ -136,8 +137,17 @@ "[user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear ratchet.") - new /obj/item/pipe_meter(src.loc) - qdel(src) + deconstruct(TRUE) + +/obj/machinery/meter/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/pipe_meter(loc) + qdel(src) + +/obj/machinery/meter/singularity_pull(S, current_size) + ..() + if(current_size >= STAGE_FIVE) + deconstruct() // TURF METER - REPORTS A TILE'S AIR CONTENTS diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index eabd81c8e04..b7c2dd152da 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -1,7 +1,8 @@ /obj/machinery/portable_atmospherics name = "atmoalter" use_power = NO_POWER_USE - armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100) + max_integrity = 250 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 60, "acid" = 30) var/datum/gas_mixture/air_contents = new var/obj/machinery/atmospherics/unary/portables_connector/connected_port @@ -124,8 +125,7 @@ T.loc = src src.holding = T update_icon() - return - + return else if(istype(W, /obj/item/wrench)) if(connected_port) disconnect() @@ -144,9 +144,15 @@ return else to_chat(user, "Nothing happens.") - return - - else if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) + return + if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) atmosanalyzer_scan(air_contents, user) + return + return ..() - return +/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user) + if(I.force < 10 && !(stat & BROKEN)) + take_damage(0) + else + add_fingerprint(user) + ..() \ No newline at end of file diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index eea0d8c20d7..2079b8cf915 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -206,8 +206,10 @@ to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") return - else if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) + if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) atmosanalyzer_scan(air_contents, user) + return + return ..() /obj/machinery/portable_atmospherics/scrubber/huge/stationary name = "Stationary Air Scrubber" diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index b968a4bd5f8..f91152b47e4 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -12,9 +12,11 @@ var/active = 0 settagwhitelist = list("id_tag", "logic_id_tag") anchored = 1.0 + armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 70) use_power = IDLE_POWER_USE idle_power_usage = 2 active_power_usage = 4 + resistance_flags = LAVA_PROOF | FIRE_PROOF var/range = 7 var/datum/radio_frequency/radio_connection @@ -22,6 +24,9 @@ var/logic_id_tag = "default" //Defines the ID tag to send logic signals to, so you don't have to unlink from doors and stuff var/logic_connect = 0 //Set this to allow the button to send out logic signals when pressed in addition to normal stuff +/obj/machinery/button/indestructible + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + /obj/machinery/driver_button/New(turf/loc, var/w_dir=null) ..() switch(w_dir) @@ -77,7 +82,7 @@ qdel(src) return 1 - return attack_hand(user) + return ..() /obj/machinery/driver_button/multitool_menu(var/mob/user, var/obj/item/multitool/P) return {" @@ -173,9 +178,6 @@ if(user.can_advanced_admin_interact()) return attack_hand(user) -/obj/machinery/ignition_switch/attackby(obj/item/W, mob/user, params) - return attack_hand(user) - /obj/machinery/ignition_switch/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index d59aca72145..7e0508ba24f 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -7,8 +7,9 @@ idle_power_usage = 5 active_power_usage = 10 layer = WALL_OBJ_LAYER - - armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0) + resistance_flags = FIRE_PROOF + damage_deflection = 12 + armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 50) var/datum/wires/camera/wires = null // Wires datum max_integrity = 100 integrity_failure = 50 @@ -117,6 +118,11 @@ view_range = num cameranet.updateVisibility(src, 0) +/obj/machinery/camera/singularity_pull(S, current_size) + if (status && current_size >= STAGE_FIVE) // If the singulo is strong enough to pull anchored objects and the camera is still active, turn off the camera as it gets ripped off the wall. + toggle_cam(null, 0) + ..() + /obj/machinery/camera/attackby(obj/item/I, mob/living/user, params) var/msg = "You attach [I] into the assembly inner circuits." var/msg2 = "The camera already has that upgrade!" @@ -228,28 +234,30 @@ return ..() /obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) - if(damage_flag == "melee" && damage_amount < 12 && !(stat & BROKEN)) - return 0 + if(stat & BROKEN) + return damage_amount . = ..() /obj/machinery/camera/obj_break(damage_flag) - if(status) + if(status && !(flags & NODECONSTRUCT)) triggerCameraAlarm() toggle_cam(null, FALSE) wires.CutAll() /obj/machinery/camera/deconstruct(disassembled = TRUE) - if(disassembled) - if(!assembly) - assembly = new() - assembly.forceMove(loc) - assembly.state = 1 - assembly.setDir(dir) - assembly.update_icon() - assembly = null - else - new /obj/item/camera_assembly(loc) - new /obj/item/stack/cable_coil(loc, 2) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + if(!assembly) + assembly = new() + assembly.forceMove(drop_location()) + assembly.state = 1 + assembly.setDir(dir) + assembly.update_icon() + assembly = null + else + var/obj/item/I = new /obj/item/camera_assembly(loc) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 2) qdel(src) /obj/machinery/camera/update_icon() diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 5f9aa6f12a1..34915f2d01b 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -12,8 +12,6 @@ w_class = WEIGHT_CLASS_SMALL anchored = FALSE materials = list(MAT_METAL=400, MAT_GLASS=250) - max_integrity = 150 - can_be_hit = TRUE // Motion, EMP-Proof, X-Ray var/list/obj/item/possible_upgrades = list(/obj/item/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/analyzer) var/list/upgrades = list() @@ -176,7 +174,8 @@ return FALSE /obj/item/camera_assembly/deconstruct(disassembled = TRUE) - new /obj/item/stack/sheet/metal(loc) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc) qdel(src) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 813120b7c42..e6c957c1779 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -12,6 +12,11 @@ var/obj/item/stock_parts/cell/charging = null var/chargelevel = -1 +/obj/machinery/cell_charger/deconstruct() + if(charging) + charging.forceMove(drop_location()) + return ..() + /obj/machinery/cell_charger/Destroy() QDEL_NULL(charging) return ..() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 26e6b8f4d7f..1c2a0ee56ab 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -538,29 +538,19 @@ ..() /obj/machinery/clonepod/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - A.ex_act(severity) - qdel(src) - return - if(2.0) - if(prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - A.ex_act(severity) - qdel(src) - return - if(3.0) - if(prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - A.ex_act(severity) - qdel(src) - return - else - return + ..() + if(!QDELETED(src) && occupant) + go_out() + +/obj/machinery/clonepod/handle_atom_del(atom/A) + if(A == occupant) + occupant = null + countdown.stop() + +/obj/machinery/clonepod/deconstruct(disassembled = TRUE) + if(occupant) + go_out() + ..() /obj/machinery/clonepod/onSoullinkRevive(mob/living/L) if(occupant && L == clonemind.current) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index aeecfa827a2..4c730963519 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -192,9 +192,9 @@ emergencyShutdown() ..() -/obj/machinery/computer/HolodeckControl/blob_act() +/obj/machinery/computer/HolodeckControl/blob_act(obj/structure/blob/B) emergencyShutdown() - ..() + return ..() /obj/machinery/computer/HolodeckControl/process() for(var/item in holographic_items) // do this first, to make sure people don't take items out when power is down. @@ -347,7 +347,7 @@ // HOLOFLOOR DOES NOT GIVE A FUCK /obj/structure/table/holotable - can_deconstruct = FALSE + flags = NODECONSTRUCT canSmoothWith = list(/obj/structure/table/holotable) /obj/structure/table/holotable/wood @@ -375,7 +375,7 @@ flags = ON_BORDER /obj/structure/rack/holorack - can_deconstruct = FALSE + flags = NODECONSTRUCT /obj/item/holo damtype = STAMINA @@ -505,6 +505,18 @@ else return ..(mover, target, height) +/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) + if(isitem(AM) && !istype(AM,/obj/item/projectile)) + if(prob(50)) + AM.forceMove(get_turf(src)) + visible_message("Swish! [AM] lands in [src].") + return + else + visible_message("[AM] bounces off of [src]'s rim!") + return ..() + else + return ..() + /obj/machinery/readybutton name = "Ready Declaration Device" desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!" diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 38cc0b56866..dfac3250d44 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -4,6 +4,7 @@ name = "AI core" icon = 'icons/mob/AI.dmi' icon_state = "0" + max_integrity = 500 var/state = 0 var/datum/ai_laws/laws = null var/obj/item/circuitboard/circuit = null @@ -15,204 +16,242 @@ QDEL_NULL(brain) return ..() -/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params) - switch(state) - if(0) - if(istype(P, /obj/item/wrench)) - playsound(loc, P.usesound, 50, 1) - if(do_after(user, 20 * P.toolspeed, target = src)) - to_chat(user, "You wrench the frame into place.") - anchored = 1 - state = 1 - if(istype(P, /obj/item/weldingtool)) - var/obj/item/weldingtool/WT = P - if(!WT.isOn()) - to_chat(user, "The welder must be on for this task.") +/obj/structure/AIcore/attackby(obj/item/P, mob/user, params) + if(istype(P, /obj/item/wrench)) + return default_unfasten_wrench(user, P, 20) + if(!anchored) + if(iswelder(P)) + if(state != EMPTY_CORE) + to_chat(user, "The core must be empty to deconstruct it!") + return + var/obj/item/weldingtool/WT = P + if(!WT.isOn()) + to_chat(user, "The welder must be on for this task!") + return + playsound(loc, WT.usesound, 50, 1) + to_chat(user, "You start to deconstruct the frame...") + if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user)) + to_chat(user, "You deconstruct the frame.") + deconstruct(TRUE) + return + else + switch(state) + if(EMPTY_CORE) + if(istype(P, /obj/item/circuitboard/aicore)) + if(!user.drop_item()) + return + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You place the circuit board inside the frame.") + update_icon() + state = CIRCUIT_CORE + P.forceMove(src) + circuit = P return - playsound(loc, WT.usesound, 50, 1) - if(do_after(user, 20 * WT.toolspeed, target = src)) - if(!src || !WT.remove_fuel(0, user)) return - to_chat(user, "You deconstruct the frame.") - new /obj/item/stack/sheet/plasteel(loc, 4) - qdel(src) - if(1) - if(istype(P, /obj/item/wrench)) - playsound(loc, P.usesound, 50, 1) - if(do_after(user, 20 * P.toolspeed, target = src)) - to_chat(user, "You unfasten the frame.") - anchored = 0 - state = 0 - if(istype(P, /obj/item/circuitboard/aicore) && !circuit) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You place the circuit board inside the frame.") - icon_state = "1" - circuit = P - user.drop_item() - P.loc = src - if(istype(P, /obj/item/screwdriver) && circuit) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You screw the circuit board into place.") - state = 2 - icon_state = "2" - if(istype(P, /obj/item/crowbar) && circuit) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You remove the circuit board.") - state = 1 - icon_state = "0" - circuit.loc = loc - circuit = null - if(2) - if(istype(P, /obj/item/screwdriver) && circuit) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You unfasten the circuit board.") - state = 1 - icon_state = "1" - if(istype(P, /obj/item/stack/cable_coil)) - if(P:amount >= 5) + if(CIRCUIT_CORE) + if(isscrewdriver(P)) playsound(loc, P.usesound, 50, 1) - if(do_after(user, 20 * P.toolspeed, target = src)) - P:amount -= 5 - if(!P:amount) qdel(P) - to_chat(user, "You add cables to the frame.") - state = 3 - icon_state = "3" - if(3) - if(istype(P, /obj/item/wirecutters)) - if(brain) - to_chat(user, "Get that brain out of there first") - else + to_chat(user, "You screw the circuit board into place.") + state = SCREWED_CORE + update_icon() + return + if(iscrowbar(P)) playsound(loc, P.usesound, 50, 1) - to_chat(user, "You remove the cables.") - state = 2 - icon_state = "2" - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) - A.amount = 5 + to_chat(user, "You remove the circuit board.") + state = EMPTY_CORE + update_icon() + circuit.forceMove(loc) + circuit = null + return + if(SCREWED_CORE) + if(iswirecutter(P) && circuit) + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You unfasten the circuit board.") + state = CIRCUIT_CORE + update_icon() + return + if(istype(P, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/C = P + if(C.get_amount() >= 5) + playsound(loc, 'sound/items/deconstruct.ogg', 50, 1) + to_chat(user, "You start to add cables to the frame...") + if(do_after(user, 20, target = src) && state == SCREWED_CORE && C.use(5)) + to_chat(user, "You add cables to the frame.") + state = CABLED_CORE + update_icon() + else + to_chat(user, "You need five lengths of cable to wire the AI core!") + return + if(CABLED_CORE) + if(iswirecutter(P)) + if(brain) + to_chat(user, "Get that [brain.name] out of there first!") + else + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You remove the cables.") + state = SCREWED_CORE + update_icon() + var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) + A.amount = 5 + return - if(istype(P, /obj/item/stack/sheet/rglass)) - if(P:amount >= 2) - playsound(loc, P.usesound, 50, 1) - if(do_after(user, 20 * P.toolspeed, target = src)) - if(P) - P:amount -= 2 - if(!P:amount) qdel(P) + if(istype(P, /obj/item/stack/sheet/rglass)) + var/obj/item/stack/sheet/rglass/G = P + if(G.get_amount() >= 2) + playsound(loc, 'sound/items/deconstruct.ogg', 50, 1) + to_chat(user, "You start to put in the glass panel...") + if(do_after(user, 20, target = src) && state == CABLED_CORE && G.use(2)) to_chat(user, "You put in the glass panel.") - state = 4 - icon_state = "4" - - if(istype(P, /obj/item/aiModule/purge)) - laws.clear_inherent_laws() - to_chat(usr, "Law module applied.") - return - - if(istype(P, /obj/item/aiModule/freeform)) - var/obj/item/aiModule/freeform/M = P - laws.add_inherent_law(M.newFreeFormLaw) - to_chat(usr, "Added a freeform law.") - return - - if(istype(P, /obj/item/aiModule)) - var/obj/item/aiModule/M = P - if(!M.laws) - to_chat(usr, "This AI module can not be applied directly to AI cores.") - return - laws = M.laws - - if(istype(P, /obj/item/mmi)) - if(!P:brainmob) - to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.") - return - if(P:brainmob.stat == 2) - to_chat(user, "Sticking a dead [P] into the frame would sort of defeat the purpose.") + state = GLASS_CORE + update_icon() + else + to_chat(user, "You need two sheets of reinforced glass to insert them into the AI core!") return - if(jobban_isbanned(P:brainmob, "AI") || jobban_isbanned(P:brainmob,"nonhumandept")) - to_chat(user, "This [P] does not seem to fit.") + if(istype(P, /obj/item/aiModule/purge)) + laws.clear_inherent_laws() + to_chat(usr, "Law module applied.") return - if(istype(P, /obj/item/mmi/syndie)) - to_chat(user, "This MMI does not seem to fit!") + if(istype(P, /obj/item/aiModule/freeform)) + var/obj/item/aiModule/freeform/M = P + laws.add_inherent_law(M.newFreeFormLaw) + to_chat(usr, "Added a freeform law.") return - if(P:brainmob.mind) - SSticker.mode.remove_cultist(P:brainmob.mind, 1) - SSticker.mode.remove_revolutionary(P:brainmob.mind, 1) + if(istype(P, /obj/item/aiModule)) + var/obj/item/aiModule/M = P + if(!M.laws) + to_chat(usr, "This AI module can not be applied directly to AI cores.") + return + laws = M.laws - user.drop_item() - P.loc = src - brain = P - to_chat(usr, "Added [P].") + if(istype(P, /obj/item/mmi) && !brain) + var/obj/item/mmi/M = P + if(!M.brainmob) + to_chat(user, "Sticking an empty [P] into the frame would sort of defeat the purpose.") + return + if(M.brainmob.stat == DEAD) + to_chat(user, "Sticking a dead [P] into the frame would sort of defeat the purpose.") + return + + if(!M.brainmob.client) + to_chat(user, "Sticking an inactive [M.name] into the frame would sort of defeat the purpose.") + return + + if(jobban_isbanned(M.brainmob, "AI") || jobban_isbanned(M.brainmob, "nonhumandept")) + to_chat(user, "This [P] does not seem to fit.") + return + + if(!M.brainmob.mind) + to_chat(user, "This [M.name] is mindless!") + return + + if(istype(P, /obj/item/mmi/syndie)) + to_chat(user, "This MMI does not seem to fit!") + return + + if(!user.drop_item()) + return + + M.forceMove(src) + brain = M + to_chat(user, "You add [M.name] to the frame.") + update_icon() + return + + if(iscrowbar(P) && brain) + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You remove the brain.") + brain.forceMove(loc) + brain = null + update_icon() + return + + if(GLASS_CORE) + if(istype(P, /obj/item/crowbar)) + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You remove the glass panel.") + state = CABLED_CORE + update_icon() + new /obj/item/stack/sheet/rglass(loc, 2) + return + + if(isscrewdriver(P)) + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You connect the monitor.") + if(!brain) + var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" + var/obj/structure/AIcore/deactivated/D = new(loc) + if(open_for_latejoin) + empty_playable_ai_cores += D + else + if(brain.brainmob.mind) + SSticker.mode.remove_cultist(brain.brainmob.mind, 1) + SSticker.mode.remove_revolutionary(brain.brainmob.mind, 1) + + var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain) + if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created + A.rename_self("AI", 1) + feedback_inc("cyborg_ais_created",1) + qdel(src) + + if(AI_READY_CORE) + if(istype(P, /obj/item/aicard)) + P.transfer_ai("INACTIVE", "AICARD", src, user) + return + + if(isscrewdriver(P)) + playsound(loc, P.usesound, 50, 1) + to_chat(user, "You disconnect the monitor.") + state = GLASS_CORE + update_icon() + return + return ..() + +/obj/structure/AIcore/update_icon() + switch(state) + if(EMPTY_CORE) + icon_state = "0" + if(CIRCUIT_CORE) + icon_state = "1" + if(SCREWED_CORE) + icon_state = "2" + if(CABLED_CORE) + if(brain) icon_state = "3b" - - if(istype(P, /obj/item/crowbar) && brain) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You remove the brain.") - brain.loc = loc - brain = null + else icon_state = "3" + if(GLASS_CORE) + icon_state = "4" + if(AI_READY_CORE) + icon_state = "ai-empty" - if(4) - if(istype(P, /obj/item/crowbar)) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You remove the glass panel.") - state = 3 - if(brain) - icon_state = "3b" - else - icon_state = "3" - new /obj/item/stack/sheet/rglass( loc, 2 ) - return - - if(istype(P, /obj/item/screwdriver)) - playsound(loc, P.usesound, 50, 1) - to_chat(user, "You connect the monitor.") - if(!brain) - var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes" - var/obj/structure/AIcore/deactivated/D = new(loc) - if(open_for_latejoin) - empty_playable_ai_cores += D - else - var/mob/living/silicon/ai/A = new /mob/living/silicon/ai ( loc, laws, brain ) - if(A) //if there's no brain, the mob is deleted and a structure/AIcore is created - A.rename_self("AI", 1) - feedback_inc("cyborg_ais_created",1) - qdel(src) +/obj/structure/AIcore/deconstruct(disassembled = TRUE) + if(state == GLASS_CORE) + new /obj/item/stack/sheet/rglass(loc, 2) + if(state >= CABLED_CORE) + new /obj/item/stack/cable_coil(loc, 5) + if(circuit) + circuit.forceMove(loc) + circuit = null + new /obj/item/stack/sheet/plasteel(loc, 4) + qdel(src) /obj/structure/AIcore/deactivated - name = "Inactive AI" - icon = 'icons/mob/AI.dmi' + name = "inactive AI" icon_state = "ai-empty" - anchored = 1 - state = 20//So it doesn't interact based on the above. Not really necessary. + anchored = TRUE + state = AI_READY_CORE + +/obj/structure/AIcore/deactivated/New() + ..() + circuit = new(src) /obj/structure/AIcore/deactivated/Destroy() if(src in empty_playable_ai_cores) empty_playable_ai_cores -= src return ..() -/obj/structure/AIcore/deactivated/attackby(var/obj/item/W, var/mob/user, params) - if(istype(W, /obj/item/aicard))//Is it? - var/obj/item/aicard/card = W - card.transfer_ai("INACTIVE","AICARD",src,user) - else if(istype(W, /obj/item/wrench)) - if(anchored) - user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") - if(!do_after(user, 40 * W.toolspeed, target = src)) - user.visible_message("\The [user] decides not to unbolt \the [src].") - return - user.visible_message("\The [user] finishes unfastening \the [src]!") - anchored = 0 - return - else - user.visible_message("\The [user] starts to bolt \the [src] to the plating...") - if(!do_after(user, 40 * W.toolspeed, target = src)) - user.visible_message("\The [user] decides not to bolt \the [src].") - return - user.visible_message("\The [user] finishes fastening down \the [src]!") - anchored = 1 - return - else - return ..() - /client/proc/empty_ai_core_toggle_latejoin() set name = "Toggle AI Core Latejoin" set category = "Admin" @@ -246,7 +285,7 @@ That prevents a few funky behaviors. //The type of interaction, the player performing the operation, the AI itself, and the card object, if any. -atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/aicard/card) +atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card) if(istype(card)) if(card.flush) to_chat(user, "ERROR: AI flush is in progress, cannot execute transfer protocol.") @@ -254,8 +293,8 @@ atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/A return 1 -/obj/structure/AIcore/deactivated/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/aicard/card) - if(!..()) +/obj/structure/AIcore/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card) + if(state != AI_READY_CORE || !..()) return //Transferring a carded AI to a core. if(interaction == AI_TRANS_FROM_CARD) @@ -266,4 +305,4 @@ atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/A to_chat(user, "Transfer successful: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.") qdel(src) else //If for some reason you use an empty card on an empty AI terminal. - to_chat(user, "There is no AI loaded on this terminal!") + to_chat(user, "There is no AI loaded on this terminal!") \ No newline at end of file diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index e6a57f4a875..e9cf036d3ca 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -19,7 +19,7 @@ else to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep!.") else - ..() + return ..() /obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob) ui_interact(user) @@ -69,6 +69,7 @@ if(occupant.health >= 0 && occupant.stat == DEAD) occupant.update_revive() occupant.lying = 0 + update_icon() sleep(10) active = 0 add_fingerprint(usr) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index a56d5c40236..28f847d81eb 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -8,18 +8,17 @@ light_color = "#00FF00" var/prize = /obj/item/stack/tickets -/obj/machinery/computer/arcade/power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - set_light(2) - else - set_light(0) +/obj/machinery/computer/arcade/proc/Reset() + return /obj/machinery/computer/arcade/New() ..() - var/choice = pick(subtypesof(/obj/machinery/computer/arcade)) - new choice(loc) - qdel(src) + if(!circuit) + var/choice = pick(subtypesof(/obj/machinery/computer/arcade)) + new choice(loc) + qdel(src) + return + Reset() /obj/machinery/computer/arcade/proc/prizevend(var/score) @@ -65,7 +64,7 @@ var/blocked = 0 //Player cannot attack/heal while set var/turtle = 0 -/obj/machinery/computer/arcade/battle/New() +/obj/machinery/computer/arcade/battle/Reset() var/name_action var/name_part1 var/name_part2 @@ -166,7 +165,7 @@ turtle = 0 if(emagged) - New() + Reset() emagged = 0 add_fingerprint(usr) @@ -186,7 +185,7 @@ new /obj/item/clothing/head/collectable/petehat(get_turf(src)) message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.") - New() + Reset() emagged = 0 else feedback_inc("arcade_win_normal") @@ -311,7 +310,7 @@ var/spaceport_freebie = 0 var/last_spaceport_action = "" -/obj/machinery/computer/arcade/orion_trail/New() +/obj/machinery/computer/arcade/orion_trail/Reset() // Sets up the main trail stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") stopblurbs = list( diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index c0384e63b94..9e8bc08f9b2 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -8,10 +8,10 @@ var/state = 0 var/obj/item/circuitboard/circuit = null var/base_mineral = /obj/item/stack/sheet/metal -// weight = 1.0E8 /obj/structure/computerframe/deconstruct(disassembled = TRUE) - drop_computer_parts() + if(!(flags & NODECONSTRUCT)) + drop_computer_parts() return ..() // will qdel the frame /obj/structure/computerframe/obj_break(damage_flag) @@ -406,7 +406,8 @@ return else to_chat(user, "DERP! BUG! Report this (And what you were doing to cause it) to Agouri") - return + return + return ..() /obj/item/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I,/obj/item/card/id)||istype(I, /obj/item/pda)) @@ -440,7 +441,8 @@ to_chat(user, "Access protocols set to [console_choice].") else to_chat(user, "Access Denied") - return + return + return ..() /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob, params) switch(state) @@ -451,6 +453,7 @@ to_chat(user, "You wrench the frame into place.") anchored = 1 state = 1 + return if(istype(P, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = P if(!WT.remove_fuel(0, user)) @@ -461,6 +464,7 @@ if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") deconstruct(TRUE) + return if(1) if(istype(P, /obj/item/wrench)) playsound(loc, P.usesound, 50, 1) @@ -468,6 +472,7 @@ to_chat(user, "You unfasten the frame.") anchored = 0 state = 0 + return if(istype(P, /obj/item/circuitboard) && !circuit) var/obj/item/circuitboard/B = P if(B.board_type == "computer") @@ -479,11 +484,13 @@ P.loc = src else to_chat(user, "This frame does not accept circuit boards of this type!") + return if(istype(P, /obj/item/screwdriver) && circuit) playsound(loc, P.usesound, 50, 1) to_chat(user, "You screw the circuit board into place.") state = 2 icon_state = "2" + return if(istype(P, /obj/item/crowbar) && circuit) playsound(loc, P.usesound, 50, 1) to_chat(user, "You remove the circuit board.") @@ -491,12 +498,14 @@ icon_state = "0" circuit.loc = loc circuit = null + return if(2) if(istype(P, /obj/item/screwdriver) && circuit) playsound(loc, P.usesound, 50, 1) to_chat(user, "You unfasten the circuit board.") state = 1 icon_state = "1" + return if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if(C.amount >= 5) @@ -512,7 +521,7 @@ return else to_chat(user, "You need five lengths of cable to wire the frame.") - return + return if(3) if(istype(P, /obj/item/wirecutters)) playsound(loc, P.usesound, 50, 1) @@ -521,7 +530,7 @@ icon_state = "2" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc ) A.amount = 5 - + return if(istype(P, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = P if(G.amount >= 2) @@ -537,7 +546,7 @@ return else to_chat(user, "You need two sheets of glass for this.") - return + return if(4) if(istype(P, /obj/item/crowbar)) playsound(loc, P.usesound, 50, 1) @@ -545,6 +554,7 @@ state = 3 icon_state = "3" new /obj/item/stack/sheet/glass(loc, 2) + return if(istype(P, /obj/item/screwdriver)) playsound(loc, P.usesound, 50, 1) to_chat(user, "You connect the monitor.") @@ -558,6 +568,9 @@ var/obj/item/circuitboard/supplycomp/C = circuit SC.can_order_contraband = C.contraband_enabled qdel(src) + return + if(user.a_intent == INTENT_HARM) + return ..() @@ -585,6 +598,7 @@ if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") deconstruct(TRUE) + return if(1) if(istype(P, /obj/item/wrench)) playsound(loc, P.usesound, 50, 1) @@ -615,6 +629,7 @@ icon_state = "0" circuit.loc = loc circuit = null + return if(2) if(istype(P, /obj/item/screwdriver) && circuit) playsound(loc, P.usesound, 50, 1) @@ -636,7 +651,7 @@ return else to_chat(user, "You need five lengths of cable to wire the frame.") - return + return if(3) if(istype(P, /obj/item/wirecutters)) playsound(loc, P.usesound, 50, 1) @@ -661,7 +676,7 @@ return else to_chat(user, "You need two sheets of glass for this.") - return + return if(4) if(istype(P, /obj/item/crowbar)) playsound(loc, P.usesound, 50, 1) @@ -678,3 +693,5 @@ if(circuit.records) B:records = circuit.records if(circuit.frequency) B:frequency = circuit.frequency qdel(src) + return + return ..() \ No newline at end of file diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 42c371fc4ee..45f390082a1 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -79,14 +79,6 @@ ui_interact(user) -/obj/machinery/computer/security/attackby(obj/item/I, user as mob, params) - if(isscrewdriver(I)) - ..() - else if(I.GetAccess()) // If hit by something with access. - attack_hand(user) - else - ..() - /obj/machinery/computer/security/telescreen/attackby(obj/item/I, mob/user, params) if(ismultitool(I)) var/direction = input(user, "Which direction?", "Select direction!") as null|anything in list("North", "East", "South", "West", "Centre") @@ -104,7 +96,7 @@ if("West") pixel_x = -32 else - ..() + return ..() /obj/machinery/computer/security/emag_act(user as mob) if(!emagged) @@ -116,7 +108,7 @@ /obj/machinery/computer/security/proc/get_user_access(mob/user) var/list/access = list() - + if(emagged) access = get_all_accesses() // Assume captain level access when emagged else if(ishuman(user)) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index acdbc1110f3..539d4dfc0ed 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -36,10 +36,10 @@ if(scanner.occupant && can_autoprocess()) scan_mob(scanner.occupant) - + if(!LAZYLEN(records)) return - + for(var/obj/machinery/clonepod/pod in pods) if(!(pod.occupant || pod.mess) && (pod.efficiency > 5)) for(var/datum/dna2/record/R in records) @@ -103,8 +103,7 @@ P.name = "[initial(P.name)] #[pods.len]" to_chat(user, "You connect [P] to [src].") else - ..() - return + return ..() /obj/machinery/computer/cloning/attack_ai(mob/user as mob) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 67f1527b199..438c8f92246 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -7,6 +7,9 @@ use_power = IDLE_POWER_USE idle_power_usage = 300 active_power_usage = 300 + max_integrity = 200 + integrity_failure = 100 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 20) var/obj/item/circuitboard/circuit = null //if circuit==null, computer can't disassembly var/processing = 0 var/icon_keyboard = "generic_key" @@ -29,44 +32,6 @@ return 0 return 1 -/obj/machinery/computer/emp_act(severity) - if(prob(20/severity)) set_broken() - ..() - - -/obj/machinery/computer/ex_act(severity) - if(!(resistance_flags & INDESTRUCTIBLE)) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(25)) - qdel(src) - return - if(prob(50)) - for(var/x in verbs) - verbs -= x - set_broken() - if(3.0) - if(prob(25)) - for(var/x in verbs) - verbs -= x - set_broken() - -/obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj) - if(prob(Proj.damage)) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - set_broken() - ..() - -/obj/machinery/computer/blob_act() - if(prob(75)) - for(var/x in verbs) - verbs -= x - set_broken() - density = 0 - /obj/machinery/computer/extinguish_light() set_light(0) visible_message("[src] grows dim, its screen barely readable.") @@ -95,6 +60,61 @@ else set_light(light_range_on, light_power_on) +/obj/machinery/computer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(stat & BROKEN) + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE) + else + playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) + +/obj/machinery/computer/obj_break(damage_flag) + if(circuit && !(flags & NODECONSTRUCT)) //no circuit, no breaking + if(!(stat & BROKEN)) + playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE) + stat |= BROKEN + update_icon() + set_light(0) + +/obj/machinery/computer/emp_act(severity) + ..() + switch(severity) + if(1) + if(prob(50)) + obj_break("energy") + if(2) + if(prob(10)) + obj_break("energy") + +/obj/machinery/computer/deconstruct(disassembled = TRUE, mob/user) + on_deconstruction() + if(!(flags & NODECONSTRUCT)) + if(circuit) //no circuit, no computer frame + var/obj/structure/computerframe/A = new /obj/structure/computerframe(loc) + var/obj/item/circuitboard/M = new circuit(A) + A.setDir(dir) + A.circuit = M + A.anchored = TRUE + if(stat & BROKEN) + if(user) + to_chat(user, "The broken glass falls out.") + else + playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE) + new /obj/item/shard(drop_location()) + new /obj/item/shard(drop_location()) + A.state = 3 + A.icon_state = "3" + else + if(user) + to_chat(user, "You disconnect the monitor.") + A.state = 4 + A.icon_state = "4" + for(var/obj/C in src) + C.forceMove(loc) + qdel(src) + /obj/machinery/computer/proc/set_broken() if(!(resistance_flags & INDESTRUCTIBLE)) stat |= BROKEN @@ -113,46 +133,10 @@ if(istype(user, /mob/dead/observer)) return 0 return ..() -/obj/machinery/computer/attackby(obj/I, mob/user, params) - if(istype(I, /obj/item/screwdriver) && circuit && !(resistance_flags & INDESTRUCTIBLE)) - var/obj/item/screwdriver/S = I - playsound(src.loc, S.usesound, 50, 1) - if(do_after(user, 20 * S.toolspeed, target = src)) - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/circuitboard/M = new circuit( A ) - A.circuit = M - A.anchored = 1 - for(var/obj/C in src) - C.loc = src.loc - if(src.stat & BROKEN) - to_chat(user, "The broken glass falls out.") - new /obj/item/shard(loc) - A.state = 3 - A.icon_state = "3" - else - to_chat(user, "You disconnect the monitor.") - A.state = 4 - A.icon_state = "4" - qdel(src) - else - attack_hand(user) - return - -/obj/machinery/computer/attack_alien(mob/living/user) - if(isalien(user) && user.a_intent == INTENT_HELP) - var/mob/living/carbon/alien/humanoid/xeno = user - if(xeno.has_fine_manipulation) - return attack_hand(user) - - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(circuit) - if(prob(80)) - user.visible_message("[user.name] smashes the [src.name] with its claws.",\ - "You smash the [src.name] with your claws.",\ - "You hear a smashing sound.") - set_broken() - return - user.visible_message("[user.name] smashes against the [src.name] with its claws.",\ - "You smash against the [src.name] with your claws.",\ - "You hear a clicking sound.") +/obj/machinery/computer/attackby(obj/item/I, mob/user, params) + if(isscrewdriver(I) && circuit && !(flags & NODECONSTRUCT)) + playsound(loc, I.usesound, 50, TRUE) + if(do_after(user, 20 * I.toolspeed, target = src)) + deconstruct(TRUE, user) + return + return ..() \ No newline at end of file diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm index 33b809bd4ac..842a65b5f50 100644 --- a/code/game/machinery/computer/honkputer.dm +++ b/code/game/machinery/computer/honkputer.dm @@ -115,5 +115,4 @@ A.icon_state = "4" qdel(src) else - src.attack_hand(user) - return + return ..() \ No newline at end of file diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index dbe766a2c44..35a5c505b5b 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -34,7 +34,8 @@ O.forceMove(src) scan = O ui_interact(user) - ..() + return + return ..() /obj/machinery/computer/med_data/attack_hand(mob/user) if(..()) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index d6e000d660d..fef40c9f93a 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -42,9 +42,7 @@ //Stops people from just unscrewing the monitor and putting it back to get the console working again. to_chat(user, "It is too hot to mess with!") return - - ..() - return + return ..() /obj/machinery/computer/message_monitor/emag_act(user as mob) // Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online. diff --git a/code/game/machinery/computer/salvage_ship.dm b/code/game/machinery/computer/salvage_ship.dm index 93583eda0e8..ba7e7200c49 100644 --- a/code/game/machinery/computer/salvage_ship.dm +++ b/code/game/machinery/computer/salvage_ship.dm @@ -36,10 +36,6 @@ moving = 0 return 1 - -/obj/machinery/computer/salvage_ship/attackby(obj/item/I as obj, mob/user as mob, params) - return attack_hand(user) - /obj/machinery/computer/salvage_ship/attack_ai(mob/user as mob) src.add_hiddenprint(user) return attack_hand(user) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index bed10bb0923..ce872e598f4 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -35,7 +35,8 @@ O.forceMove(src) scan = O ui_interact(user) - ..() + return + return ..() //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/secure_data/attack_hand(mob/user) diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 5647ae73766..125b5294860 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -33,7 +33,8 @@ O.forceMove(src) scan = O ui_interact(user) - ..() + return + return ..() //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/skills/attack_hand(mob/user) diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index 4d53906297b..0602757944f 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -254,7 +254,7 @@ var/specops_shuttle_timeleft = 0 if(istype(I,/obj/item/card/emag)) to_chat(user, "The electronic systems in this console are far too advanced for your primitive hacking peripherals.") else - return attack_hand(user) + return ..() /obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob) if(!allowed(user)) diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm index 9aaf1b39517..92ed453e71e 100644 --- a/code/game/machinery/computer/syndicate_specops_shuttle.dm +++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm @@ -177,9 +177,6 @@ var/syndicate_elite_shuttle_timeleft = 0 if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0 else return 1 -/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob, params) - return attack_hand(user) - /obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob) to_chat(user, "Access Denied.") return 1 @@ -188,7 +185,7 @@ var/syndicate_elite_shuttle_timeleft = 0 if(istype(I,/obj/item/card/emag)) to_chat(user, "The electronic systems in this console are far too advanced for your primitive hacking peripherals.") else - return attack_hand(user) + return ..() /obj/machinery/computer/syndicate_elite_shuttle/attack_hand(var/mob/user as mob) if(!allowed(user)) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index e1f595f4dfd..2d082afb9c2 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -5,7 +5,7 @@ density = 1 anchored = 1 use_power = NO_POWER_USE - max_integrity = 100 + max_integrity = 250 var/obj/item/circuitboard/circuit = null var/list/components = null var/list/req_components = null @@ -17,13 +17,14 @@ var/pattern_idx=0 /obj/machinery/constructable_frame/deconstruct(disassembled = TRUE) - new /obj/item/stack/sheet/metal(src.loc, 5) - if(state >= 3) - var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil(loc) - A.amount = 5 - if(circuit) - circuit.forceMove(loc) - circuit = null + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 5) + if(state >= 2) + var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil(loc) + A.amount = 5 + if(circuit) + circuit.forceMove(loc) + circuit = null return ..() /obj/machinery/constructable_frame/obj_break(damage_flag) @@ -87,23 +88,13 @@ return else to_chat(user, "You need five lengths of cable to wire the frame.") - return - else if(istype(P, /obj/item/stack/sheet/glass)) - var/obj/item/stack/sheet/glass/G = P - if(G.amount < 5) - to_chat(user, "You do not have enough glass to build a display case.") - return - G.use(5) - to_chat(user, "You add the glass to the frame.") - playsound(get_turf(src), G.usesound, 50, 1) - new /obj/structure/displaycase_frame(src.loc) - qdel(src) return if(istype(P, /obj/item/wrench)) playsound(src.loc, P.usesound, 75, 1) to_chat(user, "You dismantle the frame.") deconstruct(TRUE) + return if(2) if(istype(P, /obj/item/circuitboard)) var/obj/item/circuitboard/B = P @@ -121,6 +112,7 @@ update_req_desc() else to_chat(user, "This frame does not accept circuit boards of this type!") + return if(istype(P, /obj/item/wirecutters)) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") @@ -128,7 +120,7 @@ icon_state = "box_0" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil(src.loc,5) A.amount = 5 - + return if(3) if(istype(P, /obj/item/crowbar)) playsound(src.loc, P.usesound, 50, 1) @@ -145,6 +137,7 @@ req_components = null components = null icon_state = "box_1" + return if(istype(P, /obj/item/screwdriver)) var/component_check = 1 @@ -165,7 +158,7 @@ circuit.loc = null new_machine.RefreshParts() qdel(src) - return + return if(istype(P, /obj/item/storage/part_replacer) && P.contents.len && get_req_components_amt()) var/obj/item/storage/part_replacer/replacer = P @@ -218,6 +211,10 @@ if(!success) to_chat(user, "You cannot add that to the machine!") return 0 + return + if(user.a_intent == INTENT_HARM) + return ..() + //Machine Frame Circuit Boards /*Common Parts: Parts List: Ignitor, Timer, Infra-red laser, Infra-red sensor, t_scanner, Capacitor, Valve, sensor unit, @@ -339,6 +336,8 @@ to destroy them and players will be able to make replacements. build_path = /obj/machinery/atmospherics/unary/cold_sink/freezer name = "circuit board (Freezer)" to_chat(user, "You set the board to cooling.") + return + return ..() /obj/item/circuitboard/recharger name = "circuit board (Recharger)" @@ -525,6 +524,8 @@ to destroy them and players will be able to make replacements. /obj/item/circuitboard/smartfridge/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver)) set_type(null, user) + return + return ..() /obj/item/circuitboard/smartfridge/proc/set_type(typepath, mob/user) var/new_name = "" @@ -814,6 +815,8 @@ to destroy them and players will be able to make replacements. if(L.locked_location) target = get_turf(L.locked_location) to_chat(user, "You upload the data from [L]") + return + return ..() /obj/item/circuitboard/telesci_pad name = "Circuit board (Telepad)" @@ -1067,6 +1070,8 @@ to destroy them and players will be able to make replacements. /obj/item/circuitboard/logic_gate/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver)) set_type(null, user) + return + return ..() /obj/item/circuitboard/logic_gate/proc/set_type(typepath, mob/user) var/new_name = "Logic Base" diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 0546b0e9462..3106e027f47 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -8,7 +8,8 @@ layer = ABOVE_WINDOW_LAYER plane = GAME_PLANE interact_offline = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100) + max_integrity = 350 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 30, "acid" = 30) var/on = 0 var/temperature_archived var/mob/living/carbon/occupant = null @@ -73,15 +74,31 @@ break /obj/machinery/atmospherics/unary/cryo_cell/Destroy() - var/turf/T = get_turf(src) - if(istype(T)) - T.contents += contents - var/obj/item/reagent_containers/glass/B = beaker - if(beaker) - B.forceMove(get_step(T, SOUTH)) //Beaker is carefully ejected from the wreckage of the cryotube - beaker = null + QDEL_NULL(beaker) return ..() +/obj/machinery/atmospherics/unary/cryo_cell/ex_act(severity) + if(occupant) + occupant.ex_act(severity) + if(beaker) + beaker.ex_act(severity) + ..() + +/obj/machinery/atmospherics/unary/cryo_cell/handle_atom_del(atom/A) + ..() + if(A == beaker) + beaker = null + updateUsrDialog() + if(A == occupant) + occupant = null + updateUsrDialog() + update_icon() + +/obj/machinery/atmospherics/unary/cryo_cell/on_deconstruction() + if(beaker) + beaker.forceMove(drop_location()) + beaker = null + /obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/living/user as mob) if(O.loc == user) //no you can't pull things out of your ass return @@ -283,6 +300,7 @@ beaker = B add_attack_logs(user, null, "Added [B] containing [B.reagents.log_list()] to a cryo cell at [COORD(src)]") user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!") + return if(istype(G, /obj/item/screwdriver)) @@ -295,7 +313,8 @@ if(exchange_parts(user, G)) return - default_deconstruction_crowbar(G) + if(default_deconstruction_crowbar(G)) + return if(istype(G, /obj/item/grab)) var/obj/item/grab/GG = G @@ -310,7 +329,8 @@ var/mob/M = GG.affecting if(put_mob(M)) qdel(GG) - return + return + return ..() /obj/machinery/atmospherics/unary/cryo_cell/update_icon() handle_update_icon() diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9d6be29c84f..ae8b3f5829c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -18,6 +18,8 @@ density = 0 interact_offline = 1 req_one_access = list(access_heads, access_armory) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with. + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + flags = NODECONSTRUCT var/mode = null //Used for logging people entering cryosleep and important items they are carrying. @@ -193,7 +195,8 @@ icon_state = "body_scanner_0" density = 1 anchored = 1 - + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + flags = NODECONSTRUCT var/base_icon_state = "body_scanner_0" var/occupied_icon_state = "body_scanner_1" var/on_store_message = "has entered long-term storage." diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index a0c0d2234af..211f878231f 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -67,7 +67,7 @@ to_chat(user,"You unsecure and disconnect [src].") anchored = FALSE playsound(src, 'sound/items/deconstruct.ogg', 50, 1) - return + return return ..() /obj/machinery/disco/update_icon() diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 4d8b3280599..60d9953e980 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -19,46 +19,12 @@ var/drop_amount = 3 var/stacktype = /obj/item/stack/sheet/metal -/obj/structure/barricade/blob_act(obj/structure/blob/B) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - take_damage(400, BRUTE, "melee", 0, get_dir(src, B)) - -/obj/structure/barricade/ex_act(severity) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - if(resistance_flags & INDESTRUCTIBLE) - return - switch(severity) - if(1) - obj_integrity = 0 - qdel(src) - if(2) - take_damage(rand(100, 250), BRUTE, "bomb", 0) - if(3) - take_damage(rand(10, 90), BRUTE, "bomb", 0) - -/obj/structure/barricade/mech_melee_attack(obj/mecha/M) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - M.do_attack_animation(src) - var/play_soundeffect = 0 - var/mech_damtype = M.damtype - if(M.selected) - mech_damtype = M.selected.damtype - play_soundeffect = 1 - else - switch(M.damtype) - if(BRUTE) - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) - if(BURN) - playsound(src, 'sound/items/welder.ogg', 50, 1) - if(TOX) - playsound(src, 'sound/effects/spray2.ogg', 50, 1) - return 0 - else - return 0 - visible_message("[M.name] has hit [src].") - return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs. - /obj/structure/barricade/deconstruct(disassembled = TRUE) - make_debris() + if(!(flags & NODECONSTRUCT)) + make_debris() qdel(src) + /obj/structure/barricade/proc/make_debris() if(stacktype) new stacktype(get_turf(src), drop_amount) @@ -101,8 +67,6 @@ icon_state = "woodenbarricade" bar_material = WOOD stacktype = /obj/item/stack/sheet/wood - burn_state = FLAMMABLE - burntime = 25 /obj/structure/barricade/wooden/attackby(obj/item/I, mob/user) if(istype(I,/obj/item/stack/sheet/wood)) @@ -155,7 +119,7 @@ anchored = FALSE max_integrity = 180 proj_pass_rate = 20 - armor = list(melee = 10, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100) + armor = list(melee = 10, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 0) stacktype = null var/deploy_time = 40 var/deploy_message = TRUE diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 17d734d7d14..f6bbbb3bc02 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -37,23 +37,9 @@ to_chat(user, "Error, no route to host.") /obj/machinery/door_control/attackby(obj/item/W, mob/user as mob, params) - /* For later implementation - if(istype(W, /obj/item/screwdriver)) - { - if(wiresexposed) - icon_state = "doorctrl0" - wiresexposed = 0 - - else - icon_state = "doorctrl-open" - wiresexposed = 1 - - return - } - */ if(istype(W, /obj/item/detective_scanner)) return - return attack_hand(user) + return ..() /obj/machinery/door_control/emag_act(user as mob) if(!emagged) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 5b4742de317..610bbb73b06 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -648,6 +648,11 @@ About the new airlock wires panel: do_sparks(5, 1, src) return ..() +/obj/machinery/door/airlock/attack_animal(mob/user) + . = ..() + if(isElectrified()) + shock(user, 100) + /obj/machinery/door/airlock/attack_hand(mob/user) if(shock_user(user, 100)) return @@ -1230,11 +1235,11 @@ About the new airlock wires panel: var/time_to_open = 5 if(arePowerSystemsOn()) time_to_open = 50 //Powered airlocks take longer to open, and are loud. - playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, 1) + playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE) - if(do_after(user, time_to_open, target = src)) - if(density && !open(1)) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!) + if(do_after(user, time_to_open, TRUE, src)) + if(density && !open(2)) //The airlock is still closed, but something prevented it opening. (Another player noticed and bolted/welded the airlock in time!) to_chat(user, "Despite your efforts, [src] managed to resist your attempts to open it!") /obj/machinery/door/airlock/power_change() //putting this is obj/machinery/door itself makes non-airlock doors turn invisible for some reason @@ -1273,7 +1278,7 @@ About the new airlock wires panel: safe = TRUE /obj/machinery/door/airlock/obj_break(damage_flag) - if(!(flags & BROKEN) && can_deconstruct) + if(!(flags & BROKEN) && !(flags & NODECONSTRUCT)) stat |= BROKEN if(!panel_open) panel_open = TRUE @@ -1286,7 +1291,7 @@ About the new airlock wires panel: update_icon() /obj/machinery/door/airlock/deconstruct(disassembled = TRUE, mob/user) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) var/obj/structure/door_assembly/DA if(assemblytype) DA = new assemblytype(loc) diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 3b12c6f554a..8113a9caace 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -150,6 +150,7 @@ icon_state = "airlock_sensor_off" name = "airlock sensor" anchored = 1 + resistance_flags = FIRE_PROOF power_channel = ENVIRON var/id_tag @@ -253,7 +254,7 @@ if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) attack_hand(user) return - ..() + return ..() /obj/machinery/access_button/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index a0d6efc5d1f..5ad348f9d61 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -359,7 +359,7 @@ name = "gamma level hatch" hackProof = 1 aiControlDisabled = 1 - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF is_special = 1 /obj/machinery/door/airlock/hatch/gamma/attackby(obj/C, mob/user, params) @@ -472,6 +472,7 @@ icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi' overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_cult + damage_deflection = 10 hackProof = TRUE aiControlDisabled = TRUE var/openingoverlaytype = /obj/effect/temp_visual/cult/door diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 89321f2e1a8..d1144d7317d 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -9,8 +9,9 @@ layer = OPEN_DOOR_LAYER power_channel = ENVIRON max_integrity = 350 - armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100) + armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70) flags = PREVENT_CLICK_UNDER + damage_deflection = 10 var/closingLayer = CLOSED_DOOR_LAYER var/visible = 1 var/operating = FALSE @@ -24,7 +25,6 @@ var/auto_close_time_dangerous = 15 var/assemblytype //the type of door frame to drop during deconstruction var/datum/effect_system/spark_spread/spark_system - var/damage_deflection = 10 var/real_explosion_block //ignore this, just use explosion_block var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors var/emergency = FALSE @@ -203,11 +203,6 @@ return 1 return ..() -/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) - if(damage_flag == "melee" && damage_amount < damage_deflection) - return 0 - . = ..() - /obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() if(. && obj_integrity > 0) @@ -218,13 +213,13 @@ switch(damage_type) if(BRUTE) if(glass) - playsound(loc, 'sound/effects/glasshit.ogg', 90, 1) + playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE) else if(damage_amount) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) + playsound(loc, 'sound/weapons/smash.ogg', 50, TRUE) else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - playsound(loc, 'sound/items/welder.ogg', 100, 1) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) /obj/machinery/door/emag_act(mob/user) if(density) @@ -377,32 +372,10 @@ if(!stat) //Opens only powered doors. open() //Open everything! -/obj/machinery/door/blob_act(obj/structure/blob/B) - if(isturf(loc)) - var/turf/T = loc - if(T.intact && level == 1) //the blob doesn't destroy thing below the floor - return - take_damage(400, BRUTE, "melee", 0, get_dir(src, B)) +/obj/machinery/door/ex_act(severity) + //if it blows up a wall it should blow up a door + ..(severity ? max(1, severity - 1) : 0) -/obj/machinery/door/ex_act(severity, target) - if(severity) - severity = max(1, severity - 1) - else - severity = 0 - if(resistance_flags & INDESTRUCTIBLE) - return - if(target == src) - obj_integrity = 0 - qdel(src) - return - switch(severity) - if(1) - obj_integrity = 0 - qdel(src) - if(2) - take_damage(rand(100, 250), BRUTE, "bomb", 0) - if(3) - take_damage(rand(10, 90), BRUTE, "bomb", 0) /obj/machinery/door/GetExplosionBlock() return density ? real_explosion_block : 0 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index ee304b8eca1..d562c6b78ea 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -14,8 +14,8 @@ icon_state = "door_open" opacity = 0 density = FALSE - burn_state = FIRE_PROOF max_integrity = 300 + resistance_flags = FIRE_PROOF heat_proof = TRUE glass = TRUE explosion_block = 1 @@ -24,7 +24,7 @@ closingLayer = CLOSED_FIREDOOR_LAYER auto_close_time = 50 assemblytype = /obj/structure/firelock_frame - armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100) + armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 95, "acid" = 70) var/can_force = TRUE var/force_open_time = 300 var/can_crush = TRUE @@ -214,7 +214,7 @@ close() /obj/machinery/door/firedoor/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) var/obj/structure/firelock_frame/F = new assemblytype(get_turf(src)) if(disassembled) F.constructionStep = CONSTRUCTION_PANEL_OPEN @@ -284,7 +284,6 @@ icon_state = "frame1" anchored = FALSE density = TRUE - max_integrity = 300 var/constructionStep = CONSTRUCTION_NOCIRCUIT var/reinforced = 0 diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 975aa9b01ab..4d8fbf01974 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -8,8 +8,9 @@ explosion_block = 3 heat_proof = TRUE safe = FALSE - armor = list(melee = 50, bullet = 100, laser = 100, energy = 100, bomb = 50, bio = 100, rad = 100) - burn_state = FIRE_PROOF + max_integrity = 600 + armor = list("melee" = 50, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 70) + resistance_flags = FIRE_PROOF damage_deflection = 70 var/id_tag = 1.0 var/protected = 1 @@ -22,7 +23,7 @@ /obj/machinery/door/poddoor/impassable name = "reinforced blast door" desc = "A heavy duty blast door that opens mechanically. Looks even tougher than usual." - resistance_flags = INDESTRUCTIBLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/machinery/door/poddoor/impassable/emag_act(mob/user) to_chat(user, "The electronic systems in this door are far too advanced for your primitive hacking peripherals.") @@ -35,7 +36,7 @@ return 0 //"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS. -/obj/machinery/door/poddoor/ex_act(severity, target) +/obj/machinery/door/poddoor/ex_act(severity) if(severity == 3) return ..() diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 84a3fba6632..fe104ff794c 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -5,14 +5,14 @@ icon_state = "left" layer = ABOVE_WINDOW_LAYER closingLayer = ABOVE_WINDOW_LAYER + resistance_flags = ACID_PROOF visible = 0 flags = ON_BORDER opacity = 0 dir = EAST max_integrity = 150 //If you change this, consider changing ../door/window/brigdoor/ max_integrity at the bottom of this .dm file integrity_failure = 0 - armor = list(melee = 20, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100) - unacidable = 1 + armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 70, "acid" = 100) var/obj/item/airlock_electronics/electronics var/base_state = "left" var/reinf = 0 @@ -40,8 +40,7 @@ /obj/machinery/door/window/Destroy() density = FALSE - for(var/I in debris) - qdel(I) + QDEL_LIST(debris) if(obj_integrity == 0) playsound(src, "shatter", 70, 1) QDEL_NULL(electronics) @@ -180,13 +179,12 @@ /obj/machinery/door/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - playsound(loc, 'sound/effects/glasshit.ogg', 90, 1) + playsound(src, 'sound/effects/glasshit.ogg', 90, TRUE) if(BURN) - playsound(loc, 'sound/items/welder.ogg', 100, 1) - + playsound(src, 'sound/items/welder.ogg', 100, TRUE) /obj/machinery/door/window/deconstruct(disassembled = TRUE) - if(can_deconstruct && !disassembled) + if(!(flags & NODECONSTRUCT) && !disassembled) for(var/obj/fragment in debris) fragment.forceMove(get_turf(src)) transfer_fingerprints_to(fragment) @@ -234,7 +232,7 @@ add_fingerprint(user) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) if(isscrewdriver(I)) if(density || operating) to_chat(user, "You need to open the door to access the maintenance panel!") @@ -335,7 +333,7 @@ base_state = "clockwork" shards = 0 rods = 0 - burn_state = FIRE_PROOF + resistance_flags = ACID_PROOF | FIRE_PROOF cancolor = FALSE var/made_glow = FALSE diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index fef3d7c5e5e..d4dc8f854ef 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -51,12 +51,13 @@ var/list/doppler_arrays = list() power_change() to_chat(user, "You unfasten [src].") playsound(loc, I.usesound, 50, 1) + return if(istype(I, /obj/item/disk/tech_disk)) var/obj/item/disk/tech_disk/disk = I disk.load_tech(toxins_tech) to_chat(user, "You swipe the disk into [src].") - else - return ..() + return + return ..() /obj/machinery/doppler_array/attack_hand(mob/user) if(..()) diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index 1519981dfc7..920a111496e 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -27,20 +27,6 @@ stat |= NOPOWER set_light(0) -/obj/machinery/dye_generator/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(25)) - stat |= BROKEN - icon_state = "[initial(icon_state)]-broken" - /obj/machinery/dye_generator/attack_hand(mob/user) ..() src.add_fingerprint(user) @@ -60,8 +46,8 @@ user.visible_message("[user] fills the [HD] up with some dye.","You fill the [HD] up with some hair dye.") HD.dye_color = dye_color HD.update_dye_overlay() - else - return ..() + return + return ..() //Hair Dye Bottle diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index e0a49fdfc8c..62fbae71c78 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -52,7 +52,7 @@ var/frequency = 1379 var/radio_filter = null var/datum/radio_frequency/radio_connection - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/machinery/embedded_controller/radio/Initialize() ..() diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index e9504157063..255d8d3cce1 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -12,11 +12,14 @@ FIRE ALARM var/timing = 0.0 var/lockdownbyai = 0 anchored = 1.0 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100) + max_integrity = 250 + integrity_failure = 100 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100, fire = 90, acid = 30) use_power = IDLE_POWER_USE idle_power_usage = 2 active_power_usage = 6 power_channel = ENVIRON + resistance_flags = FIRE_PROOF var/last_process = 0 var/wiresexposed = 0 var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone @@ -139,8 +142,35 @@ FIRE ALARM playsound(get_turf(src), I.usesound, 50, 1) qdel(src) - else - return ..() + return + return ..() + +/obj/machinery/firealarm/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + if(.) //damage received + if(obj_integrity > 0 && !(stat & BROKEN) && buildstage != 0) + if(prob(33)) + alarm() + +/obj/machinery/firealarm/singularity_pull(S, current_size) + if (current_size >= STAGE_FIVE) // If the singulo is strong enough to pull anchored objects, the fire alarm experiences integrity failure + deconstruct() + ..() + +/obj/machinery/firealarm/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT) && buildstage != 0) //can't break the electronics if there isn't any inside. + stat |= BROKEN + update_icon() + +/obj/machinery/firealarm/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 1) + if(!(stat & BROKEN)) + var/obj/item/I = new /obj/item/firealarm_electronics(loc) + if(!disassembled) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 3) + qdel(src) /obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 23eafe8874b..30069ff0310 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -5,6 +5,9 @@ desc = "A wall-mounted flashbulb device." icon = 'icons/obj/stationobjs.dmi' icon_state = "mflash1" + max_integrity = 250 + integrity_failure = 100 + damage_deflection = 10 var/id = null var/range = 2 //this is roughly the size of brig cell var/disable = 0 @@ -132,9 +135,6 @@ if(user.can_advanced_admin_interact()) return attack_hand(user) -/obj/machinery/flasher_button/attackby(obj/item/W, mob/user as mob, params) - return attack_hand(user) - /obj/machinery/flasher_button/attack_hand(mob/user as mob) if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 68e22f2e8c7..0cc6dda7098 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -4,6 +4,8 @@ icon_state = "flood00" anchored = FALSE density = TRUE + max_integrity = 100 + integrity_failure = 80 light_power = 20 var/on = FALSE var/obj/item/stock_parts/cell/high/cell = null @@ -104,6 +106,8 @@ " You have loosened \the [src]'s casters.", \ "You hear ratchet.") anchored = FALSE + updateicon() + return if(istype(W, /obj/item/screwdriver)) if(!open) if(unlocked) @@ -112,7 +116,8 @@ else unlocked = TRUE to_chat(user, "You unscrew the battery panel.") - + updateicon() + return if(istype(W, /obj/item/crowbar)) if(unlocked) if(open) @@ -123,7 +128,8 @@ if(unlocked) open = TRUE to_chat(user, "You remove the battery panel.") - + updateicon() + return if(istype(W, /obj/item/stock_parts/cell)) if(open) if(cell) @@ -133,7 +139,9 @@ W.loc = src cell = W to_chat(user, "You insert the power cell.") - updateicon() + updateicon() + return + return ..() /obj/machinery/floodlight/extinguish_light() on = 0 diff --git a/code/game/machinery/gameboard.dm b/code/game/machinery/gameboard.dm index ab93e69f36d..2df0496ae67 100644 --- a/code/game/machinery/gameboard.dm +++ b/code/game/machinery/gameboard.dm @@ -99,5 +99,4 @@ if(default_deconstruction_crowbar(I, ignore_panel = TRUE)) return - else - return ..() + return ..() diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 4bc080fca67..35d5a6546d4 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -57,8 +57,8 @@ updateUsrDialog() else to_chat(user, "There is already ID card inside.") - else - return ..() + return + return ..() /obj/machinery/computer/guestpass/proc/get_changeable_accesses() return giver.access diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index fc23507d73b..10708ff9c0e 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -45,7 +45,8 @@ var/list/holopads = list() active_power_usage = 100 layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them. plane = FLOOR_PLANE - armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0) + max_integrity = 300 + armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0) var/list/masters = list()//List of living mobs that use the holopad var/list/holorays = list()//Holoray-mob link. var/last_request = 0 //to prevent request spam. ~Carn @@ -87,6 +88,11 @@ var/list/holopads = list() if(outgoing_call) outgoing_call.ConnectionFailure(src) +/obj/machinery/hologram/holopad/obj_break() + . = ..() + if(outgoing_call) + outgoing_call.ConnectionFailure(src) + /obj/machinery/hologram/holopad/RefreshParts() var/holograph_range = 4 for(var/obj/item/stock_parts/capacitor/B in component_parts) @@ -105,8 +111,7 @@ var/list/holopads = list() if(default_deconstruction_crowbar(I)) return - else - return ..() + return ..() /obj/machinery/hologram/holopad/attack_hand(mob/living/carbon/human/user) @@ -480,7 +485,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ /obj/effect/overlay/holo_pad_hologram/examine(mob/user) if(Impersonation) . = Impersonation.examine(user) - else + else . = ..() diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 13ed8bebc23..aca4254b517 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -51,7 +51,7 @@ /obj/machinery/holosign_switch/attackby(obj/item/W, mob/user as mob, params) if(istype(W, /obj/item/detective_scanner)) return - return src.attack_hand(user) + return ..() /obj/machinery/holosign_switch/attack_hand(mob/user as mob) src.add_fingerprint(usr) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 22cf6d56ecd..45056369662 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -4,7 +4,9 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "igniter1" plane = FLOOR_PLANE - armor = list(melee = 50, bullet = 30, laser = 70, energy = 50, bomb = 20, bio = 0, rad = 0) + max_integrity = 300 + armor = list(melee = 50, bullet = 30, laser = 70, energy = 50, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 70) + resistance_flags = FIRE_PROOF var/id = null var/on = FALSE anchored = TRUE @@ -53,6 +55,7 @@ desc = "A wall-mounted ignition device." icon = 'icons/obj/stationobjs.dmi' icon_state = "migniter" + resistance_flags = FIRE_PROOF var/id = null var/disable = FALSE var/last_spark = FALSE @@ -87,8 +90,8 @@ icon_state = "[base_state]" else icon_state = "[base_state]-p" - else - return ..() + return + return ..() /obj/machinery/sparker/attack_ai() if(src.anchored) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 144b441d2de..204a85b426e 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -55,6 +55,11 @@ else return ..() +/obj/machinery/iv_drip/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc) + qdel(src) + /obj/machinery/iv_drip/examine(mob/user) . = ..() if(bag) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index b1e335c1ce9..4d27ad6b5b5 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -160,7 +160,7 @@ qdel(src) return 1 - return src.attack_hand(user) + return ..() /obj/machinery/light_switch/multitool_menu(var/mob/user, var/obj/item/multitool/P) return {" diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 4129af82a5d..63368000567 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -97,6 +97,7 @@ Class Procs: name = "machinery" icon = 'icons/obj/stationobjs.dmi' pressure_resistance = 15 + max_integrity = 200 layer = BELOW_OBJ_LAYER var/stat = 0 var/emagged = 0 @@ -122,7 +123,7 @@ Class Procs: /obj/machinery/Initialize(mapload) if(!armor) - armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) . = ..() GLOB.machines += src @@ -176,26 +177,6 @@ Class Procs: new /obj/effect/temp_visual/emp(loc) ..() -/obj/machinery/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(25)) - qdel(src) - return - else - return - -/obj/machinery/blob_act() - if(prob(50)) - qdel(src) - //sets the use_power var and then forces an area power update /obj/machinery/proc/update_use_power(var/new_use_power) use_power = new_use_power @@ -391,19 +372,20 @@ Class Procs: gl_uid++ /obj/machinery/proc/default_deconstruction_crowbar(var/obj/item/crowbar/C, var/ignore_panel = 0) - if(istype(C) && (panel_open || ignore_panel)) + if(istype(C) && (panel_open || ignore_panel) && !(flags & NODECONSTRUCT)) playsound(loc, C.usesound, 50, 1) - deconstruct() + deconstruct(TRUE) return 1 return 0 /obj/machinery/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) on_deconstruction() if(component_parts && component_parts.len) spawn_frame(disassembled) for(var/obj/item/I in component_parts) I.forceMove(loc) + component_parts.Cut() qdel(src) /obj/machinery/proc/spawn_frame(disassembled) @@ -417,11 +399,11 @@ Class Procs: M.icon_state = "box_1" /obj/machinery/obj_break(damage_flag) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) stat |= BROKEN /obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/icon_state_open, var/icon_state_closed, var/obj/item/screwdriver/S) - if(istype(S)) + if(!(flags & NODECONSTRUCT) && istype(S)) playsound(loc, S.usesound, 50, 1) if(!panel_open) panel_open = 1 @@ -443,7 +425,7 @@ Class Procs: return 0 /obj/proc/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20) - if(istype(W)) + if(!(flags & NODECONSTRUCT) && istype(W)) to_chat(user, "Now [anchored ? "un" : ""]securing [name].") playsound(loc, W.usesound, 50, 1) if(do_after(user, time * W.toolspeed, target = src)) @@ -458,6 +440,8 @@ Class Procs: /obj/machinery/proc/exchange_parts(mob/user, obj/item/storage/part_replacer/W) var/shouldplaysound = 0 + if((flags & NODECONSTRUCT)) + return FALSE if(istype(W) && component_parts) if(panel_open || W.works_from_distance) var/obj/item/circuitboard/CB = locate(/obj/item/circuitboard) in component_parts @@ -499,7 +483,7 @@ Class Procs: if(stat & BROKEN) . += "It looks broken and non-functional." if(!(resistance_flags & INDESTRUCTIBLE)) - if(burn_state == ON_FIRE) + if(resistance_flags & ON_FIRE) . += "It's on fire!" var/healthpercent = (obj_integrity/max_integrity) * 100 switch(healthpercent) diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index de14dce7d5b..68878e3ad13 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -122,6 +122,7 @@ build++ update_icon() return 1 + return if(1) // Fixed to the floor if(istype(W, /obj/item/wrench)) to_chat(user, "You begin to de-anchor \the [src] from the floor.") @@ -144,6 +145,7 @@ build++ update_icon() return 1 + return if(2) // Welded to the floor if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W @@ -165,6 +167,7 @@ to_chat(user, "You've added cables to \the [src].") build++ update_icon() + return if(3) // Wired if(istype(W, /obj/item/wirecutters)) to_chat(user, "You begin to remove the wiring from \the [src].") @@ -185,6 +188,7 @@ build++ update_icon() return 1 + return if(4) // Grille in place if(istype(W, /obj/item/crowbar)) to_chat(user, "You begin to pry off the grille from \the [src]...") @@ -201,7 +205,8 @@ M.dir = src.dir qdel(src) return 1 - ..() + return + return ..() /obj/machinery/mass_driver_frame/update_icon() icon_state = "mass_driver_b[build]" diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index d4175b10ae1..c93c4e099b2 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -10,7 +10,8 @@ level = 1 // underfloor layer = 2.5 anchored = 1 - armor = list(melee = 70, bullet = 70, laser = 70, energy = 70, bomb = 0, bio = 0, rad = 0) + max_integrity = 500 + armor = list(melee = 70, bullet = 70, laser = 70, energy = 70, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80) var/open = 0 // true if cover is open var/locked = 1 // true if controls are locked var/location = "" // location response text @@ -113,9 +114,6 @@ /obj/machinery/navbeacon/attack_ai(mob/user) interact(user, 1) -/obj/machinery/navbeacon/attack_animal() - return - /obj/machinery/navbeacon/attack_hand(mob/user) interact(user, 0) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index f354feb1629..fba07d684ac 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -78,7 +78,9 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co desc = "A standard Nanotrasen-licensed newsfeed handler for use in commercial space stations. All the news you absolutely have no use for, in one place!" icon = 'icons/obj/terminals.dmi' icon_state = "newscaster_normal" - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + max_integrity = 200 + integrity_failure = 50 var/screen = NEWSCASTER_MAIN var/paper_remaining = 15 var/securityCaster = 0 @@ -95,7 +97,6 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co var/obj/item/photo/photo = null var/channel_name = "" //the feed channel which will be receiving the feed, or being created var/c_locked = 0 //Will our new channel be locked to public submissions? - var/hitstaken = 0 //Death at 3 hits from an item with force>=15 var/datum/feed_channel/viewing_channel = null var/silence = 0 var/temp = null @@ -139,41 +140,32 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co return ..() /obj/machinery/newscaster/update_icon() - overlays.Cut() + cut_overlays() if(inoperable()) icon_state = "newscaster_off" - if(stat & BROKEN) //If the thing is smashed, add crack overlay on top of the unpowered sprite. - overlays += image(icon, "crack3") else if(!news_network.wanted_issue) //wanted icon state, there can be no overlays on it as it's a priority message icon_state = "newscaster_normal" if(alert) //new message alert overlay - overlays += "newscaster_alert" + add_overlay("newscaster_alert") + var/hp_percent = obj_integrity * 100 /max_integrity + switch(hp_percent) + if(75 to 100) + return + if(50 to 75) + add_overlay("crack1") + if(25 to 50) + add_overlay("crack2") else - icon_state = "newscaster_wanted" - - if(hitstaken > 0) //Cosmetic damage overlay - overlays += image(icon, "crack[hitstaken]") + add_overlay("crack3") /obj/machinery/newscaster/power_change() ..() update_icon() -/obj/machinery/newscaster/ex_act(severity) - switch(severity) - if(1) - qdel(src) - return - if(2) - stat |= BROKEN - if(prob(50)) - qdel(src) - else - update_icon() //can't place it above the return and outside the if-else. or we might get runtimes of null.update_icon() if(prob(50)) goes in. - else - if(prob(50)) - stat |= BROKEN - update_icon() +/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + update_icon() /obj/machinery/newscaster/attack_ghost(mob/user) ui_interact(user) @@ -581,35 +573,59 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co to_chat(user, "Now [anchored ? "un" : ""]securing [name]") playsound(loc, I.usesound, 50, 1) if(do_after(user, 60 * I.toolspeed, target = src)) - new /obj/item/mounted/frame/newscaster_frame(loc) - playsound(loc, I.usesound, 50, 1) - qdel(src) - return - - if(stat & BROKEN) - playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1) - visible_message("[user.name] further abuses the shattered [name].", null, 5) - else - if(istype(I, /obj/item) ) - var/obj/item/W = I - if(W.damtype == STAMINA) - return - if(W.force < 15) - visible_message("[user.name] hits the [name] with the [W.name] with no visible effect.", null , 5) - playsound(loc, 'sound/effects/glasshit.ogg', 100, 1) + playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) + if(stat & BROKEN) + to_chat(user, "The broken remains of [src] fall on the ground.") + new /obj/item/stack/sheet/metal(loc, 5) + new /obj/item/shard(loc) + new /obj/item/shard(loc) else - hitstaken++ - if(hitstaken == 3) - visible_message("[user.name] smashes the [name]!", null, 5) - stat |= BROKEN - playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) - else - visible_message("[user.name] forcefully slams the [name] with the [I.name]!", null, 5) - playsound(loc, 'sound/effects/glasshit.ogg', 100, 1) + to_chat(user, "You [anchored ? "un" : ""]secure [name].") + new /obj/item/mounted/frame/newscaster_frame(loc) + qdel(src) + else if(iswelder(I) && user.a_intent != INTENT_HARM) + var/obj/item/weldingtool/WT = I + if(stat & BROKEN) + if(WT.remove_fuel(0, user)) + user.visible_message("[user] is repairing [src].", + "You begin repairing [src]...", + "You hear welding.") + playsound(loc, WT.usesound, 40, 1) + if(do_after(user,40 * WT.toolspeed, 1, target = src)) + if(!WT.isOn() || !(stat & BROKEN)) + return + to_chat(user, "You repair [src].") + playsound(loc, 'sound/items/welder2.ogg', 50, 1) + obj_integrity = max_integrity + stat &= ~BROKEN + update_icon() else - to_chat(user, "This does nothing.") - update_icon() - ..() + to_chat(user, "[src] does not need repairs.") + else + return ..() + +/obj/machinery/newscaster/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(stat & BROKEN) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, TRUE) + else + playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) + +/obj/machinery/newscaster/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 2) + new /obj/item/shard(loc) + new /obj/item/shard(loc) + qdel(src) + +/obj/machinery/newscaster/obj_break() + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + stat |= BROKEN + playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE) + update_icon() /obj/machinery/newscaster/proc/AttachPhoto(mob/user) if(photo) @@ -783,6 +799,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co scribble = s attack_self(user) return + return ..() ////////////////////////////////////helper procs diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 955d82309b1..b4241b5f19d 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -159,6 +159,8 @@ var/obj/machinery/atmospherics/binary/circulator/circP = make_from if(istype(circP) && circP.side == circP.CIRC_RIGHT) icon_state = "m_[icon_state]" + if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging)) + resistance_flags |= FIRE_PROOF | LAVA_PROOF // called by turf to know if should treat as bent or not on placement /obj/item/pipe/proc/is_bent_pipe() @@ -322,8 +324,6 @@ return rotate() /obj/item/pipe/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - ..() - if(!istype(W, /obj/item/wrench)) return ..() @@ -524,8 +524,6 @@ w_class = WEIGHT_CLASS_BULKY /obj/item/pipe_meter/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - ..() - if(!istype(W, /obj/item/wrench)) return ..() if(!locate(/obj/machinery/atmospherics/pipe, src.loc)) @@ -551,7 +549,6 @@ w_class = WEIGHT_CLASS_BULKY /obj/item/pipe_gsensor/attackby(var/obj/item/W as obj, var/mob/user as mob) - ..() if(!istype(W, /obj/item/wrench)) return ..() new/obj/machinery/air_sensor( src.loc ) diff --git a/code/game/machinery/portable_tag_turret.dm b/code/game/machinery/portable_tag_turret.dm index 5e213043c42..a077def9136 100644 --- a/code/game/machinery/portable_tag_turret.dm +++ b/code/game/machinery/portable_tag_turret.dm @@ -77,21 +77,19 @@ else icon_state = "[lasercolor]grey_target_prism" -/obj/machinery/porta_turret/tag/bullet_act(obj/item/projectile/Proj) +/obj/machinery/porta_turret/tag/bullet_act(obj/item/projectile/P) ..() - - if(lasercolor == "b" && disabled == 0) - if(istype(Proj, /obj/item/gun/energy/laser/tag/red)) - disabled = 1 - qdel(Proj) // qdel - sleep(100) - disabled = 0 - if(lasercolor == "r" && disabled == 0) - if(istype(Proj, /obj/item/gun/energy/laser/tag/blue)) - disabled = 1 - qdel(Proj) // qdel - sleep(100) - disabled = 0 + if(!disabled) + if(lasercolor == "b") + if(istype(P, /obj/item/projectile/beam/lasertag/redtag)) + disabled = TRUE + spawn(100) + disabled = FALSE + else if(lasercolor == "r") + if(istype(P, /obj/item/projectile/beam/lasertag/bluetag)) + disabled = TRUE + spawn(100) + disabled = FALSE /obj/machinery/porta_turret/tag/assess_living(var/mob/living/L) if(!L) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 56618164bbb..a07c639c36f 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -13,7 +13,7 @@ idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power power_channel = EQUIP //drains power from the EQUIPMENT channel - armor = list(melee = 50, bullet = 30, laser = 30, energy = 30, bomb = 30, bio = 0, rad = 0) + armor = list(melee = 50, bullet = 30, laser = 30, energy = 30, bomb = 30, bio = 0, rad = 0, fire = 90, acid = 90) var/raised = 0 //if the turret cover is "open" and the turret is raised var/raising= 0 //if the turret is currently opening or closing its cover var/health = 80 //the turret's health @@ -1079,4 +1079,4 @@ var/list/turret_icons desc = "Syndicate exterior defense turret chambered for 4.6x30mm rounds. Designed to be fitted to assault pods, it uses low calliber bullets to save space." health = 100 projectile = /obj/item/projectile/bullet/weakbullet3 - eprojectile = /obj/item/projectile/bullet/weakbullet3 + eprojectile = /obj/item/projectile/bullet/weakbullet3 \ No newline at end of file diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 00f88f51c6a..4b081307762 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -63,49 +63,22 @@ return 1 /obj/machinery/recharge_station/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - A.ex_act(severity) - qdel(src) - return - if(2.0) - if(prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - A.ex_act(severity) - qdel(src) - return - if(3.0) - if(prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - A.ex_act(severity) - qdel(src) - return + if(occupant) + occupant.ex_act(severity) + ..() -/obj/machinery/recharge_station/blob_act() - if(prob(50)) - var/atom/movable/A = occupant - go_out() - A.blob_act() - qdel(src) +/obj/machinery/recharge_station/handle_atom_del(atom/A) + ..() + if(A == occupant) + occupant = null + updateUsrDialog() + update_icon() /obj/machinery/recharge_station/narsie_act() go_out() new /obj/effect/gibspawner/generic(get_turf(loc)) //I REPLACE YOUR TECHNOLOGY WITH FLESH! qdel(src) - -/obj/machinery/recharge_station/attack_animal(var/mob/living/simple_animal/M)//Stop putting hostile mobs in things guise - if(M.environment_smash) - M.do_attack_animation(src) - visible_message("[M.name] smashes [src] apart!") - go_out() - qdel(src) - return - /obj/machinery/recharge_station/Bumped(var/mob/AM) move_inside(AM) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index e3c51f9c375..2cc86ee1b3a 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -38,7 +38,8 @@ var/list/obj/machinery/requests_console/allConsoles = list() anchored = 1 icon = 'icons/obj/terminals.dmi' icon_state = "req_comp0" - armor = list(melee = 70, bullet = 30, laser = 30, energy = 30, bomb = 0, bio = 0, rad = 0) + max_integrity = 300 + armor = list("melee" = 70, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90) var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department var/list/message_log = list() //List of all messages var/departmentType = 0 //Bitflag. Zero is reply-only. Map currently uses raw numbers instead of defines. diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index f652dc9899e..3cb06daab94 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -6,7 +6,7 @@ density = 1 opacity = FALSE anchored = 1 - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/const/max_health = 200 var/health = max_health //The shield can only take so much beating (prevents perma-prisons) @@ -97,7 +97,7 @@ qdel(src) -/obj/machinery/shield/hitby(AM as mob|obj) +/obj/machinery/shield/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) ..() var/tforce = 0 if(ismob(AM)) @@ -529,8 +529,8 @@ icon_state = "shieldwall" anchored = 1 density = 1 - unacidable = 1 - luminosity = 3 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + light_range = 3 var/needs_power = 0 var/active = 1 var/delay = 5 diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 3fde4116fa3..00d29b43459 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -5,7 +5,8 @@ icon_state = "sheater0" name = "space heater" desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire." - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100) + max_integrity = 250 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 10) var/obj/item/stock_parts/cell/cell var/on = 0 var/open = 0 diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index a4182198d20..3437bafeb3b 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -305,6 +305,7 @@ return if(panel_open) wires.Interact(user) + return if(state_open) if(store_item(I, user)) @@ -313,6 +314,8 @@ to_chat(user, "You load the [I] into the storage compartment.") else to_chat(user, "The unit already contains that item.") + return + return ..() /obj/machinery/suit_storage_unit/proc/store_item(obj/item/I, mob/user) @@ -354,9 +357,10 @@ occupant = null /obj/machinery/suit_storage_unit/deconstruct(disassembled = TRUE) - open_machine() - dump_contents() - new /obj/item/stack/sheet/metal (loc, 2) + if(!(flags & NODECONSTRUCT)) + open_machine() + dump_contents() + new /obj/item/stack/sheet/metal (loc, 2) qdel(src) /obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index b2692b6621b..28a35680cdb 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -10,7 +10,7 @@ anchored = 0 density = 0 layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF var/datum/wires/syndicatebomb/wires = null var/minimum_timer = 90 @@ -37,6 +37,14 @@ if(.) payload.detonate() +/obj/machinery/syndicatebomb/obj_break() + if(!try_detonate()) + ..() + +/obj/machinery/syndicatebomb/obj_destruction() + if(!try_detonate()) + ..() + /obj/machinery/syndicatebomb/process() if(!active) STOP_PROCESSING(SSfastprocess, src) @@ -300,7 +308,7 @@ item_state = "eshield0" w_class = WEIGHT_CLASS_NORMAL origin_tech = "syndicate=5;combat=6" - burn_state = FLAMMABLE //Burnable (but the casing isn't) + resistance_flags = FLAMMABLE //Burnable (but the casing isn't) var/adminlog = null var/range_heavy = 3 var/range_medium = 9 diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index ed8c531720b..ec5d63804f6 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -208,8 +208,9 @@ A.icon_state = "4" A.anchored = 1 qdel(src) - src.updateUsrDialog() - return + updateUsrDialog() + return + return ..() emag_act(user as mob) if(!emagged) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 16113f5bcfe..3ce5c316ba6 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -23,6 +23,7 @@ to_chat(user, "You unfasten the bolts.") playsound(src.loc, P.usesound, 50, 1) construct_op++ + return if(1) if(istype(P, /obj/item/screwdriver)) to_chat(user, "You fasten the bolts.") @@ -32,6 +33,7 @@ to_chat(user, "You dislodge the external plating.") playsound(src.loc, P.usesound, 75, 1) construct_op++ + return if(2) if(istype(P, /obj/item/wrench)) to_chat(user, "You secure the external plating.") @@ -44,6 +46,7 @@ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc ) A.amount = 5 stat |= BROKEN // the machine's been borked! + return if(3) if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/A = P @@ -56,6 +59,7 @@ qdel(A) construct_op-- stat &= ~BROKEN // the machine's not borked anymore! + return if(istype(P, /obj/item/crowbar)) to_chat(user, "You begin prying out the circuit board other components...") playsound(src.loc, P.usesound, 50, 1) @@ -85,6 +89,8 @@ var/obj/machinery/constructable_frame/machine_frame/F = new F.loc = src.loc qdel(src) + return + return ..() /obj/machinery/telecomms/proc/formatInput(var/label,var/varname, var/input) var/value = vars[varname] diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 93c8da26253..73a9261feb0 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -150,8 +150,9 @@ A.icon_state = "4" A.anchored = 1 qdel(src) - src.updateUsrDialog() - return + updateUsrDialog() + return + return ..() emag_act(user as mob) if(!emagged) diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index d76debd7e34..1fe1490442a 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -13,10 +13,9 @@ /obj/machinery/computer/telecomms/traffic/attackby(obj/item/I, mob/user) if(ismultitool(I)) unlocked = !unlocked - to_chat(user, "This computer is now [unlocked ? "Unlocked" : "Locked"]. \ -Reopen the UI to see the difference.") + to_chat(user, "This computer is now [unlocked ? "Unlocked" : "Locked"]. Reopen the UI to see the difference.") return - . = ..() + return ..() /obj/machinery/computer/telecomms/traffic/attack_hand(mob/user) interact(user) @@ -26,7 +25,7 @@ Reopen the UI to see the difference.") return 0 if(GLOB.nttc_config.valid_languages.len == 1) - GLOB.nttc_config.update_languages() // this is silly but it has to be done because NTTC inits before languages do + GLOB.nttc_config.update_languages() // this is silly but it has to be done because NTTC inits before languages do var/datum/asset/assets = get_asset_datum(/datum/asset/simple/nttc) assets.send(user) diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index af2a1a8d9c0..7336704555c 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -13,6 +13,7 @@ icon_state = "control_standby" anchored = 1 density = 0 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/enabled = 0 var/lethal = 0 var/locked = 1 diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 2c13dbc946a..13837e2581f 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -24,7 +24,7 @@ density = 1 max_integrity = 300 integrity_failure = 100 - armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) var/icon_vend //Icon_state when vending var/icon_deny //Icon_state when denying access @@ -213,16 +213,6 @@ var/datum/data/vending_product/record = R .[record.product_path] += record.amount -/obj/machinery/vending/ex_act(severity) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - switch(severity) - if(1) - obj_integrity = 0 - qdel(src) - if(2) - take_damage(rand(100, 250), BRUTE, "bomb", 0) - if(3) - take_damage(rand(10, 90), BRUTE, "bomb", 0) - /obj/machinery/vending/deconstruct(disassembled = TRUE) eject_item() if(!refill_canister) //the non constructable vendors drop metal instead of a machine frame. @@ -231,9 +221,6 @@ else ..() -/obj/machinery/vending/blob_act(obj/structure/blob/B) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - take_damage(400, BRUTE, "melee", 0, get_dir(src, B)) - /obj/machinery/vending/attackby(obj/item/I, mob/user, params) if(currently_vending && vendor_account && !vendor_account.suspended) var/paid = 0 @@ -1071,7 +1058,8 @@ /obj/item/gun/projectile/shotgun = 2,/obj/item/gun/projectile/automatic/ar = 2) premium = list(/obj/item/ammo_box/magazine/smgm9mm = 2,/obj/item/ammo_box/magazine/m50 = 4,/obj/item/ammo_box/magazine/m45 = 2,/obj/item/ammo_box/magazine/m75 = 2) contraband = list(/obj/item/clothing/under/patriotsuit = 1,/obj/item/bedsheet/patriot = 3) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF /obj/machinery/vending/toyliberationstation @@ -1098,7 +1086,8 @@ /obj/item/toy/katana = 10, /obj/item/twohanded/dualsaber/toy = 5, /obj/item/toy/cards/deck/syndicate = 10) //Gambling and it hurts, making it a +18 item - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF /obj/machinery/vending/cigarette name = "cigarette machine" @@ -1173,7 +1162,8 @@ /obj/item/stack/medical/splint = 4, /obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/dropper = 4, /obj/item/healthanalyzer = 4, /obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2) contraband = list(/obj/item/reagent_containers/glass/bottle/sulfonal = 1, /obj/item/reagent_containers/glass/bottle/pancuronium = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF refill_canister = /obj/item/vending_refill/medical /obj/machinery/vending/medical/syndicate_access @@ -1205,7 +1195,8 @@ density = FALSE //It is wall-mounted, and thus, not dense. --Superxpdude products = list(/obj/item/stack/medical/bruise_pack = 2, /obj/item/stack/medical/ointment = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, /obj/item/healthanalyzer = 1) contraband = list(/obj/item/reagent_containers/syringe/charcoal = 4, /obj/item/reagent_containers/syringe/antiviral = 4, /obj/item/reagent_containers/food/pill/tox = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF refill_canister = /obj/item/vending_refill/wallmed /obj/machinery/vending/wallmed/Initialize(mapload) @@ -1358,7 +1349,8 @@ /obj/item/clothing/shoes/clown_shoes/magical = 1, /obj/item/twohanded/staff = 2) contraband = list(/obj/item/reagent_containers/glass/bottle/wizarditis = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF /obj/machinery/vending/autodrobe name = "\improper AutoDrobe" @@ -1542,6 +1534,7 @@ product_ads = "For Tsar and Country.;Have you fulfilled your nutrition quota today?;Very nice!;We are simple people, for this is all we eat.;If there is a person, there is a problem. If there is no person, then there is no problem." products = list(/obj/item/reagent_containers/food/drinks/drinkingglass/soda = 30) contraband = list(/obj/item/reagent_containers/food/drinks/drinkingglass/cola = 20) + resistance_flags = FIRE_PROOF refill_canister = /obj/item/vending_refill/sovietsoda /obj/machinery/vending/sovietsoda/Initialize(mapload) @@ -1563,7 +1556,8 @@ /obj/item/wrench = 5,/obj/item/analyzer = 5,/obj/item/t_scanner = 5,/obj/item/screwdriver = 5) contraband = list(/obj/item/weldingtool/hugetank = 2,/obj/item/clothing/gloves/color/fyellow = 2) premium = list(/obj/item/clothing/gloves/color/yellow = 1) - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70) + resistance_flags = FIRE_PROOF /obj/machinery/vending/engivend name = "\improper Engi-Vend" diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index af067f60688..1478016abba 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -208,10 +208,11 @@ user.drop_item() crayon = W crayon.loc = src + update_icon() else - ..() + return ..() else - ..() + return ..() else if(istype(W,/obj/item/grab)) if( (state == 1) && hacked) var/obj/item/grab/G = W @@ -219,8 +220,9 @@ G.affecting.loc = src qdel(G) state = 3 + update_icon() else - ..() + return ..() else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \ istype(W,/obj/item/clothing/under) || \ istype(W,/obj/item/clothing/mask) || \ @@ -283,9 +285,9 @@ to_chat(user, "You can't put the item in right now.") else to_chat(user, "The washing machine is full.") + update_icon() else - ..() - update_icon() + return ..() /obj/machinery/washing_machine/attack_hand(mob/user as mob) switch(state) @@ -320,3 +322,7 @@ update_icon() + +/obj/machinery/washing_machine/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal(drop_location(), 2) + qdel(src) \ No newline at end of file diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index d6aafd88e5b..9295e3bc385 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -3,8 +3,8 @@ var/maxsize = 2 internal_damage_threshold = 50 maint_access = 0 - damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8) - armor = list(melee = 30, bullet = 30, laser = 15, energy = 20, bomb = 20, bio = 0, rad = 0) + armor = list(melee = 30, bullet = 30, laser = 15, energy = 20, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100) + destruction_sleep_duration = 2 var/am = "d3c2fbcadca903a41161ccc9df9cf948" /obj/mecha/combat/moved_inside(var/mob/living/carbon/human/H as mob) diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index a1264b753e6..52b3b122c18 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -5,14 +5,13 @@ initial_icon = "durand" step_in = 4 dir_in = 1 //Facing North. - health = 400 + max_integrity = 400 deflect_chance = 20 - damage_absorption = list("brute"=0.5,"fire"=1.1,"bullet"=0.65,"laser"=0.85,"energy"=0.9,"bomb"=0.8) - armor = list(melee = 40, bullet = 35, laser = 15, energy = 10, bomb = 20, bio = 0, rad = 0) + armor = list(melee = 40, bullet = 35, laser = 15, energy = 10, bomb = 20, bio = 0, rad = 50, fire = 100, acid = 100) max_temperature = 30000 infra_luminosity = 8 force = 40 - wreckage = /obj/effect/decal/mecha_wreckage/durand + wreckage = /obj/structure/mecha_wreckage/durand /obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0) ..() @@ -36,10 +35,10 @@ initial_icon = "old_durand" step_in = 4 dir_in = 1 //Facing North. - health = 400 + max_integrity = 400 deflect_chance = 20 - damage_absorption = list("brute"=0.5,"fire"=1.1,"bullet"=0.65,"laser"=0.85,"energy"=0.9,"bomb"=0.8) + armor = list(melee = 50, bullet = 35, laser = 15, energy = 15, bomb = 20, bio = 0, rad = 50, fire = 100, acid = 100) max_temperature = 30000 infra_luminosity = 8 force = 40 - wreckage = /obj/effect/decal/mecha_wreckage/durand/old \ No newline at end of file + wreckage = /obj/structure/mecha_wreckage/durand/old \ No newline at end of file diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index 1afdc52a34a..b47693f1dcb 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -5,14 +5,13 @@ initial_icon = "gygax" step_in = 3 dir_in = 1 //Facing North. - health = 250 + max_integrity = 250 deflect_chance = 5 - damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1) - armor = list(melee = 25, bullet = 20, laser = 30, energy = 15, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 20, laser = 30, energy = 15, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100) max_temperature = 25000 infra_luminosity = 6 leg_overload_coeff = 2 - wreckage = /obj/effect/decal/mecha_wreckage/gygax + wreckage = /obj/structure/mecha_wreckage/gygax internal_damage_threshold = 35 max_equip = 3 maxsize = 2 @@ -39,16 +38,17 @@ name = "Dark Gygax" icon_state = "darkgygax" initial_icon = "darkgygax" - health = 300 + max_integrity = 300 deflect_chance = 15 - damage_absorption = list("brute"=0.6,"fire"=0.8,"bullet"=0.6,"laser"=0.5,"energy"=0.65,"bomb"=0.8) + armor = list(melee = 40, bullet = 40, laser = 50, energy = 35, bomb = 20, bio = 0, rad =20, fire = 100, acid = 100) max_temperature = 35000 leg_overload_coeff = 100 operation_req_access = list(access_syndicate) - wreckage = /obj/effect/decal/mecha_wreckage/gygax/dark + wreckage = /obj/structure/mecha_wreckage/gygax/dark max_equip = 4 maxsize = 2 starting_voice = /obj/item/mecha_modkit/voice/syndicate + destruction_sleep_duration = 1 /obj/mecha/combat/gygax/dark/loaded/New() ..() diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index ce33ba75e91..35df97e3bea 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -4,15 +4,14 @@ icon_state = "honker" initial_icon = "honker" step_in = 3 - health = 140 + max_integrity = 140 deflect_chance = 60 internal_damage_threshold = 60 - damage_absorption = list("brute"=1.2,"fire"=1.5,"bullet"=1,"laser"=1,"energy"=1,"bomb"=1) - armor = list(melee = -20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = -20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) max_temperature = 25000 infra_luminosity = 5 operation_req_access = list(access_clown) - wreckage = /obj/effect/decal/mecha_wreckage/honker + wreckage = /obj/structure/mecha_wreckage/honker add_req_access = 0 max_equip = 3 starting_voice = /obj/item/mecha_modkit/voice/honk @@ -28,7 +27,7 @@ ME.attach(src) /obj/mecha/combat/honker/get_stats_part() - var/integrity = health/initial(health)*100 + var/integrity = obj_integrity/max_integrity*100 var/cell_charge = get_charge() var/tank_pressure = internal_tank ? round(internal_tank.return_pressure(),0.01) : "None" var/tank_temperature = internal_tank ? internal_tank.return_temperature() : "Unknown" diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index aee96d7a7ae..4b17b172c55 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -4,20 +4,20 @@ icon_state = "marauder" initial_icon = "marauder" step_in = 5 - health = 500 + max_integrity = 500 deflect_chance = 25 - damage_absorption = list("brute"=0.5,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7) - armor = list(melee = 50, bullet = 55, laser = 40, energy = 30, bomb = 30, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 55, "laser" = 40, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 60, "fire" = 100, "acid" = 100) max_temperature = 60000 - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF infra_luminosity = 3 operation_req_access = list(access_cent_specops) - wreckage = /obj/effect/decal/mecha_wreckage/marauder + wreckage = /obj/structure/mecha_wreckage/marauder add_req_access = 0 internal_damage_threshold = 25 force = 45 max_equip = 5 starting_voice = /obj/item/mecha_modkit/voice/nanotrasen + destruction_sleep_duration = 1 /obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0) . = ..() @@ -51,8 +51,8 @@ initial_icon = "seraph" operation_req_access = list(access_cent_commander) step_in = 3 - health = 550 - wreckage = /obj/effect/decal/mecha_wreckage/seraph + max_integrity = 550 + wreckage = /obj/structure/mecha_wreckage/seraph internal_damage_threshold = 20 force = 80 max_equip = 8 @@ -89,7 +89,7 @@ icon_state = "mauler" initial_icon = "mauler" operation_req_access = list(access_syndicate) - wreckage = /obj/effect/decal/mecha_wreckage/mauler + wreckage = /obj/structure/mecha_wreckage/mauler starting_voice = /obj/item/mecha_modkit/voice/syndicate /obj/mecha/combat/marauder/mauler/loaded/New() diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index d1092212761..be166c3b8f3 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -7,13 +7,12 @@ dir_in = 2 //Facing south. step_energy_drain = 3 normal_step_energy_drain = 3 - health = 200 + max_integrity = 200 deflect_chance = 30 - damage_absorption = list("brute"=0.7,"fire"=0.7,"bullet"=0.7,"laser"=0.7,"energy"=0.7,"bomb"=0.7) - armor = list(melee = 30, bullet = 30, laser = 30, energy = 30, bomb = 30, bio = 0, rad = 0) + armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 50, "fire" = 100, "acid" = 100) max_temperature = 25000 infra_luminosity = 3 - wreckage = /obj/effect/decal/mecha_wreckage/phazon + wreckage = /obj/structure/mecha_wreckage/phazon add_req_access = 1 //operation_req_access = list() internal_damage_threshold = 25 diff --git a/code/game/mecha/combat/reticence.dm b/code/game/mecha/combat/reticence.dm index 436f60d90b2..35fb7dff7f8 100644 --- a/code/game/mecha/combat/reticence.dm +++ b/code/game/mecha/combat/reticence.dm @@ -5,12 +5,11 @@ initial_icon = "mime" step_in = 2 dir_in = 1 //Facing North. - health = 150 + max_integrity = 150 deflect_chance = 30 - damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1) - armor = list(melee = 25, bullet = 20, laser = 30, energy = 15, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) max_temperature = 15000 - wreckage = /obj/effect/decal/mecha_wreckage/reticence + wreckage = /obj/structure/mecha_wreckage/reticence operation_req_access = list(access_mime) add_req_access = 0 internal_damage_threshold = 60 diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 0db0dff7ea1..e7aa4d45578 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -7,11 +7,12 @@ icon_state = "mecha_equip" force = 5 origin_tech = "materials=2;engineering=2" + max_integrity = 300 var/equip_cooldown = 0 var/equip_ready = 1 var/energy_drain = 0 var/obj/mecha/chassis = null - var/range = MELEE //bitflags + var/range = MECHA_MELEE //bitflags var/salvageable = 1 var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates @@ -59,10 +60,10 @@ return txt /obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not? - return range&RANGED + return range & MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/proc/is_melee() - return range&MELEE + return range & MECHA_MELEE /obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target) if(!target) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 87d32c07fa9..5b5f483b94f 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -35,7 +35,7 @@ icon_state = "sleeper" origin_tech = "engineering=3;biotech=3;plasmatech=2" energy_drain = 20 - range = MELEE + range = MECHA_MELEE equip_cooldown = 20 var/mob/living/carbon/patient = null var/inject_amount = 10 @@ -250,7 +250,7 @@ var/synth_speed = 5 //[num] reagent units per cycle energy_drain = 10 var/mode = 0 //0 - fire syringe, 1 - analyze reagents. - range = MELEE|RANGED + range = MECHA_MELEE | MECHA_RANGED equip_cooldown = 10 origin_tech = "materials=3;biotech=4;magnets=4" diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 98e814d111c..f61a1383309 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -22,8 +22,7 @@ return if(isobj(target)) var/obj/target_obj = target - if(target_obj.unacidable && !ismecha(target_obj)) - occupant_message("[target] is too durable to drill through.") + if(target_obj.resistance_flags & UNACIDABLE) return target.visible_message("[chassis] starts to drill [target].", "[chassis] starts to drill [target]...", @@ -41,10 +40,9 @@ if(isliving(target)) drill_mob(target, chassis.occupant) playsound(src, 'sound/weapons/drill.ogg', 40, TRUE) - else if(istype(target, /obj)) + else if(isobj(target)) var/obj/O = target - //O.take_damage(15, BRUTE, 0, FALSE, get_dir(chassis, target)) - O.ex_act(2)//TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable + O.take_damage(15, BRUTE, 0, FALSE, get_dir(chassis, target)) playsound(src, 'sound/weapons/drill.ogg', 40, TRUE) else set_ready_state(TRUE) diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 664927b1d3a..43937ab1111 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -10,7 +10,7 @@ origin_tech = "bluespace=7" equip_cooldown = 150 energy_drain = 8000 - range = RANGED + range = MECHA_RANGED var/tele_precision = 4 /obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target) @@ -39,7 +39,7 @@ origin_tech = "bluespace=4;magnets=4;plasmatech=2" equip_cooldown = 50 energy_drain = 300 - range = RANGED + range = MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target) if(!action_checks(target) || !is_teleport_allowed(loc.z)) @@ -85,7 +85,7 @@ origin_tech = "bluespace=3;magnets=3;engineering=4" equip_cooldown = 10 energy_drain = 100 - range = MELEE|RANGED + range = MECHA_MELEE | MECHA_RANGED var/atom/movable/locked var/mode = 1 //1 - gravsling 2 - gravpush @@ -245,8 +245,8 @@ chassis.clearInternalDamage(int_dam_flag) repaired = 1 break - if(health_boost<0 || chassis.health < initial(chassis.health)) - chassis.health += min(health_boost, initial(chassis.health)-chassis.health) + if(h_boost<0 || chassis.obj_integrity < chassis.max_integrity) + chassis.obj_integrity += min(h_boost, chassis.max_integrity-chassis.obj_integrity) repaired = 1 if(repaired) if(!chassis.use_power(energy_drain)) @@ -346,7 +346,7 @@ desc = "An exosuit module that generates power using solid plasma as fuel. Pollutes the environment." icon_state = "tesla" origin_tech = "plasmatech=2;powerstorage=2;engineering=2" - range = MELEE + range = MECHA_MELEE var/coeff = 100 var/fuel_type = MAT_PLASMA var/max_fuel = 150000 diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 940e89b804b..8a155660b8c 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -119,7 +119,7 @@ icon_state = "mecha_exting" equip_cooldown = 5 energy_drain = 0 - range = MELEE|RANGED + range = MECHA_MELEE | MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/extinguisher/New() create_reagents(1000) @@ -190,7 +190,7 @@ origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4" equip_cooldown = 10 energy_drain = 250 - range = MELEE|RANGED + range = MECHA_MELEE | MECHA_RANGED flags_2 = NO_MAT_REDEMPTION_2 var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock. var/canRwall = 0 @@ -290,7 +290,7 @@ origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4" equip_cooldown = 10 energy_drain = 250 - range = MELEE|RANGED + range = MECHA_MELEE | MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/mimercd/can_attach(obj/mecha/combat/reticence/M) if(..()) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index b4ec817c4cc..a69847ccb56 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -1,6 +1,6 @@ /obj/item/mecha_parts/mecha_equipment/weapon name = "mecha weapon" - range = RANGED + range = MECHA_RANGED origin_tech = "materials=3;combat=3" var/projectile var/fire_sound @@ -186,7 +186,7 @@ icon_state = "mecha_honker" energy_drain = 200 equip_cooldown = 150 - range = MELEE|RANGED + range = MECHA_MELEE | MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M as obj) if(..()) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 4e12a22a109..895361f301b 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -175,7 +175,7 @@ if(recharge_port && !QDELETED(recharge_port)) data["recharge_port"] = list("mech" = null) if(recharge_port.recharging_mecha && !QDELETED(recharge_port.recharging_mecha)) - data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mecha.health, "maxhealth" = initial(recharge_port.recharging_mecha.health), "cell" = null) + data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mecha.obj_integrity, "maxhealth" = initial(recharge_port.recharging_mecha.max_integrity), "cell" = null) if(recharge_port.recharging_mecha.cell && !QDELETED(recharge_port.recharging_mecha.cell)) data["has_mech"] = 1 data["mecha_name"] = recharge_port.recharging_mecha || "None" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 8e6afaf0a20..6e86bbed7de 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1,11 +1,4 @@ -#define MECHA_INT_FIRE 1 -#define MECHA_INT_TEMP_CONTROL 2 -#define MECHA_INT_SHORT_CIRCUIT 4 -#define MECHA_INT_TANK_BREACH 8 -#define MECHA_INT_CONTROL_LOST 16 -#define MELEE 1 -#define RANGED 2 #define MECHAMOVE_RAND 1 #define MECHAMOVE_TURN 2 @@ -18,11 +11,13 @@ density = 1 //Dense. To raise the heat. opacity = 1 ///opaque. Menacing. anchored = 1 //no pulling around. - unacidable = 1 //and no deleting hoomans inside + resistance_flags = FIRE_PROOF | ACID_PROOF layer = MOB_LAYER //icon draw layer infra_luminosity = 15 //byond implementation is bugged. force = 5 - armor = list(melee = 20, bullet = 10, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + max_integrity = 300 //max_integrity is base health + armor = list(melee = 20, bullet = 10, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100) + var/list/facing_modifiers = list(MECHA_FRONT_ARMOUR = 1.5, MECHA_SIDE_ARMOUR = 1, MECHA_BACK_ARMOUR = 0.5) var/ruin_mecha = FALSE //if the mecha starts on a ruin, don't automatically give it a tracking beacon to prevent metagaming. var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items) var/can_move = 0 // time of next allowed movement @@ -31,11 +26,9 @@ var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South. var/normal_step_energy_drain = 10 var/step_energy_drain = 10 + var/melee_energy_drain = 15 var/overload_step_energy_drain_min = 100 - var/health = 300 //health is health var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. - //the values in this list show how much damage will pass through, not how much will be absorbed. - var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1) var/obj/item/stock_parts/cell/cell var/state = 0 var/list/log = new @@ -87,6 +80,8 @@ var/activated = FALSE var/power_warned = FALSE + var/destruction_sleep_duration = 1 //Time that mech pilot is put to sleep for if mech is destroyed + var/melee_cooldown = 10 var/melee_can_hit = 1 @@ -118,7 +113,6 @@ smoke_system.set_up(3, src) smoke_system.attach(src) add_cell() - START_PROCESSING(SSobj, src) GLOB.poi_list |= src log_message("[src] created.") @@ -170,7 +164,7 @@ /obj/mecha/examine(mob/user) . = ..() - var/integrity = health/initial(health)*100 + var/integrity = obj_integrity * 100 / max_integrity switch(integrity) if(85 to 100) . += "It's fully intact." @@ -239,24 +233,6 @@ if(target.reagents.get_reagent_amount("toxin") + force < force*2) target.reagents.add_reagent("toxin", force/2.5) - - -/atom/proc/mech_melee_attack(obj/mecha/M) - return - -/obj/mecha/mech_melee_attack(obj/mecha/M) - if(M.damtype =="brute") - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) - else if(M.damtype == "fire") - playsound(src, 'sound/items/welder.ogg', 50, 1) - else - return - M.occupant_message("You hit [src].") - visible_message("[src] has been hit by [M.name].") - take_damage(M.force, damtype) - add_attack_logs(M.occupant, src, "Mecha-attacked with [M] (INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") - return - /obj/mecha/proc/range_action(atom/target) return @@ -349,8 +325,7 @@ else occupant.clear_alert("mechaport") if(leg_overload_mode) - take_damage(1) - if(health < initial(health) - initial(health) / 3) + if(obj_integrity < max_integrity - max_integrity / 3) leg_overload_mode = FALSE step_in = initial(step_in) step_energy_drain = initial(step_energy_drain) @@ -457,10 +432,11 @@ //////// Internal damage //////// /////////////////////////////////// -/obj/mecha/proc/check_for_internal_damage(var/list/possible_int_damage,var/ignore_threshold=null) - if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) return +/obj/mecha/proc/check_for_internal_damage(list/possible_int_damage, ignore_threshold=null) + if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) + return if(prob(20)) - if(ignore_threshold || health*100/initial(health) 0) +/obj/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + if(. && obj_integrity > 0) spark_system.start() - diag_hud_set_mechhealth() - else - qdel(src) - return + switch(damage_flag) + if("fire") + check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL)) + if("melee") + check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) + else + check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT)) + if(. >= 5 || prob(33)) + occupant_message("Taking damage!") + log_message("Took [damage_amount] points of damage. Damage type: [damage_type]") + +/obj/mecha/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + . = ..() + if(!damage_amount) + return 0 + var/booster_deflection_modifier = 1 + var/booster_damage_modifier = 1 + if(damage_flag == "bullet" || damage_flag == "laser" || damage_flag == "energy") + for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment) + if(B.projectile_react()) + booster_deflection_modifier = B.deflect_coeff + booster_damage_modifier = B.damage_coeff + break + else if(damage_flag == "melee") + for(var/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/B in equipment) + if(B.attack_react()) + booster_deflection_modifier *= B.deflect_coeff + booster_damage_modifier *= B.damage_coeff + break + + if(attack_dir) + var/facing_modifier = get_armour_facing(dir2angle(attack_dir) - dir2angle(src)) + booster_damage_modifier /= facing_modifier + booster_deflection_modifier *= facing_modifier + if(prob(deflect_chance * booster_deflection_modifier)) + visible_message("[src]'s armour deflects the attack!") + log_message("Armor saved.") + return 0 + if(.) + . *= booster_damage_modifier /obj/mecha/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) - log_message("Attack by hand/paw. Attacker - [user].",1) user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1) user.visible_message("[user] hits [name]. Nothing happens", "You hit [name] with no visible effect.") - log_append_to_last("Armor saved.") + log_message("Attack by hand/paw. Attacker - [user].") /obj/mecha/attack_alien(mob/living/user) - log_message("Attack by alien. Attacker - [user].",1) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(!prob(deflect_chance)) - take_damage(15) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1) - to_chat(user, "You slash at the armored suit!") - visible_message("The [user] slashes at [name]'s armor!") - else - log_append_to_last("Armor saved.") - playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1) - to_chat(user, "Your claws had no effect!") - occupant_message("The [user]'s claws are stopped by the armor.") - visible_message("The [user] rebounds off [name]'s armor!") - return - + log_message("Attack by alien. Attacker - [user].", color = "red") + playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE) + attack_generic(user, 15, BRUTE, "melee", 0) /obj/mecha/attack_animal(mob/living/simple_animal/user) - log_message("Attack by simple animal. Attacker - [user].",1) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if((user.a_intent == INTENT_HELP && user.ckey) || user.melee_damage_upper == 0) + log_message("Attack by simple animal. Attacker - [user].") + if(!user.melee_damage_upper && !user.obj_damage) user.custom_emote(1, "[user.friendly] [src].") + return FALSE else - user.do_attack_animation(src) - if(!prob(deflect_chance)) - var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) - take_damage(damage) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - visible_message("[user] [user.attacktext] [src]!") - user.create_attack_log("attacked [name]") - else - log_append_to_last("Armor saved.") - playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1) - occupant_message("The [user]'s attack is stopped by the armor.") - visible_message("The [user] rebounds off [name]'s armor!") - user.create_attack_log("attacked [name]") - return + var/play_soundeffect = 1 + if(user.environment_smash) + play_soundeffect = 0 + playsound(src, 'sound/effects/bang.ogg', 50, TRUE) + var/animal_damage = rand(user.melee_damage_lower,user.melee_damage_upper) + if(user.obj_damage) + animal_damage = user.obj_damage + animal_damage = min(animal_damage, 20*user.environment_smash) + user.create_attack_log("attacked [name]") + attack_generic(user, animal_damage, user.melee_damage_type, "melee", play_soundeffect) + return TRUE /obj/mecha/hulk_damage() return 15 @@ -579,105 +567,67 @@ /obj/mecha/attack_hulk(mob/living/carbon/human/user) . = ..() if(.) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST)) log_message("Attack by hulk. Attacker - [user].", 1) add_attack_logs(user, src, "Punched with hulk powers") -/obj/mecha/hitby(atom/movable/A) //wrapper +/obj/mecha/blob_act(obj/structure/blob/B) + log_message("Attack by blob. Attacker - [B].") + take_damage(30, BRUTE, "melee", 0, get_dir(src, B)) + +/obj/mecha/attack_tk() + return + +/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper + log_message("Hit by [AM].") + . = ..() + +/obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper + log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).") ..() - log_message("Hit by [A].",1) - var/def_coeff = 1 - var/dam_coeff = 1 - var/counter_tracking = 0 - for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment) - if(B.projectile_react()) - def_coeff = B.deflect_coeff - dam_coeff = B.damage_coeff - counter_tracking = 1 - break - - if(istype(A, /obj/item/mecha_parts/mecha_tracking)) - if(!counter_tracking) - A.forceMove(src) - visible_message("The [A] fastens firmly to [src].") - return - - if(prob(deflect_chance * def_coeff) || ismob(A)) - occupant_message("[A] bounces off the armor.") - visible_message("[A] bounces off the [src]\s armor!") - log_append_to_last("Armor saved.") - if(isliving(A)) - var/mob/living/M = A - M.take_organ_damage(10) - - if(isobj(A)) - var/obj/O = A - if(O.throwforce) - take_damage(O.throwforce * dam_coeff) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - - -/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper - log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).",1) - - var/deflection = 1 - var/dam_coeff = 1 - for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment) - if(B.projectile_react()) - deflection = B.deflect_coeff - dam_coeff = B.damage_coeff - break - - if(Proj.damage_type != BRUTE && Proj.damage_type != BURN) - visible_message("[src]'s armour is undamaged by [Proj]!") - else if(prob(deflect_chance * deflection)) - visible_message("[src]'s armour deflects [Proj]!") - else - visible_message("[src] is hit by [Proj].") - take_damage(Proj.damage * dam_coeff, Proj.flag) - check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT)) - Proj.on_hit(src) +/obj/mecha/ex_act(severity, target) + log_message("Affected by explosion of severity: [severity].") + if(prob(deflect_chance)) + severity++ + log_message("Armor saved, changing severity to [severity]") + ..() + severity++ + for(var/X in equipment) + var/obj/item/mecha_parts/mecha_equipment/ME = X + ME.ex_act(severity) + for(var/Y in trackers) + var/obj/item/mecha_parts/mecha_tracking/MT = Y + MT.ex_act(severity) + if(occupant) + occupant.ex_act(severity) +/obj/mecha/handle_atom_del(atom/A) + if(A == occupant) + occupant = null + icon_state = initial(icon_state)+"-open" + setDir(dir_in) /obj/mecha/Destroy() + if(occupant) + occupant.SetSleeping(destruction_sleep_duration) go_out() + var/mob/living/silicon/ai/AI for(var/mob/M in src) //Let's just be ultra sure if(isAI(M)) - M.gib() //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. Forever. + occupant = null + AI = M //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. They can be recovered with an AI card from the wreck. else M.forceMove(loc) - - if(prob(30)) - explosion(get_turf(loc), 0, 0, 1, 3) - - if(wreckage) - var/obj/effect/decal/mecha_wreckage/WR = new wreckage(loc) - for(var/obj/item/mecha_parts/mecha_equipment/E in equipment) - if(E.salvageable && prob(30)) - WR.crowbar_salvage += E - E.forceMove(WR) - E.equip_ready = 1 - else - E.forceMove(loc) - qdel(E) - if(cell) - WR.crowbar_salvage += cell - cell.forceMove(WR) - cell.charge = rand(0, cell.charge) - if(internal_tank) - WR.crowbar_salvage += internal_tank - internal_tank.forceMove(WR) - else - QDEL_LIST(equipment) - QDEL_NULL(cell) - QDEL_NULL(internal_tank) - + for(var/obj/item/mecha_parts/mecha_equipment/E in equipment) + E.detach(loc) + qdel(E) + equipment.Cut() + QDEL_NULL(cell) + QDEL_NULL(internal_tank) + if(AI) + AI.gib() //No wreck, no AI to recover STOP_PROCESSING(SSobj, src) GLOB.poi_list.Remove(src) - equipment.Cut() - cell = null - internal_tank = null if(loc) loc.assume_air(cabin_air) air_update_turf() @@ -690,36 +640,11 @@ GLOB.mechas_list -= src //global mech list return ..() -/obj/mecha/ex_act(severity) - log_message("Affected by explosion of severity: [severity].",1) - if(prob(deflect_chance)) - severity++ - log_append_to_last("Armor saved, changing severity to [severity].") - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(30)) - qdel(src) - else - take_damage(initial(health)/2) - check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST, MECHA_INT_SHORT_CIRCUIT), 1) - if(3) - if(prob(5)) - qdel(src) - else - take_damage(initial(health) / 5) - check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST, MECHA_INT_SHORT_CIRCUIT), 1) - //TODO -/obj/mecha/blob_act() - take_damage(30, "brute") - return - /obj/mecha/emp_act(severity) if(get_charge()) use_power((cell.charge/3)/(severity*2)) - take_damage(50 / severity, "energy") + take_damage(30 / severity, BURN, "energy", 1) log_message("EMP detected", 1) check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL, MECHA_INT_CONTROL_LOST, MECHA_INT_SHORT_CIRCUIT), 1) @@ -727,7 +652,7 @@ ..() if(exposed_temperature > max_temperature) log_message("Exposed to dangerous temperature.", 1) - take_damage(5, "fire") + take_damage(5, BURN, 0, 1) check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL)) ////////////////////// @@ -836,7 +761,7 @@ else if(iswelder(W) && user.a_intent != INTENT_HARM) var/obj/item/weldingtool/WT = W - if(health < initial(health)) + if(obj_integrity < max_integrity) if(WT.remove_fuel(0, user)) user.visible_message("[user] starts repairing some damage to [name].", "You start repairing some damage to [name]") if(do_after_once(user, 15 * WT.toolspeed, target = src, attempt_cancel_message = "You stop repairing [name].")) @@ -845,7 +770,7 @@ user.visible_message("[user] repairs the damaged gas tank.", "You repair the damaged gas tank.") else user.visible_message("[user] repairs some damage to [name].", "You repair some damage to [name].") - health += min(20, initial(health) - health) + obj_integrity += min(10, max_integrity - obj_integrity) else to_chat(user, "The welder must be on for this task!") else @@ -900,27 +825,15 @@ to_chat(user, "You stop installing [M].") else - return attacked_by(W, user) - -/obj/mecha/attacked_by(obj/item/I, mob/user) - log_message("Attacked by [I]. Attacker - [user]") - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - var/deflection = deflect_chance - var/dam_coeff = 1 - for(var/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/B in equipment) - if(B.attack_react(user)) - deflection *= B.deflect_coeff - dam_coeff *= B.damage_coeff - break - if(prob(deflection)) - to_chat(user, "[I] bounces off [src]\s armor.") - log_append_to_last("Armor saved.") - else - user.visible_message("[user] hits [src] with [I].", "You hit [src] with [I].") - take_damage(round(I.force * dam_coeff), I.damtype) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) + return ..() +/obj/mecha/mech_melee_attack(obj/mecha/M) + if(!has_charge(melee_energy_drain)) + return 0 + use_power(melee_energy_drain) + if(M.damtype == BRUTE || M.damtype == BURN) + add_attack_logs(M.occupant, src, "Mecha-attacked with [M] (INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") + . = ..() /obj/mecha/emag_act(mob/user) to_chat(user, "[src]'s ID slot rejects the card.") @@ -1148,7 +1061,7 @@ visible_message("[user] starts to climb into [src]") if(do_after(user, 40, target = src)) - if(health <= 0) + if(obj_integrity <= 0) to_chat(user, "You cannot get in the [name], it has been destroyed!") else if(occupant) to_chat(user, "[occupant] was faster! Try better next time, loser.") @@ -1448,7 +1361,7 @@ if(cabin_air && cabin_air.return_volume()>0) cabin_air.temperature = min(6000+T0C, cabin_air.return_temperature()+rand(10,15)) if(cabin_air.return_temperature() > max_temperature/2) - take_damage(4/round(max_temperature/cabin_air.return_temperature(),0.1),"fire") + take_damage(4/round(max_temperature/cabin_air.return_temperature(),0.1), BURN, 0, 0) if(internal_damage & MECHA_INT_TANK_BREACH) //remove some air from internal tank if(internal_tank) @@ -1531,6 +1444,32 @@ visual_effect_icon = ATTACK_EFFECT_MECHTOXIN ..() +/obj/mecha/obj_destruction() + if(wreckage) + var/mob/living/silicon/ai/AI + if(isAI(occupant)) + AI = occupant + occupant = null + var/obj/structure/mecha_wreckage/WR = new wreckage(loc, AI) + for(var/obj/item/mecha_parts/mecha_equipment/E in equipment) + if(E.salvageable && prob(30)) + WR.crowbar_salvage += E + E.detach(WR) //detaches from src into WR + E.equip_ready = 1 + else + E.detach(loc) + qdel(E) + if(cell) + WR.crowbar_salvage += cell + cell.forceMove(WR) + cell.charge = rand(0, cell.charge) + cell = null + if(internal_tank) + WR.crowbar_salvage += internal_tank + internal_tank.forceMove(WR) + cell = null + . = ..() + /obj/mecha/CtrlClick(mob/living/L) if(occupant != L || !istype(L)) return ..() diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index c7ab5ac6620..3c71db19b72 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -113,7 +113,6 @@ chassis.log_message("Toggled defence mode.") UpdateButtonIcon() - /datum/action/innate/mecha/mech_overload_mode name = "Toggle leg actuators overload" button_icon_state = "mech_overload_off" @@ -121,7 +120,7 @@ /datum/action/innate/mecha/mech_overload_mode/Activate(forced_state = null) if(!owner || !chassis || chassis.occupant != owner) return - if(chassis.health < initial(chassis.health) - initial(chassis.health) / 3) + if(chassis.obj_integrity < chassis.max_integrity - chassis.max_integrity / 3) chassis.occupant_message("The leg actuators are too damaged to overload!") return // Can't activate them if the mech is too damaged if(!isnull(forced_state)) diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 8d9b4a19708..99e6ca72367 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -89,7 +89,7 @@ answer["cell_percentage"] = round(M.cell.percent()) else answer["cell"] = 0 - answer["integrity"] = M.health/initial(M.health)*100 + answer["integrity"] = round((M.obj_integrity/M.max_integrity*100), 0.01) answer["airtank"] = M.return_pressure() answer["pilot"] = "[M.occupant||"None"]" var/area/area = get_area(M) @@ -109,7 +109,7 @@ var/cell_charge = M.get_charge() var/area/A = get_area(M) var/answer = {"Name: [M.name] - Integrity: [M.health/initial(M.health)*100]% + Integrity: [M.obj_integrity / M.max_integrity * 100]% Cell charge: [isnull(cell_charge)?"Not found":"[M.cell.percent()]%"] Airtank: [M.return_pressure()]kPa Pilot: [M.occupant||"None"] @@ -123,11 +123,6 @@ /obj/item/mecha_parts/mecha_tracking/emp_act() qdel(src) - return - -/obj/item/mecha_parts/mecha_tracking/ex_act() - qdel(src) - return /obj/item/mecha_parts/mecha_tracking/proc/in_mecha() if(istype(loc, /obj/mecha)) diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 75b9fc6b1b8..6aff10eb423 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -23,7 +23,7 @@ /obj/item/mecha_parts/chassis/attackby(obj/item/W, mob/user, params) if(!construct || !construct.action(W, user)) - ..() + return ..() /obj/item/mecha_parts/chassis/attack_hand() return diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index c4367056e03..9598d328d7a 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -69,7 +69,7 @@ /obj/mecha/proc/get_stats_part() - var/integrity = health/initial(health)*100 + var/integrity = obj_integrity/max_integrity*100 var/cell_charge = get_charge() var/tank_pressure = internal_tank ? round(internal_tank.return_pressure(),0.01) : "None" var/tank_temperature = internal_tank ? internal_tank.return_temperature() : "Unknown" diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index d108311b99d..0e0ed85b727 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -3,233 +3,214 @@ /////////////////////////////////// -/obj/effect/decal/mecha_wreckage - name = "Exosuit wreckage" - desc = "Remains of some unfortunate mecha. Completely unrepairable." +/obj/structure/mecha_wreckage + name = "exosuit wreckage" + desc = "Remains of some unfortunate mecha. Completely unrepairable, but perhaps something can be salvaged." icon = 'icons/mecha/mecha.dmi' - density = 1 - anchored = 0 + density = TRUE + anchored = FALSE opacity = 0 - var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel,/obj/item/stack/sheet/metal,/obj/item/stack/rods) - var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil) - var/list/crowbar_salvage + var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/metal, /obj/item/stack/rods) var/salvage_num = 5 + var/list/crowbar_salvage = list() + var/wires_removed = FALSE + var/mob/living/silicon/ai/AI //AIs to be salvaged + var/list/parts -/obj/effect/decal/mecha_wreckage/New() - ..() - crowbar_salvage = new - return - -/obj/effect/decal/mecha_wreckage/ex_act(severity) - if(severity < 2) - spawn - qdel(src) - return - -/obj/effect/decal/mecha_wreckage/bullet_act(var/obj/item/projectile/Proj) - return - - -/obj/effect/decal/mecha_wreckage/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/weldingtool)) - var/obj/item/weldingtool/WT = W - if(salvage_num <= 0) - user.visible_message("[user] begins to slice apart the now completely stripped [src].", "You begin to slice apart the [src].", "You hear the sound of a welder nearby.") - if(WT.remove_fuel(0,user) && do_after(user, 80 * WT.toolspeed, target = src)) - user.visible_message("The now-dilapidated [src] falls apart in a clatter.", "As you slice apart the final support structures, the [src] falls apart in a heap.", "You hear metal clanking to the floor.") - new /obj/item/stack/sheet/metal(src.loc) - var/obj/item/stack/rods/rods = new /obj/item/stack/rods(src.loc) - rods.amount = 2 - qdel(src) - else - if(isemptylist(welder_salvage)) - to_chat(user, "What's left on the [src] cannot be removed with a welder, besides the frame itself") - else if(WT.remove_fuel(0,user)) - var/type = prob(70)?pick(welder_salvage):null - if(type) - var/N = new type(get_turf(user)) - user.visible_message("[user] cuts [N] from [src]", "You cut [N] from [src]", "You hear a sound of welder nearby") - if(istype(N, /obj/item/mecha_parts/part)) - welder_salvage -= type - salvage_num-- - else - to_chat(user, "You failed to salvage anything valuable from [src].") - else - to_chat(user, "You need more welding fuel to complete this task.") - else if(istype(W, /obj/item/wirecutters)) - if(salvage_num <= 0) - to_chat(user, "You don't see anything that can be cut with [W].") - return - else if(!isemptylist(wirecutters_salvage)) - var/type = prob(70)?pick(wirecutters_salvage):null - if(type) - var/N = new type(get_turf(user)) - user.visible_message("[user] cuts [N] from [src].", "You cut [N] from [src].") - salvage_num-- - else - to_chat(user, "You failed to salvage anything valuable from [src].") - else if(istype(W, /obj/item/crowbar)) - if(!isemptylist(crowbar_salvage)) - var/obj/S = pick(crowbar_salvage) - if(S) - S.loc = get_turf(user) - crowbar_salvage -= S - user.visible_message("[user] pries [S] from [src].", "You pry [S] from [src].") - else - to_chat(user, "You don't see anything that can be pried with [W].") - else - ..() - return - - -/obj/effect/decal/mecha_wreckage/gygax - name = "Gygax wreckage" - icon_state = "gygax-broken" - -/obj/effect/decal/mecha_wreckage/gygax/New() - ..() - var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso, - /obj/item/mecha_parts/part/gygax_head, - /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) - for(var/i=0;i<2;i++) - if(!isemptylist(parts) && prob(40)) +/obj/structure/mecha_wreckage/Initialize(mapload, mob/living/silicon/ai/AI_pilot) + . = ..() + if(parts) + for(var/i in 1 to 2) + if(!parts.len) + break + if(prob(60)) + continue var/part = pick(parts) welder_salvage += part - parts -= part - return + parts = null + if(!AI_pilot) //Type-checking for this is already done in mecha/Destroy() + return + AI = AI_pilot + AI.apply_damage(150, BURN) //Give the AI a bit of damage from the "shock" of being suddenly shut down + AI.death() //The damage is not enough to kill the AI, but to be 'corrupted files' in need of repair. + AI.forceMove(src) //Put the dead AI inside the wreckage for recovery + add_overlay(mutable_appearance('icons/obj/projectiles.dmi', "green_laser")) //Overlay for the recovery beacon + AI.controlled_mech = null + AI.remote_control = null -/obj/effect/decal/mecha_wreckage/gygax/dark - name = "Dark Gygax wreckage" +/obj/structure/mecha_wreckage/Destroy() + QDEL_NULL(AI) + QDEL_LIST(crowbar_salvage) + return ..() + +/obj/structure/mecha_wreckage/examine(mob/user) + . = ..() + if(!AI) + return + . += "The AI recovery beacon is active." + +/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params) + if(iswelder(I)) + if(salvage_num <= 0 || !length(welder_salvage)) + to_chat(user, "You don't see anything that can be cut with [I]!") + return + var/obj/item/weldingtool/WT = I + playsound(get_turf(src), WT.usesound, 50, TRUE) + if(!WT.remove_fuel(0, user)) + return + if(prob(30)) + to_chat(user, "You fail to salvage anything valuable from [src]!") + return + var/type = pick(welder_salvage) + var/N = new type(get_turf(user)) + user.visible_message("[user] cuts [N] from [src].", "You cut [N] from [src].") + if(!istype(N, /obj/item/stack)) + welder_salvage -= type + salvage_num-- + return + + if(iswirecutter(I)) + if(wires_removed) + to_chat(user, "You don't see anything that can be cut with [I]!") + return + var/N = new /obj/item/stack/cable_coil(get_turf(user), rand(1, 3)) + user.visible_message("[user] cuts [N] from [src].", "You cut [N] from [src].") + wires_removed = TRUE + return + + if(iscrowbar(I)) + if(crowbar_salvage.len) + var/obj/S = pick(crowbar_salvage) + S.forceMove(user.drop_location()) + user.visible_message("[user] pries [S] from [src].", "You pry [S] from [src].") + crowbar_salvage -= S + return + to_chat(user, "You don't see anything that can be cut with [I]!") + return + return ..() + + +/obj/structure/mecha_wreckage/transfer_ai(interaction, mob/user, null, obj/item/aicard/card) + if(!..()) + return + + //Proc called on the wreck by the AI card. + if(interaction != AI_TRANS_TO_CARD) //AIs can only be transferred in one direction, from the wreck to the card. + return + if(!AI) //No AI in the wreck + to_chat(user, "No AI backups found.") + return + cut_overlays() //Remove the recovery beacon overlay + AI.forceMove(card) //Move the dead AI to the card. + if(AI.client) //AI player is still in the dead AI and is connected + to_chat(AI, "The remains of your file system have been recovered on a mobile storage device.") + else //Give the AI a heads-up that it is probably going to get fixed. + AI.notify_ghost_cloning("You have been recovered from the wreckage!", source = card) + to_chat(user, "Backup files recovered: [AI.name] ([rand(1000, 9999)].exe) salvaged from [name] and stored within local memory.") + AI = null + +/obj/structure/mecha_wreckage/gygax + name = "\improper Gygax wreckage" + icon_state = "gygax-broken" + parts = list( + /obj/item/mecha_parts/part/gygax_torso, + /obj/item/mecha_parts/part/gygax_head, + /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/structure/mecha_wreckage/gygax/dark + name = "\improper Dark Gygax wreckage" icon_state = "darkgygax-broken" -/obj/effect/decal/mecha_wreckage/marauder - name = "Marauder wreckage" +/obj/structure/mecha_wreckage/marauder + name = "\improper Marauder wreckage" icon_state = "marauder-broken" -/obj/effect/decal/mecha_wreckage/mauler - name = "Mauler wreckage" +/obj/structure/mecha_wreckage/mauler + name = "\improper Mauler wreckage" icon_state = "mauler-broken" desc = "The syndicate won't be very happy about this..." -/obj/effect/decal/mecha_wreckage/seraph - name = "Seraph wreckage" +/obj/structure/mecha_wreckage/seraph + name = "\improper Seraph wreckage" icon_state = "seraph-broken" -/obj/effect/decal/mecha_wreckage/reticence +/obj/structure/mecha_wreckage/reticence name = "\improper Reticence wreckage" - icon_state = "mime-broken" + icon_state = "reticence-broken" + color = "#87878715" + desc = "..." -/obj/effect/decal/mecha_wreckage/ripley - name = "Ripley wreckage" +/obj/structure/mecha_wreckage/ripley + name = "\improper Ripley wreckage" icon_state = "ripley-broken" + parts = list(/obj/item/mecha_parts/part/ripley_torso, + /obj/item/mecha_parts/part/ripley_left_arm, + /obj/item/mecha_parts/part/ripley_right_arm, + /obj/item/mecha_parts/part/ripley_left_leg, + /obj/item/mecha_parts/part/ripley_right_leg) -/obj/effect/decal/mecha_wreckage/ripley/New() - ..() - var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso, - /obj/item/mecha_parts/part/ripley_left_arm, - /obj/item/mecha_parts/part/ripley_right_arm, - /obj/item/mecha_parts/part/ripley_left_leg, - /obj/item/mecha_parts/part/ripley_right_leg) - for(var/i=0;i<2;i++) - if(!isemptylist(parts) && prob(40)) - var/part = pick(parts) - welder_salvage += part - parts -= part - return +/obj/structure/mecha_wreckage/ripley/mkii + name = "\improper Ripley MK-II wreckage" + icon_state = "ripleymkii-broken" -/obj/effect/decal/mecha_wreckage/ripley/firefighter - name = "Firefighter wreckage" +/obj/structure/mecha_wreckage/ripley/firefighter + name = "\improper Firefighter wreckage" icon_state = "firefighter-broken" + parts = list(/obj/item/mecha_parts/part/ripley_torso, + /obj/item/mecha_parts/part/ripley_left_arm, + /obj/item/mecha_parts/part/ripley_right_arm, + /obj/item/mecha_parts/part/ripley_left_leg, + /obj/item/mecha_parts/part/ripley_right_leg, + /obj/item/clothing/suit/fire) -/obj/effect/decal/mecha_wreckage/ripley/firefighter/New() - ..() - var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso, - /obj/item/mecha_parts/part/ripley_left_arm, - /obj/item/mecha_parts/part/ripley_right_arm, - /obj/item/mecha_parts/part/ripley_left_leg, - /obj/item/mecha_parts/part/ripley_right_leg, - /obj/item/clothing/suit/fire) - for(var/i=0;i<2;i++) - if(!isemptylist(parts) && prob(40)) - var/part = pick(parts) - welder_salvage += part - parts -= part - return - -/obj/effect/decal/mecha_wreckage/ripley/deathripley - name = "Death-Ripley wreckage" +/obj/structure/mecha_wreckage/ripley/deathripley + name = "\improper Death-Ripley wreckage" icon_state = "deathripley-broken" + parts = null -/obj/effect/decal/mecha_wreckage/honker - name = "Honker wreckage" +/obj/structure/mecha_wreckage/honker + name = "\improper H.O.N.K wreckage" icon_state = "honker-broken" + desc = "All is right in the universe." + parts = list( + /obj/item/mecha_parts/chassis/honker, + /obj/item/mecha_parts/part/honker_torso, + /obj/item/mecha_parts/part/honker_head, + /obj/item/mecha_parts/part/honker_left_arm, + /obj/item/mecha_parts/part/honker_right_arm, + /obj/item/mecha_parts/part/honker_left_leg, + /obj/item/mecha_parts/part/honker_right_leg) -/obj/effect/decal/mecha_wreckage/honker/New() - ..() - var/list/parts = list( - /obj/item/mecha_parts/chassis/honker, - /obj/item/mecha_parts/part/honker_torso, - /obj/item/mecha_parts/part/honker_head, - /obj/item/mecha_parts/part/honker_left_arm, - /obj/item/mecha_parts/part/honker_right_arm, - /obj/item/mecha_parts/part/honker_left_leg, - /obj/item/mecha_parts/part/honker_right_leg) - for(var/i=0;i<2;i++) - if(!isemptylist(parts) && prob(40)) - var/part = pick(parts) - welder_salvage += part - parts -= part - return - -/obj/effect/decal/mecha_wreckage/durand - name = "Durand wreckage" +/obj/structure/mecha_wreckage/durand + name = "\improper Durand wreckage" icon_state = "durand-broken" + parts = list( + /obj/item/mecha_parts/part/durand_torso, + /obj/item/mecha_parts/part/durand_head, + /obj/item/mecha_parts/part/durand_left_arm, + /obj/item/mecha_parts/part/durand_right_arm, + /obj/item/mecha_parts/part/durand_left_leg, + /obj/item/mecha_parts/part/durand_right_leg) -/obj/effect/decal/mecha_wreckage/durand/New() - ..() - var/list/parts = list( - /obj/item/mecha_parts/part/durand_torso, - /obj/item/mecha_parts/part/durand_head, - /obj/item/mecha_parts/part/durand_left_arm, - /obj/item/mecha_parts/part/durand_right_arm, - /obj/item/mecha_parts/part/durand_left_leg, - /obj/item/mecha_parts/part/durand_right_leg) - for(var/i=0;i<2;i++) - if(!isemptylist(parts) && prob(40)) - var/part = pick(parts) - welder_salvage += part - parts -= part - return - - -/obj/effect/decal/mecha_wreckage/durand/old - name = "Durand wreckage" +/obj/structure/mecha_wreckage/durand/old icon_state = "old_durand-broken" -/obj/effect/decal/mecha_wreckage/phazon - name = "Phazon wreckage" +/obj/structure/mecha_wreckage/phazon + name = "\improper Phazon wreckage" icon_state = "phazon-broken" -/obj/effect/decal/mecha_wreckage/odysseus - name = "Odysseus wreckage" +/obj/structure/mecha_wreckage/odysseus + name = "\improper Odysseus wreckage" icon_state = "odysseus-broken" - -/obj/effect/decal/mecha_wreckage/odysseus/New() - ..() - var/list/parts = list( - /obj/item/mecha_parts/part/odysseus_torso, - /obj/item/mecha_parts/part/odysseus_head, - /obj/item/mecha_parts/part/odysseus_left_arm, - /obj/item/mecha_parts/part/odysseus_right_arm, - /obj/item/mecha_parts/part/odysseus_left_leg, - /obj/item/mecha_parts/part/odysseus_right_leg) - for(var/i=0;i<2;i++) - if(!isemptylist(parts) && prob(40)) - var/part = pick(parts) - welder_salvage += part - parts -= part - return + parts = list( + /obj/item/mecha_parts/part/odysseus_torso, + /obj/item/mecha_parts/part/odysseus_head, + /obj/item/mecha_parts/part/odysseus_left_arm, + /obj/item/mecha_parts/part/odysseus_right_arm, + /obj/item/mecha_parts/part/odysseus_left_leg, + /obj/item/mecha_parts/part/odysseus_right_leg) \ No newline at end of file diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index da746290e8a..dcee2c1e74e 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -5,8 +5,8 @@ initial_icon = "odysseus" step_in = 3 max_temperature = 15000 - health = 120 - wreckage = /obj/effect/decal/mecha_wreckage/odysseus + max_integrity = 120 + wreckage = /obj/structure/mecha_wreckage/odysseus internal_damage_threshold = 35 deflect_chance = 15 step_energy_drain = 6 diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 2cb2538f136..0e095f7ca12 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -7,15 +7,15 @@ var/fast_pressure_step_in = 2 //step_in while in normal pressure conditions var/slow_pressure_step_in = 4 //step_in while in better pressure conditions max_temperature = 20000 - health = 200 + max_integrity = 200 lights_power = 7 deflect_chance = 15 - damage_absorption = list("brute"=0.6,"fire"=1,"bullet"=0.8,"laser"=0.9,"energy"=1,"bomb"=0.6) - armor = list(melee = 40, bullet = 20, laser = 10, energy = 20, bomb = 40, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 20, "laser" = 10, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) max_equip = 6 - wreckage = /obj/effect/decal/mecha_wreckage/ripley + wreckage = /obj/structure/mecha_wreckage/ripley var/list/cargo = new var/cargo_capacity = 15 + var/hides = 0 /obj/mecha/working/ripley/Move() . = ..() @@ -32,9 +32,8 @@ ore.forceMove(ore_box) /obj/mecha/working/ripley/Destroy() - while(damage_absorption["brute"] < 0.6) - new /obj/item/stack/sheet/animalhide/goliath_hide(loc) - damage_absorption["brute"] = damage_absorption["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop + for(var/i=1, i <= hides, i++) + new /obj/item/stack/sheet/animalhide/goliath_hide(loc) //If a goliath-plated ripley gets killed, all the plates drop for(var/atom/movable/A in cargo) A.forceMove(loc) step_rand(A) @@ -43,30 +42,24 @@ /obj/mecha/working/ripley/go_out() ..() - if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3) - overlays = null - overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-open") - else if(damage_absorption["brute"] == 0.3) - overlays = null - overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full-open") + update_icon() -/obj/mecha/working/ripley/moved_inside(var/mob/living/carbon/human/H as mob) +/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H) ..() - if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3) - overlays = null - overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g") - else if(damage_absorption["brute"] == 0.3) - overlays = null - overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full") + update_icon() -/obj/mecha/working/ripley/mmi_moved_inside(var/obj/item/mmi/mmi_as_oc as obj,mob/user as mob) +/obj/mecha/working/ripley/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user) ..() - if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3) - overlays = null - overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g") - else if(damage_absorption["brute"] == 0.3) - overlays = null - overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full") + update_icon() + +/obj/mecha/working/ripley/update_icon() + ..() + if(hides) + cut_overlays() + if(hides < 3) + add_overlay(occupant ? "ripley-g" : "ripley-g-open") + else + add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open") /obj/mecha/working/ripley/firefighter desc = "Standart APLU chassis was refitted with additional thermal protection and cistern." @@ -74,13 +67,12 @@ icon_state = "firefighter" initial_icon = "firefighter" max_temperature = 65000 - health = 250 - burn_state = LAVA_PROOF + max_integrity = 250 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF lights_power = 7 - damage_absorption = list("brute"=0.6,"fire"=0.5,"bullet"=0.7,"laser"=0.7,"energy"=1,"bomb"=0.4) - armor = list(melee = 40, bullet = 30, laser = 30, energy = 30, bomb = 60, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 60, "bio" = 0, "rad" = 70, "fire" = 100, "acid" = 100) max_equip = 5 // More armor, less tools - wreckage = /obj/effect/decal/mecha_wreckage/ripley/firefighter + wreckage = /obj/structure/mecha_wreckage/ripley/firefighter /obj/mecha/working/ripley/deathripley desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE" @@ -91,10 +83,10 @@ slow_pressure_step_in = 3 opacity=0 max_temperature = 65000 - health = 300 + max_integrity = 300 lights_power = 7 - damage_absorption = list("brute"=0.6,"fire"=0.4,"bullet"=0.6,"laser"=0.6,"energy"=1,"bomb"=0.3) - wreckage = /obj/effect/decal/mecha_wreckage/ripley/deathripley + armor = list("melee" = 40, "bullet" = 40, "laser" = 40, "energy" = 0, "bomb" = 70, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + wreckage = /obj/structure/mecha_wreckage/ripley/deathripley step_energy_drain = 0 normal_step_energy_drain = 0 @@ -107,6 +99,7 @@ /obj/mecha/working/ripley/mining desc = "An old, dusty mining ripley." name = "APLU \"Miner\"" + obj_integrity = 75 //Low starting health /obj/mecha/working/ripley/mining/New() ..() @@ -184,6 +177,14 @@ step_rand(A) return ..() +/obj/mecha/working/ripley/ex_act(severity) + ..() + for(var/X in cargo) + var/obj/O = X + if(prob(30 / severity)) + cargo -= O + O.forceMove(drop_location()) + /obj/mecha/working/ripley/proc/update_pressure() var/turf/T = get_turf(loc) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 72652958e7c..0ad39cd73be 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -74,7 +74,7 @@ /obj/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE) . = ..() if(.) - if(burn_state == ON_FIRE) //Sets the mob on fire if you buckle them to a burning atom/movableect + if(resistance_flags & ON_FIRE) //Sets the mob on fire if you buckle them to a burning atom/movableect M.adjust_fire_stacks(1) M.IgniteMob() diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm index 118d3efcc2c..8f383fd518c 100644 --- a/code/game/objects/effects/alien_acid.dm +++ b/code/game/objects/effects/alien_acid.dm @@ -1,88 +1,92 @@ -/* Alien shit! - * Contains: - * effect/acid - */ - - -/* - * Acid - */ /obj/effect/acid gender = PLURAL name = "acid" - desc = "Burbling corrossive stuff." - icon = 'icons/effects/effects.dmi' + desc = "Burbling corrosive stuff." icon_state = "acid" - density = 0 + density = FALSE opacity = 0 - anchored = 1 - unacidable = 1 - var/atom/target - var/ticks = 0 - var/target_strength = 0 + anchored = TRUE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + layer = ABOVE_NORMAL_TURF_LAYER + var/turf/target -/obj/effect/acid/New(loc, targ) - ..(loc) - target = targ +/obj/effect/acid/Initialize(mapload, acid_pwr, acid_amt) + . = ..() + + target = get_turf(src) + + if(acid_amt) + acid_level = min(acid_amt * acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor. //handle APCs and newscasters and stuff nicely - pixel_x = target.pixel_x - pixel_y = target.pixel_y + pixel_x = target.pixel_x + rand(-4,4) + pixel_y = target.pixel_y + rand(-4,4) - if(isturf(target)) //Turfs take twice as long to take down. - target_strength = 640 - else - target_strength = 320 - tick() + START_PROCESSING(SSobj, src) -/obj/effect/acid/proc/tick() +/obj/effect/acid/Destroy() + STOP_PROCESSING(SSobj, src) + target = null + return ..() + +/obj/effect/acid/process() + . = 1 if(!target) qdel(src) + return 0 - ticks++ + if(prob(5)) + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) - if(ticks >= target_strength) - target.visible_message("[target] collapses under its own weight into a puddle of goop and undigested debris!") - - if(istype(target, /obj/structure/closet)) - var/obj/structure/closet/T = target - T.dump_contents() - qdel(target) - - if(istype(target, /turf/simulated/mineral)) - var/turf/simulated/mineral/M = target - M.ChangeTurf(/turf/simulated/floor/plating/asteroid/airless) - - if(istype(target, /turf/simulated/floor)) - var/turf/simulated/floor/F = target - F.ChangeTurf(F.baseturf) - - if(istype(target, /turf/simulated/wall)) - var/turf/simulated/wall/W = target - W.dismantle_wall(1) - - else - qdel(target) + for(var/obj/O in target) + if(prob(20) && !(resistance_flags & UNACIDABLE)) + if(O.acid_level < acid_level * 0.3) + var/acid_used = min(acid_level * 0.05, 20) + O.acid_act(10, acid_used) + acid_level = max(0, acid_level - acid_used * 10) + acid_level = max(acid_level - (5 + 2 * round(sqrt(acid_level))), 0) + if(acid_level <= 0) qdel(src) - return + return 0 - x = target.x - y = target.y - z = target.z +/obj/effect/acid/Crossed(AM as mob|obj) + if(isliving(AM)) + var/mob/living/L = AM + if(L.flying) + return + if(L.m_intent != MOVE_INTENT_WALK && prob(40)) + var/acid_used = min(acid_level * 0.05, 20) + if(L.acid_act(10, acid_used, "feet")) + acid_level = max(0, acid_level - acid_used * 10) + playsound(L, 'sound/weapons/sear.ogg', 50, TRUE) + to_chat(L, "[src] burns you!") - switch(target_strength - ticks) - if(480) - visible_message("[target] is holding up against the acid!") - if(320) - visible_message("[target] is being melted by the acid!") - if(160) - visible_message("[target] is struggling to withstand the acid!") - if(80) - visible_message("[target] begins to crumble under the acid!") +//xenomorph corrosive acid +/obj/effect/acid/alien + var/target_strength = 30 - spawn(1) - if(src) - tick() + +/obj/effect/acid/alien/process() + . = ..() + if(.) + if(prob(45)) + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) + target_strength-- + if(target_strength <= 0) + target.visible_message("[target] collapses under its own weight into a puddle of goop and undigested debris!") + target.acid_melt() + qdel(src) + else + + switch(target_strength) + if(24) + visible_message("[target] is holding up against the acid!") + if(16) + visible_message("[target] is being melted by the acid!") + if(8) + visible_message("[target] is struggling to withstand the acid!") + if(4) + visible_message("[target] begins to crumble under the acid!") \ No newline at end of file diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 41d2c256c2b..774174f6b2f 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -5,7 +5,6 @@ icon = 'icons/effects/effects.dmi' desc = "A mysterious anomaly, seen commonly only in the region of space that the station orbits..." icon_state = "bhole3" - unacidable = 1 density = 0 anchored = 1 luminosity = 3 diff --git a/code/game/objects/effects/bump_teleporter.dm b/code/game/objects/effects/bump_teleporter.dm index bb9a34010c9..02e35b7e876 100644 --- a/code/game/objects/effects/bump_teleporter.dm +++ b/code/game/objects/effects/bump_teleporter.dm @@ -19,6 +19,12 @@ var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list() BUMP_TELEPORTERS -= src return ..() +/obj/effect/bump_teleporter/singularity_act() + return + +/obj/effect/bump_teleporter/singularity_pull() + return + /obj/effect/bump_teleporter/Bumped(atom/user) if(!ismob(user)) //user.loc = src.loc //Stop at teleporter location diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 3308acffcd8..fd7ce125089 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -172,6 +172,9 @@ var/global/list/image/splatter_cache = list() overlays += giblets . = ..() +/obj/effect/decal/cleanable/blood/gibs/ex_act(severity) + return + /obj/effect/decal/cleanable/blood/gibs/up random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gibup1", "gibup1", "gibup1") diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index 349b8039d92..cee5517fd0a 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -75,6 +75,9 @@ . = ..() QDEL_IN(src, 2 MINUTES) +/obj/effect/decal/cleanable/greenglow/ex_act() + return + /obj/effect/decal/cleanable/cobweb name = "cobweb" desc = "Somebody should remove that." @@ -83,11 +86,7 @@ layer = OBJ_LAYER icon = 'icons/effects/effects.dmi' icon_state = "cobweb1" - burntime = 1 - -/obj/effect/decal/cleanable/cobweb/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - ..() - qdel(src) + resistance_flags = FLAMMABLE /obj/effect/decal/cleanable/molten_object name = "gooey grey mass" @@ -133,6 +132,22 @@ random_icon_states = list("gvomit_1", "gvomit_2", "gvomit_3", "gvomit_4") scoop_reagents = list("green_vomit" = 5) +/obj/effect/decal/cleanable/shreds + name = "shreds" + desc = "The shredded remains of what appears to be clothing." + icon_state = "shreds" + gender = PLURAL + mergeable_decal = FALSE + +/obj/effect/decal/cleanable/shreds/ex_act(severity, target) + if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion. + qdel(src) + +/obj/effect/decal/cleanable/shreds/Initialize(mapload) + pixel_x = rand(-10, 10) + pixel_y = rand(-10, 10) + . = ..() + /obj/effect/decal/cleanable/tomato_smudge name = "tomato smudge" desc = "It's red." diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 2feaea2a149..88821ae34c6 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -8,7 +8,7 @@ desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. Its vulgar themes have marked it as contraband aboard Nanotrasen space facilities." icon = 'icons/obj/contraband.dmi' force = 0 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/poster_type var/obj/structure/sign/poster/poster_structure @@ -94,6 +94,8 @@ else to_chat(user, "You carefully remove the poster from the wall.") roll_and_drop(user.loc) + return + return ..() /obj/structure/sign/poster/attack_hand(mob/user) if(ruined) diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index 64561630d06..425031ae3e5 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -10,6 +10,9 @@ icon = 'icons/obj/chempuff.dmi' pass_flags = PASSTABLE | PASSGRILLE +/obj/effect/decal/chempuff/blob_act(obj/structure/blob/B) + return + /obj/effect/decal/snow name = "snow" density = FALSE diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm index 77a51b4d975..d69b8cad25a 100644 --- a/code/game/objects/effects/decals/remains.dm +++ b/code/game/objects/effects/decals/remains.dm @@ -1,6 +1,12 @@ /obj/effect/decal/remains gender = PLURAL +/obj/effect/decal/remains/acid_act() + visible_message("[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!") + playsound(src, 'sound/items/welder.ogg', 150, TRUE) + new /obj/effect/decal/cleanable/greenglow(drop_location()) + qdel(src) + /obj/effect/decal/remains/human name = "remains" desc = "They look like human remains. They have a strange aura about them." diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index 04ea1dc0841..6792f0aa6e2 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -8,7 +8,6 @@ would spawn and follow the beaker, even if it is carried or thrown. /obj/effect/particle_effect name = "particle effect" mouse_opacity = MOUSE_OPACITY_TRANSPARENT - unacidable = TRUE //So effects are not targeted by alien acid. pass_flags = PASSTABLE | PASSGRILLE anchored = TRUE diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index f134bd44b10..8338e727c9c 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -170,6 +170,7 @@ desc = "A lightweight foamed metal wall." icon = 'icons/effects/effects.dmi' icon_state = "metalfoam" + resistance_flags = FIRE_PROOF | ACID_PROOF density = TRUE opacity = TRUE // changed in New() anchored = TRUE @@ -191,7 +192,7 @@ move_update_air(T) /obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) - playsound(loc, 'sound/weapons/tap.ogg', 100, 1) + playsound(src.loc, 'sound/weapons/tap.ogg', 100, TRUE) /obj/structure/foamedmetal/proc/updateicon() if(metal == MFOAM_ALUMINUM) diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index fda96373825..338219da1ae 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -4,8 +4,8 @@ /obj/effect icon = 'icons/effects/effects.dmi' - burn_state = LAVA_PROOF - resistance_flags = INDESTRUCTIBLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF + move_resist = INFINITY anchored = 1 can_be_hit = FALSE @@ -15,11 +15,39 @@ /obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE) return FALSE +/obj/effect/singularity_act() + qdel(src) + return FALSE + +/obj/effect/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + return + +/obj/effect/acid_act() + return + +/obj/effect/mech_melee_attack(obj/mecha/M) + return 0 + +/obj/effect/blob_act(obj/structure/blob/B) + return + /obj/effect/experience_pressure_difference() return +/obj/effect/ex_act(severity) + switch(severity) + if(1) + qdel(src) + if(2) + if(prob(60)) + qdel(src) + if(3) + if(prob(25)) + qdel(src) + /obj/effect/decal plane = FLOOR_PLANE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF var/no_scoop = FALSE //if it has this, don't let it be scooped up var/no_clear = FALSE //if it has this, don't delete it when its' scooped up var/list/scoop_reagents = null @@ -51,4 +79,14 @@ if(reagents) for(var/datum/reagent/R in reagents.reagent_list) R.on_ex_act() - ..() \ No newline at end of file + qdel(src) + +/obj/effect/decal/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + if(reagents) + reagents.temperature_reagents(exposed_temperature) + if(!(resistance_flags & FIRE_PROOF)) //non fire proof decal or being burned by lava + qdel(src) + +/obj/effect/decal/blob_act(obj/structure/blob/B) + if(B && B.loc == loc) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/effects/forcefields.dm b/code/game/objects/effects/forcefields.dm index b18f283e9a8..848c6701434 100644 --- a/code/game/objects/effects/forcefields.dm +++ b/code/game/objects/effects/forcefields.dm @@ -6,7 +6,6 @@ anchored = 1 opacity = 0 density = 1 - unacidable = 1 var/lifetime = 30 SECONDS /obj/effect/forcefield/New() diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index fa64bedd2ac..0fe284fb67e 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -3,13 +3,13 @@ /obj/structure/glowshroom name = "glowshroom" desc = "Mycena Bregprox, a species of mushroom that glows in the dark." - anchored = 1 + anchored = TRUE opacity = 0 - density = 0 + density = FALSE icon = 'icons/obj/lighting.dmi' icon_state = "glowshroom" //replaced in New - layer = 2.1 - var/endurance = 30 + layer = ABOVE_NORMAL_TURF_LAYER + max_integrity = 30 var/delay = 1200 var/floor = 0 var/generation = 1 @@ -52,7 +52,8 @@ myseed.adjust_production(rand(-3,6)) myseed.adjust_endurance(rand(-3,6)) delay = delay - myseed.production * 100 //So the delay goes DOWN with better stats instead of up. :I - endurance = myseed.endurance + obj_integrity = myseed.endurance + max_integrity = myseed.endurance if(myseed.get_gene(/datum/plant_gene/trait/glow)) var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow) set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color) @@ -151,40 +152,18 @@ floor = 1 return 1 -/obj/structure/glowshroom/attackby(obj/item/I, mob/user) - ..() - var/damage_to_do = I.force - if(istype(I, /obj/item/scythe)) - var/obj/item/scythe/S = I - if(S.extend) //so folded telescythes won't get damage boosts / insta-clears (they instead will instead be treated like non-scythes) - damage_to_do *= 4 - for(var/obj/structure/glowshroom/G in range(1,src)) - G.endurance -= damage_to_do - G.CheckEndurance() - return - else if(I.sharp) - damage_to_do = I.force * 3 // wirecutter: 6->18, knife 10->30, hatchet 12->36 - if(I.damtype != STAMINA) - endurance -= damage_to_do - CheckEndurance() - -/obj/structure/glowshroom/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - if(3) - if(prob(5)) - qdel(src) +/obj/structure/glowshroom/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + if(damage_type == BURN && damage_amount) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) /obj/structure/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() if(exposed_temperature > 300) - endurance -= 5 - CheckEndurance() + take_damage(5, BURN, 0, 0) -/obj/structure/glowshroom/proc/CheckEndurance() - if(endurance <= 0) - qdel(src) +/obj/structure/glowshroom/acid_act(acidpwr, acid_volume) + . = 1 + visible_message("[src] melts away!") + var/obj/effect/decal/cleanable/molten_object/I = new (get_turf(src)) + I.desc = "Looks like this was \an [src] some time ago." + qdel(src) \ No newline at end of file diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index eac27316f44..0cab543c5a7 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -3,7 +3,7 @@ icon = 'icons/mob/screen_gen.dmi' icon_state = "x2" anchored = 1.0 - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/landmark/New() @@ -101,6 +101,16 @@ tag = text("landmark*[]", name) +/obj/effect/landmark/singularity_act() + return + +// Please stop bombing the Observer-Start landmark. +/obj/effect/landmark/ex_act() + return + +/obj/effect/landmark/singularity_pull() + return + /obj/effect/landmark/start name = "start" icon = 'icons/mob/screen_gen.dmi' diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm index 9b4814237fe..ea1c80e5346 100644 --- a/code/game/objects/effects/manifest.dm +++ b/code/game/objects/effects/manifest.dm @@ -2,7 +2,6 @@ name = "manifest" icon = 'icons/mob/screen_gen.dmi' icon_state = "x" - unacidable = 1//Just to be sure. /obj/effect/manifest/New() diff --git a/code/game/objects/effects/misc.dm b/code/game/objects/effects/misc.dm index 191f776d01c..bd237fbfdb6 100644 --- a/code/game/objects/effects/misc.dm +++ b/code/game/objects/effects/misc.dm @@ -33,11 +33,9 @@ layer = 99 plane = HUD_PLANE mouse_opacity = MOUSE_OPACITY_TRANSPARENT - unacidable = 1//Just to be sure. /obj/effect/beam name = "beam" - unacidable = 1//Just to be sure. var/def_zone pass_flags = PASSTABLE @@ -53,7 +51,6 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "begin" anchored = 1.0 - unacidable = 1 /obj/effect/projection name = "Projection" @@ -73,7 +70,6 @@ desc = "A stand with the empty body of a cyborg bolted to it." density = 1 anchored = 1 - unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr /obj/effect/spawner name = "object spawner" diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 312826d3ddb..4506f9b33a9 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -1,6 +1,5 @@ /obj/effect/overlay name = "overlay" - unacidable = 1 var/i_attached//Added for possible image attachments to objects. For hallucinations and the like. /obj/effect/overlay/singularity_act() diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index f36902664f8..99f1ec2965f 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -3,7 +3,6 @@ desc = "Looks unstable. Best to test it with the clown." icon = 'icons/obj/stationobjs.dmi' icon_state = "portal" - unacidable = TRUE anchored = TRUE var/obj/item/target = null @@ -110,7 +109,7 @@ if(!do_teleport(M, target, precision, bypass_area_flag = ignore_tele_proof_area_setting)) // Try to send them to a turf adjacent to target. invalid_teleport() return FALSE - + return TRUE /obj/effect/portal/proc/invalid_teleport() diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index d4336aa6cf3..169a0a4b3c8 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -5,74 +5,31 @@ icon = 'icons/effects/effects.dmi' anchored = TRUE density = FALSE - var/health = 15 + max_integrity = 15 var/mob/living/carbon/human/master_commander = null +/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) + + +/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee") + switch(damage_type) + if(BURN) + damage_amount *= 2 + if(BRUTE) + damage_amount *= 0.25 + . = ..() + /obj/structure/spider/Destroy() master_commander = null return ..() -//similar to weeds, but only barfed out by nurses manually -/obj/structure/spider/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - if(3) - if(prob(5)) - qdel(src) - -/obj/structure/spider/attackby(obj/item/W, mob/user, params) - if(W.attack_verb.len) - visible_message("[user] has [pick(W.attack_verb)] [src] with [W]!") - else - visible_message("[user] has attacked [src] with [W]!") - var/damage = W.force / 4 - if(iswelder(W)) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0, user)) - damage = 15 - playsound(loc, WT.usesound, 100, 1) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - health -= damage - healthcheck() - -/obj/structure/spider/attack_animal(mob/living/simple_animal/M) - if(M.melee_damage_upper == 0) - return - var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - visible_message("\The [M] [M.attacktext] [src]!") - health -= damage - healthcheck() - -/obj/structure/spider/attack_alien(mob/living/carbon/alien/humanoid/M) - playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1) - visible_message("[M] has slashed at [src]!", "[M] has slashed at [src]!") - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - var/damage = rand(10, 20) - health -= damage - healthcheck() - -/obj/structure/spider/bullet_act(obj/item/projectile/Proj) - ..() - health -= Proj.damage - healthcheck() - -/obj/structure/spider/proc/healthcheck() - if(health <= 0) - qdel(src) - /obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() if(exposed_temperature > 300) - health -= 5 - healthcheck() + take_damage(5, BURN, 0, 0) /obj/structure/spider/stickyweb icon_state = "stickyweb1" @@ -127,7 +84,7 @@ icon_state = "spiderling" anchored = 0 layer = 2.75 - health = 3 + max_integrity = 3 var/amount_grown = 0 var/grow_as = null var/obj/machinery/atmospherics/unary/vent_pump/entry_vent @@ -145,6 +102,7 @@ /obj/structure/spider/spiderling/Destroy() STOP_PROCESSING(SSobj, src) entry_vent = null + new /obj/effect/decal/cleanable/spiderling_remains(get_turf(src)) return ..() /obj/structure/spider/spiderling/Bump(atom/user) @@ -153,15 +111,6 @@ else ..() -/obj/structure/spider/spiderling/proc/die() - visible_message("[src] dies!") - new /obj/effect/decal/cleanable/spiderling_remains(loc) - qdel(src) - -/obj/structure/spider/spiderling/healthcheck() - if(health <= 0) - die() - /obj/structure/spider/spiderling/process() if(travelling_in_vent) if(istype(loc, /turf)) @@ -251,7 +200,7 @@ name = "cocoon" desc = "Something wrapped in silky spider web" icon_state = "cocoon1" - health = 60 + max_integrity = 60 /obj/structure/spider/cocoon/New() ..() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index a618a57076f..4955f7f508a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -15,13 +15,14 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/inhand_x_dimension = 32 var/inhand_y_dimension = 32 + max_integrity = 200 + can_be_hit = FALSE suicidal_hands = TRUE - var/r_speed = 1.0 - var/health = null var/hitsound = null var/usesound = null + var/throwhitsound var/w_class = WEIGHT_CLASS_NORMAL var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE @@ -80,6 +81,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does when first embedded (this*w_class) var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class) var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class. + var/embedded_ignore_throwspeed_threshold = FALSE var/toolspeed = 1 // If this item is a tool, the speed multiplier @@ -135,24 +137,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d else return 1 -/obj/item/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(5)) - qdel(src) - return - else - return - -/obj/item/blob_act() - qdel(src) +/obj/item/blob_act(obj/structure/blob/B) + if(B && B.loc == loc) + qdel(src) /obj/item/verb/move_to_top() set name = "Move To Top" @@ -207,6 +194,22 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d msg += "*--------*" . += msg +/obj/item/burn() + if(!QDELETED(src)) + var/turf/T = get_turf(src) + var/obj/effect/decal/cleanable/ash/A = new(T) + A.desc += "\nLooks like this used to be \an [name] some time ago." + ..() + +/obj/item/acid_melt() + if(!QDELETED(src)) + var/turf/T = get_turf(src) + var/obj/effect/decal/cleanable/molten_object/MO = new(T) + MO.pixel_x = rand(-16,16) + MO.pixel_y = rand(-16,16) + MO.desc = "Looks like this was \an [src] some time ago." + ..() + /obj/item/afterattack(atom/target, mob/user, proximity, params) SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity, params) ..() @@ -225,7 +228,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d to_chat(user, "You try to move your [temp.name], but cannot!") return 0 - if(burn_state == ON_FIRE && !pickupfireoverride) + if((resistance_flags & ON_FIRE) && !pickupfireoverride) var/mob/living/carbon/human/H = user if(istype(H)) if(H.gloves && (H.gloves.max_heat_protection_temperature > 360)) @@ -240,6 +243,15 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d else extinguish() + if(acid_level > 20 && !ismob(loc))// so we can still remove the clothes on us that have acid. + var/mob/living/carbon/human/H = user + if(istype(H)) + if(!H.gloves || (!(H.gloves.resistance_flags & (UNACIDABLE|ACID_PROOF)))) + to_chat(user, "The acid on [src] burns your hand!") + var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm") + if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage + H.UpdateDamageIcon() + if(istype(src.loc, /obj/item/storage)) //If the item is in a storage item, take it out var/obj/item/storage/S = src.loc @@ -260,13 +272,13 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d return 1 -/obj/item/attack_alien(mob/user as mob) +/obj/item/attack_alien(mob/user) var/mob/living/carbon/alien/A = user if(!A.has_fine_manipulation) if(src in A.contents) // To stop Aliens having items stuck in their pockets A.unEquip(src) - to_chat(user, "Your claws aren't capable of such fine manipulation.") + to_chat(user, "Your claws aren't capable of such fine manipulation!") return attack_hand(A) @@ -523,10 +535,11 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d return /obj/item/singularity_pull(S, current_size) - spawn(0) //this is needed or multiple items will be thrown sequentially and not simultaneously - if(current_size >= STAGE_FOUR) - throw_at(S,14,3) - else ..() + ..() + if(current_size >= STAGE_FOUR) + throw_at(S, 14, 3, spin = 0) + else + return /obj/item/throw_impact(atom/A) if(A && !QDELETED(A)) @@ -567,6 +580,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(!do_after(user, 40, target = source)) return clean_blood() + acid_level = 0 user.visible_message("[user] washes [src] using [source].", \ "You wash [src] using [source].") return 1 @@ -591,9 +605,20 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(H.slip(src, trip_stun, trip_weaken, trip_tiles, trip_walksafe, trip_any, trip_verb)) return TRUE +/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) + return + /obj/item/attack_hulk(mob/living/carbon/human/user) return FALSE +/obj/item/attack_animal(mob/living/simple_animal/M) + if(can_be_hit) + return ..() + return FALSE + +/obj/item/mech_melee_attack(obj/mecha/M) + return 0 + /obj/item/proc/openTip(location, control, params, user) openToolTip(user, src, params, title = name, content = "[desc]", theme = "") diff --git a/code/game/objects/items/ashtray.dm b/code/game/objects/items/ashtray.dm index 8e85709ef97..8ca65d7a668 100644 --- a/code/game/objects/items/ashtray.dm +++ b/code/game/objects/items/ashtray.dm @@ -1,133 +1,94 @@ /obj/item/ashtray icon = 'icons/ashtray.dmi' - var/ - max_butts = 0 - empty_desc = "" - icon_empty = "" - icon_half = "" - icon_full = "" - icon_broken = "" + var/max_butts = 0 + var/icon_half = "" + var/icon_full = "" -/obj/item/ashtray/New() - ..() - src.pixel_y = rand(-5, 5) - src.pixel_x = rand(-6, 6) - return +/obj/item/ashtray/Initialize(mapload) + . = ..() + pixel_y = rand(-5, 5) + pixel_x = rand(-6, 6) -/obj/item/ashtray/attackby(obj/item/W as obj, mob/user as mob, params) - if(health < 1) - return - if(istype(W,/obj/item/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/match)) +/obj/item/ashtray/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/cigbutt) || istype(I, /obj/item/clothing/mask/cigarette) || istype(I, /obj/item/match)) if(contents.len >= max_butts) to_chat(user, "This ashtray is full.") return - user.unEquip(W) - W.loc = src + if(!user.unEquip(I)) + return + I.forceMove(src) - if(istype(W,/obj/item/clothing/mask/cigarette)) - var/obj/item/clothing/mask/cigarette/cig = W + if(istype(I, /obj/item/clothing/mask/cigarette)) + var/obj/item/clothing/mask/cigarette/cig = I if(cig.lit == 1) - src.visible_message("[user] crushes [cig] in [src], putting it out.") + visible_message("[user] crushes [cig] in [src], putting it out.") var/obj/item/butt = new cig.type_butt(src) cig.transfer_fingerprints_to(butt) qdel(cig) else if(cig.lit == 0) to_chat(user, "You place [cig] in [src] without even smoking it. Why would you do that?") - src.visible_message("[user] places [W] in [src].") - user.update_inv_l_hand() - user.update_inv_r_hand() + visible_message("[user] places [I] in [src].") add_fingerprint(user) - if(contents.len == max_butts) - icon_state = icon_full - desc = empty_desc + " It's stuffed full." - else if(contents.len > max_butts/2) - icon_state = icon_half - desc = empty_desc + " It's half-filled." + update_icon() else - health = max(0,health - W.force) - to_chat(user, "You hit [src] with [W].") - if(health < 1) - die() - return + return ..() + +/obj/item/ashtray/update_icon() + if(contents.len == max_butts) + icon_state = icon_full + desc = initial(desc) + " It's stuffed full." + if(contents.len > max_butts * 0.5) + icon_state = icon_half + desc = initial(desc) + " It's half-filled." + else + icon_state = initial(icon_state) + desc = initial(desc) + +/obj/item/ashtray/deconstruct() + empty_tray() + qdel(src) + +/obj/item/ashtray/proc/empty_tray() + for(var/obj/item/I in contents) + I.forceMove(loc) + update_icon() /obj/item/ashtray/throw_impact(atom/hit_atom) - if(health > 0) - health = max(0,health - 3) - if(health < 1) - die() - return - if(contents.len) - src.visible_message("[src] slams into [hit_atom] spilling its contents!") - for(var/obj/item/clothing/mask/cigarette/O in contents) - O.loc = src.loc - icon_state = icon_empty + if(contents.len) + visible_message("[src] slams into [hit_atom] spilling its contents!") + empty_tray() return ..() -/obj/item/ashtray/proc/die() - src.visible_message("[src] shatters spilling its contents!") - for(var/obj/item/clothing/mask/cigarette/O in contents) - O.loc = src.loc - icon_state = icon_broken - /obj/item/ashtray/plastic name = "plastic ashtray" desc = "Cheap plastic ashtray." icon_state = "ashtray_bl" - icon_empty = "ashtray_bl" icon_half = "ashtray_half_bl" icon_full = "ashtray_full_bl" - icon_broken = "ashtray_bork_bl" - max_butts = 14 - health = 24.0 + max_butts = 8 + max_integrity = 8 materials = list(MAT_METAL=30, MAT_GLASS=30) - empty_desc = "Cheap plastic ashtray." - throwforce = 3.0 - die() - ..() - name = "pieces of plastic" - desc = "Pieces of plastic with ash on them." - return - + throwforce = 3 /obj/item/ashtray/bronze name = "bronze ashtray" desc = "Massive bronze ashtray." icon_state = "ashtray_br" - icon_empty = "ashtray_br" icon_half = "ashtray_half_br" icon_full = "ashtray_full_br" - icon_broken = "ashtray_bork_br" - max_butts = 10 - health = 72.0 + max_butts = 16 + max_integrity = 16 materials = list(MAT_METAL=80) - empty_desc = "Massive bronze ashtray." - throwforce = 10.0 - - die() - ..() - name = "pieces of bronze" - desc = "Pieces of bronze with ash on them." - return - + throwforce = 10 /obj/item/ashtray/glass name = "glass ashtray" desc = "Glass ashtray. Looks fragile." icon_state = "ashtray_gl" - icon_empty = "ashtray_gl" icon_half = "ashtray_half_gl" icon_full = "ashtray_full_gl" - icon_broken = "ashtray_bork_gl" max_butts = 12 - health = 12.0 + max_integrity = 12 materials = list(MAT_GLASS=60) - empty_desc = "Glass ashtray. Looks fragile." - throwforce = 6.0 - - die() - ..() - name = "shards of glass" - desc = "Shards of glass with ash on them." - playsound(src, "shatter", 30, 1) - return \ No newline at end of file + throwforce = 6 \ No newline at end of file diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index a566f208082..79cc221ee7f 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -92,6 +92,7 @@ icon = 'icons/obj/items.dmi' icon_state = "blueprints" fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage." + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF w_class = WEIGHT_CLASS_NORMAL var/list/showing = list() var/client/viewing diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 1e75bdc84fc..e68251f09bd 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -22,6 +22,7 @@ sound = 'sound/items/zip.ogg' var/item_path = /obj/item/bodybag density = 0 + integrity_failure = 0 /obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob, params) @@ -38,13 +39,13 @@ src.overlays += image(src.icon, "bodybag_label") else src.name = "body bag" - //..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri return - else if(istype(W, /obj/item/wirecutters)) + if(istype(W, /obj/item/wirecutters)) to_chat(user, "You cut the tag off the bodybag") src.name = "body bag" src.overlays.Cut() return + return ..() /obj/structure/closet/body_bag/close() diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 5ea13308de5..7b6d3612351 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -32,29 +32,33 @@ /obj/item/candle/attackby(obj/item/W, mob/user, params) - ..() if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool light("[user] casually lights [src] with [WT], what a badass.") - else if(istype(W, /obj/item/lighter)) + return + if(istype(W, /obj/item/lighter)) var/obj/item/lighter/L = W if(L.lit) light("After some fiddling, [user] manages to light [src] with [L].") - else if(istype(W, /obj/item/match)) + return + if(istype(W, /obj/item/match)) var/obj/item/match/M = W if(M.lit) light("[user] lights [src] with [M]") - else if(istype(W, /obj/item/candle)) + return + if(istype(W, /obj/item/candle)) var/obj/item/candle/C = W if(C.lit) light("[user] tilts [C] and lights [src] with it.") + return + return ..() /obj/item/candle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - ..() if(!lit) light() //honk + return ..() /obj/item/candle/proc/light(show_message) if(!lit) diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 3693acf8e2f..788de290b19 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -4,7 +4,7 @@ desc = "A vaguely humanoid cardboard cutout. It's completely blank." icon = 'icons/obj/cardboard_cutout.dmi' icon_state = "cutout_basic" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE w_class = WEIGHT_CLASS_BULKY var/list/possible_appearances = list("Assistant", "Clown", "Mime", "Traitor", "Nuke Op", "Cultist", "Revolutionary", "Wizard", "Shadowling", "Xenomorph", "Swarmer", @@ -63,7 +63,7 @@ push_over() /obj/item/cardboard_cutout/bullet_act(obj/item/projectile/P) - visible_message("[src] has been hit by [P]!") + visible_message("[src] is hit by [P]!") playsound(src, 'sound/weapons/slice.ogg', 50, 1) if(prob(P.damage)) push_over() diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 44a84ded883..ce8e0fe1ce0 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -104,13 +104,4 @@ to_chat(user, "You [AI.control_disabled ? "disable" : "enable"] the AI's wireless interface.") update_icon() - return 1 - -/obj/item/aicard/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - if(2.0) - if(prob(50)) qdel(src) - if(3.0) - if(prob(25)) qdel(src) + return 1 \ No newline at end of file diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 5fa2bd692e0..be58a9dc12a 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -112,7 +112,16 @@ to_chat(M, "Your chameleon-projector deactivates.") master.disrupt() -/obj/effect/dummy/chameleon/ex_act(var/severity) //no longer bomb-proof +/obj/effect/dummy/chameleon/attack_animal() + master.disrupt() + +/obj/effect/dummy/chameleon/attack_slime() + master.disrupt() + +/obj/effect/dummy/chameleon/attack_alien() + master.disrupt() + +/obj/effect/dummy/chameleon/ex_act(severity) //no longer bomb-proof for(var/mob/M in src) to_chat(M, "Your chameleon-projector deactivates.") spawn() diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 74f98a9384a..90a778f8e49 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -394,5 +394,4 @@ on = TRUE anchored = TRUE var/range = null - unacidable = TRUE - burn_state = LAVA_PROOF + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 6d3a1c2b49d..3942407b3d8 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -4,7 +4,8 @@ icon = 'icons/obj/musician.dmi' lefthand_file = 'icons/mob/inhands/equipment/instruments_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/instruments_righthand.dmi' - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE + max_integrity = 100 var/datum/song/handheld/song var/instrumentId = "generic" var/instrumentExt = "mid" @@ -55,7 +56,7 @@ desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\"" icon_state = "golden_violin" item_state = "golden_violin" - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/instrument/piano_synth name = "synthesizer" diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 64971ae37a3..e6ffa264a51 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -12,6 +12,7 @@ var/looking_for_personality = 0 var/mob/living/silicon/pai/pai var/list/faction = list("neutral") // The factions the pAI will inherit from the card + resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE /obj/item/paicard/syndicate name = "syndicate personal AI device" @@ -334,12 +335,6 @@ M.emp_act(severity) ..() -/obj/item/paicard/ex_act(severity) - if(pai) - pai.ex_act(severity) - else - qdel(src) - /obj/item/paicard/extinguish_light() pai.extinguish_light() - set_light(0) + set_light(0) \ No newline at end of file diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index 908c205939d..a2b1f2fdedb 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -10,6 +10,7 @@ throw_speed = 1 layer = 4 pressure_resistance = 2 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/documents/nanotrasen desc = "\"Top Secret\" Nanotrasen documents printed on special copy-protected paper. It is filled with complex diagrams and lists of names, dates and coordinates." diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index 121b0214b5a..d0118d815fb 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -6,13 +6,13 @@ lefthand_file = 'icons/mob/inhands/flags_lefthand.dmi' righthand_file = 'icons/mob/inhands/flags_righthand.dmi' w_class = WEIGHT_CLASS_BULKY - burntime = 20 - burn_state = FLAMMABLE + max_integrity = 40 + resistance_flags = FLAMMABLE var/rolled = FALSE /obj/item/flag/attackby(obj/item/W, mob/user, params) - ..() - if(is_hot(W) && burn_state != ON_FIRE) + . = ..() + if(is_hot(W) && !(resistance_flags & ON_FIRE)) user.visible_message("[user] lights [src] with [W].", "You light [src] with [W].", "You hear a low whoosh.") fire_act() @@ -35,11 +35,11 @@ item_state = icon_state if(rolled) icon_state = "[icon_state]_rolled" - if(burn_state == ON_FIRE) + if(resistance_flags & ON_FIRE) item_state = "[item_state]_fire" - if(burn_state == ON_FIRE && rolled) + if((resistance_flags & ON_FIRE) && rolled) overlays += image('icons/obj/flag.dmi', src , "fire_rolled") - else if(burn_state == ON_FIRE && !rolled) + else if((resistance_flags & ON_FIRE) && !rolled) overlays += image('icons/obj/flag.dmi', src , "fire") if(ismob(loc)) var/mob/M = loc @@ -251,16 +251,16 @@ boobytrap = null trapper = null else - ..() + return ..() /obj/item/flag/chameleon/attackby(obj/item/W, mob/user, params) - if(is_hot(W) && burn_state != ON_FIRE && boobytrap && trapper) + if(is_hot(W) && !(resistance_flags & ON_FIRE) && boobytrap && trapper) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) message_admins("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] (JMP).") log_game("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") investigate_log("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).", INVESTIGATE_BOMB) - ..() + return ..() /obj/item/flag/chameleon/burn() if(boobytrap) diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 771ccce0f6b..9be42813e09 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -40,14 +40,16 @@ /obj/item/latexballon/ex_act(severity) burst() switch(severity) - if(1) + if (1) qdel(src) - if(2) - if(prob(50)) + if (2) + if (prob(50)) qdel(src) -/obj/item/latexballon/bullet_act() - burst() +/obj/item/latexballon/bullet_act(obj/item/projectile/P) + if(!P.nodamage) + burst() + return ..() /obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume) ..() diff --git a/code/game/objects/items/mountable_frames/apc_frame.dm b/code/game/objects/items/mountable_frames/apc_frame.dm index fbdab5584f1..f6707775fb2 100644 --- a/code/game/objects/items/mountable_frames/apc_frame.dm +++ b/code/game/objects/items/mountable_frames/apc_frame.dm @@ -6,23 +6,26 @@ mount_reqs = list("simfloor", "nospace") /obj/item/mounted/frame/apc_frame/try_build(turf/on_wall, mob/user) - if(..()) - var/turf/turf_loc = get_turf(user) - var/area/area_loc = turf_loc.loc - if(area_loc.get_apc()) - to_chat(user, "This area already has an APC.") - return //only one APC per area - for(var/obj/machinery/power/terminal/T in turf_loc) - if(T.master) - to_chat(user, "There is another network terminal here.") - return - else - var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(turf_loc) - C.amount = 10 - to_chat(user, "You cut the cables and disassemble the unused power terminal.") - qdel(T) - return 1 - return + if(!..()) + return + var/turf/T = get_turf(user) + var/area/A = get_area(T) + if(A.get_apc()) + to_chat(user, "This area already has an APC!") + return //only one APC per area + if(!A.requires_power) + to_chat(user, "You cannot place [src] in this area!") + return //can't place apcs in areas with no power requirement + for(var/obj/machinery/power/terminal/E in T) + if(E.master) + to_chat(user, "There is another network terminal here!") + return + else + var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(T) + C.amount = 10 + to_chat(user, "You cut the cables and disassemble the unused power terminal.") + qdel(E) + return TRUE /obj/item/mounted/frame/apc_frame/do_build(turf/on_wall, mob/user) new /obj/machinery/power/apc(get_turf(src), get_dir(user, on_wall), 1) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 439f3cb971b..887016d1fdf 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -7,6 +7,8 @@ w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 7 + resistance_flags = FLAMMABLE + max_integrity = 40 var/heal_brute = 0 var/heal_burn = 0 var/self_delay = 20 diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index def012e2663..769bc9dad54 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -28,6 +28,8 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \ singular_name = "glass sheet" icon_state = "sheet-glass" materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100) + resistance_flags = ACID_PROOF origin_tech = "materials=1" created_window = /obj/structure/window/basic full_window = /obj/structure/window/full/basic @@ -87,6 +89,8 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \ singular_name = "reinforced glass sheet" icon_state = "sheet-rglass" materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100) + resistance_flags = ACID_PROOF origin_tech = "materials=2" created_window = /obj/structure/window/reinforced full_window = /obj/structure/window/full/reinforced @@ -112,6 +116,8 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ icon_state = "sheet-plasmaglass" item_state = "sheet-rglass" materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT*2) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 100) + resistance_flags = ACID_PROOF origin_tech = "plasmatech=2;materials=2" created_window = /obj/structure/window/plasmabasic full_window = /obj/structure/window/full/plasmabasic @@ -153,10 +159,11 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \ icon_state = "sheet-plasmarglass" item_state = "sheet-rglass" materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT*2) + armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) + resistance_flags = ACID_PROOF origin_tech = "plasmatech=2;materials=2" created_window = /obj/structure/window/plasmareinforced full_window = /obj/structure/window/full/plasmareinforced - armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0) point_value = 23 /obj/item/stack/sheet/plasmarglass/New(loc, amount) @@ -174,6 +181,8 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list( icon_state = "sheet-titaniumglass" item_state = "sheet-rglass" materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) + resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/titaniumglass full_window = /obj/structure/window/full/shuttle @@ -192,6 +201,8 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( icon_state = "sheet-plastitaniumglass" item_state = "sheet-rglass" materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) + resistance_flags = ACID_PROOF merge_type = /obj/item/stack/sheet/plastitaniumglass full_window = /obj/structure/window/plastitanium diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index 7e18fa4a8ea..e48aa4befe5 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -133,52 +133,41 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ flags = NOBLUDGEON w_class = WEIGHT_CLASS_NORMAL layer = MOB_LAYER - var/static/list/can_strengthen_clothing - -/obj/item/stack/sheet/animalhide/goliath_hide/Initialize(mapload) - . = ..() - if(!can_strengthen_clothing) - can_strengthen_clothing = typecacheof(list( + var/static/list/goliath_platable_armor_typecache = typecacheof(list( /obj/item/clothing/suit/space/hardsuit/mining, /obj/item/clothing/head/helmet/space/hardsuit/mining, /obj/item/clothing/suit/hooded/explorer, /obj/item/clothing/head/hooded/explorer, - /obj/item/clothing/head/helmet/space/plasmaman/mining - )) + /obj/item/clothing/head/helmet/space/plasmaman/mining)) /obj/item/stack/sheet/animalhide/goliath_hide/afterattack(atom/target, mob/user, proximity_flag) - if(proximity_flag) - if(is_type_in_typecache(target, can_strengthen_clothing)) - var/obj/item/clothing/C = target - var/current_armor = C.armor - if(current_armor["melee"] < 60) - current_armor["melee"] = min(current_armor["melee"] + 10, 60) - to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") - use(1) + if(!proximity_flag) + return + if(is_type_in_typecache(target, goliath_platable_armor_typecache)) + var/obj/item/clothing/C = target + var/list/current_armor = C.armor + if(current_armor["melee"] < 60) + current_armor["melee"] = min(current_armor["melee"] + 10, 60) + to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") + use(1) + else + to_chat(user, "You can't improve [C] any further!") + else if(istype(target, /obj/mecha/working/ripley)) + var/obj/mecha/working/ripley/D = target + if(D.hides < 3) + D.hides++ + D.armor["melee"] = min(D.armor["melee"] + 10, 70) + D.armor["bullet"] = min(D.armor["bullet"] + 5, 50) + D.armor["laser"] = min(D.armor["laser"] + 5, 50) + to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") + D.update_icon() + if(D.hides == 3) + D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - its pilot must be an experienced monster hunter." else - to_chat(user, "You can't improve [C] any further.") - return - if(istype(target, /obj/mecha/working/ripley)) - var/obj/mecha/D = target - if(D.icon_state != "ripley-open") - to_chat(user, "You can't add armour onto the mech while someone is inside!") - return - var/list/damage_absorption = D.damage_absorption - if(damage_absorption["brute"] > 0.3) - damage_absorption["brute"] = max(damage_absorption["brute"] - 0.1, 0.3) - damage_absorption["bullet"] = damage_absorption["bullet"] - 0.05 - damage_absorption["fire"] = damage_absorption["fire"] - 0.05 - damage_absorption["laser"] = damage_absorption["laser"] - 0.025 - to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") - use(1) - D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open") D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." - if(damage_absorption["brute"] == 0.3) - D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open") - D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter." - else - to_chat(user, "You can't improve [D] any further!") - return + use(1) + else + to_chat(user, "You can't improve [D] any further!") /obj/item/stack/sheet/animalhide/ashdrake name = "ash drake hide" diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index c9099d6d38b..047ffb3292a 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -208,8 +208,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \ origin_tech = "plasmatech=2;materials=2" sheettype = "plasma" materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT) - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 100 point_value = 20 /obj/item/stack/sheet/mineral/plasma/New() diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 27061500607..e85aa28bde8 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -104,6 +104,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list( materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT) throwforce = 10.0 flags = CONDUCT + resistance_flags = FIRE_PROOF origin_tech = "materials=1" merge_type = /obj/item/stack/sheet/metal point_value = 2 @@ -149,6 +150,8 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list( icon_state = "sheet-plasteel" item_state = "sheet-metal" materials = list(MAT_METAL=2000, MAT_PLASMA=2000) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80) + resistance_flags = FIRE_PROOF throwforce = 10.0 flags = CONDUCT origin_tech = "materials=2" @@ -175,6 +178,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list( new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), + new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50), new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10), @@ -194,7 +198,8 @@ var/global/list/datum/stack_recipe/wood_recipes = list( singular_name = "wood plank" icon_state = "sheet-wood" origin_tech = "materials=1;biotech=1" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0) merge_type = /obj/item/stack/sheet/wood /obj/item/stack/sheet/wood/New(var/loc, var/amount=null) @@ -237,7 +242,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \ singular_name = "cloth roll" icon_state = "sheet-cloth" origin_tech = "materials=2" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/cloth @@ -262,7 +267,7 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \ singular_name = "durathread roll" icon_state = "sheet-durathread" item_state = "sheet-cloth" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/durathread @@ -276,7 +281,7 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \ desc = "A bundle of raw cotton ready to be spun on the loom." singular_name = "raw cotton ball" icon_state = "sheet-cotton" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/cotton @@ -327,7 +332,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( singular_name = "cardboard sheet" icon_state = "sheet-card" origin_tech = "materials=1" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE merge_type = /obj/item/stack/sheet/cardboard /obj/item/stack/sheet/cardboard/New(var/loc, var/amt = null) @@ -407,7 +412,7 @@ var/global/list/datum/stack_recipe/brass_recipes = list (\ singular_name = "brass sheet" icon_state = "sheet-brass" icon = 'icons/obj/items.dmi' - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF throwforce = 10 max_amount = 50 throw_speed = 1 diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 20b1c64f61d..a4141a7a58a 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -38,10 +38,10 @@ merge(O) ..() -/obj/item/stack/hitby(atom/movable/AM, skipcatch, hitpush) +/obj/item/stack/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) if(istype(AM, merge_type) && !(amount >= max_amount)) merge(AM) - ..() + . = ..() /obj/item/stack/Destroy() if(usr && usr.machine == src) @@ -130,7 +130,7 @@ if(R.max_res_amount > 1 && max_multiplier > 1) max_multiplier = min(max_multiplier, round(R.max_res_amount / R.res_amount)) t1 += " |" - + var/list/multipliers = list(5, 10, 25) for(var/n in multipliers) if(max_multiplier >= n) diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index fcbb277edd5..564010b1aed 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -81,7 +81,7 @@ icon_state = "tile_grass" origin_tech = "biotech=1" turf_type = /turf/simulated/floor/grass - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE //Wood /obj/item/stack/tile/wood @@ -92,7 +92,7 @@ icon_state = "tile-wood" origin_tech = "biotech=1" turf_type = /turf/simulated/floor/wood - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE //Carpets /obj/item/stack/tile/carpet @@ -101,7 +101,7 @@ desc = "A piece of carpet. It is the same size as a floor tile" icon_state = "tile-carpet" turf_type = /turf/simulated/floor/carpet - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/stack/tile/carpet/black name = "black carpet" @@ -123,6 +123,8 @@ flags = CONDUCT turf_type = /turf/simulated/floor/plasteel mineralType = "metal" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70) + resistance_flags = FIRE_PROOF //Light /obj/item/stack/tile/light @@ -143,7 +145,7 @@ desc = "A piece of carpet with a convincing star pattern." icon_state = "tile_space" turf_type = /turf/simulated/floor/fakespace - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE merge_type = /obj/item/stack/tile/fakespace /obj/item/stack/tile/fakespace/loaded @@ -191,7 +193,7 @@ icon_state = "tile_space" turf_type = /turf/simulated/floor/carpet/arcade merge_type = /obj/item/stack/tile/arcade_carpet - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/stack/tile/arcade_carpet/loaded amount = 20 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 41476b9453c..71d5e36badf 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -404,8 +404,8 @@ obj/item/toy/cards - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 50 var/parentdeck = null var/deckstyle = "nanotrasen" var/card_hitsound = null @@ -627,6 +627,7 @@ obj/item/toy/cards/cardhand/apply_card_vars(obj/item/toy/cards/newobj,obj/item/t newobj.card_throw_speed = sourceobj.card_throw_speed newobj.card_throw_range = sourceobj.card_throw_range newobj.card_attack_verb = sourceobj.card_attack_verb + newobj.resistance_flags = sourceobj.resistance_flags obj/item/toy/cards/singlecard @@ -753,7 +754,7 @@ obj/item/toy/cards/deck/syndicate card_throw_speed = 3 card_throw_range = 20 card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut") - burn_state = FIRE_PROOF + resistance_flags = NONE /* || Custom card decks || @@ -795,7 +796,7 @@ obj/item/toy/cards/deck/syndicate/black item_state = "egg4" w_class = WEIGHT_CLASS_TINY var/cooldown = 0 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/toy/therapy/New() if(item_color) @@ -891,7 +892,7 @@ obj/item/toy/cards/deck/syndicate/black icon_state = "carpplushie" attack_verb = list("bitten", "eaten", "fin slapped") var/bitesound = 'sound/weapons/bite.ogg' - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE // Attack mob /obj/item/toy/carpplushie/attack(mob/M as mob, mob/user as mob) @@ -954,7 +955,7 @@ obj/item/toy/cards/deck/syndicate/black icon = 'icons/obj/toy.dmi' var/poof_sound = 'sound/weapons/thudswoosh.ogg' attack_verb = list("poofed", "bopped", "whapped","cuddled","fluffed") - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/toy/plushie/attack(mob/M as mob, mob/user as mob) playsound(loc, poof_sound, 20, 1) // Play the whoosh sound in local area @@ -1106,7 +1107,7 @@ obj/item/toy/cards/deck/syndicate/black item_state = "arm_blade" attack_verb = list("pricked", "absorbed", "gored") w_class = WEIGHT_CLASS_SMALL - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /* * Toy/fake flash @@ -1507,7 +1508,7 @@ obj/item/toy/cards/deck/syndicate/black icon = 'icons/obj/toy.dmi' icon_state = "toy_mouse" w_class = WEIGHT_CLASS_SMALL - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/cooldown = 0 /* diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 0dce7e51cd1..3a6101b65c7 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/trash.dmi' w_class = WEIGHT_CLASS_TINY desc = "This is rubbish." - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/trash/raisins name = "4no raisins" @@ -43,7 +43,7 @@ /obj/item/trash/plate name = "Plate" icon_state = "plate" - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/trash/snack_bowl name = "Snack bowl" @@ -60,7 +60,7 @@ /obj/item/trash/tray name = "Tray" icon_state = "tray" - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/trash/candle name = "candle" @@ -76,7 +76,7 @@ icon_state = "cola" var/is_glass = 0 var/is_plastic = 0 - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/trash/gum name = "chewed gum" diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index c386e4feba0..733e3f7e0bd 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -49,7 +49,8 @@ GLOBAL_LIST_INIT(rcd_door_types, list( usesound = 'sound/items/deconstruct.ogg' flags_2 = NO_MAT_REDEMPTION_2 req_access = list(access_engine) - + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) + resistance_flags = FIRE_PROOF // Important shit var/datum/effect_system/spark_spread/spark_system var/matter = 0 diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 62b203e43b1..2b5b8e1e8fc 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -13,6 +13,7 @@ RSF anchored = 0.0 var/matter = 0 var/mode = 1 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) w_class = WEIGHT_CLASS_NORMAL var/list/configured_items = list() diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 055986dff30..400759e845a 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -89,6 +89,8 @@ var/list/access = list() var/registered_name = "Unknown" // The name registered_name on the card slot_flags = SLOT_ID + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF var/untrackable // Can not be tracked by AI's var/blood_type = "\[UNSET\]" diff --git a/code/game/objects/items/weapons/cash.dm b/code/game/objects/items/weapons/cash.dm index 507b19d9f7a..84d7eab9e0b 100644 --- a/code/game/objects/items/weapons/cash.dm +++ b/code/game/objects/items/weapons/cash.dm @@ -9,7 +9,7 @@ throw_speed = 1 throw_range = 7 w_class = WEIGHT_CLASS_TINY - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE singular_name = "credit" max_amount = 1000000 merge_type = /obj/item/stack/spacecash diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm index 37109669390..7680ef269dd 100644 --- a/code/game/objects/items/weapons/chrono_eraser.dm +++ b/code/game/objects/items/weapons/chrono_eraser.dm @@ -52,7 +52,7 @@ can_charge = 0 fire_delay = 50 var/obj/item/chrono_eraser/TED = null - var/obj/effect/chrono_field/field = null + var/obj/structure/chrono_field/field = null var/turf/startpos = null /obj/item/gun/energy/chrono_gun/New(var/obj/item/chrono_eraser/T) @@ -79,7 +79,7 @@ field_disconnect(field) return ..() -/obj/item/gun/energy/chrono_gun/proc/field_connect(var/obj/effect/chrono_field/F) +/obj/item/gun/energy/chrono_gun/proc/field_connect(obj/structure/chrono_field/F) var/mob/living/user = src.loc if(F.gun) if(isliving(user) && F.captured) @@ -93,7 +93,7 @@ to_chat(user, "Connection established with target: [F.captured]") -/obj/item/gun/energy/chrono_gun/proc/field_disconnect(var/obj/effect/chrono_field/F) +/obj/item/gun/energy/chrono_gun/proc/field_disconnect(obj/structure/chrono_field/F) if(F && field == F) var/mob/living/user = src.loc if(F.gun == src) @@ -103,7 +103,7 @@ field = null startpos = null -/obj/item/gun/energy/chrono_gun/proc/field_check(var/obj/effect/chrono_field/F) +/obj/item/gun/energy/chrono_gun/proc/field_check(obj/structure/chrono_field/F) if(F) if(field == F) var/turf/currentpos = get_turf(src) @@ -135,7 +135,7 @@ /obj/item/projectile/energy/chrono_beam/on_hit(atom/target) if(target && gun && isliving(target)) - var/obj/effect/chrono_field/F = new(target.loc, target, gun) + var/obj/structure/chrono_field/F = new(target.loc, target, gun) gun.field_connect(F) /obj/item/ammo_casing/energy/chrono_beam @@ -144,26 +144,27 @@ icon_state = "chronobolt" e_cost = 0 -/obj/effect/chrono_field +/obj/structure/chrono_field name = "eradication field" desc = "An aura of time-bluespace energy." icon = 'icons/effects/effects.dmi' icon_state = "chronofield" - density = 1 - anchored = 1 - unacidable = 1 + density = FALSE + anchored = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF + move_resist = INFINITY blend_mode = BLEND_MULTIPLY var/mob/living/captured = null var/obj/item/gun/energy/chrono_gun/gun = null - var/tickstokill = 30 - var/image/mob_underlay = null + var/tickstokill = 15 + var/mutable_appearance/mob_underlay var/preloaded = 0 var/RPpos = null -/obj/effect/chrono_field/New(loc, var/mob/living/target, var/obj/item/gun/energy/chrono_gun/G) +/obj/structure/chrono_field/New(loc, mob/living/target, obj/item/gun/energy/chrono_gun/G) if(target && isliving(target) && G) - target.loc = src - src.captured = target + target.forceMove(src) + captured = target var/icon/mob_snapshot = getFlatIcon(target) var/icon/cached_icon = new() @@ -173,18 +174,19 @@ mob_icon.Blend(removing_frame, ICON_MULTIPLY) cached_icon.Insert(mob_icon, "frame[i]") - mob_underlay = new(cached_icon, "frame1") + mob_underlay = mutable_appearance(cached_icon, "frame1") update_icon() desc = initial(desc) + "
It appears to contain [target.name]." START_PROCESSING(SSobj, src) + return ..() -/obj/effect/chrono_field/Destroy() +/obj/structure/chrono_field/Destroy() if(gun && gun.field_check(src)) gun.field_disconnect(src) return ..() -/obj/effect/chrono_field/update_icon() +/obj/structure/chrono_field/update_icon() var/ttk_frame = 1 - (tickstokill / initial(tickstokill)) ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT) if(ttk_frame != RPpos) @@ -193,11 +195,11 @@ underlays = list() //hack: BYOND refuses to update the underlay to match the icon_state otherwise underlays += mob_underlay -/obj/effect/chrono_field/process() +/obj/structure/chrono_field/process() if(captured) if(tickstokill > initial(tickstokill)) for(var/atom/movable/AM in contents) - AM.loc = loc + AM.forceMove(drop_location()) qdel(src) else if(tickstokill <= 0) to_chat(captured, "As the last essence of your being is erased from time, you begin to re-experience your most enjoyable memory. You feel happy...") @@ -211,12 +213,8 @@ qdel(src) else captured.Paralyse(4) - if(captured.reagents) - captured.reagents.del_reagent("synaptizine") //you pesky thing you - if(captured.loc != src) //If they manage to escape, immediately kill them, this is so that even if there IS a way to get out, they won't use it - captured.loc = src - tickstokill = 0 - return .() + if(captured.loc != src) + captured.forceMove(src) update_icon() if(gun) if(gun.field_check(src)) @@ -229,7 +227,8 @@ else qdel(src) -/obj/effect/chrono_field/bullet_act(var/obj/item/projectile/P) + +/obj/structure/chrono_field/bullet_act(obj/item/projectile/P) if(istype(P, /obj/item/projectile/energy/chrono_beam)) var/obj/item/projectile/energy/chrono_beam/beam = P var/obj/item/gun/energy/chrono_gun/Pgun = beam.gun @@ -238,28 +237,28 @@ else return 0 -/obj/effect/chrono_field/assume_air() +/obj/structure/chrono_field/assume_air() return 0 -/obj/effect/chrono_field/return_air() //we always have nominal air and temperature +/obj/structure/chrono_field/return_air() //we always have nominal air and temperature var/datum/gas_mixture/GM = new GM.oxygen = MOLES_O2STANDARD GM.nitrogen = MOLES_N2STANDARD GM.temperature = T20C return GM -/obj/effect/chrono_field/Move() +/obj/structure/chrono_field/Move() return -/obj/effect/chrono_field/singularity_act() +/obj/structure/chrono_field/singularity_act() return -/obj/effect/chrono_field/ex_act() +/obj/structure/chrono_field/ex_act() return -/obj/effect/chrono_field/blob_act() +/obj/structure/chrono_field/blob_act(obj/structure/blob/B) return #undef CHRONO_BEAM_RANGE -#undef CHRONO_FRAME_COUNT +#undef CHRONO_FRAME_COUNT \ No newline at end of file diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index 72bb3fceb11..09d43434560 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -11,7 +11,7 @@ throwforce = 6.0 w_class = WEIGHT_CLASS_SMALL attack_verb = list("bashed", "battered", "judged", "whacked") - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/gavelhammer/suicide_act(mob/user) user.visible_message("[user] has sentenced [user.p_them()]self to death with the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") @@ -26,7 +26,7 @@ force = 2.0 throwforce = 2.0 w_class = WEIGHT_CLASS_TINY - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/gavelblock/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/gavelhammer)) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 4eeee2c81c9..23e81e3c41d 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -11,6 +11,7 @@ w_class = WEIGHT_CLASS_BULKY origin_tech = "biotech=4" actions_types = list(/datum/action/item_action/toggle_paddles) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/back.dmi' ) @@ -259,6 +260,7 @@ force = 0 throwforce = 6 w_class = WEIGHT_CLASS_BULKY + resistance_flags = INDESTRUCTIBLE toolspeed = 1 var/revivecost = 1000 diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index f0f8af4e0d3..9ccbc3bffd5 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -15,9 +15,11 @@ materials = list(MAT_METAL=90) attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") dog_fashion = /datum/dog_fashion/back + resistance_flags = FIRE_PROOF var/max_water = 50 var/last_use = 1.0 var/safety = 1 + var/refilling = FALSE var/sprite_name = "fire_extinguisher" var/power = 5 //Maximum distance launched water will travel var/precision = 0 //By default, turfs picked from a spray are random, set to 1 to make it always have at least one water effect per row @@ -54,6 +56,13 @@ to_chat(user, "The safety is [safety ? "on" : "off"].") return +/obj/item/extinguisher/attack_obj(obj/O, mob/living/user) + if(AttemptRefill(O, user)) + refilling = TRUE + return FALSE + else + return ..() + /obj/item/extinguisher/proc/AttemptRefill(atom/target, mob/user) if(istype(target, /obj/structure/reagent_dispensers/watertank) && target.Adjacent(user)) var/safety_save = safety @@ -77,11 +86,15 @@ return 0 /obj/item/extinguisher/afterattack(atom/target, mob/user , flag) + . = ..() //TODO; Add support for reagents in water. if(target.loc == user)//No more spraying yourself when putting your extinguisher away return - if(AttemptRefill(target, user)) + + if(refilling) + refilling = FALSE return + if(!safety) if(src.reagents.total_volume < 1) to_chat(usr, "\The [src] is empty.") diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 701b72c1821..298ce493b14 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -13,6 +13,7 @@ throw_range = 5 w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=500) + resistance_flags = FIRE_PROOF origin_tech = "combat=1;plasmatech=2;engineering=2" var/status = FALSE var/lit = FALSE //on or off diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 5a6131b2d4a..5a3286bfc05 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -13,7 +13,7 @@ icon = 'icons/obj/items.dmi' icon_state = "gift1" item_state = "gift1" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/a_gift/New() ..() @@ -33,11 +33,6 @@ else to_chat(user, "The gift was empty!") qdel(src) - return - -/obj/item/a_gift/ex_act() - qdel(src) - return /obj/effect/spresent/relaymove(mob/user as mob) if(user.stat) @@ -139,7 +134,7 @@ flags = NOBLUDGEON amount = 25 max_amount = 25 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/stack/wrapping_paper/attack_self(mob/user) to_chat(user, "You need to use it on a package that has already been wrapped!") diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index b0f89c6215b..5ffcaa9291c 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -22,8 +22,7 @@ for(var/obj/structure/blob/B in hear(8, flashbang_turf)) //Blob damage here var/damage = round(30 / (get_dist(B, get_turf(src)) + 1)) - B.health -= damage - B.update_icon() + B.take_damage(damage, BURN, "melee", 0) spawn(light_time) qdel(src) diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index b8372f18a1e..414fffdfc7e 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -9,12 +9,18 @@ throw_range = 20 flags = CONDUCT slot_flags = SLOT_BELT - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 40 var/active = 0 var/det_time = 50 var/display_timer = 1 +/obj/item/grenade/deconstruct(disassembled = TRUE) + if(!disassembled) + prime() + if(!QDELETED(src)) + qdel(src) + /obj/item/grenade/proc/clown_check(var/mob/living/user) if((CLUMSY in user.mutations) && prob(50)) to_chat(user, "Huh? How does this thing work?") diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 6b9c4d815f4..7fd965b5c2a 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -31,8 +31,7 @@ for(var/obj/structure/blob/B in view(8,src)) var/damage = round(30/(get_dist(B,src)+1)) - B.health -= damage - B.update_icon() + B.take_damage(damage, BURN, "melee", 0) sleep(80) qdel(src) return diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 28e73f29317..94f5e47f4ca 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -13,6 +13,7 @@ materials = list(MAT_METAL=500) origin_tech = "engineering=3;combat=3" breakouttime = 600 //Deciseconds = 60s = 1 minutes + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) var/cuffsound = 'sound/weapons/handcuffs.ogg' var/trashtype = null //For disposable cuffs var/ignoresClumsy = FALSE @@ -32,9 +33,9 @@ to_chat(user, "Uh... how do those things work?!") apply_cuffs(user, user) return - + cuff(C, user) - + /obj/item/restraints/handcuffs/proc/cuff(mob/living/carbon/C, mob/user, remove_src = TRUE) if(ishuman(C)) var/mob/living/carbon/human/H = C diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index f75818892ca..3d18b2e0109 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -31,6 +31,7 @@ flags = CONDUCT attack_verb = list("attacked", "stabbed", "poked") hitsound = 'sound/weapons/bladeslice.ogg' + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) sharp = 0 var/max_contents = 1 @@ -116,6 +117,7 @@ materials = list(MAT_METAL=12000) attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharp = TRUE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) var/bayonet = FALSE //Can this be attached to a gun? /obj/item/kitchen/knife/suicide_act(mob/user) @@ -199,6 +201,7 @@ materials = list() origin_tech = "biotech=3;combat=2" attack_verb = list("shanked", "shivved") + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) /* diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index 56d237c4eda..d69c04792a3 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -14,6 +14,7 @@ flags = CONDUCT slot_flags = SLOT_BELT attack_verb = null + resistance_flags = FIRE_PROOF var/lit = 0 /obj/item/lighter/zippo diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index a2e5791851d..89146cf9952 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -10,6 +10,9 @@ var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave usesound = 'sound/weapons/blade1.ogg' + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) + resistance_flags = FIRE_PROOF toolspeed = 1 light_power = 2 var/brightness_on = 2 diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index a98ebed84da..69e11a533fd 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -9,7 +9,7 @@ throw_range = 7 w_class = WEIGHT_CLASS_NORMAL attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/mopping = 0 var/mopcount = 0 var/mopcap = 5 diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index dc466f479d0..a6c152dd5e3 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -8,8 +8,8 @@ item_state = "paintcan" materials = list(MAT_METAL=200) w_class = WEIGHT_CLASS_NORMAL - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 100 amount_per_transfer_from_this = 5 possible_transfer_amounts = list(5,10,20,30,50,70) volume = 70 diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index a73bb3249d4..6a2ee5635d7 100644 --- a/code/game/objects/items/weapons/pneumaticCannon.dm +++ b/code/game/objects/items/weapons/pneumaticCannon.dm @@ -9,6 +9,7 @@ item_state = "bulldog" lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi' righthand_file = 'icons/mob/inhands/guns_righthand.dmi' + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50) var/maxWeightClass = 20 //The max weight of items that can fit into the cannon var/loadedWeightClass = 0 //The weight of items currently in the cannon var/obj/item/tank/tank = null //The gas tank that is drawn from to fire things diff --git a/code/game/objects/items/weapons/powerfist.dm b/code/game/objects/items/weapons/powerfist.dm index 7dbe16a668a..4aab2c25d22 100644 --- a/code/game/objects/items/weapons/powerfist.dm +++ b/code/game/objects/items/weapons/powerfist.dm @@ -9,6 +9,8 @@ throwforce = 10 throw_range = 7 w_class = WEIGHT_CLASS_NORMAL + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 40) + resistance_flags = FIRE_PROOF origin_tech = "combat=5;powerstorage=3;syndicate=3" var/click_delay = 1.5 var/fisto_setting = 1 diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm index 4381c4295c7..073ae0941e4 100644 --- a/code/game/objects/items/weapons/rpd.dm +++ b/code/game/objects/items/weapons/rpd.dm @@ -23,6 +23,8 @@ throw_range = 5 w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL = 75000, MAT_GLASS = 37500) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) + resistance_flags = FIRE_PROOF origin_tech = "engineering=4;materials=2" var/datum/effect_system/spark_spread/spark_system var/lastused diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 79d33de586f..1b2b9c6f21c 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -9,7 +9,7 @@ throw_speed = 4 throw_range = 20 origin_tech = "bluespace=6" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/teleportation_scroll/apprentice name = "lesser scroll of teleportation" diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index 3e04ad3a440..1bad335bb49 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -12,7 +12,9 @@ materials = list(MAT_GLASS = MINERAL_MATERIAL_AMOUNT) attack_verb = list("stabbed", "slashed", "sliced", "cut") hitsound = 'sound/weapons/bladeslice.ogg' - armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0) + armor = list("melee" = 100, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 100) + max_integrity = 40 + resistance_flags = ACID_PROOF sharp = TRUE var/cooldown = 0 var/icon_prefix diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index a3780c39b61..7388cff9e5b 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -1,7 +1,7 @@ /obj/item/shield name = "shield" block_chance = 50 - armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70) /obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) if(attack_type == THROWN_PROJECTILE_ATTACK) @@ -53,7 +53,7 @@ item_state = "buckler" materials = list() origin_tech = "materials=1;combat=3;biotech=2" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE block_chance = 30 /obj/item/shield/energy diff --git a/code/game/objects/items/weapons/signs.dm b/code/game/objects/items/weapons/signs.dm index 6c416111db7..56f31188300 100644 --- a/code/game/objects/items/weapons/signs.dm +++ b/code/game/objects/items/weapons/signs.dm @@ -6,7 +6,7 @@ force = 5 w_class = WEIGHT_CLASS_BULKY attack_verb = list("bashed","smacked") - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/delayed = 0 //used to do delays diff --git a/code/game/objects/items/weapons/staff.dm b/code/game/objects/items/weapons/staff.dm index 15b0b914391..fa2c6adcc7f 100644 --- a/code/game/objects/items/weapons/staff.dm +++ b/code/game/objects/items/weapons/staff.dm @@ -10,7 +10,7 @@ w_class = WEIGHT_CLASS_SMALL armour_penetration = 100 attack_verb = list("bludgeoned", "whacked", "disciplined") - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/twohanded/staff/broom name = "broom" diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 45c2ebfd8c0..57f4e999ac8 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -15,8 +15,8 @@ max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 21 storage_slots = 21 - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = NONE + max_integrity = 300 sprite_sheets = list( "Vox" = 'icons/mob/species/vox/back.dmi', "Vox Armalis" = 'icons/mob/species/armalis/back.dmi', @@ -56,9 +56,10 @@ item_state = "holdingpack" max_w_class = WEIGHT_CLASS_HUGE max_combined_w_class = 35 - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF flags_2 = NO_MAT_REDEMPTION_2 cant_hold = list(/obj/item/storage/backpack/holding) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50) /obj/item/storage/backpack/holding/New() ..() @@ -86,7 +87,6 @@ /obj/item/storage/backpack/holding/singularity_act(current_size) var/dist = max((current_size - 2),1) explosion(src.loc,(dist),(dist*2),(dist*4)) - return /obj/item/storage/backpack/santabag name = "Santa's Gift Bag" @@ -151,14 +151,14 @@ desc = "It's a special backpack made exclusively for Nanotrasen officers." icon_state = "captainpack" item_state = "captainpack" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/industrial name = "industrial backpack" desc = "It's a tough backpack for the daily grind of station life." icon_state = "engiepack" item_state = "engiepack" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/explorer name = "explorer bag" @@ -189,7 +189,7 @@ desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma." icon_state = "toxpack" item_state = "toxpack" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/virology name = "virology backpack" @@ -205,7 +205,7 @@ name = "leather satchel" desc = "It's a very fancy satchel made with fine leather." icon_state = "satchel" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF var/strap_side_straight = FALSE /obj/item/storage/backpack/satchel/verb/switch_strap() @@ -241,7 +241,7 @@ name = "industrial satchel" desc = "A tough satchel with extra pockets." icon_state = "satchel-eng" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/satchel/explorer name = "explorer satchel" @@ -273,7 +273,7 @@ name = "scientist satchel" desc = "Useful for holding research materials." icon_state = "satchel-tox" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/satchel_sec name = "security satchel" @@ -289,7 +289,7 @@ name = "captain's satchel" desc = "An exclusive satchel for Nanotrasen officers." icon_state = "satchel-cap" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/satchel_flat name = "smuggler's satchel" @@ -335,6 +335,7 @@ origin_tech = "syndicate=1" silent = 1 slowdown = 0 + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/duffel/syndie/med name = "suspicious duffelbag" @@ -466,7 +467,7 @@ desc = "A duffelbag designed to hold large quantities of condoms." icon_state = "duffel-captain" item_state = "duffel-captain" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/duffel/security name = "security duffelbag" @@ -509,14 +510,14 @@ desc = "A duffelbag designed to hold tools." icon_state = "duffel-eng" item_state = "duffel-eng" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/duffel/atmos name = "atmospherics duffelbag" desc = "A duffelbag designed to hold tools. This one is specially designed for atmospherics." icon_state = "duffel-atmos" item_state = "duffel-atmos" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/storage/backpack/duffel/hydro name = "hydroponics duffelbag" @@ -536,6 +537,7 @@ desc = "A spacious backpack with lots of pockets, used by members of the Nanotrasen Emergency Response Team." icon_state = "ert_commander" item_state = "backpack" + resistance_flags = FIRE_PROOF //Commander /obj/item/storage/backpack/ert/commander diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index e8a181a197b..a3808bf5d80 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -169,7 +169,7 @@ max_w_class = WEIGHT_CLASS_NORMAL w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/grown,/obj/item/reagent_containers/food/snacks/grown/ash_flora) - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/storage/bag/plants/portaseeder name = "portable seed extractor" @@ -364,7 +364,7 @@ max_w_class = WEIGHT_CLASS_NORMAL w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics can_hold = list(/obj/item/book, /obj/item/storage/bible, /obj/item/tome, /obj/item/spellbook) - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /* * Trays - Agouri @@ -486,7 +486,7 @@ max_combined_w_class = 200 w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/reagent_containers/food/pill,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/glass/bottle) - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /* * Biowaste bag (mostly for xenobiologists) */ @@ -500,4 +500,4 @@ max_combined_w_class = 200 w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/slime_extract,/obj/item/reagent_containers/food/snacks/monkeycube,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/iv_bag,/obj/item/reagent_containers/hypospray/autoinjector) - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 579f2fddf0b..5560f3b4306 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -8,6 +8,7 @@ righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi' slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") + max_integrity = 300 var/use_item_overlays = 0 // Do we have overlays for items held inside the belt? /obj/item/storage/belt/update_icon() @@ -293,6 +294,7 @@ icon_state = "militarybelt" item_state = "military" max_w_class = WEIGHT_CLASS_SMALL + resistance_flags = FIRE_PROOF /obj/item/storage/belt/military/sst icon_state = "assaultbelt" diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index db34f3ae2c8..a79674d3217 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -5,7 +5,7 @@ throw_speed = 1 throw_range = 5 w_class = WEIGHT_CLASS_NORMAL - burn_state = FLAMMABLE + resistance_flags = FIRE_PROOF var/mob/affecting = null var/deity_name = "Christ" diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index d4e1ed2d7f1..776a53a7f26 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -24,7 +24,7 @@ desc = "It's just an ordinary box." icon_state = "box" item_state = "syringe_kit" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/foldable = /obj/item/stack/sheet/cardboard var/amt = 1 @@ -964,6 +964,7 @@ desc = "A sack neatly crafted out of paper." icon_state = "paperbag_None" item_state = "paperbag_None" + resistance_flags = FLAMMABLE foldable = null var/design = NODESIGN diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 0a2a8bcfbbc..8ba79674ab9 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -12,8 +12,8 @@ max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 150 /obj/item/storage/briefcase/sniperbundle desc = "Its label reads \"genuine hardened Captain leather\", but suspiciously has no other tags or branding. Smells like L'Air du Temps." diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 027910ebcb4..664cc8229bd 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -17,7 +17,7 @@ icon = 'icons/obj/food/containers.dmi' icon_state = "donutbox6" name = "donut box" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/icon_type = "donut" /obj/item/storage/fancy/update_icon(var/itemremoved = 0) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 53f93775cad..1b12c828417 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -317,7 +317,7 @@ return 1 //Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target -/obj/item/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location, burn = 0) +/obj/item/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location) if(!istype(W)) return 0 if(istype(src, /obj/item/storage/fancy)) @@ -351,17 +351,19 @@ W.on_exit_storage(src) update_icon() W.mouse_opacity = initial(W.mouse_opacity) - if(burn) - W.fire_act() return 1 /obj/item/storage/Exited(atom/A, loc) remove_from_storage(A, loc) //worry not, comrade; this only gets called once ..() -/obj/item/storage/empty_object_contents(burn, loc) - for(var/obj/item/Item in contents) - remove_from_storage(Item, loc, burn) +/obj/item/storage/deconstruct(disassembled = TRUE) + var/drop_loc = loc + if(ismob(loc)) + drop_loc = get_turf(src) + for(var/obj/item/I in contents) + remove_from_storage(I, drop_loc) + qdel(src) //This proc is called when you want to place an item into the storage item. /obj/item/storage/attackby(obj/item/I, mob/user, params) diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index aa3b824d40d..e8cc64af842 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -121,6 +121,7 @@ desc = "A huge brass box with several indentations in its surface." icon_state = "brassbox" item_state = null + resistance_flags = FIRE_PROOF | ACID_PROOF w_class = WEIGHT_CLASS_HUGE max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 28 diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 2b93bec6b52..197a3cad49f 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/wallets.dmi' icon_state = "wallet" w_class = WEIGHT_CLASS_SMALL - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE can_hold = list( /obj/item/stack/spacecash, /obj/item/card, diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 6fba277ec35..232d8384e45 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -10,6 +10,7 @@ w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=2" attack_verb = list("beaten") + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80) var/stunforce = 7 var/status = 0 var/obj/item/stock_parts/cell/high/bcell = null diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index d7da7044d7c..40376248d61 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -120,6 +120,7 @@ item_state = "jetpack-captain" volume = 90 w_class = WEIGHT_CLASS_NORMAL + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //steal objective items are hard to destroy. /obj/item/tank/jetpack/oxygen/harness name = "jet harness (oxygen)" diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index bf69b8e8804..f85af5c093d 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -12,7 +12,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 4 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 30) actions_types = list(/datum/action/item_action/set_internals) var/datum/gas_mixture/air_contents = null var/distribute_pressure = ONE_ATMOSPHERE @@ -105,10 +105,10 @@ . += "\The [bicon(icon)][src] feels [descriptive]" -/obj/item/tank/blob_act() - if(prob(50)) - var/turf/location = loc - if(!( istype(location, /turf) )) +/obj/item/tank/blob_act(obj/structure/blob/B) + if(B && B.loc == loc) + var/turf/location = get_turf(src) + if(!location) qdel(src) if(air_contents) @@ -116,6 +116,15 @@ qdel(src) +/obj/item/tank/deconstruct(disassembled = TRUE) + if(!disassembled) + var/turf/T = get_turf(src) + if(T) + T.assume_air(air_contents) + air_update_turf() + playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) + qdel(src) + /obj/item/tank/attackby(obj/item/W as obj, mob/user as mob, params) ..() diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 3d2972d4ac6..2375c42db65 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -9,6 +9,9 @@ slot_flags = SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/toggle_mister) + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) + resistance_flags = FIRE_PROOF var/obj/item/noz var/on = 0 diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index a108d7e259d..c463c7897fc 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -22,6 +22,7 @@ throw_speed = 4 throw_range = 20 materials = list(MAT_METAL=400) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) origin_tech = "magnets=3;bluespace=2" /obj/item/locator/attack_self(mob/user as mob) @@ -103,7 +104,8 @@ Frequency: throw_range = 5 materials = list(MAT_METAL=10000) origin_tech = "magnets=3;bluespace=4" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/active_portals = 0 /obj/item/hand_tele/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index ec821a753a9..bf861c5acb1 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -28,6 +28,7 @@ origin_tech = "materials=1;engineering=1" attack_verb = list("bashed", "battered", "bludgeoned", "whacked") toolspeed = 1 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) /obj/item/wrench/suicide_act(mob/user) user.visible_message("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!") @@ -44,6 +45,7 @@ desc = "A brass wrench. It's faintly warm to the touch." icon_state = "wrench_brass" toolspeed = 0.5 + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/wrench/abductor name = "alien wrench" @@ -133,6 +135,7 @@ hitsound = 'sound/weapons/bladeslice.ogg' usesound = 'sound/items/screwdriver.ogg' toolspeed = 1 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) var/random_color = TRUE //if the screwdriver uses random coloring /obj/item/screwdriver/nuke @@ -170,6 +173,7 @@ icon_state = "screwdriver_brass" toolspeed = 0.5 random_color = FALSE + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/screwdriver/abductor name = "alien screwdriver" @@ -233,6 +237,7 @@ usesound = 'sound/items/wirecutter.ogg' sharp = 1 toolspeed = 1 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) var/random_color = TRUE /obj/item/wirecutters/New(loc, param_color = null) @@ -264,6 +269,7 @@ icon_state = "cutters_brass" toolspeed = 0.5 random_color = FALSE + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/wirecutters/abductor name = "alien wirecutters" @@ -326,6 +332,8 @@ var/acti_sound = 'sound/items/welderactivate.ogg' var/deac_sound = 'sound/items/welderdeactivate.ogg' w_class = WEIGHT_CLASS_SMALL + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) + resistance_flags = FIRE_PROOF materials = list(MAT_METAL=70, MAT_GLASS=30) origin_tech = "engineering=1;plasmatech=1" toolspeed = 1 @@ -658,6 +666,7 @@ desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch." icon_state = "brasswelder" item_state = "brasswelder" + resistance_flags = FIRE_PROOF | ACID_PROOF obj/item/weldingtool/experimental/process() ..() @@ -683,6 +692,7 @@ obj/item/weldingtool/experimental/process() origin_tech = "engineering=1;combat=1" attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") toolspeed = 1 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) /obj/item/crowbar/red icon_state = "crowbar_red" @@ -695,6 +705,7 @@ obj/item/weldingtool/experimental/process() icon_state = "crowbar_brass" item_state = "crowbar_brass" toolspeed = 0.5 + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/crowbar/abductor name = "alien crowbar" diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 16387c8b2cb..fdaea1eb183 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -115,6 +115,7 @@ icon_state = "offhand" name = "offhand" flags = ABSTRACT + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/item/twohanded/offhand/unwield() if(!QDELETED(src)) @@ -181,6 +182,9 @@ attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") hitsound = 'sound/weapons/bladeslice.ogg' usesound = 'sound/items/crowbar.ogg' + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) + resistance_flags = FIRE_PROOF /obj/item/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" @@ -190,12 +194,10 @@ if(!proximity) return if(wielded) //destroys windows and grilles in one hit - if(istype(A, /obj/structure/window)) - var/obj/structure/window/W = A - W.take_damage(200, BRUTE, "melee", 0) - else if(istype(A, /obj/structure/grille)) - var/obj/structure/grille/G = A - G.take_damage(40, BRUTE, "melee", 0) + if(istype(A, /obj/structure/window) || istype(A, /obj/structure/grille)) + var/obj/structure/W = A + W.obj_destruction("fireaxe") + /obj/item/twohanded/fireaxe/boneaxe // Blatant imitation of the fireaxe, but made out of bone. icon_state = "bone_axe0" @@ -230,6 +232,9 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 75 sharp_when_wielded = TRUE // only sharp when wielded + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70) + resistance_flags = FIRE_PROOF light_power = 2 var/brightness_on = 2 var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE) @@ -337,6 +342,8 @@ sharp = TRUE no_spin_thrown = TRUE var/obj/item/grenade/explosive = null + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30) var/icon_prefix = "spearglass" /obj/item/twohanded/spear/update_icon() @@ -585,7 +592,8 @@ throwforce = 15 throw_range = 1 w_class = WEIGHT_CLASS_HUGE - armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 50, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF var/charged = 5 origin_tech = "combat=4;bluespace=4;plasmatech=7" @@ -759,6 +767,7 @@ force_wielded = 30 attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") hitsound = 'sound/weapons/bladeslice.ogg' + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) var/charged = 1 /obj/item/twohanded/energizedfireaxe/update_icon() @@ -805,6 +814,9 @@ force_wielded = 15 attack_verb = list("attacked", "impaled", "pierced") hitsound = 'sound/weapons/bladeslice.ogg' + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30) + resistance_flags = FIRE_PROOF /obj/item/twohanded/pitchfork/demonic name = "demonic pitchfork" diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm index 46d43320f92..aafebf7ef92 100644 --- a/code/game/objects/items/weapons/vending_items.dm +++ b/code/game/objects/items/weapons/vending_items.dm @@ -13,6 +13,7 @@ throw_speed = 1 throw_range = 7 w_class = WEIGHT_CLASS_BULKY + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 30) // Built automatically from the corresponding vending machine. // If null, considered to be full. Otherwise, is list(/typepath = amount). diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index de06d78f9a7..735ae7dc608 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -9,6 +9,9 @@ throw_speed = 7 throw_range = 15 attack_verb = list("banned") + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70) + resistance_flags = FIRE_PROOF /obj/item/banhammer/suicide_act(mob/user) @@ -46,6 +49,9 @@ w_class = WEIGHT_CLASS_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) + resistance_flags = FIRE_PROOF /obj/item/claymore/suicide_act(mob/user) user.visible_message("[user] is falling on the [name]! It looks like [user.p_theyre()] trying to commit suicide.") @@ -70,6 +76,9 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) + resistance_flags = FIRE_PROOF /obj/item/katana/cursed slot_flags = null @@ -146,6 +155,7 @@ embedded_fall_chance = 0 //Hahaha! sharp = 1 materials = list(MAT_METAL=500, MAT_GLASS=500) + resistance_flags = FIRE_PROOF /obj/item/spear/kidan icon_state = "kidanspear" diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 6f007a6bdbc..cf025ba4746 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -1,45 +1,52 @@ //the essential proc to call when an obj must receive damage of any kind. -/obj/proc/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, armour_penetration = 0) +/obj/proc/take_damage(damage_amount, damage_type = BRUTE, damage_flag = "", sound_effect = TRUE, attack_dir, armour_penetration = 0) + if(QDELETED(src)) + stack_trace("[src] taking damage after deletion") + return if(sound_effect) play_attack_sound(damage_amount, damage_type, damage_flag) - if(!(resistance_flags & INDESTRUCTIBLE) && obj_integrity > 0) - damage_amount = run_obj_armor(damage_amount, damage_type, damage_flag, attack_dir, armour_penetration) - if(damage_amount >= 0.1) - . = damage_amount - var/old_integ = obj_integrity - obj_integrity = max(old_integ - damage_amount, 0) - if(obj_integrity <= 0) - var/int_fail = integrity_failure - if(int_fail && old_integ > int_fail) - obj_break(damage_flag) - obj_destruction(damage_flag) - else if(integrity_failure) - if(obj_integrity <= integrity_failure) - obj_break(damage_flag) + if((resistance_flags & INDESTRUCTIBLE) || obj_integrity <= 0) + return + damage_amount = run_obj_armor(damage_amount, damage_type, damage_flag, attack_dir, armour_penetration) + if(damage_amount < DAMAGE_PRECISION) + return + . = damage_amount + obj_integrity = max(obj_integrity - damage_amount, 0) + //BREAKING FIRST + if(integrity_failure && obj_integrity <= integrity_failure) + obj_break(damage_flag) + //DESTROYING SECOND + if(obj_integrity <= 0) + obj_destruction(damage_flag) -//returns the damage value of the attack after processing the obj's various armor protections +///returns the damage value of the attack after processing the obj's various armor protections /obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0) - if(!(damage_type in list(BRUTE, BURN))) + if(damage_flag == "melee" && damage_amount < damage_deflection) return 0 + switch(damage_type) + if(BRUTE) + if(BURN) + else + return 0 var/armor_protection = 0 if(damage_flag) armor_protection = armor[damage_flag] if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor. - armor_protection = Clamp(armor_protection - armour_penetration, 0, 100) - return round(damage_amount * (100 - armor_protection) * 0.01, 0.1) + armor_protection = Clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100) + return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION) -//the sound played when the obj is damaged. +///the sound played when the obj is damaged. /obj/proc/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) if(damage_amount) - playsound(src, 'sound/weapons/smash.ogg', 50, 1) + playsound(src, 'sound/weapons/smash.ogg', 50, TRUE) else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - playsound(src.loc, 'sound/items/welder.ogg', 100, 1) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) -/obj/hitby(atom/movable/AM) +/obj/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) ..() var/tforce = 0 if(ismob(AM)) @@ -54,8 +61,7 @@ return switch(severity) if(1) - obj_integrity = 0 - qdel(src) + take_damage(INFINITY, BRUTE, "bomb", 0) if(2) take_damage(rand(100, 250), BRUTE, "bomb", 0) if(3) @@ -63,11 +69,12 @@ /obj/bullet_act(obj/item/projectile/P) . = ..() - playsound(src, P.hitsound, 50, 1) + playsound(src, P.hitsound, 50, TRUE) visible_message("[src] is hit by \a [P]!") if(!QDELETED(src)) //Bullet on_hit effect might have already destroyed this object take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration) +///Called to get the damage that hulks will deal to the obj. /obj/proc/hulk_damage() return 150 //the damage hulks do on punches to this object, is affected by melee armor @@ -84,17 +91,6 @@ return TRUE return FALSE -/obj/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) - return TRUE - -/obj/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) - collision_damage(pusher, force, direction) - return TRUE - -/obj/proc/collision_damage(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) - var/amt = max(0, ((force - (move_resist * MOVE_FORCE_CRUSH_RATIO)) / (move_resist * MOVE_FORCE_CRUSH_RATIO)) * 10) - take_damage(amt, BRUTE) - /obj/blob_act(obj/structure/blob/B) if(isturf(loc)) var/turf/T = loc @@ -109,7 +105,7 @@ /obj/attack_alien(mob/living/carbon/alien/humanoid/user) if(attack_generic(user, 60, BRUTE, "melee", 0)) - playsound(loc, 'sound/weapons/slash.ogg', 100, 1) + playsound(loc, 'sound/weapons/slash.ogg', 100, TRUE) /obj/attack_animal(mob/living/simple_animal/M) if((M.a_intent == INTENT_HELP && M.ckey) || (!M.melee_damage_upper && !M.obj_damage)) @@ -124,7 +120,18 @@ else . = attack_generic(M, rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", play_soundeffect, M.armour_penetration) if(. && !play_soundeffect) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE) + +/obj/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) + return TRUE + +/obj/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) + collision_damage(pusher, force, direction) + return TRUE + +/obj/proc/collision_damage(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction) + var/amt = max(0, ((force - (move_resist * MOVE_FORCE_CRUSH_RATIO)) / (move_resist * MOVE_FORCE_CRUSH_RATIO)) * 10) + take_damage(amt, BRUTE) /obj/attack_slime(mob/living/simple_animal/slime/user) if(!user.is_adult) @@ -141,48 +148,86 @@ else switch(M.damtype) if(BRUTE) - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) + playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE) if(BURN) - playsound(src, 'sound/items/welder.ogg', 50, 1) + playsound(src, 'sound/items/welder.ogg', 50, TRUE) if(TOX) - playsound(src, 'sound/effects/spray2.ogg', 50, 1) + playsound(src, 'sound/effects/spray2.ogg', 50, TRUE) return 0 else return 0 - visible_message("[M.name] has hit [src].") + M.visible_message("[M.name] hits [src]!", "You hit [src]!") return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs. /obj/singularity_act() - ex_act(1) + ex_act(EXPLODE_DEVASTATE) if(src && !QDELETED(src)) qdel(src) return 2 +///// ACID + +GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/effects/effects.dmi', "acid")) + +///the obj's reaction when touched by acid +/obj/acid_act(acidpwr, acid_volume) + if(!(resistance_flags & UNACIDABLE) && acid_volume) + + if(!acid_level) + SSacid.processing[src] = src + add_overlay(GLOB.acid_overlay, TRUE) + var/acid_cap = acidpwr * 300 //so we cannot use huge amounts of weak acids to do as well as strong acids. + if(acid_level < acid_cap) + acid_level = min(acid_level + acidpwr * acid_volume, acid_cap) + return 1 + +///the proc called by the acid subsystem to process the acid that's on the obj +/obj/proc/acid_processing() + . = TRUE + if(!(resistance_flags & ACID_PROOF)) + if(prob(33)) + playsound(loc, 'sound/items/welder.ogg', 150, TRUE) + take_damage(min(1 + round(sqrt(acid_level) * 0.3), 300), BURN, "acid", 0) + + acid_level = max(acid_level - (5 + 3 * round(sqrt(acid_level))), 0) + if(!acid_level) + return FALSE + +///called when the obj is destroyed by acid. +/obj/proc/acid_melt() + SSacid.processing -= src + deconstruct(FALSE) + //// FIRE /obj/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) + if(isturf(loc)) + var/turf/T = loc + if(T.intact && level == 1) //fire can't damage things hidden below the floor. + return ..() - if(!burn_state) - burn_state = ON_FIRE + if(exposed_temperature && !(resistance_flags & FIRE_PROOF)) + take_damage(Clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0) + if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF)) + resistance_flags |= ON_FIRE SSfires.processing[src] = src - burn_world_time = world.time + burntime*rand(10,20) - if(global_overlay) - overlays += fire_overlay - return TRUE + add_overlay(fire_overlay, TRUE) + return 1 +///called when the obj is destroyed by fire /obj/proc/burn() - empty_object_contents(1, loc) - var/obj/effect/decal/cleanable/ash/A = new(loc) - A.desc = "Looks like this used to be a [name] some time ago." - SSfires.processing -= src - qdel(src) + if(resistance_flags & ON_FIRE) + SSfires.processing -= src + deconstruct(FALSE) +///Called when the obj is no longer on fire. /obj/proc/extinguish() - if(burn_state == ON_FIRE) - burn_state = FLAMMABLE - overlays -= fire_overlay + if(resistance_flags & ON_FIRE) + resistance_flags &= ~ON_FIRE + cut_overlay(fire_overlay, TRUE) SSfires.processing -= src +///Called when the obj is hit by a tesla bolt. /obj/proc/tesla_act(power) being_shocked = TRUE var/power_bounced = power * 0.5 @@ -194,21 +239,23 @@ //the obj is deconstructed into pieces, whether through careful disassembly or when destroyed. /obj/proc/deconstruct(disassembled = TRUE) + SEND_SIGNAL(src, COMSIG_OBJ_DECONSTRUCT, disassembled) qdel(src) //what happens when the obj's health is below integrity_failure level. /obj/proc/obj_break(damage_flag) return -//what happens when the obj's integrity reaches zero. +///what happens when the obj's integrity reaches zero. /obj/proc/obj_destruction(damage_flag) - if(damage_flag == BURN) + if(damage_flag == "acid") + acid_melt() + else if(damage_flag == "fire") burn() else deconstruct(FALSE) -//changes max_integrity while retaining current health percentage -//returns TRUE if the obj broke, FALSE otherwise +///changes max_integrity while retaining current health percentage, returns TRUE if the obj got broken. /obj/proc/modify_max_integrity(new_max, can_break = TRUE, damage_type = BRUTE, new_failure_integrity = null) var/current_integrity = obj_integrity var/current_max = max_integrity @@ -228,6 +275,6 @@ return TRUE return FALSE -//returns how much the object blocks an explosion +///returns how much the object blocks an explosion. Used by subtypes. /obj/proc/GetExplosionBlock() - CRASH("Unimplemented GetExplosionBlock()") + CRASH("Unimplemented GetExplosionBlock()") \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 2dec47151ac..0fcfedc07a8 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -2,29 +2,29 @@ //var/datum/module/mod //not used var/origin_tech = null //Used by R&D to determine what research bonuses it grants. var/crit_fail = 0 - var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. animate_movement = 2 var/throwforce = 1 var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item var/sharp = 0 // whether this object cuts var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! - var/can_deconstruct = TRUE var/damtype = "brute" var/force = 0 var/list/armor var/obj_integrity //defaults to max_integrity - var/max_integrity = INFINITY + var/max_integrity = 500 var/integrity_failure = 0 //0 if we have no special broken behavior + ///Damage under this value will be completely ignored + var/damage_deflection = 0 var/resistance_flags = NONE // INDESTRUCTIBLE + + var/acid_level = 0 //how much acid is on that obj + var/can_be_hit = TRUE //can this be bludgeoned by items? var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it - var/burn_state = FIRE_PROOF // LAVA_PROOF | FIRE_PROOF | FLAMMABLE | ON_FIRE - var/burntime = 10 //How long it takes to burn to ashes, in seconds - var/burn_world_time //What world time the object will burn up completely var/being_shocked = 0 var/speed_process = FALSE @@ -35,7 +35,7 @@ /obj/New() ..() if(!armor) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) if(obj_integrity == null) obj_integrity = max_integrity if(on_blueprints && isturf(loc)) @@ -275,13 +275,12 @@ a { /obj/water_act(volume, temperature, source, method = TOUCH) . = ..() extinguish() + acid_level = 0 /obj/singularity_pull(S, current_size) - if(anchored) - if(current_size >= STAGE_FIVE) - anchored = 0 - step_towards(src,S) - else step_towards(src,S) + ..() + if(!anchored || current_size >= STAGE_FIVE) + step_towards(src,S) /obj/proc/container_resist(var/mob/living) return @@ -289,12 +288,6 @@ a { /obj/proc/CanAStarPass() . = !density -/obj/proc/empty_object_contents(burn = 0, new_loc = loc) - for(var/obj/item/Item in contents) //Empty out the contents - Item.forceMove(new_loc) - if(burn) - Item.fire_act() //Set them on fire, too - /obj/proc/on_mob_move(dir, mob/user) return diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 54cdda2a80b..797f0922565 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,34 +1,14 @@ /obj/structure icon = 'icons/obj/structures.dmi' pressure_resistance = 8 + max_integrity = 300 var/climbable var/mob/climber var/broken = FALSE -/obj/structure/blob_act() - if(prob(50)) - qdel(src) - -/obj/structure/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - return - -/obj/structure/mech_melee_attack(obj/mecha/M) - if(M.damtype == "brute") - M.occupant_message("You hit [src].") - visible_message("[src] has been hit by [M.name].") - return 1 - return 0 - /obj/structure/New() + if (!armor) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) ..() if(smooth) if(SSticker && SSticker.current_state == GAME_STATE_PLAYING) @@ -162,7 +142,7 @@ /obj/structure/examine(mob/user) . = ..() if(!(resistance_flags & INDESTRUCTIBLE)) - if(burn_state == ON_FIRE) + if(resistance_flags & ON_FIRE) . += "It's on fire!" if(broken) . += "It appears to be broken." diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index bf13a05f691..26ab24b609c 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -28,12 +28,12 @@ switch(damage_type) if(BRUTE) if(damage_amount) - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE) else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) if(damage_amount) - playsound(loc, 'sound/items/welder.ogg', 100, 1) + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) /* * Resin @@ -301,8 +301,9 @@ break /obj/structure/alien/egg/obj_break(damage_flag) - if(status != BURST) - Burst(kill = TRUE) + if(!(flags & NODECONSTRUCT)) + if(status != BURST) + Burst(kill = TRUE) /obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index d392deeec81..604d80bb7a4 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -4,7 +4,9 @@ icon = 'icons/obj/barsigns.dmi' icon_state = "empty" req_access = list(access_bar) - armor = list(melee = 20, bullet = 20, laser = 20, energy = 100, bomb = 0, bio = 0, rad = 0) + max_integrity = 500 + integrity_failure = 250 + armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) var/list/barsigns=list() var/list/hiddensigns var/emagged = 0 @@ -38,7 +40,21 @@ else desc = "It displays \"[name]\"." +/obj/structure/sign/barsign/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + broken = TRUE +/obj/structure/sign/barsign/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal(drop_location(), 2) + new /obj/item/stack/cable_coil(drop_location(), 2) + qdel(src) + +/obj/structure/sign/barsign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) /obj/structure/sign/barsign/attack_ai(mob/user as mob) return src.attack_hand(user) @@ -58,9 +74,6 @@ /obj/structure/sign/barsign/attackby(var/obj/item/I, var/mob/user) - if(!allowed(user)) - to_chat(user, "Access denied.") - return if( istype(I, /obj/item/screwdriver)) if(!panel_open) to_chat(user, "You open the maintenance panel.") @@ -90,6 +103,8 @@ broken = 0 else to_chat(user, "You need at least two lengths of cable!") + else + return ..() diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index e942215b6cd..8945819e3aa 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -16,7 +16,7 @@ LINEN BINS throw_range = 2 w_class = WEIGHT_CLASS_TINY item_color = "white" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE slot_flags = SLOT_BACK dog_fashion = /datum/dog_fashion/head/ghost @@ -236,8 +236,8 @@ LINEN BINS icon = 'icons/obj/structures.dmi' icon_state = "linenbin-full" anchored = 1 - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 var/amount = 20 var/list/sheets = list() var/obj/item/hidden = null @@ -261,8 +261,9 @@ LINEN BINS /obj/structure/bedsheetbin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - if(!amount) - return + if(amount) + amount = 0 + update_icon() ..() /obj/structure/bedsheetbin/burn() diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm index 36b33965cc1..5a0a47150ca 100644 --- a/code/game/objects/structures/coathanger.dm +++ b/code/game/objects/structures/coathanger.dm @@ -25,7 +25,6 @@ coat.loc = src update_icon() else - to_chat(user, "You cannot hang [W] on [src]") return ..() /obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index efca449bbf3..b58aecc7c78 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -4,14 +4,15 @@ icon = 'icons/obj/closet.dmi' icon_state = "closed" density = 1 - armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0) + max_integrity = 200 + integrity_failure = 50 + armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60) var/icon_closed = "closed" var/icon_opened = "open" var/opened = FALSE var/welded = FALSE var/locked = FALSE var/wall_mounted = 0 //never solid (You can always pass over it) - var/health = 100 var/lastbang var/cutting_tool = /obj/item/weldingtool var/sound = 'sound/machines/click.ogg' @@ -124,48 +125,20 @@ if(!(opened ? close() : open())) to_chat(user, "It won't budge!") -/obj/structure/closet/ex_act(severity) - switch(severity) - if(1) - for(var/atom/movable/A in src)//pulls everything out of the locker and hits it with an explosion - A.ex_act(severity++) - dump_contents() - qdel(src) - if(2) - if(prob(50)) - for(var/atom/movable/A in src) - A.ex_act(severity++) - dump_contents() - new /obj/item/stack/sheet/metal(loc) - qdel(src) - if(3) - if(prob(5)) - for(var/atom/movable/A in src) - A.ex_act(severity++) - dump_contents() - new /obj/item/stack/sheet/metal(loc) - qdel(src) +/obj/structure/closet/proc/bust_open() + welded = FALSE //applies to all lockers + locked = FALSE //applies to critter crates and secure lockers only + broken = TRUE //applies to secure lockers only + open() -/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj) - ..() - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - health -= Proj.damage - if(health <= 0) - dump_contents() - qdel(src) +/obj/structure/closet/deconstruct(disassembled = TRUE) + if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT)) + new material_drop(loc, material_drop_amount) + qdel(src) -/obj/structure/closet/attack_animal(mob/living/simple_animal/user) - if(user.environment_smash) - user.do_attack_animation(src) - visible_message("[user] destroys the [src].") - dump_contents() - qdel(src) - -// this should probably use dump_contents() -/obj/structure/closet/blob_act() - if(prob(75)) - dump_contents() - qdel(src) +/obj/structure/closet/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + bust_open() /obj/structure/closet/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/rcs) && !opened) @@ -240,6 +213,7 @@ else to_chat(user, "Out of charges.") return + return if(opened) if(istype(W, /obj/item/grab)) @@ -260,9 +234,7 @@ visible_message("[user] slices apart \the [src].", "You cut \the [src] apart with \the [WT].", "You hear welding.") - var/turf/T = get_turf(src) - new material_drop(T, material_drop_amount) - qdel(src) + deconstruct(TRUE) return if(isrobot(user)) return @@ -287,8 +259,10 @@ update_icon() for(var/mob/M in viewers(src)) M.show_message("[src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "You hear welding.", 2) - else + else if(user.a_intent != INTENT_HARM) attack_hand(user) + else + return ..() /obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user) ..() @@ -425,6 +399,16 @@ if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1) +/obj/structure/closet/ex_act(severity) + for(var/atom/A in contents) + A.ex_act(severity) + CHECK_TICK + ..() + +/obj/structure/closet/singularity_act() + dump_contents() + ..() + /obj/structure/closet/AllowDrop() return TRUE diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index f642960e52e..6f0bd9f257c 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -5,9 +5,9 @@ icon_state = "cardboard" icon_opened = "cardboard_open" icon_closed = "cardboard" - health = 10 - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 + integrity_failure = 0 sound = 'sound/effects/rustle2.ogg' material_drop = /obj/item/stack/sheet/cardboard var/amt = 4 diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index 6e34e70894e..eb0958f03c6 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -4,8 +4,8 @@ icon_state = "coffin" icon_closed = "coffin" icon_opened = "coffin_open" - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 material_drop = /obj/item/stack/sheet/wood /obj/structure/closet/coffin/update_icon() diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index affc44cc09d..dea63a0d69d 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -8,7 +8,7 @@ icon_opened = "fireaxe1100" anchored = TRUE density = FALSE - armor = list(melee = 50, bullet = 50, laser = 50, energy = 100, bomb = 10, bio = 100, rad = 100) + armor = list("melee" = 50, "bullet" = 20, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50) var/localopened = FALSE //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri opened = TRUE var/hitstaken = FALSE @@ -104,7 +104,7 @@ user.put_in_hands(fireaxe) to_chat(user, "You take \the [fireaxe] from the [src].") fireaxe = null - + add_fingerprint(user) update_icon() else @@ -179,13 +179,13 @@ /obj/structure/closet/fireaxecabinet/proc/update_icon_opening() var/hasaxe = fireaxe != null icon_state = "fireaxe[hasaxe][localopened][hitstaken][smashed]opening" - spawn(10) + spawn(10) update_icon() /obj/structure/closet/fireaxecabinet/proc/update_icon_closing() var/hasaxe = fireaxe != null icon_state = "fireaxe[hasaxe][localopened][hitstaken][smashed]closing" - spawn(10) + spawn(10) update_icon() /obj/structure/closet/fireaxecabinet/update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm index 94895458d2b..6f388b0bd40 100644 --- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm +++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm @@ -4,8 +4,8 @@ icon_state = "cabinet_closed" icon_closed = "cabinet_closed" icon_opened = "cabinet_open" - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 /obj/structure/closet/cabinet/update_icon() if(!opened) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm index 195b9e2864c..b8f57705d64 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm @@ -7,8 +7,8 @@ icon_opened = "cabinetdetective_open" icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 /obj/structure/closet/secure_closet/bar/New() ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/depot.dm b/code/game/objects/structures/crates_lockers/closets/secure/depot.dm index 41fb0a768a4..6f5ab3c2dac 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/depot.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/depot.dm @@ -4,7 +4,6 @@ desc = "" locked = 0 anchored = 1 - health = 200 req_access = list() layer = 2.9 // ensures the loot they drop always appears on top of them. var/is_armory = FALSE @@ -40,7 +39,7 @@ if(isanimal(M) && "syndicate" in M.faction) to_chat(M, "The [src] resists your attack!") return - return ..(M) + return ..() /obj/structure/closet/secure_closet/syndicate/depot/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/rcs)) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index 5c75494a27a..d8bc213f1cf 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -33,8 +33,8 @@ icon_opened = "cabinetdetective_open" icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 /obj/structure/closet/secure_closet/personal/cabinet/update_icon() if(broken) @@ -86,4 +86,4 @@ else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken) emag_act(user) else - to_chat(user, "Access Denied") + return ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index b5f715d165f..3ab0d94317b 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -7,7 +7,9 @@ opened = 0 locked = 1 broken = 0 - armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0) + max_integrity = 250 + armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80) + damage_deflection = 20 var/large = 1 icon_closed = "secure" var/icon_locked = "secure1" @@ -15,7 +17,6 @@ var/icon_broken = "securebroken" var/icon_off = "secureoff" wall_mounted = 0 //never solid (You can always pass over it) - health = 200 /obj/structure/closet/secure_closet/can_open() if(!..()) @@ -85,9 +86,11 @@ else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken) emag_act(user) else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool)) - return ..(W,user) - else + return ..(W, user) + else if(user.a_intent != INTENT_HARM) togglelock(user) + else + return ..() /obj/structure/closet/secure_closet/emag_act(mob/user) if(!broken) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 295af50fde2..f66987d544b 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -333,8 +333,8 @@ icon_opened = "cabinetdetective_open" icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 /obj/structure/closet/secure_closet/detective/New() ..() diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 909ee79e1ab..a6fe47e0e9d 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -5,7 +5,7 @@ icon_state = "human_male" density = 1 anchored = 1 - health = 0 //destroying the statue kills the mob within + max_integrity = 0 //destroying the statue kills the mob within var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils. var/intialBrute = 0 @@ -20,7 +20,7 @@ L.anchored = 0 L.forceMove(src) L.disabilities += MUTE - health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues + max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues intialTox = L.getToxLoss() intialFire = L.getFireLoss() intialBrute = L.getBruteLoss() @@ -37,7 +37,7 @@ icon_state = "corgi" desc = "If it takes forever, I will wait for you..." - if(health == 0) //meaning if the statue didn't find a valid target + if(max_integrity == 0) //meaning if the statue didn't find a valid target qdel(src) return @@ -70,7 +70,7 @@ for(var/mob/living/M in src) M.forceMove(loc) M.disabilities -= MUTE - M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob + M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob ..() @@ -87,35 +87,10 @@ /obj/structure/closet/statue/toggle() return -/obj/structure/closet/statue/proc/check_health() - if(health <= 0) - for(var/mob/M in src) - shatter(M) - -/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - check_health() - -/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user as mob) - if(user.environment_smash) - for(var/mob/M in src) - shatter(M) - -/obj/structure/closet/statue/blob_act() +/obj/structure/closet/statue/obj_destruction(damage_flag) for(var/mob/M in src) shatter(M) - -/obj/structure/closet/statue/ex_act(severity) - for(var/mob/M in src) - M.ex_act(severity) - health -= 60 / severity - check_health() - -/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob, params) - user.changeNext_move(CLICK_CD_MELEE) - health -= I.force - visible_message("[user] strikes [src] with [I].") - check_health() + ..() /obj/structure/closet/statue/MouseDrop_T() return @@ -132,9 +107,8 @@ /obj/structure/closet/statue/update_icon() return -/obj/structure/closet/statue/proc/shatter(mob/user as mob) +/obj/structure/closet/statue/proc/shatter(mob/user) if(user) user.dust() dump_contents() - visible_message("[src] shatters!. ") - qdel(src) + visible_message("[src] shatters!. ") \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 965819dd436..1b116678151 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -176,27 +176,14 @@ playsound(loc, W.usesound, 100, 1) rigged = FALSE return - else return attack_hand(user) + else if(user.a_intent != INTENT_HARM) + attack_hand(user) + else + return ..() -/obj/structure/closet/crate/ex_act(severity) - switch(severity) - if(1.0) - for(var/obj/O in src.contents) - qdel(O) - qdel(src) - return - if(2.0) - for(var/obj/O in src.contents) - if(prob(50)) - qdel(O) - qdel(src) - return - if(3.0) - if(prob(50)) - qdel(src) - return - else - return +/obj/structure/closet/singularity_act() + dump_contents() + ..() /obj/structure/closet/crate/attack_hand(mob/user) if(manifest) @@ -236,9 +223,12 @@ var/greenlight = "securecrateg" var/sparks = "securecratesparks" var/emag = "securecrateemag" + max_integrity = 500 + armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80) + damage_deflection = 25 + var/tamperproof = 0 broken = 0 locked = 1 - health = 1000 /obj/structure/closet/crate/secure/update_icon() ..() @@ -252,6 +242,21 @@ else overlays += greenlight +/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION) + boom() + else + return ..() + +/obj/structure/closet/crate/secure/proc/boom(mob/user) + if(user) + to_chat(user, "The crate's anti-tamper system activates!") + investigate_log("[key_name(user)] has detonated a [src]", INVESTIGATE_BOMB) + for(var/atom/movable/AM in src) + qdel(AM) + explosion(get_turf(src), 0, 1, 5, 5) + qdel(src) + /obj/structure/closet/crate/secure/can_open() return !locked @@ -462,7 +467,7 @@ "You have secured [src]'s floor casters.") anchored = TRUE else - ..() + return ..() /obj/structure/closet/crate/radiation desc = "A crate with a radiation sign on it." @@ -527,6 +532,7 @@ icon_state = "largemetal" icon_opened = "largemetalopen" icon_closed = "largemetal" + integrity_failure = 0 //Makes the crate break when integrity reaches 0, instead of opening and becoming an invisible sprite. /obj/structure/closet/crate/large/close() . = ..() diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index f54a0459b16..7b30dee1f73 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -45,8 +45,10 @@ "You pry open \the [src].", \ "You hear splitting wood.") qdel(src) + else if(user.a_intent != INTENT_HARM) + attack_hand(user) else - return attack_hand(user) + return ..() /obj/structure/largecrate/mule @@ -56,7 +58,7 @@ /obj/structure/largecrate/lisa/attackby(obj/item/W as obj, mob/user as mob) //ugly but oh well if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc) - ..() + return ..() /obj/structure/largecrate/cow name = "cow crate" @@ -65,7 +67,7 @@ /obj/structure/largecrate/cow/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/cow(loc) - ..() + return ..() /obj/structure/largecrate/goat name = "goat crate" @@ -74,7 +76,7 @@ /obj/structure/largecrate/goat/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/hostile/retaliate/goat(loc) - ..() + return ..() /obj/structure/largecrate/chick name = "chicken crate" @@ -85,7 +87,7 @@ var/num = rand(4, 6) for(var/i = 0, i < num, i++) new /mob/living/simple_animal/chick(loc) - ..() + return ..() /obj/structure/largecrate/cat name = "cat crate" @@ -94,4 +96,4 @@ /obj/structure/largecrate/cat/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/pet/cat(loc) - ..() \ No newline at end of file + return ..() \ No newline at end of file diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index efe426b4a72..7a3f787b91e 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -14,18 +14,21 @@ layer = SHOWER_OPEN_LAYER opacity = 0 -/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone) - if(!P.nodamage) - visible_message("[P] tears [src] down!") - qdel(src) - else - ..(P, def_zone) - /obj/structure/curtain/attack_hand(mob/user) playsound(get_turf(loc), "rustle", 15, 1, -5) toggle() ..() +/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 80, TRUE) + /obj/structure/curtain/proc/toggle() set_opacity(!opacity) if(opacity) @@ -65,7 +68,7 @@ to_chat(user, "You cut apart [src].") deconstruct() else - . = ..() + return ..() /obj/structure/curtain/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/cloth(loc, 2) diff --git a/code/game/objects/structures/depot.dm b/code/game/objects/structures/depot.dm index a3dc4ac7007..5ea249b5ed2 100644 --- a/code/game/objects/structures/depot.dm +++ b/code/game/objects/structures/depot.dm @@ -26,18 +26,13 @@ if(!has_overloaded) overload(TRUE, TRUE) depotarea.reactor = null - ..() + return ..() /obj/structure/fusionreactor/ex_act(severity) if(severity < 3) obj_integrity = 0 healthcheck() -/obj/structure/fusionreactor/bullet_act(obj/item/projectile/Proj) - obj_integrity -= Proj.damage - ..() - healthcheck() - /obj/structure/fusionreactor/proc/healthcheck() if(obj_integrity <= 0 && istype(depotarea)) overload(TRUE) @@ -46,13 +41,15 @@ if(iswrench(I)) playsound(loc, I.usesound, 50, 1) to_chat(user, "The [src] is too well secured to the floor.") - else if(isscrewdriver(I)) + return + if(isscrewdriver(I)) to_chat(user, "You try to screwdriver open [src], but accidentally release some radiation!") if(prob(50)) empulse(src, 4, 10) else for(var/mob/living/M in range(10, loc)) M.apply_effect(rand(5, 25), IRRADIATE) + return else return ..() diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 623ead7bc62..deaf07cbe78 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -1,217 +1,81 @@ -#define DISPLAYCASE_FRAME_CIRCUIT 0 -#define DISPLAYCASE_FRAME_SCREWDRIVER 1 - -// List and hook used to set up the captain's print on their display case -GLOBAL_LIST_INIT(captain_display_cases, list()) - -/proc/updateDisplaycase(mob/living/carbon/human/captain) - if(!GLOB.captain_display_cases.len) - return - var/fingerprint = captain.get_full_print() - for(var/item in GLOB.captain_display_cases) - var/obj/structure/displaycase/CASE = item - CASE.ue = fingerprint - -/obj/structure/displaycase_frame - name = "display case frame" - icon = 'icons/obj/stock_parts.dmi' - icon_state = "box_glass" - armor = list(melee = 30, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) - var/obj/item/airlock_electronics/circuit = null - var/obj/item/assembly/prox_sensor/sensor = null - var/state = DISPLAYCASE_FRAME_CIRCUIT - -/obj/structure/displaycase_frame/Destroy() - QDEL_NULL(circuit) - QDEL_NULL(sensor) - return ..() - -/obj/structure/displaycase_frame/attackby(obj/item/W as obj, mob/user as mob, params) - var/pstate = state - var/turf/T = get_turf(src) - switch(state) - if(DISPLAYCASE_FRAME_CIRCUIT) - if(istype(W, /obj/item/airlock_electronics) && W.icon_state != "door_electronics_smoked") - user.drop_item() - circuit = W - circuit.forceMove(src) - state++ - to_chat(user, "You add the airlock electronics to the frame.") - playsound(get_turf(src),W.usesound, 50, 1) - if(istype(W, /obj/item/crowbar)) - new /obj/machinery/constructable_frame/machine_frame(T) - var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(T) - G.amount = 5 - qdel(src) - to_chat(user, "You pry the glass out of the frame.") - playsound(get_turf(src), W.usesound, 50, 1) - return - - if(DISPLAYCASE_FRAME_SCREWDRIVER) - if(isscrewdriver(W)) - var/obj/structure/displaycase/C = new(T) - if(circuit.one_access) - C.req_access = null - C.req_one_access = circuit.conf_access - else - C.req_access = circuit.conf_access - C.req_one_access = null - if(isprox(sensor)) - C.burglar_alarm = 1 - playsound(get_turf(src), W.usesound, 50, 1) - qdel(src) - return - if(istype(W, /obj/item/crowbar)) - circuit.forceMove(T) - circuit = null - if(isprox(sensor)) - sensor.forceMove(T) - sensor = null - state-- - to_chat(user, "You pry the electronics out of the frame.") - playsound(get_turf(src), W.usesound, 50, 1) - if(isprox(W) && !isprox(sensor)) - user.drop_item() - sensor = W - sensor.forceMove(src) - to_chat(user, "You add the proximity sensor to the frame.") - playsound(src.loc, W.usesound, 50, 1) - - if(pstate != state) - pstate = state - update_icon() - -/obj/structure/displaycase_frame/update_icon() - switch(state) - if(1) - icon_state = "box_glass_circuit" - else - icon_state = "box_glass" - /obj/structure/displaycase name = "display case" icon = 'icons/obj/stationobjs.dmi' - icon_state = "glassbox20" - desc = "A display case for prized possessions. It taunts you to kick it." + icon_state = "glassbox0" + desc = "A display case for prized possessions." density = TRUE anchored = TRUE - unacidable = TRUE //Dissolving the case would also delete the contents. - var/health = 30 - var/obj/item/occupant = null - var/destroyed = FALSE - var/locked = FALSE - var/burglar_alarm = FALSE - var/ue = null - var/image/occupant_overlay = null - var/obj/item/airlock_electronics/circuit + resistance_flags = ACID_PROOF + armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100) + max_integrity = 200 + integrity_failure = 50 + var/obj/item/showpiece = null + var/alert = TRUE + var/open = FALSE + var/openable = TRUE + var/obj/item/airlock_electronics/electronics var/start_showpiece_type = null //add type for items on display - var/alarm_needs_power = TRUE + var/list/start_showpieces = list() //Takes sublists in the form of list("type" = /obj/item/bikehorn, "trophy_message" = "henk") + var/trophy_message = "" -/obj/structure/displaycase/New() +/obj/structure/displaycase/Initialize(mapload) . = ..() + if(start_showpieces.len && !start_showpiece_type) + var/list/showpiece_entry = pick(start_showpieces) + if (showpiece_entry && showpiece_entry["type"]) + start_showpiece_type = showpiece_entry["type"] + if (showpiece_entry["trophy_message"]) + trophy_message = showpiece_entry["trophy_message"] if(start_showpiece_type) - occupant = new start_showpiece_type(src) + showpiece = new start_showpiece_type (src) update_icon() /obj/structure/displaycase/Destroy() - dump() - QDEL_NULL(circuit) + QDEL_NULL(electronics) + QDEL_NULL(showpiece) return ..() -/obj/structure/displaycase/captains_laser - name = "captain's display case" - desc = "A display case for the captain's antique laser gun. Hooked up with an anti-theft system." - burglar_alarm = TRUE - locked = TRUE - req_access = list(access_captain) - start_showpiece_type = /obj/item/gun/energy/laser/captain - -/obj/structure/displaycase/captains_laser/Initialize(mapload) - . = ..() - GLOB.captain_display_cases += src - -/obj/structure/displaycase/captains_laser/Destroy() - GLOB.captain_display_cases -= src - return ..() - -/obj/structure/displaycase/lavaland_winter - burglar_alarm = TRUE - locked = TRUE - req_access = list(access_cent_specops) - start_showpiece_type = /obj/item/gun/energy/laser/captain - -/obj/structure/displaycase/stechkin - name = "officer's display case" - desc = "A display case containing a humble stechkin pistol. Never forget your roots." - locked = 1 - req_access = list(access_syndicate_command) - start_showpiece_type = /obj/item/gun/projectile/automatic/pistol - /obj/structure/displaycase/examine(mob/user) . = ..() - . += "Peering through the glass, you see that it contains:" - if(occupant) - . += "[bicon(occupant)] \A [occupant]." - else - . += "Nothing." + if(alert) + . += "Hooked up with an anti-theft system." + if(showpiece) + . += "There's [showpiece] inside." + if(trophy_message) + . += "The plaque reads:\n [trophy_message]" /obj/structure/displaycase/proc/dump() - if(occupant) - occupant.forceMove(get_turf(src)) - occupant = null - occupant_overlay = null + if(showpiece) + showpiece.forceMove(loc) + showpiece = null -/obj/structure/displaycase/ex_act(severity) - switch(severity) - if(1) +/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) + +/obj/structure/displaycase/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + dump() + if(!disassembled) new /obj/item/shard(loc) - if(occupant) - dump() - qdel(src) - if(2) - if(prob(50)) - src.health -= 15 - src.healthcheck() - if(3) - if(prob(50)) - src.health -= 5 - src.healthcheck() + trigger_alarm() + qdel(src) -/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - health -= Proj.damage - ..() - src.healthcheck() - return +/obj/structure/displaycase/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + density = FALSE + broken = 1 + new /obj/item/shard( src.loc ) + playsound(src, "shatter", 70, TRUE) + update_icon() + trigger_alarm() -/obj/structure/displaycase/blob_act() - if(prob(75)) - new /obj/item/shard(loc) - if(occupant) dump() - qdel(src) - -/obj/structure/displaycase/proc/healthcheck() - if(src.health <= 0) - health = 0 - if(!( src.destroyed )) - src.density = 0 - src.destroyed = 1 - new /obj/item/shard(loc) - playsound(get_turf(src), "shatter", 70, 1) - update_icon() - spawn(0) - if(!alarm_needs_power) - burglar_alarm() - else - var/area/a = get_area(src) - if(isarea(a) && a.power_equip) - burglar_alarm() - else - playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1) - return - -/obj/structure/displaycase/proc/burglar_alarm() - if(burglar_alarm && is_station_contact(z)) +/obj/structure/displaycase/proc/trigger_alarm() + set waitfor = FALSE + if(alert && is_station_contact(z)) var/area/alarmed = get_area(src) alarmed.burglaralert(src) visible_message("The burglar alarm goes off!") @@ -221,130 +85,153 @@ GLOBAL_LIST_INIT(captain_display_cases, list()) sleep(74) // 7.4 seconds long /obj/structure/displaycase/update_icon() - if(destroyed) - icon_state = "glassbox2b" + var/icon/I + if(open) + I = icon('icons/obj/stationobjs.dmi',"glassbox_open") else - icon_state = "glassbox2[locked]" - overlays = 0 - if(occupant) - var/icon/occupant_icon=getFlatIcon(occupant) - occupant_icon.Scale(16,16) - occupant_overlay = image(occupant_icon) - occupant_overlay.pixel_x = 8 - occupant_overlay.pixel_y = 8 - if(locked) - occupant_overlay.alpha = 128 - overlays += occupant_overlay - return + I = icon('icons/obj/stationobjs.dmi',"glassbox0") + if(broken) + I = icon('icons/obj/stationobjs.dmi',"glassboxb0") + if(showpiece) + var/icon/S = getFlatIcon(showpiece) + S.Scale(17, 17) + I.Blend(S,ICON_UNDERLAY,8,8) + icon = I -/obj/structure/displaycase/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/card)) - var/obj/item/card/id/I = W - if(!check_access(I)) - to_chat(user, "Access denied.") - return - locked = !locked - if(!locked) - to_chat(user, "[bicon(src)] \The [src] clicks as locks release, and it slowly opens for you.") +/obj/structure/displaycase/attackby(obj/item/I, mob/user, params) + if(I.GetID() && !broken && openable) + if(allowed(user)) + to_chat(user, "You [open ? "close":"open"] [src].") + toggle_lock(user) else - to_chat(user, "[bicon(src)] You close \the [src] and swipe your card, locking it.") + to_chat(user, "Access denied.") + else if(iswelder(I) && user.a_intent == INTENT_HELP && !broken) + var/obj/item/weldingtool/WT = I + if(obj_integrity < max_integrity && WT.remove_fuel(5, user)) + to_chat(user, "You begin repairing [src].") + playsound(loc, WT.usesound, 40, 1) + if(do_after(user, 40 * WT.toolspeed, target = src)) + obj_integrity = max_integrity + playsound(loc, 'sound/items/welder2.ogg', 50, 1) + update_icon() + to_chat(user, "You repair [src].") + else + to_chat(user, "[src] is already in good condition!") + return + else if(!alert && iscrowbar(I) && openable) //Only applies to the lab cage and player made display cases + if(broken) + if(showpiece) + to_chat(user, "Remove the displayed object first.") + else + to_chat(user, "You remove the destroyed case") + qdel(src) + else + to_chat(user, "You start to [open ? "close":"open"] [src].") + if(do_after(user, 20 * I.toolspeed, target = src)) + to_chat(user, "You [open ? "close":"open"] [src].") + toggle_lock(user) + else if(open && !showpiece) + if(user.drop_item()) + I.forceMove(src) + showpiece = I + to_chat(user, "You put [I] on display") + update_icon() + else if(istype(I, /obj/item/stack/sheet/glass) && broken) + var/obj/item/stack/sheet/glass/G = I + if(G.get_amount() < 2) + to_chat(user, "You need two glass sheets to fix the case!") + return + to_chat(user, "You start fixing [src]...") + if(do_after(user, 20, target = src)) + G.use(2) + broken = 0 + obj_integrity = max_integrity + update_icon() + else + return ..() + +/obj/structure/displaycase/proc/toggle_lock(mob/user) + open = !open + update_icon() + +/obj/structure/displaycase/attack_hand(mob/user) + user.changeNext_move(CLICK_CD_MELEE) + if(showpiece && (broken || open)) + to_chat(user, "You deactivate the hover field built into the case.") + dump() + add_fingerprint(user) update_icon() return - if(istype(W,/obj/item/crowbar) && (!locked || destroyed)) - user.visible_message("[user.name] pries \the [src] apart.", \ - "You pry \the [src] apart.", \ - "You hear something pop.") - var/turf/T = get_turf(src) - playsound(T, W.usesound, 50, 1) - dump() - var/obj/item/airlock_electronics/C = circuit - if(!C) - C = new (src) - C.one_access = !(req_access && req_access.len>0) - if(!C.one_access) - C.conf_access = req_access - else - C.conf_access = req_one_access - - if(!destroyed) - var/obj/structure/displaycase_frame/F = new(T) - F.state = DISPLAYCASE_FRAME_SCREWDRIVER - F.circuit = C - F.circuit.forceMove(F) - if(burglar_alarm) - new /obj/item/assembly/prox_sensor(T) - F.update_icon() - else - C.forceMove(T) - circuit = null - new /obj/machinery/constructable_frame/machine_frame(T) - qdel(src) - return - if(W.flags & ABSTRACT) - to_chat(user, "You can't put this into the case.") - return - if(user.a_intent == INTENT_HARM) - if(locked && !destroyed) - src.health -= W.force - src.healthcheck() - ..() - else if(!locked) - dump() - to_chat(user, "You smash \the [W] into the delicate electronics at the bottom of the case, and deactivate the hover field.") - update_icon() else - if(locked) - to_chat(user, "It's locked, you can't put anything into it.") + //prevents remote "kicks" with TK + if(!Adjacent(user)) return - if(!occupant) - if(!user.drop_item()) - to_chat(user, "[W] is stuck to you. You cannot put it in [src]!") - return - to_chat(user, "You insert \the [W] into \the [src], and it floats as the hoverfield activates.") - user.drop_item() - W.forceMove(src) - occupant=W - update_icon() + user.visible_message("[user] kicks the display case.") + user.do_attack_animation(src, ATTACK_EFFECT_KICK) + take_damage(2) -/obj/structure/displaycase/attack_hand(mob/user as mob) - if(destroyed || (!locked && user.a_intent == INTENT_HARM)) - if(occupant) - dump() - to_chat(user, "You smash your fist into the delicate electronics at the bottom of the case, and deactivate the hover field.") - src.add_fingerprint(user) - update_icon() - else - if(user.a_intent == INTENT_HARM) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src, ATTACK_EFFECT_KICK) - user.visible_message("[user.name] kicks \the [src]!", \ - "You kick \the [src]!", \ - "You hear glass crack.") - src.health -= 2 - healthcheck() - else if(!locked) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - var/print = H.get_full_print() - if(!ue) - to_chat(user, "Your press your thumb against the fingerprint scanner, registering your identity with the case.") - ue = print - return - if(ue != print) - to_chat(user, "Access denied.") - return +/obj/structure/displaycase_chassis + anchored = TRUE + density = FALSE + name = "display case chassis" + desc = "The wooden base of a display case." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "glassbox_chassis" + var/obj/item/airlock_electronics/electronics - if(occupant) - to_chat(user, "Your press your thumb against the fingerprint scanner, and deactivate the hover field built into the case.") - dump() - update_icon() +/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params) + if(iswrench(I)) //The player can only deconstruct the wooden frame + to_chat(user, "You start disassembling [src]...") + playsound(src.loc, I.usesound, 50, 1) + if(do_after(user, 30 * I.toolspeed, target = src)) + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + new /obj/item/stack/sheet/wood(get_turf(src), 5) + qdel(src) + + else if(istype(I, /obj/item/airlock_electronics)) + to_chat(user, "You start installing the electronics into [src]...") + playsound(src.loc, I.usesound, 50, 1) + if(do_after(user, 30, target = src)) + if(user.drop_item()) + I.forceMove(src) + electronics = I + to_chat(user, "You install the airlock electronics.") + + else if(istype(I, /obj/item/stack/sheet/glass)) + var/obj/item/stack/sheet/glass/G = I + if(G.get_amount() < 10) + to_chat(user, "You need ten glass sheets to do this!") + return + to_chat(user, "You start adding [G] to [src]...") + if(do_after(user, 20, target = src)) + G.use(10) + var/obj/structure/displaycase/display = new(src.loc) + if(electronics) + electronics.forceMove(display) + display.electronics = electronics + if(electronics.one_access) + display.req_one_access = electronics.conf_access else - to_chat(src, "[bicon(src)] \The [src] is empty!") - else - user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user.name] gently runs [user.p_their()] hands over [src] in appreciation of its contents.", \ - "You gently run your hands over [src] in appreciation of its contents.", \ - "You hear someone streaking glass with their greasy hands.") + display.req_access = electronics.conf_access + qdel(src) + else + return ..() -#undef DISPLAYCASE_FRAME_CIRCUIT -#undef DISPLAYCASE_FRAME_SCREWDRIVER +//The captains display case requiring specops ID access is intentional. +//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed. +/obj/structure/displaycase/captain + alert = TRUE + start_showpiece_type = /obj/item/gun/energy/laser/captain + req_access = list(access_cent_specops) + +/obj/structure/displaycase/labcage + name = "lab cage" + desc = "A glass lab container for storing interesting creatures." + start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr + req_access = list(access_rd) + +/obj/structure/displaycase/stechkin + name = "officer's display case" + desc = "A display case containing a humble stechkin pistol. Never forget your roots." + start_showpiece_type = /obj/item/gun/projectile/automatic/pistol + req_access = list(access_syndicate_command) \ No newline at end of file diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index c2c11356d60..461f300ae4d 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -281,7 +281,7 @@ qdel(source) /obj/structure/door_assembly/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) var/turf/T = get_turf(src) if(!disassembled) material_amt = rand(2,4) diff --git a/code/game/objects/structures/door_assembly_types.dm b/code/game/objects/structures/door_assembly_types.dm index 2475e9e1b4d..2873686e4f4 100644 --- a/code/game/objects/structures/door_assembly_types.dm +++ b/code/game/objects/structures/door_assembly_types.dm @@ -150,7 +150,7 @@ else bound_width = world.icon_size bound_height = width * world.icon_size - update_icon() + ..() /obj/structure/door_assembly/multi_tile/Move() . = ..() diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 998120c3ee8..1c657b9e244 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -5,8 +5,6 @@ icon_state = "dresser" density = 1 anchored = 1 - burn_state = FLAMMABLE - burntime = 25 /obj/structure/dresser/attack_hand(mob/user as mob) if(!Adjacent(user))//no tele-grooming @@ -82,11 +80,15 @@ user.visible_message("[user] has secured [src]'s bolts.", \ "You have secured [src]'s bolts.") anchored = 1 - else - if(iscrowbar(W) && !anchored) - playsound(loc, W.usesound, 100, 1) - user.visible_message("[user] is attempting to dismantle [src].", \ - "You begin to dismantle [src]...") - if(do_after(user, 40 * W.toolspeed, target = src)) - new /obj/item/stack/sheet/wood (loc, 30) - qdel(src) + return + if(iscrowbar(W) && !anchored) + playsound(loc, W.usesound, 100, 1) + user.visible_message("[user] is attempting to dismantle [src].", "You begin to dismantle [src]...") + if(do_after(user, 40 * W.toolspeed, target = src)) + deconstruct() + return + return ..() + +/obj/structure/dresser/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/wood(drop_location(), 30) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index b8f0d6c5cb5..995e86b5dfb 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -31,6 +31,7 @@ part = null qdel(src) return + return ..() /obj/structure/chair/e_chair/verb/activate_e_chair() set name = "Activate Electric Chair" diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 1bd5ef9546d..0a8be5854ab 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -10,6 +10,8 @@ icon_state = "extinguisher_closed" anchored = 1 density = 0 + max_integrity = 200 + integrity_failure = 50 var/obj/item/extinguisher/has_extinguisher = null var/extinguishertype var/opened = 0 @@ -47,7 +49,17 @@ /obj/structure/extinguisher_cabinet/Destroy() QDEL_NULL(has_extinguisher) return ..() - + +/obj/structure/extinguisher_cabinet/ex_act(severity) + if(has_extinguisher) + has_extinguisher.ex_act(severity) + ..() + +/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A) + if(A == has_extinguisher) + has_extinguisher = null + update_icon() + /obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params) if(isrobot(user) || isalien(user)) return @@ -64,6 +76,7 @@ else playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened + update_icon() else if(istype(O, /obj/item/weldingtool)) if(has_extinguisher) to_chat(user, "You need to remove the extinguisher before deconstructing the cabinet!") @@ -82,13 +95,14 @@ visible_message("[user] slices apart [src].", "You cut [src] apart with [WT].", "You hear welding.") - var/turf/T = get_turf(src) - new material_drop(T) - qdel(src) - else + deconstruct(TRUE) + else if(user.a_intent != INTENT_HARM) playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened - update_icon() + update_icon() + else + return ..() + /obj/structure/extinguisher_cabinet/attack_hand(mob/user) if(isrobot(user) || isalien(user)) @@ -127,6 +141,22 @@ opened = !opened update_icon() +/obj/structure/extinguisher_cabinet/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + broken = 1 + opened = 1 + if(has_extinguisher) + has_extinguisher.forceMove(loc) + has_extinguisher = null + update_icon() + +/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc) + if(has_extinguisher) + has_extinguisher.forceMove(loc) + has_extinguisher = null + qdel(src) /obj/structure/extinguisher_cabinet/update_icon() if(!opened) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 9e2868835da..113d1d12e7b 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -21,8 +21,7 @@ density = TRUE opacity = TRUE - - can_deconstruct = TRUE + max_integrity = 100 canSmoothWith = list( /turf/simulated/wall, @@ -123,21 +122,25 @@ if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W if(WT.remove_fuel(0,user)) - dismantle(user) + dismantle(user, TRUE) else to_chat(user, "You can't reach, close it first!") if(istype(W, /obj/item/gun/energy/plasmacutter) || istype(W, /obj/item/pickaxe/drill/diamonddrill) || istype(W, /obj/item/pickaxe/drill/jackhammer) || istype(W, /obj/item/melee/energy/blade)) - dismantle(user) + dismantle(user, TRUE) -/obj/structure/falsewall/proc/dismantle(mob/user) +/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE) user.visible_message("[user] dismantles the false wall.", "You dismantle the false wall.") - if(can_deconstruct) - new girder_type(loc) + playsound(src, 'sound/items/welder.ogg', 100, TRUE) + deconstruct(disassembled) + +/obj/structure/falsewall/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + new girder_type(loc) if(mineral_amount) for(var/i in 1 to mineral_amount) new mineral(loc) - playsound(src, 'sound/items/welder.ogg', 100, 1) qdel(src) /* @@ -224,6 +227,7 @@ mineral = /obj/item/stack/sheet/mineral/diamond walltype = /turf/simulated/wall/mineral/diamond canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond) + max_integrity = 800 /obj/structure/falsewall/plasma @@ -333,8 +337,7 @@ desc = "A huge chunk of warm metal. The clanging of machinery emanates from within." icon = 'icons/turf/walls/clockwork_wall.dmi' icon_state = "clockwork_wall" - burn_state = FIRE_PROOF - unacidable = TRUE + resistance_flags = FIRE_PROOF | ACID_PROOF mineral_amount = 1 canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass) girder_type = /obj/structure/clockwork/wall_gear/displaced diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index 9c51cc0d451..7830fd4f101 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -1,6 +1,6 @@ /obj/structure/flora - burn_state = FLAMMABLE - burntime = 30 + resistance_flags = FLAMMABLE + max_integrity = 150 //trees /obj/structure/flora/tree @@ -244,7 +244,7 @@ desc = "a rock" icon_state = "rock1" icon = 'icons/obj/flora/rocks.dmi' - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF anchored = 1 /obj/structure/flora/rock/New() diff --git a/code/game/objects/structures/fluff.dm b/code/game/objects/structures/fluff.dm index a6a4f699314..c81b350f745 100644 --- a/code/game/objects/structures/fluff.dm +++ b/code/game/objects/structures/fluff.dm @@ -20,7 +20,7 @@ new/obj/item/stack/sheet/metal(drop_location()) qdel(src) return - ..() + return ..() /obj/structure/fluff/empty_terrarium //Empty terrariums are created when a preserved terrarium in a lavaland seed vault is activated. name = "empty terrarium" diff --git a/code/game/objects/structures/foodcart.dm b/code/game/objects/structures/foodcart.dm index 1d48e4851df..da88c16f074 100644 --- a/code/game/objects/structures/foodcart.dm +++ b/code/game/objects/structures/foodcart.dm @@ -173,32 +173,7 @@ update_icon() //Not really needed without overlays, but keeping just in case updateUsrDialog() -/* -Overlays for cart_unused -/obj/structure/foodcart/update_icon() - overlays = null - if(food1) - overlays += "cart_food1" - if(food2) - overlays += "cart_food2" - if(food3) - overlays += "cart_food3" - if(food4) - overlays += "cart_food4" - if(food5) - overlays += "cart_food5" - if(food6) - overlays += "cart_food6" - if(drink1) - overlays += "cart_drink1" - if(drink2) - overlays += "cart_drink2" - if(drink3) - overlays += "cart_drink3" - if(drink4) - overlays += "cart_drink4" - if(drink5) - overlays += "cart_drink5" - if(drink6) - overlays += "cart_drink6" -*/ \ No newline at end of file +/obj/structure/foodcart/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 4) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 11c0038632f..de1d712b0a4 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -6,7 +6,7 @@ layer = BELOW_OBJ_LAYER var/state = GIRDER_NORMAL var/girderpasschance = 20 // percentage chance that a projectile passes through the girder. - var/health = 200 + max_integrity = 200 var/can_displace = TRUE //If the girder can be moved around by crowbarring it var/metalUsed = 2 //used to determine amount returned in deconstruction @@ -29,24 +29,6 @@ for(var/i=0;i < metalAmount;i++) new /obj/item/stack/sheet/metal(get_turf(src)) -/obj/structure/girder/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - if((M.environment_smash & ENVIRONMENT_SMASH_STRUCTURES) || (M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS)) - if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS) - ex_act(2) - M.visible_message("[M] smashes through \the [src].", "You smash through \the [src].") - else - M.visible_message("[M] smashes against \the [src].", "You smash against \the [src].") - take_damage(rand(25, 75)) - return - -/obj/structure/girder/take_damage(amount) - health -= amount - if(health <= 0) - new /obj/item/stack/sheet/metal(get_turf(src)) - qdel(src) - /obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature) ..() var/temp_check = exposed_temperature @@ -378,62 +360,30 @@ . = . || mover.checkpass(PASSGRILLE) /obj/structure/girder/deconstruct(disassembled = TRUE) - if(can_deconstruct) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) + if(!(flags & NODECONSTRUCT)) + var/remains = pick(/obj/item/stack/rods, /obj/item/stack/sheet/metal) new remains(loc) qdel(src) -/obj/structure/girder/blob_act() - if(prob(40)) - qdel(src) - /obj/structure/girder/narsie_act() if(prob(25)) new /obj/structure/girder/cult(loc) qdel(src) -/obj/structure/girder/bullet_act(obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/beam/pulse)) - ex_act(2) - else - take_damage(Proj.damage) - ..() - return 0 - -/obj/structure/girder/ex_act(severity) - switch(severity) - if(1) - qdel(src) - return - if(2) - if(prob(75)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - qdel(src) - return - if(3) - if(prob(40)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - qdel(src) - return - else - return - /obj/structure/girder/displaced name = "displaced girder" icon_state = "displaced" anchored = 0 state = GIRDER_DISPLACED girderpasschance = 25 - health = 120 + max_integrity = 120 /obj/structure/girder/reinforced name = "reinforced girder" icon_state = "reinforced" state = GIRDER_REINF girderpasschance = 0 - health = 350 + max_integrity = 350 /obj/structure/girder/cult name = "runed girder" @@ -501,17 +451,13 @@ var/turf/T = get_turf(src) T.ChangeTurf(/turf/simulated/wall/cult) qdel(src) - -/obj/structure/girder/cult/take_damage(amount) - health -= amount - if(health <= 0) - new /obj/item/stack/sheet/runed_metal(get_turf(src)) - qdel(src) + else + return ..() /obj/structure/girder/cult/narsie_act() return /obj/structure/girder/cult/deconstruct(disassembled = TRUE) - if(can_deconstruct) - new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/runed_metal(drop_location(), 1) qdel(src) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 7635ee49598..f3a4b8a241c 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -9,7 +9,7 @@ pressure_resistance = 5*ONE_ATMOSPHERE layer = BELOW_OBJ_LAYER level = 3 - armor = list(melee = 50, bullet = 70, laser = 70, energy = 100, bomb = 10, bio = 100, rad = 100) + armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0) max_integrity = 50 integrity_failure = 20 var/rods_type = /obj/item/stack/rods @@ -42,16 +42,9 @@ //height=42 icon='icons/fence-ns.dmi' -/obj/structure/grille/ex_act(severity) - switch(severity) - if(1) - qdel(src) - else - take_damage(rand(5,10), BRUTE, 0) - -/obj/structure/grille/blob_act() - if(!broken) - obj_break() +/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + update_icon() /obj/structure/grille/examine(mob/user) . = ..() @@ -74,6 +67,11 @@ shock(user, 70) shockcooldown = world.time + my_shockcooldown +/obj/structure/grille/attack_animal(mob/user) + . = ..() + if(!shock(user, 70)) + take_damage(rand(5,10), BRUTE, "melee", 1) + /obj/structure/grille/hulk_damage() return 60 @@ -94,14 +92,9 @@ take_damage(rand(5,10), BRUTE, "melee", 1) /obj/structure/grille/attack_alien(mob/living/user) - if(istype(user, /mob/living/carbon/alien/larva)) - return - user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) - user.visible_message("[user] mangles [src].", \ - "You mangle [src].", \ - "You hear twisting metal.") - + user.changeNext_move(CLICK_CD_MELEE) + user.visible_message("[user] mangles [src].") if(!shock(user, 70)) take_damage(20, BRUTE, "melee", 1) @@ -204,39 +197,31 @@ W.state = WINDOW_OUT_OF_FRAME to_chat(user, "You place the [W] on [src].") W.update_nearby_icons() - return -/obj/structure/grille/attacked_by(obj/item/I, mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(!(I.flags&NOBLUDGEON)) - if(I.force) - visible_message("[user] has hit [src] with [I]!") - take_damage(I.force * 0.3, I.damtype) /obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) if(damage_amount) - playsound(src, 'sound/effects/grillehit.ogg', 80, 1) + playsound(src, 'sound/effects/grillehit.ogg', 80, TRUE) else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - playsound(src, 'sound/items/welder.ogg', 80, 1) + playsound(src, 'sound/items/welder.ogg', 80, TRUE) /obj/structure/grille/deconstruct(disassembled = TRUE) if(!loc) //if already qdel'd somehow, we do nothing return - if(can_deconstruct) - var/obj/R = new rods_type(loc, rods_amount) + if(!(flags & NODECONSTRUCT)) + var/obj/R = new rods_type(drop_location(), rods_amount) transfer_fingerprints_to(R) qdel(src) ..() /obj/structure/grille/obj_break() - if(!broken && can_deconstruct) + if(!broken && !(flags & NODECONSTRUCT)) new broken_type(loc) - var/obj/R = new rods_type(loc, rods_broken) + var/obj/R = new rods_type(drop_location(), rods_broken) transfer_fingerprints_to(R) qdel(src) @@ -266,15 +251,17 @@ if(exposed_temperature > T0C + 1500) take_damage(1, BURN, 0, 0) -/obj/structure/grille/hitby(atom/movable/AM) - if(istype(AM, /obj)) +/obj/structure/grille/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) + if(isobj(AM)) if(prob(50) && anchored && !broken) - var/turf/T = get_turf(src) - var/obj/structure/cable/C = T.get_cable_node() - if(C) - playsound(loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5) - tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot. - C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock. + var/obj/O = AM + if(O.throwforce != 0)//don't want to let people spam tesla bolts, this way it will break after time + var/turf/T = get_turf(src) + var/obj/structure/cable/C = T.get_cable_node() + if(C) + playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5) + tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot. + C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock. return ..() /obj/structure/grille/broken // Pre-broken grilles for map placement diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 67ee4b6ac00..ec1ad6d1552 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -6,7 +6,7 @@ icon = 'icons/effects/effects.dmi' anchored = TRUE max_integrity = 1 - armor = list("melee" = 0, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0) + armor = list("melee" = 0, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 20) var/obj/item/holosign_creator/projector /obj/structure/holosign/New(loc, source_projector) @@ -32,9 +32,9 @@ /obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - playsound(loc, 'sound/weapons/egloves.ogg', 80, 1) + playsound(loc, 'sound/weapons/egloves.ogg', 80, TRUE) if(BURN) - playsound(loc, 'sound/weapons/egloves.ogg', 80, 1) + playsound(loc, 'sound/weapons/egloves.ogg', 80, TRUE) /obj/structure/holosign/wetsign name = "wet floor sign" diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 03e80563224..e9853f12162 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -19,12 +19,11 @@ density = 1 anchored = 1 opacity = 0 - + max_integrity = 50 icon = 'icons/obj/inflatable.dmi' icon_state = "wall" var/torn = /obj/item/inflatable/torn var/intact = /obj/item/inflatable - var/health = 50.0 /obj/structure/inflatable/Initialize(location) ..() @@ -41,97 +40,28 @@ /obj/structure/inflatable/CanAtmosPass(turf/T) return !density -/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - if(health <= 0) - deflate(1) - return - -/obj/structure/inflatable/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - deflate(1) - return - if(3.0) - if(prob(50)) - deflate(1) - return - -/obj/structure/inflatable/blob_act() - deflate(1) - /obj/structure/inflatable/attack_hand(mob/user as mob) add_fingerprint(user) - return - -/obj/structure/inflatable/attack_generic(mob/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime - health -= damage - if(health <= 0) - user.visible_message("[user] tears open [src]!") - deflate(1) - else //for nicer text~ - user.visible_message("[user] tears at [src]!") - -/obj/structure/inflatable/attack_alien(mob/user as mob) - if(islarva(user)) - return - attack_generic(user, 15) - -/obj/structure/inflatable/attack_animal(mob/user as mob) - if(!isanimal(user)) - return - var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0) - return - attack_generic(M, M.melee_damage_upper) - -/obj/structure/inflatable/attack_slime(mob/user as mob) - var/mob/living/simple_animal/slime/S = user - if(!S.is_adult) - return - attack_generic(user, rand(10, 15)) - -/obj/structure/inflatable/attackby(obj/item/W as obj, mob/user as mob, params) - if(!istype(W)) - return - if(is_pointed(W)) - visible_message("[user] pierces [src] with [W]!") - deflate(1) - if(W.damtype == BRUTE || W.damtype == BURN) - hit(W.force) - ..() - return - -/obj/structure/inflatable/proc/hit(var/damage, var/sound_effect = 1) - health = max(0, health - damage) - if(sound_effect) - playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) - if(health <= 0) - deflate(1) /obj/structure/inflatable/AltClick() if(usr.stat || usr.restrained()) return if(!Adjacent(usr)) return - deflate() + deconstruct(TRUE) -/obj/structure/inflatable/proc/deflate(var/violent=0) +/obj/structure/inflatable/deconstruct(disassembled = TRUE) playsound(loc, 'sound/machines/hiss.ogg', 75, 1) - if(violent) + if(!disassembled) visible_message("[src] rapidly deflates!") var/obj/item/inflatable/torn/R = new torn(loc) - src.transfer_fingerprints_to(R) + transfer_fingerprints_to(R) qdel(src) else visible_message("[src] slowly deflates.") spawn(50) var/obj/item/inflatable/R = new intact(loc) - src.transfer_fingerprints_to(R) + transfer_fingerprints_to(R) qdel(src) /obj/structure/inflatable/verb/hand_deflate() @@ -142,7 +72,7 @@ if(usr.stat || usr.restrained()) return - deflate() + deconstruct(TRUE) /obj/item/inflatable/door name = "inflatable door" @@ -278,4 +208,4 @@ new /obj/item/inflatable(src) new /obj/item/inflatable(src) new /obj/item/inflatable(src) - new /obj/item/inflatable(src) + new /obj/item/inflatable(src) \ No newline at end of file diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index e38af14ecc4..6281d589c70 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -8,6 +8,7 @@ desc = "The frame of a meat spike." density = 1 anchored = 0 + max_integrity = 200 /obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params) add_fingerprint(user) @@ -26,6 +27,9 @@ new /obj/structure/kitchenspike(loc) add_fingerprint(user) qdel(src) + return + else + return ..() /obj/structure/kitchenspike @@ -37,6 +41,7 @@ anchored = 1 buckle_lying = FALSE can_buckle = TRUE + max_integrity = 250 //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/structure/kitchenspike/attack_hand(mob/user) @@ -52,10 +57,7 @@ playsound(loc, G.usesound, 100, 1) if(do_after(user, 20 * G.toolspeed, target = src)) to_chat(user, "You pry the spikes out of the frame.") - new /obj/item/stack/rods(loc, 4) - new /obj/structure/kitchenspike_frame(loc) - add_fingerprint(user) - qdel(src) + deconstruct(TRUE) else to_chat(user, "You can't do that while something's on the spike!") return @@ -63,16 +65,15 @@ return if(has_buckled_mobs()) to_chat(user, "The spike already has something on it, finish collecting its meat first!") - else - if(isliving(G.affecting)) - if(!has_buckled_mobs()) - if(do_mob(user, src, 120)) - if(spike(G.affecting)) - G.affecting.visible_message("[user] slams [G.affecting] onto the meat spike!", "[user] slams you onto the meat spike!", "You hear a squishy wet noise.") - qdel(G) - return - to_chat(user, "You can't use that on the spike!") return + if(isliving(G.affecting)) + if(!has_buckled_mobs()) + if(do_mob(user, src, 120)) + if(spike(G.affecting)) + G.affecting.visible_message("[user] slams [G.affecting] onto the meat spike!", "[user] slams you onto the meat spike!", "You hear a squishy wet noise.") + qdel(G) + return + return ..() /obj/structure/kitchenspike/proc/spike(mob/living/victim) @@ -143,4 +144,13 @@ if(has_buckled_mobs()) for(var/mob/living/L in buckled_mobs) release_mob(L) - return ..() \ No newline at end of file + return ..() + +/obj/structure/kitchenspike/deconstruct(disassembled = TRUE) + if(disassembled) + var/obj/F = new /obj/structure/kitchenspike_frame(loc) + transfer_fingerprints_to(F) + else + new /obj/item/stack/sheet/metal(loc, 4) + new /obj/item/stack/rods(loc, 4) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm deleted file mode 100644 index 7fa0357cfaf..00000000000 --- a/code/game/objects/structures/lamarr_cage.dm +++ /dev/null @@ -1,82 +0,0 @@ -/obj/structure/lamarr - name = "Lab Cage" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "labcage1" - desc = "A glass lab container for storing interesting creatures." - density = 1 - anchored = 1 - unacidable = 1//Dissolving the case would also delete Lamarr - var/health = 30 - var/occupied = 1 - var/destroyed = 0 - -/obj/structure/lamarr/ex_act(severity) - switch(severity) - if(1) - new /obj/item/shard(loc) - Break() - qdel(src) - if(2) - if(prob(50)) - src.health -= 15 - src.healthcheck() - if(3) - if(prob(50)) - src.health -= 5 - src.healthcheck() - - -/obj/structure/lamarr/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - src.healthcheck() - return - - -/obj/structure/lamarr/blob_act() - if(prob(75)) - new /obj/item/shard(loc) - Break() - qdel(src) - -/obj/structure/lamarr/proc/healthcheck() - if(src.health <= 0) - if(!( src.destroyed )) - src.density = 0 - src.destroyed = 1 - new /obj/item/shard(loc) - playsound(src, "shatter", 70, 1) - Break() - else - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) - return - -/obj/structure/lamarr/update_icon() - if(src.destroyed) - src.icon_state = "labcageb[src.occupied]" - else - src.icon_state = "labcage[src.occupied]" - return - - -/obj/structure/lamarr/attackby(obj/item/W as obj, mob/user as mob, params) - src.health -= W.force - src.healthcheck() - ..() - return - -/obj/structure/lamarr/attack_hand(mob/user as mob) - if(src.destroyed) - return - else - user.visible_message("[user] kicks the lab cage.", "You kick the lab cage.") - src.health -= 2 - healthcheck() - return - -/obj/structure/lamarr/proc/Break() - if(occupied) - new /obj/item/clothing/mask/facehugger/lamarr(src.loc) - occupied = 0 - update_icon() - return diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 5aab6610f8c..a5fdff392b4 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -5,7 +5,8 @@ icon_state = "lattice" density = FALSE anchored = TRUE - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) + max_integrity = 50 layer = LATTICE_LAYER //under pipes plane = FLOOR_PLANE var/number_of_rods = 1 @@ -41,24 +42,17 @@ return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc) /obj/structure/lattice/deconstruct(disassembled = TRUE) - new /obj/item/stack/rods(get_turf(src), number_of_rods) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/rods(get_turf(src), number_of_rods) qdel(src) -/obj/structure/lattice/blob_act() - qdel(src) -/obj/structure/lattice/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - qdel(src) - if(3) - return +/obj/structure/lattice/blob_act(obj/structure/blob/B) + return /obj/structure/lattice/singularity_pull(S, current_size) if(current_size >= STAGE_FOUR) - qdel(src) + deconstruct() /obj/structure/lattice/clockwork name = "cog lattice" diff --git a/code/game/objects/structures/lavaland/necropolis_tendril.dm b/code/game/objects/structures/lavaland/necropolis_tendril.dm index 7ce1f6626b9..f906bb30a34 100644 --- a/code/game/objects/structures/lavaland/necropolis_tendril.dm +++ b/code/game/objects/structures/lavaland/necropolis_tendril.dm @@ -13,7 +13,7 @@ move_resist = INFINITY // just killing it tears a massive hole in the ground, let's not move it anchored = TRUE - burn_state = LAVA_PROOF + resistance_flags = FIRE_PROOF | LAVA_PROOF var/gps = null var/obj/effect/light_emitter/tendril/emitted_light diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index f2d39dcd8ca..008cc43f24d 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -7,7 +7,8 @@ icon = 'icons/obj/doors/mineral_doors.dmi' icon_state = "metal" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100) + max_integrity = 200 + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 50, "acid" = 50) var/initial_state var/state = 0 //closed, 1 == open var/isSwitchingStates = 0 @@ -52,9 +53,6 @@ /obj/structure/mineral_door/attack_hand(mob/user) return TryToSwitchState(user) -/obj/structure/mineral_door/attack_animal(mob/user) - return TryToSwitchState(user) - /obj/structure/mineral_door/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) SwitchState() @@ -139,23 +137,7 @@ else if(user.a_intent != INTENT_HARM) attack_hand(user) else - attacked_by(W, user) - -/obj/structure/mineral_door/attacked_by(obj/item/I, mob/user) - if(I.damtype != STAMINA) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - visible_message("[user] hits \the [src] with \the [I].") - if(damageSound) - playsound(loc, damageSound, 100, 1) - else - playsound(loc, I.hitsound, 100, 1) - hardness -= I.force / 100 - CheckHardness() - -/obj/structure/mineral_door/proc/CheckHardness() - if(hardness <= 0) - deconstruct(FALSE) + return ..() /obj/structure/mineral_door/deconstruct(disassembled = TRUE) var/turf/T = get_turf(src) @@ -166,28 +148,14 @@ new sheetType(T, max(sheetAmount - 2, 1)) qdel(src) -/obj/structure/mineral_door/ex_act(severity = 1) - switch(severity) - if(1) - deconstruct(FALSE) - if(2) - if(prob(20)) - deconstruct(FALSE) - else - hardness-- - CheckHardness() - if(3) - hardness -= 0.1 - CheckHardness() - /obj/structure/mineral_door/iron - hardness = 3 + max_integrity = 300 /obj/structure/mineral_door/silver name = "silver door" icon_state = "silver" sheetType = /obj/item/stack/sheet/mineral/silver - hardness = 3 + max_integrity = 300 /obj/structure/mineral_door/gold name = "gold door" @@ -198,14 +166,14 @@ name = "uranium door" icon_state = "uranium" sheetType = /obj/item/stack/sheet/mineral/uranium - hardness = 3 + max_integrity = 300 light_range = 2 /obj/structure/mineral_door/sandstone name = "sandstone door" icon_state = "sandstone" sheetType = /obj/item/stack/sheet/mineral/sandstone - hardness = 0.5 + max_integrity = 100 /obj/structure/mineral_door/transparent opacity = 0 @@ -241,7 +209,7 @@ name = "diamond door" icon_state = "diamond" sheetType = /obj/item/stack/sheet/mineral/diamond - hardness = 10 + max_integrity = 1000 /obj/structure/mineral_door/wood name = "wood door" @@ -250,8 +218,8 @@ closeSound = 'sound/effects/doorcreaky.ogg' sheetType = /obj/item/stack/sheet/wood hardness = 1 - burn_state = FLAMMABLE - burntime = 30 + resistance_flags = FLAMMABLE + max_integrity = 200 /obj/structure/mineral_door/resin name = "resin door" diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index f40d7f7f2de..83da489a466 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -6,6 +6,8 @@ icon_state = "mirror" density = 0 anchored = 1 + max_integrity = 200 + integrity_failure = 100 var/list/ui_users = list() /obj/structure/mirror/New(turf/T, newdir = SOUTH, building = FALSE) @@ -34,26 +36,16 @@ ui_users[user] = AC AC.ui_interact(user) -/obj/structure/mirror/proc/shatter() - if(broken) - return - broken = TRUE - icon_state = "mirror_broke" - playsound(src, "shatter", 70, 1) - desc = "Oh no, seven years of bad luck!" - - -/obj/structure/mirror/bullet_act(obj/item/projectile/Proj) - if(prob(Proj.damage * 2)) - if(!broken) - shatter() - else - playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - ..() - +/obj/structure/mirror/obj_break(damage_flag, mapload) + if(!broken && !(flags & NODECONSTRUCT)) + icon_state = "mirror_broke" + if(!mapload) + playsound(src, "shatter", 70, TRUE) + if(desc == initial(desc)) + desc = "Oh no, seven years of bad luck!" + broken = TRUE /obj/structure/mirror/attackby(obj/item/I, mob/living/user, params) - user.changeNext_move(CLICK_CD_MELEE) if(isscrewdriver(I)) user.visible_message("[user] begins to unfasten [src].", "You begin to unfasten [src].") if(do_after(user, 30 * I.toolspeed, target = src)) @@ -64,59 +56,21 @@ user.visible_message("[user] carefully places [src] on the floor.", "You carefully place [src] on the floor.") new /obj/item/mounted/mirror(get_turf(user)) qdel(src) - return - - user.do_attack_animation(src) - if(broken) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) return + return ..() - if(prob(I.force * 2)) - visible_message("[user] smashes [src] with [I]!") - shatter() - else - visible_message("[user] hits [src] with [I]!") - playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1) +/obj/structure/mirror/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!disassembled) + new /obj/item/shard( src.loc ) + qdel(src) - -/obj/structure/mirror/attack_alien(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - if(islarva(user)) - return - user.do_attack_animation(src) - if(broken) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - return - user.visible_message("[user] smashes [src]!") - shatter() - - -/obj/structure/mirror/attack_animal(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - if(!isanimal(user)) - return - var/mob/living/simple_animal/M = user - if(M.melee_damage_upper <= 0) - return - M.do_attack_animation(src) - if(broken) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - return - user.visible_message("[user] smashes [src]!") - shatter() - - -/obj/structure/mirror/attack_slime(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - var/mob/living/simple_animal/slime/S = user - if(!S.is_adult) - return - user.do_attack_animation(src) - if(broken) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - return - user.visible_message("[user] smashes [src]!") - shatter() +/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE) + if(BURN) + playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE) /obj/item/mounted/mirror @@ -204,8 +158,5 @@ /obj/structure/mirror/magic/attackby(obj/item/I, mob/living/user, params) return -/obj/structure/mirror/magic/shatter() - return //can't be broken. it's magic, i ain't gotta explain shit - /obj/structure/mirror/magic/proc/curse(mob/living/user) return \ No newline at end of file diff --git a/code/game/objects/structures/misc.dm b/code/game/objects/structures/misc.dm index 01fab63dd57..b6da99bf6dc 100644 --- a/code/game/objects/structures/misc.dm +++ b/code/game/objects/structures/misc.dm @@ -11,9 +11,6 @@ anchored = 1 density = 1 - attackby(obj/item/W as obj, mob/user as mob, params) - return attack_hand(user) - attack_hand(mob/user as mob) to_chat(user, "Civilians: NT is recruiting! Please head SOUTH to the NT Recruitment office to join the station's crew!") @@ -26,11 +23,6 @@ anchored = 1 density = 0 - attackby(obj/item/W as obj, mob/user as mob, params) - - return attack_hand(user) - - attack_hand(mob/user as mob) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 948a39ba93e..05c6a66c733 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -33,18 +33,5 @@ playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1) if(src.reagents.total_volume < 1) to_chat(user, "Out of water!") - return - -/obj/structure/mopbucket/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(5)) - qdel(src) - return + return + return ..() \ No newline at end of file diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 2953744a824..b847657e5f5 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -16,6 +16,7 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "morgue1" density = 1 + max_integrity = 400 dir = EAST var/obj/structure/m_tray/connected = null var/list/status_descriptors = list( @@ -132,8 +133,9 @@ else name = "Morgue" overlays.Cut() - add_fingerprint(user) - return + add_fingerprint(user) + return + return ..() /obj/structure/morgue/relaymove(mob/user as mob) if(user.stat) @@ -184,6 +186,7 @@ var/obj/structure/morgue/connected = null anchored = 1.0 pass_flags = LETPASSTHROW + max_integrity = 350 /obj/structure/m_tray/attack_hand(mob/user as mob) @@ -323,8 +326,9 @@ name = text("Crematorium- '[]'", t) else name = "Crematorium" - add_fingerprint(user) - return + add_fingerprint(user) + return + return ..() /obj/structure/crematorium/relaymove(mob/user as mob) if(user.stat || locked) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 8ea6a3c0cce..aa6528ee118 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -5,6 +5,7 @@ icon_state = "nboard00" density = 0 anchored = 1 + max_integrity = 150 var/notices = 0 /obj/structure/noticeboard/Initialize() @@ -29,6 +30,8 @@ to_chat(user, "You pin the paper to the noticeboard.") else to_chat(user, "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.") + return + return ..() /obj/structure/noticeboard/attack_hand(user as mob) var/dat = "Noticeboard
" @@ -37,6 +40,10 @@ user << browse("Notices[dat]","window=noticeboard") onclose(user, "noticeboard") +/obj/structure/noticeboard/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal (loc, 1) + qdel(src) /obj/structure/noticeboard/Topic(href, href_list) ..() diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 12586dc742c..2ce0918ac16 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -6,7 +6,7 @@ density = 0 anchored = 1 layer = 4 - armor = list(melee = 100, bullet = 80, laser = 80, energy = 100, bomb = 50, bio = 100, rad = 100) + armor = list(melee = 100, bullet = 80, laser = 80, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 50, acid = 50) var/state = PLASTIC_FLAPS_NORMAL /obj/structure/plasticflaps/examine(mob/user) @@ -53,7 +53,7 @@ P.add_fingerprint(user) qdel(src) else - . = ..() + return ..() /obj/structure/plasticflaps/CanPass(atom/A, turf/T) if(istype(A) && A.checkpass(PASSGLASS)) @@ -95,19 +95,8 @@ return CanAStarPass(ID, to_dir, M.pulling) return TRUE //diseases, stings, etc can pass -/obj/structure/plasticflaps/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - if(3) - if(prob(5)) - qdel(src) - /obj/structure/plasticflaps/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) new /obj/item/stack/sheet/plastic/five(loc) qdel(src) @@ -125,4 +114,4 @@ T.air_update_turf(TRUE) /obj/structure/plasticflaps/mining/CanAtmosPass(turf/T) - return FALSE + return FALSE \ No newline at end of file diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index 9e50af57473..e3ebb0579a4 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -46,6 +46,7 @@ to_chat(user, "You dismantle [src].") new /obj/item/stack/sheet/metal(src.loc, 5) qdel(src) + return if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W if(!anchored) @@ -70,6 +71,7 @@ return anchored = 0 to_chat(user, "You cut [src] free from the floor.") + return //Finishing the frame if(istype(W,/obj/item/stack/sheet)) if(finished) @@ -96,6 +98,8 @@ S.use(1) new /obj/structure/reflector/box (src.loc) qdel(src) + return + return ..() /obj/structure/reflector/proc/get_reflection(srcdir,pdir) return 0 diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index d847601de18..1e289a7f27b 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -17,8 +17,7 @@ GLOBAL_LIST_EMPTY(safes) anchored = TRUE density = TRUE - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/open = FALSE var/locked = TRUE @@ -83,7 +82,7 @@ GLOBAL_LIST_EMPTY(safes) if(open) . += "The inside of the the door has numbers written on it: [get_combination()]" -/obj/structure/safe/blob_act() +/obj/structure/safe/blob_act(obj/structure/blob/B) return /obj/structure/safe/ex_act(severity) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 6d41209aa94..707d30dbcfa 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -4,25 +4,18 @@ opacity = 0 density = 0 layer = 3.5 - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + max_integrity = 100 + armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) -/obj/structure/sign/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - qdel(src) - return - if(3.0) - qdel(src) - return - else - return - -/obj/structure/sign/blob_act() - qdel(src) - return +/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 80, TRUE) /obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction if(istype(tool, /obj/item/screwdriver) && !istype(src, /obj/structure/sign/double)) @@ -35,14 +28,15 @@ //S.icon = I.Scale(24, 24) S.sign_state = icon_state qdel(src) - else ..() + else + return ..() /obj/item/sign name = "sign" desc = "" icon = 'icons/obj/decals.dmi' w_class = WEIGHT_CLASS_NORMAL - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction @@ -69,11 +63,13 @@ S.icon_state = sign_state to_chat(user, "You fasten \the [S] with your [tool].") qdel(src) - else ..() + else + return ..() /obj/structure/sign/double/map name = "station map" desc = "A framed picture of the station." + max_integrity = 500 /obj/structure/sign/double/map/left icon_state = "map-left" @@ -125,11 +121,13 @@ name = "\improper DANGER: FIRE" desc = "A warning sign which reads 'DANGER: FIRE'" icon_state = "fire" + resistance_flags = FIRE_PROOF /obj/structure/sign/nosmoking_1 name = "\improper NO SMOKING" desc = "A warning sign which reads 'NO SMOKING'" icon_state = "nosmoking" + resistance_flags = FLAMMABLE /obj/structure/sign/nosmoking_2 name = "\improper NO SMOKING" diff --git a/code/game/objects/structures/spawner.dm b/code/game/objects/structures/spawner.dm index 71149cb1733..f960a7443ee 100644 --- a/code/game/objects/structures/spawner.dm +++ b/code/game/objects/structures/spawner.dm @@ -24,42 +24,6 @@ return ..() -/obj/structure/spawner/blob_act(obj/structure/blob/B) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - take_damage(400, BRUTE, "melee", 0, get_dir(src, B)) - -/obj/structure/spawner/ex_act(severity) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - if(resistance_flags & INDESTRUCTIBLE) - return - switch(severity) - if(1) - obj_integrity = 0 - qdel(src) - if(2) - take_damage(rand(100, 250), BRUTE, "bomb", 0) - if(3) - take_damage(rand(10, 90), BRUTE, "bomb", 0) - -/obj/structure/spawner/mech_melee_attack(obj/mecha/M) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable - M.do_attack_animation(src) - var/play_soundeffect = 0 - var/mech_damtype = M.damtype - if(M.selected) - mech_damtype = M.selected.damtype - play_soundeffect = 1 - else - switch(M.damtype) - if(BRUTE) - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) - if(BURN) - playsound(src, 'sound/items/welder.ogg', 50, 1) - if(TOX) - playsound(src, 'sound/effects/spray2.ogg', 50, 1) - return 0 - else - return 0 - visible_message("[M.name] has hit [src].") - return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs. - /obj/structure/spawner/syndicate name = "warp beacon" icon = 'icons/obj/device.dmi' diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 6f531f5c14c..6af52d6999b 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -5,76 +5,42 @@ icon_state = "" density = 1 anchored = 0 - var/hardness = 1 + max_integrity = 100 var/oreAmount = 5 var/material_drop_type = /obj/item/stack/sheet/metal /obj/structure/statue/attackby(obj/item/W, mob/living/user, params) add_fingerprint(user) - user.changeNext_move(CLICK_CD_MELEE) - if(iswrench(W)) - if(anchored) - playsound(loc, W.usesound, 100, 1) - user.visible_message("[user] is loosening the [name]'s bolts.", \ - "You are loosening the [name]'s bolts...") - if(do_after(user, 40 * W.toolspeed, target = src)) - if(!loc || !anchored) - return - user.visible_message("[user] loosened the [name]'s bolts!", \ - "You loosen the [name]'s bolts!") - anchored = 0 - else - if(!isfloorturf(loc)) - user.visible_message("A floor must be present to secure the [name]!") - return - playsound(loc, W.usesound, 100, 1) - user.visible_message("[user] is securing the [name]'s bolts...", \ - "You are securing the [name]'s bolts...") - if(do_after(user, 40 * W.toolspeed, target = src)) - if(!loc || anchored) - return - user.visible_message("[user] has secured the [name]'s bolts.", \ - "You have secured the [name]'s bolts.") - anchored = 1 - - else if(istype(W, /obj/item/gun/energy/plasmacutter)) - playsound(src, W.usesound, 100, 1) - user.visible_message("[user] is slicing apart the [name]...", \ - "You are slicing apart the [name]...") - if(do_after(user, 40 * W.toolspeed, target = src)) - if(!loc) - return - user.visible_message("[user] slices apart the [name].", \ - "You slice apart the [name].") - Dismantle(TRUE) - - else if(istype(W, /obj/item/pickaxe/drill/jackhammer)) - var/obj/item/pickaxe/drill/jackhammer/D = W - if(!loc) + if(!(flags & NODECONSTRUCT)) + if(default_unfasten_wrench(user, W)) return - user.visible_message("[user] destroys the [name]!", \ - "You destroy the [name].") - D.playDigSound() - qdel(src) - - else if(iswelder(W) && !anchored) - var/obj/item/weldingtool/WT = W - if(WT.remove_fuel(0, user)) - playsound(loc, W.usesound, 40, 1) - user.visible_message("[user] is slicing apart the [name].", \ + if(istype(W, /obj/item/gun/energy/plasmacutter)) + playsound(src, W.usesound, 100, 1) + user.visible_message("[user] is slicing apart the [name]...", \ "You are slicing apart the [name]...") if(do_after(user, 40 * W.toolspeed, target = src)) if(!loc) return - playsound(loc, W.usesound, 50, 1) user.visible_message("[user] slices apart the [name].", \ - "You slice apart the [name]!") - Dismantle(TRUE) - else - hardness -= W.force/100 - ..() - CheckHardness() - return ..() + "You slice apart the [name].") + deconstruct(TRUE) + return + + else if(iswelder(W)) + var/obj/item/weldingtool/WT = W + if(WT.remove_fuel(0, user)) + playsound(loc, W.usesound, 40, 1) + user.visible_message("[user] is slicing apart the [name].", \ + "You are slicing apart the [name]...") + if(do_after(user, 40 * W.toolspeed, target = src)) + if(!loc) + return + playsound(loc, W.usesound, 50, 1) + user.visible_message("[user] slices apart the [name].", \ + "You slice apart the [name]!") + deconstruct(TRUE) + return + return ..() /obj/structure/statue/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) @@ -85,40 +51,18 @@ /obj/structure/statue/CanAtmosPass() return !density -/obj/structure/statue/bullet_act(obj/item/projectile/Proj) - hardness -= Proj.damage - ..() - CheckHardness() - -/obj/structure/statue/proc/CheckHardness() - if(hardness <= 0) - Dismantle(TRUE) - -/obj/structure/statue/proc/Dismantle(disassembled = TRUE) - if(material_drop_type) - var/drop_amt = oreAmount - if(!disassembled) - drop_amt -= 2 - if(drop_amt > 0) - new material_drop_type(get_turf(src), drop_amt) +/obj/structure/statue/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(material_drop_type) + var/drop_amt = oreAmount + if(!disassembled) + drop_amt -= 2 + if(drop_amt > 0) + new material_drop_type(get_turf(src), drop_amt) qdel(src) -/obj/structure/statue/ex_act(severity = 1) - switch(severity) - if(1) - Dismantle(TRUE) - if(2) - if(prob(20)) - Dismantle(TRUE) - else - hardness-- - CheckHardness() - if(3) - hardness -= 0.1 - CheckHardness() - /obj/structure/statue/uranium - hardness = 3 + max_integrity = 300 light_range = 2 material_drop_type = /obj/item/stack/sheet/mineral/uranium var/last_event = 0 @@ -136,7 +80,7 @@ /obj/structure/statue/uranium/attackby(obj/item/W, mob/user, params) radiate() - ..() + return ..() /obj/structure/statue/uranium/Bumped(atom/user) radiate() @@ -156,7 +100,7 @@ active = null /obj/structure/statue/plasma - hardness = 2 + max_integrity = 200 material_drop_type = /obj/item/stack/sheet/mineral/plasma desc = "This statue is suitably made from plasma." @@ -193,18 +137,18 @@ investigate_log("[key_name(user)] ignited a plasma statue at [COORD(loc)]", "atmos") ignite(is_hot(W)) return - ..() + return ..() /obj/structure/statue/plasma/proc/PlasmaBurn() atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 160) - Dismantle(FALSE) + deconstruct(FALSE) /obj/structure/statue/plasma/proc/ignite(exposed_temperature) if(exposed_temperature > 300) PlasmaBurn() /obj/structure/statue/gold - hardness = 3 + max_integrity = 300 material_drop_type = /obj/item/stack/sheet/mineral/gold desc = "This is a highly valuable statue made from gold." @@ -229,7 +173,7 @@ icon_state = "rd" /obj/structure/statue/silver - hardness = 3 + max_integrity = 300 material_drop_type = /obj/item/stack/sheet/mineral/silver desc = "This is a valuable statue made from silver." @@ -254,7 +198,7 @@ icon_state = "medborg" /obj/structure/statue/diamond - hardness = 10 + max_integrity = 1000 material_drop_type = /obj/item/stack/sheet/mineral/diamond desc = "This is a very expensive diamond statue." @@ -271,7 +215,7 @@ icon_state = "ai2" /obj/structure/statue/bananium - hardness = 3 + max_integrity = 300 material_drop_type = /obj/item/stack/sheet/mineral/bananium desc = "A bananium statue with a small engraving:'HOOOOOOONK'." var/spam_flag = 0 @@ -286,7 +230,7 @@ /obj/structure/statue/bananium/attackby(obj/item/W, mob/user, params) honk() - ..() + return ..() /obj/structure/statue/bananium/attack_hand(mob/user) honk() @@ -300,7 +244,7 @@ spam_flag = 0 /obj/structure/statue/sandstone - hardness = 0.5 + max_integrity = 50 material_drop_type = /obj/item/stack/sheet/mineral/sandstone /obj/structure/statue/sandstone/assistant @@ -315,7 +259,7 @@ icon_state = "venus" /obj/structure/statue/tranquillite - hardness = 0.5 + max_integrity = 300 material_drop_type = /obj/item/stack/sheet/mineral/tranquillite desc = "..." @@ -333,7 +277,9 @@ to_chat(user, "It is fastened to the floor!") return setDir(turn(dir, 90)) + //////////////////////////////// + /obj/structure/snowman name = "snowman" desc = "Seems someone made a snowman here." @@ -341,10 +287,10 @@ icon_state = "snowman" anchored = TRUE density = TRUE + max_integrity = 50 /obj/structure/snowman/built desc = "Just like the ones you remember from childhood!" - max_integrity = 50 /obj/structure/snowman/built/Destroy() new /obj/item/reagent_containers/food/snacks/grown/carrot(drop_location()) @@ -379,4 +325,4 @@ icon = 'icons/obj/decorations.dmi' icon_state = "chickenstatue" anchored = 1 - density = 1 + density = 1 \ No newline at end of file diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index d3ee6c0bece..f8c65089324 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -5,7 +5,7 @@ desc = "It's a gruesome pile of thick, sticky resin shaped like a nest." icon = 'icons/mob/alien.dmi' icon_state = "nest" - var/health = 100 + max_integrity = 120 var/image/nest_overlay comfort = 0 @@ -76,15 +76,15 @@ M.layer = initial(M.layer) cut_overlay(nest_overlay) -/obj/structure/bed/nest/attackby(obj/item/W as obj, mob/user as mob, params) - user.changeNext_move(CLICK_CD_MELEE) - var/aforce = W.force - health = max(0, health - aforce) - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - visible_message("[user] hits [src] with [W]!", 1) - healthcheck() +/obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) -/obj/structure/bed/nest/proc/healthcheck() - if(health <= 0) - density = FALSE - qdel(src) +/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user) + if(user.a_intent != INTENT_HARM) + return attack_hand(user) + else + return ..() \ No newline at end of file diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 0802c212560..23802cf56a5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -17,8 +17,9 @@ can_buckle = TRUE anchored = TRUE buckle_lying = TRUE - burn_state = FLAMMABLE - burntime = 30 + resistance_flags = FLAMMABLE + max_integrity = 100 + integrity_failure = 30 var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 2 buckle_offset = -6 @@ -39,18 +40,19 @@ /obj/structure/bed/proc/handle_rotation() return -/obj/structure/bed/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/wrench)) - playsound(loc, W.usesound, 50, 1) - new buildstacktype(loc, buildstackamount) - qdel(src) +/obj/structure/bed/attackby(obj/item/W, mob/user, params) + if(iswrench(W) && !(flags & NODECONSTRUCT)) + playsound(loc, W.usesound, 50, TRUE) + deconstruct(TRUE) + else + return ..() + +/obj/structure/bed/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(buildstacktype) + new buildstacktype(loc, buildstackamount) + ..() -/obj/structure/bed/attack_animal(mob/living/simple_animal/user) - if(user.environment_smash) - user.do_attack_animation(src) - visible_message("[user] smashes [src] apart!") - new buildstacktype(loc, buildstackamount) - qdel(src) /* * Roller beds @@ -60,7 +62,7 @@ name = "roller bed" icon = 'icons/obj/rollerbed.dmi' icon_state = "down" - burn_state = FIRE_PROOF + resistance_flags = NONE anchored = FALSE comfort = 1 @@ -76,6 +78,8 @@ user.visible_message("[user] collapses \the [name].", "You collapse \the [name].") new/obj/item/roller(get_turf(src)) qdel(src) + else + return ..() /obj/structure/bed/roller/post_buckle_mob(mob/living/M) density = TRUE diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index cdb502a695c..0e9b7b3a6ae 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -7,7 +7,9 @@ can_buckle = TRUE buckle_lying = FALSE // you sit in a chair, not lay anchored = TRUE - burn_state = FIRE_PROOF + resistance_flags = NONE + max_integrity = 250 + integrity_failure = 25 buckle_offset = 0 var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 1 @@ -51,10 +53,18 @@ SK.loc = E SK.master = E qdel(src) - if(istype(W, /obj/item/wrench)) + return + if(iswrench(W) && !(flags & NODECONSTRUCT)) playsound(loc, W.usesound, 50, 1) + deconstruct(TRUE) + return + return ..() + +/obj/structure/chair/deconstruct() + // If we have materials, and don't have the NOCONSTRUCT flag + if(buildstacktype && (!(flags & NODECONSTRUCT))) new buildstacktype(loc, buildstackamount) - qdel(src) + ..() /obj/structure/chair/MouseDrop(over_object, src_location, over_location) . = ..() @@ -137,8 +147,8 @@ name = "wooden chair" desc = "Old is never too old to not be in fashion." icon_state = "wooden_chair" - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE + max_integrity = 70 buildstackamount = 3 buildstacktype = /obj/item/stack/sheet/wood item_chair = /obj/item/chair/wood @@ -155,8 +165,8 @@ desc = "It looks comfy." icon_state = "comfychair" color = rgb(255, 255, 255) - burn_state = FLAMMABLE - burntime = 30 + resistance_flags = FLAMMABLE + max_integrity = 70 buildstackamount = 2 item_chair = null var/image/armrest = null @@ -287,27 +297,6 @@ icon_state = "bar" item_chair = /obj/item/chair/stool/bar -/obj/structure/chair/stool/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(70)) - new buildstacktype(loc, buildstackamount) - qdel(src) - return - if(3.0) - if(prob(50)) - new buildstacktype(loc, buildstackamount) - qdel(src) - return - -/obj/structure/chair/stool/blob_act() - if(prob(75)) - new buildstacktype(loc, buildstackamount) - qdel(src) - /obj/item/chair name = "chair" desc = "Bar brawl essential." @@ -412,7 +401,7 @@ name = "wooden chair" icon_state = "wooden_chair_toppled" item_state = "woodenchair" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE max_integrity = 70 hitsound = 'sound/weapons/genhit1.ogg' origin_type = /obj/structure/chair/wood diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 1786d8cc8ff..fe2ee995413 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -100,7 +100,7 @@ icon_state = "wood_frame" framestack = /obj/item/stack/sheet/wood framestackamount = 2 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/sheet/wood)) @@ -127,8 +127,7 @@ name = "brass table frame" desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch." icon_state = "brass_frame" - burn_state = FIRE_PROOF - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF framestack = /obj/item/stack/tile/brass framestackamount = 1 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index ba2a80b945f..2d8c44c2a48 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -210,7 +210,7 @@ if(istype(I, /obj/item/grab)) tablepush(I, user) return - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) if(isscrewdriver(I) && deconstruction_ready) to_chat(user, "You start disassembling [src]...") playsound(loc, I.usesound, 50, 1) @@ -244,7 +244,7 @@ return ..() /obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) var/turf/T = get_turf(src) new buildstack(T, buildstackamount) if(!wrench_disassembly) @@ -368,9 +368,10 @@ icon = 'icons/obj/smooth_structures/glass_table.dmi' icon_state = "glass_table" buildstack = /obj/item/stack/sheet/glass - max_integrity = 70 - unacidable = 1 canSmoothWith = null + max_integrity = 70 + resistance_flags = ACID_PROOF + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) var/list/debris = list() /obj/structure/table/glass/New() @@ -385,7 +386,7 @@ /obj/structure/table/glass/Crossed(atom/movable/AM, oldloc) . = ..() - if(!can_deconstruct) + if(flags & NODECONSTRUCT) return if(!isliving(AM)) return @@ -421,13 +422,13 @@ qdel(src) /obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) if(disassembled) ..() return else var/turf/T = get_turf(src) - playsound(T, "shatter", 50, 1) + playsound(T, "shatter", 50, TRUE) for(var/X in debris) var/atom/movable/AM = X AM.forceMove(T) @@ -452,8 +453,7 @@ buildstack = /obj/item/stack/sheet/wood max_integrity = 70 canSmoothWith = list(/obj/structure/table/wood, /obj/structure/table/wood/poker) - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE /obj/structure/table/wood/narsie_act(total_override = TRUE) if(!total_override) @@ -508,7 +508,7 @@ canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table) max_integrity = 200 integrity_failure = 50 - armor = list(melee = 10, bullet = 30, laser = 30, energy = 100, bomb = 20, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 30, "laser" = 30, "energy" = 100, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70) /obj/structure/table/reinforced/deconstruction_hints(mob/user) if(deconstruction_ready) @@ -542,14 +542,14 @@ to_chat(user, "You weaken the table.") deconstruction_ready = TRUE else - . = ..() + return ..() /obj/structure/table/reinforced/brass name = "brass table" desc = "A solid, slightly beveled brass table." icon = 'icons/obj/smooth_structures/brass_table.dmi' icon_state = "brass_table" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF frame = /obj/structure/table_frame/brass framestack = /obj/item/stack/tile/brass buildstack = /obj/item/stack/tile/brass @@ -616,7 +616,7 @@ held_items += item.UID() /obj/structure/table/tray/deconstruct(disassembled = TRUE, wrench_disassembly = 0) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) var/turf/T = get_turf(src) new buildstack(T, buildstackamount) qdel(src) @@ -680,7 +680,7 @@ step(O, get_dir(O, src)) /obj/structure/rack/attackby(obj/item/W, mob/user, params) - if(iswrench(W) && can_deconstruct) + if(iswrench(W) && !(flags & NODECONSTRUCT) && user.a_intent != INTENT_HELP) playsound(loc, W.usesound, 50, 1) deconstruct(TRUE) return @@ -706,11 +706,11 @@ switch(damage_type) if(BRUTE) if(damage_amount) - playsound(loc, 'sound/items/dodgeball.ogg', 80, 1) + playsound(loc, 'sound/items/dodgeball.ogg', 80, TRUE) else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - playsound(loc, 'sound/items/welder.ogg', 40, 1) + playsound(loc, 'sound/items/welder.ogg', 40, TRUE) /obj/structure/rack/skeletal_bar name = "skeletal minibar" @@ -729,7 +729,7 @@ */ /obj/structure/rack/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) density = FALSE var/obj/item/rack_parts/newparts = new(loc) transfer_fingerprints_to(newparts) @@ -753,7 +753,7 @@ new /obj/item/stack/sheet/metal(user.loc) qdel(src) else - . = ..() + return ..() /obj/item/rack_parts/attack_self(mob/user) if(building) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index dbeb827d0b9..6a16305a299 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -63,6 +63,7 @@ else to_chat(user, "[src] is full.") SSnanoui.update_uis(src) + return if(istype(I, /obj/item/tank/plasma)) if(plasmatanks < 10) user.drop_item() @@ -74,6 +75,7 @@ else to_chat(user, "[src] is full.") SSnanoui.update_uis(src) + return if(istype(I, /obj/item/wrench)) if(anchored) to_chat(user, "You lean down and unwrench [src].") @@ -81,6 +83,8 @@ else to_chat(user, "You wrench [src] into place.") anchored = 1 + return + return ..() /obj/structure/dispenser/Topic(href, href_list) if(..()) @@ -118,3 +122,11 @@ else SSnanoui.close_user_uis(usr,src) return 1 + +/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + for(var/X in src) + var/obj/item/I = X + I.forceMove(loc) + new /obj/item/stack/sheet/metal(loc, 2) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 591157e8bd6..79e9c6cfab1 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -24,10 +24,7 @@ /obj/structure/target_stake/attackby(obj/item/W, mob/user, params) // Putting objects on the stake. Most importantly, targets - if(pinned_target) - return // get rid of that pinned target first! - - if(istype(W, /obj/item/target)) + if(istype(W, /obj/item/target) && !pinned_target) density = 0 W.density = 1 user.drop_item(src) @@ -35,6 +32,8 @@ W.layer = 3.1 pinned_target = W to_chat(user, "You slide the target into the stake.") + return + return ..() /obj/structure/target_stake/attack_hand(mob/user) // taking pinned targets off! diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 0958f3cc0e0..fc5ec2b9339 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -671,6 +671,7 @@ icon_state = "puddle" can_move = 0 can_rotate = 0 + resistance_flags = UNACIDABLE /obj/structure/sink/puddle/attack_hand(mob/M as mob) icon_state = "puddle-splash" diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index a083ec96af0..654fb23fdd6 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -32,6 +32,8 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f flags = ON_BORDER can_be_unanchored = TRUE max_integrity = 25 + resistance_flags = ACID_PROOF + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) var/ini_dir = null var/state = WINDOW_OUT_OF_FRAME var/reinf = FALSE @@ -127,6 +129,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return /obj/structure/window/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) deconstruct(FALSE) @@ -254,7 +257,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f take_damage(75) return - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) if(isscrewdriver(I)) playsound(src, I.usesound, 75, 1) if(reinf) @@ -331,18 +334,18 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f switch(damage_type) if(BRUTE) if(damage_amount) - playsound(src, hitsound, 75, 1) + playsound(src, hitsound, 75, TRUE) else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - playsound(src, 'sound/items/welder.ogg', 100, 1) + playsound(src, 'sound/items/Welder.ogg', 100, TRUE) /obj/structure/window/deconstruct(disassembled = TRUE) if(QDELETED(src)) return if(!disassembled) playsound(src, breaksound, 70, 1) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) for(var/i in debris) var/obj/item/I = i I.forceMove(loc) @@ -478,9 +481,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f reinf = TRUE cancolor = TRUE heat_resistance = 1600 - armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100) - max_integrity = 50 + armor = list("melee" = 80, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) + max_integrity = 75 explosion_block = 1 + damage_deflection = 11 glass_type = /obj/item/stack/sheet/rglass /obj/structure/window/reinforced/tinted @@ -550,9 +554,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f shardtype = /obj/item/shard/plasma glass_type = /obj/item/stack/sheet/plasmaglass heat_resistance = 32000 - max_integrity = 120 + max_integrity = 200 explosion_block = 1 - armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100) + armor = list("melee" = 80, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100) /obj/structure/window/plasmabasic/BlockSuperconductivity() return 1 @@ -564,9 +568,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f shardtype = /obj/item/shard/plasma glass_type = /obj/item/stack/sheet/plasmarglass reinf = TRUE - max_integrity = 160 + max_integrity = 500 explosion_block = 2 - armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100) + armor = list("melee" = 80, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100) + damage_deflection = 21 /obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return @@ -598,11 +603,11 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f shardtype = /obj/item/shard/plasma glass_type = /obj/item/stack/sheet/plasmaglass heat_resistance = 32000 - max_integrity = 240 + max_integrity = 300 smooth = SMOOTH_TRUE canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) explosion_block = 1 - armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100) + armor = list("melee" = 80, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100) /obj/structure/window/full/plasmareinforced name = "reinforced plasma window" @@ -613,9 +618,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f glass_type = /obj/item/stack/sheet/plasmarglass smooth = SMOOTH_TRUE reinf = TRUE - max_integrity = 320 + max_integrity = 1000 explosion_block = 2 - armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100) + armor = list("melee" = 80, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100) /obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return @@ -627,10 +632,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f icon_state = "r_window" smooth = SMOOTH_TRUE canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) - max_integrity = 100 + max_integrity = 150 reinf = TRUE heat_resistance = 1600 - armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100) + armor = list("melee" = 80, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) explosion_block = 1 glass_type = /obj/item/stack/sheet/rglass cancolor = TRUE @@ -653,11 +658,11 @@ obj/structure/window/full/reinforced/ice desc = "A reinforced, air-locked pod window." icon = 'icons/obj/smooth_structures/shuttle_window.dmi' icon_state = "shuttle_window" - max_integrity = 160 + max_integrity = 150 reinf = TRUE heat_resistance = 1600 explosion_block = 3 - armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) + armor = list("melee" = 90, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) smooth = SMOOTH_TRUE canSmoothWith = null glass_type = /obj/item/stack/sheet/titaniumglass @@ -679,7 +684,7 @@ obj/structure/window/full/reinforced/ice flags = PREVENT_CLICK_UNDER reinf = TRUE heat_resistance = 1600 - armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) + armor = list("melee" = 95, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) smooth = SMOOTH_TRUE canSmoothWith = null explosion_block = 3 @@ -692,10 +697,9 @@ obj/structure/window/full/reinforced/ice desc = "A paper-thin pane of translucent yet reinforced brass." icon = 'icons/obj/smooth_structures/clockwork_window.dmi' icon_state = "clockwork_window_single" - burn_state = FIRE_PROOF - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF max_integrity = 80 - armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100) + armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) explosion_block = 2 //fancy AND hard to destroy. the most useful combination. glass_type = /obj/item/stack/tile/brass reinf = FALSE diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index 21a55004ade..3e923f20790 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -1,7 +1,9 @@ /obj/structure/shuttle name = "shuttle" icon = 'icons/turf/shuttle.dmi' - armor = list(melee = 100, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0) //default + ignores melee + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + max_integrity = 500 + armor = list(melee = 100, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) //default + ignores melee /obj/structure/shuttle/shuttleRotate(rotation) ..() diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index e6c0bdea081..2124d9c49ea 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -86,7 +86,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," if(A.level == 3) return 1 -/turf/simulated/floor/blob_act() +/turf/simulated/floor/blob_act(obj/structure/blob/B) return /turf/simulated/floor/proc/update_icon() @@ -211,6 +211,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," return make_plating() /turf/simulated/floor/singularity_pull(S, current_size) + ..() if(current_size == STAGE_THREE) if(prob(30)) if(builtin_tile) @@ -241,5 +242,8 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," if(.) ChangeTurf(/turf/simulated/floor/clockwork) +/turf/simulated/floor/acid_melt() + ChangeTurf(baseturf) + /turf/simulated/floor/can_have_cabling() return !burnt && !broken diff --git a/code/game/turfs/simulated/floor/indestructible.dm b/code/game/turfs/simulated/floor/indestructible.dm index adb41ac335e..f63ab64e31b 100644 --- a/code/game/turfs/simulated/floor/indestructible.dm +++ b/code/game/turfs/simulated/floor/indestructible.dm @@ -4,7 +4,7 @@ /turf/simulated/floor/indestructible/ex_act(severity) return -/turf/simulated/floor/indestructible/blob_act() +/turf/simulated/floor/indestructible/blob_act(obj/structure/blob/B) return /turf/simulated/floor/indestructible/singularity_act() diff --git a/code/game/turfs/simulated/floor/lava.dm b/code/game/turfs/simulated/floor/lava.dm index e35f9e86c68..22b056568de 100644 --- a/code/game/turfs/simulated/floor/lava.dm +++ b/code/game/turfs/simulated/floor/lava.dm @@ -14,6 +14,9 @@ /turf/simulated/floor/plating/lava/ex_act() return +/turf/simulated/floor/plating/lava/acid_act(acidpwr, acid_volume) + return + /turf/simulated/floor/plating/lava/airless temperature = TCMB @@ -21,7 +24,7 @@ if(burn_stuff(AM)) START_PROCESSING(SSprocessing, src) -/turf/simulated/floor/plating/lava/hitby(atom/movable/AM) +/turf/simulated/floor/plating/lava/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) if(burn_stuff(AM)) START_PROCESSING(SSprocessing, src) @@ -77,6 +80,8 @@ O.resistance_flags |= FLAMMABLE //Even fireproof things burn up in lava if(O.resistance_flags & FIRE_PROOF) O.resistance_flags &= ~FIRE_PROOF + if(O.armor["fire"] > 50) //obj with 100% fire armor still get slowly burned away. + O.armor["fire"] = 50 O.fire_act(10000, 1000) else if(isliving(thing)) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index b446625a9e9..e2e2eced8f0 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -150,6 +150,10 @@ /turf/simulated/floor/engine/pry_tile(obj/item/C, mob/user, silent = FALSE) return +/turf/simulated/floor/engine/acid_act(acidpwr, acid_volume) + acidpwr = min(acidpwr, 50) //we reduce the power so reinf floor never get melted. + . = ..() + /turf/simulated/floor/engine/attackby(obj/item/C as obj, mob/user as mob, params) if(!C || !user) return @@ -182,7 +186,7 @@ if(prob(50)) ChangeTurf(baseturf) -/turf/simulated/floor/engine/blob_act() +/turf/simulated/floor/engine/blob_act(obj/structure/blob/B) if(prob(25)) ChangeTurf(baseturf) @@ -217,12 +221,14 @@ assume_air(adding) /turf/simulated/floor/engine/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) - if(prob(30)) - make_plating() //does not actually do anything - else + if(floor_tile) if(prob(30)) - ReplaceWithLattice() + new floor_tile(src) + make_plating() + else if(prob(30)) + ReplaceWithLattice() /turf/simulated/floor/engine/vacuum name = "vacuum floor" diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 964a0c3dcc5..c4f0e93dbd6 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -88,7 +88,7 @@ addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE) playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction -/turf/simulated/mineral/attack_animal(mob/living/simple_animal/user as mob) +/turf/simulated/mineral/attack_animal(mob/living/simple_animal/user) if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS)) gets_drilled() ..() @@ -120,6 +120,10 @@ if(istype(M.selected, /obj/item/mecha_parts/mecha_equipment/drill)) M.selected.action(src) + +/turf/simulated/mineral/acid_melt() + ChangeTurf(baseturf) + /turf/simulated/mineral/ex_act(severity) ..() switch(severity) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index ed72fb88993..65b80597c72 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -168,7 +168,7 @@ else return -/turf/simulated/wall/blob_act() +/turf/simulated/wall/blob_act(obj/structure/blob/B) if(prob(50)) dismantle_wall() else @@ -188,17 +188,21 @@ ..() /turf/simulated/wall/mech_melee_attack(obj/mecha/M) - if(M.damtype == "brute") - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) - M.occupant_message("You hit [src].") - visible_message("[src] has been hit by [M.name].") - if(prob(5) && M.force > 20) - dismantle_wall(1) - M.occupant_message("You smash through the wall.") - visible_message("[src.name] smashes through the wall!") - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - else - add_dent(WALL_DENT_HIT) + M.do_attack_animation(src) + switch(M.damtype) + if(BRUTE) + playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE) + M.visible_message("[M.name] hits [src]!", "You hit [src]!") + if(prob(hardness + M.force) && M.force > 20) + dismantle_wall(1) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE) + else + add_dent(WALL_DENT_HIT) + if(BURN) + playsound(src, 'sound/items/welder.ogg', 100, TRUE) + if(TOX) + playsound(src, 'sound/effects/spray2.ogg', 100, TRUE) + return FALSE // Wall-rot effect, a nasty fungus that destroys walls. /turf/simulated/wall/proc/rot() @@ -434,6 +438,10 @@ return FALSE /turf/simulated/wall/singularity_pull(S, current_size) + ..() + wall_singularity_pull(current_size) + +/turf/simulated/wall/proc/wall_singularity_pull(current_size) if(current_size >= STAGE_FIVE) if(prob(50)) dismantle_wall() @@ -446,6 +454,14 @@ if(prob(20)) ChangeTurf(/turf/simulated/wall/cult) +/turf/simulated/wall/acid_act(acidpwr, acid_volume) + if(explosion_block >= 2) + acidpwr = min(acidpwr, 50) //we reduce the power so strong walls never get melted. + . = ..() + +/turf/simulated/wall/acid_melt() + dismantle_wall(1) + /turf/simulated/wall/proc/add_dent(denttype, x=rand(-8, 8), y=rand(-8, 8)) if(LAZYLEN(dent_decals) >= MAX_DENT_DECALS) return diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 8850fbf24fa..ff1f33a769c 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -10,7 +10,7 @@ /turf/simulated/wall/indestructible/ex_act(severity) return -/turf/simulated/wall/indestructible/blob_act() +/turf/simulated/wall/indestructible/blob_act(obj/structure/blob/B) return /turf/simulated/wall/indestructible/singularity_act() diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index ae4d7588b97..f58d5dd60ad 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -287,7 +287,7 @@ return TRUE -/turf/simulated/wall/r_wall/singularity_pull(S, current_size) +/turf/simulated/wall/r_wall/wall_singularity_pull(current_size) if(current_size >= STAGE_FIVE) if(prob(30)) dismantle_wall() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 40c0d83272e..1c0bfb167d6 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -25,7 +25,7 @@ var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) add_overlay(/obj/effect/fullbright) - + if (light_power && light_range) update_light() @@ -265,6 +265,9 @@ var/turf/T = locate(destination_x, destination_y, destination_z) user.forceMove(T) +/turf/space/acid_act(acidpwr, acid_volume) + return 0 + /turf/space/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) underlay_appearance.icon = 'icons/turf/space.dmi' underlay_appearance.icon_state = SPACE_ICON_STATE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 0ab9ccbef15..d589c3dcb64 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -43,7 +43,7 @@ /turf/Initialize(mapload) . = ..() - + var/area/A = loc if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A)) add_overlay(/obj/effect/fullbright) @@ -206,7 +206,7 @@ var/old_baseturf = baseturf var/turf/W = new path(src) W.baseturf = old_baseturf - + if(!defer_change) W.AfterChange(ignore_air) W.blueprint_data = old_blueprint_data @@ -412,6 +412,27 @@ //////////////////////////////////////////////////// +/turf/acid_act(acidpwr, acid_volume) + . = 1 + var/acid_type = /obj/effect/acid + if(acidpwr >= 200) //alien acid power + acid_type = /obj/effect/acid/alien + var/has_acid_effect = FALSE + for(var/obj/O in src) + if(intact && O.level == 1) //hidden under the floor + continue + if(istype(O, acid_type)) + var/obj/effect/acid/A = O + A.acid_level = min(A.level + acid_volume * acidpwr, 12000)//capping acid level to limit power of the acid + has_acid_effect = 1 + continue + O.acid_act(acidpwr, acid_volume) + if(!has_acid_effect) + new acid_type(src, acidpwr, acid_volume) + +/turf/proc/acid_melt() + return + /turf/handle_fall(mob/faller, forced) faller.lying = pick(90, 270) if(!forced) @@ -424,7 +445,7 @@ for(var/obj/O in contents) //this is for deleting things like wires contained in the turf if(O.level != 1) continue - if(O.invisibility == 101) + if(O.invisibility == INVISIBILITY_MAXIMUM) O.singularity_act() ChangeTurf(baseturf) return(2) @@ -516,5 +537,5 @@ /turf/AllowDrop() return TRUE -/turf/proc/water_act(volume, temperature, source) +/turf/proc/water_act(volume, temperature, source) return FALSE diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm index 8ae608a0af6..537cfdc8d57 100644 --- a/code/game/turfs/unsimulated.dm +++ b/code/game/turfs/unsimulated.dm @@ -10,6 +10,9 @@ /turf/unsimulated/rpd_act() return +/turf/unsimulated/acid_act(acidpwr, acid_volume, acid_id) + return 0 + /turf/unsimulated/floor/plating/vox icon_state = "plating" name = "plating" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 98c83f4e612..172529f0a6d 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2764,7 +2764,7 @@ feedback_add_details("admin_secrets_fun_used","BO") message_admins("[key_name_admin(usr)] broke all lights", 1) for(var/obj/machinery/light/L in GLOB.machines) - L.broken() + L.break_light_tube() if("whiteout") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","WO") diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index 38c034927bc..80d6cad031a 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -76,9 +76,11 @@ var/obj/item/stack/spacecash/C = O if(pay_with_cash(C, user)) tokens += 1 - return + return if(panel_open && component_parts && istype(O, /obj/item/crowbar)) default_deconstruction_crowbar(O) + return + return ..() /obj/machinery/arcade/update_icon() return diff --git a/code/modules/arcade/mob_hunt/battle_computer.dm b/code/modules/arcade/mob_hunt/battle_computer.dm index 4942f25ffbd..0d6e91b60d9 100644 --- a/code/modules/arcade/mob_hunt/battle_computer.dm +++ b/code/modules/arcade/mob_hunt/battle_computer.dm @@ -54,6 +54,8 @@ /obj/machinery/computer/mob_battle_terminal/attackby(obj/item/O, mob/user) if(istype(O, /obj/item/nanomob_card)) insert_card(O, user) + return + return ..() /obj/machinery/computer/mob_battle_terminal/proc/insert_card(obj/item/nanomob_card/new_card, mob/user) if(!new_card) @@ -287,6 +289,8 @@ /obj/machinery/computer/mob_healer_terminal/attackby(obj/item/O, mob/user) if(istype(O, /obj/item/nanomob_card)) heal_card(O, user) + return + return ..() /obj/machinery/computer/mob_healer_terminal/proc/heal_card(obj/item/nanomob_card/patient, mob/user) if(!patient) diff --git a/code/modules/arcade/mob_hunt/mob_avatar.dm b/code/modules/arcade/mob_hunt/mob_avatar.dm index d407a305446..89eda41be7c 100644 --- a/code/modules/arcade/mob_hunt/mob_avatar.dm +++ b/code/modules/arcade/mob_hunt/mob_avatar.dm @@ -42,7 +42,7 @@ attempt_capture(P, -20) //attempting a melee capture reduces the mob's effective run_chance by 20% to balance the risk of triggering a trap mob return 1 -/obj/effect/nanomob/hitby(atom/movable/AM) +/obj/effect/nanomob/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) if(istype(AM, /obj/item/pda)) var/obj/item/pda/P = AM attempt_capture(P) //attempting a ranged capture does not affect the mob's effective run_chance but does prevent you from being shocked by a trap mob diff --git a/code/modules/arcade/prize_counter.dm b/code/modules/arcade/prize_counter.dm index d8666c36617..ca1a06d2a65 100644 --- a/code/modules/arcade/prize_counter.dm +++ b/code/modules/arcade/prize_counter.dm @@ -53,6 +53,8 @@ if(tickets) //save the tickets! print_tickets() default_deconstruction_crowbar(O) + return + return ..() /obj/machinery/prize_counter/attack_hand(mob/user as mob) if(..()) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index d8ee727f2f8..d94e3243013 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -115,14 +115,14 @@ var/obj/item/assembly/A = W if(!A.secured && !secured) attach_assembly(A, user) - return + return if(isscrewdriver(W)) if(toggle_secure()) to_chat(user, "[src] is ready!") else to_chat(user, "[src] can now be attached!") return - ..() + return ..() /obj/item/assembly/process() STOP_PROCESSING(SSobj, src) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index ac4613575e8..a7007806289 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -197,15 +197,4 @@ a_left.pulsed(0) if(master) master.receive_signal() - return TRUE - -/obj/item/assembly_holder/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - if(3) - if(prob(25)) - qdel(src) + return TRUE \ No newline at end of file diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 912eff95981..f4869f10d33 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -121,10 +121,10 @@ return TRUE //end the search! return FALSE -/obj/item/assembly/mousetrap/hitby(atom/movable/A) +/obj/item/assembly/mousetrap/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) if(!armed) return ..() - visible_message("[src] is triggered by [A].") + visible_message("[src] is triggered by [AM].") triggered(null) /obj/item/assembly/mousetrap/armed diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index addc6f847ab..29f79cae1a7 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -165,6 +165,7 @@ desc = "The neutralized core of an anomaly. It'd probably be valuable for research." icon_state = "anomaly core" item_state = "electronic" + resistance_flags = FIRE_PROOF receiving = TRUE /obj/item/assembly/signaler/anomaly/receive_signal(datum/signal/signal) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 699cbf5f803..8bacd9a839c 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -6,7 +6,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null icon_state = "off" density = 1 anchored = 1 - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/active = 0 /obj/machinery/gateway/Initialize() @@ -162,6 +162,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null if(istype(W,/obj/item/multitool)) to_chat(user, "The gate is already calibrated, there is no work for you to do here.") return + return ..() /////////////////////////////////////Away//////////////////////// @@ -290,4 +291,5 @@ var/obj/machinery/gateway/centerstation/the_gateway = null else to_chat(user, "Recalibration successful!: This gate's systems have been fine tuned. Travel to this gate will now be on target.") calibrated = 1 - return + return + return ..() \ No newline at end of file diff --git a/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm b/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm index 7d045f0afcb..63dfd3f5e4d 100644 --- a/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm +++ b/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm @@ -256,4 +256,5 @@ to_chat(user, "Activating the machine has unlocked a way forward!") else to_chat(user, "Your ID card already has all the access this machine can give.") - . = 1 + return + return ..() diff --git a/code/modules/awaymissions/mission_code/ruins/oldstation.dm b/code/modules/awaymissions/mission_code/ruins/oldstation.dm index b66b272c763..83cdfd8ac5c 100644 --- a/code/modules/awaymissions/mission_code/ruins/oldstation.dm +++ b/code/modules/awaymissions/mission_code/ruins/oldstation.dm @@ -160,7 +160,7 @@ item_state = "anc_helm" armor = list("melee" = 30, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 75) item_color = "ancient" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF sprite_sheets = null /obj/item/clothing/suit/space/hardsuit/ancient @@ -170,7 +170,7 @@ item_state = "anc_hardsuit" armor = list("melee" = 30, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 75) slowdown = 3 - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF sprite_sheets = null helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient var/footstep = 1 diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index 6d647c8ff1b..619b3c398f0 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -196,4 +196,4 @@ var/sc_safecode5 = "[rand(0,9)]" return /obj/singularity/narsie/sc_Narsie/ex_act() - return + return \ No newline at end of file diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index a65f6819d81..a6fe3789aae 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -1,6 +1,8 @@ /obj/item/clothing name = "clothing" - burn_state = FLAMMABLE + max_integrity = 200 + integrity_failure = 80 + resistance_flags = FLAMMABLE var/list/species_restricted = null //Only these species can wear this kit. var/scan_reagents = 0 //Can the wearer see reagents while it's equipped? @@ -123,7 +125,7 @@ w_class = WEIGHT_CLASS_TINY throwforce = 2 slot_flags = SLOT_EARS - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/ears.dmi', "Vox Armalis" = 'icons/mob/species/armalis/ears.dmi' @@ -201,7 +203,7 @@ var/over_mask = FALSE //Whether or not the eyewear is rendered above the mask. Purely cosmetic. strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets put_on_delay = 25 - burn_state = FIRE_PROOF + resistance_flags = NONE species_restricted = list("exclude","Kidan") /* SEE_SELF // can see self, no matter what @@ -274,7 +276,7 @@ BLIND // can't see anything to_chat(user, "[src] have already been clipped!") return else - ..() + return ..() /obj/item/clothing/under/proc/set_sensors(mob/user as mob) var/mob/M = user @@ -472,9 +474,9 @@ BLIND // can't see anything update_icon() else to_chat(user, "[src] have already had [p_their()] toes cut open!") - return + return else - ..() + return ..() /obj/item/clothing/shoes/proc/step_action(var/mob/living/carbon/human/H) //squeek squeek SEND_SIGNAL(src, COMSIG_SHOES_STEP_ACTION) @@ -505,7 +507,7 @@ BLIND // can't see anything name = "suit" var/fire_resist = T0C+100 allowed = list(/obj/item/tank/emergency_oxygen) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) slot_flags = SLOT_OCLOTHING var/blood_overlay_type = "suit" var/suittoggled = FALSE @@ -593,7 +595,7 @@ BLIND // can't see anything flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH item_state = "s_helmet" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 50) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT @@ -603,7 +605,7 @@ BLIND // can't see anything flash_protect = 2 strip_delay = 50 put_on_delay = 50 - burn_state = FIRE_PROOF + resistance_flags = NONE dog_fashion = null /obj/item/clothing/suit/space @@ -618,7 +620,7 @@ BLIND // can't see anything body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/flashlight,/obj/item/tank) slowdown = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 50) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT @@ -626,7 +628,7 @@ BLIND // can't see anything max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT strip_delay = 80 put_on_delay = 80 - burn_state = FIRE_PROOF + resistance_flags = NONE hide_tail_by_species = null species_restricted = list("exclude","Vox","Wryn") @@ -637,7 +639,7 @@ BLIND // can't see anything body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS permeability_coefficient = 0.90 slot_flags = SLOT_ICLOTHING - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/uniform.dmi', @@ -787,3 +789,13 @@ BLIND // can't see anything /obj/item/clothing/under/AltClick() handle_accessories_removal() + +/obj/item/clothing/obj_destruction(damage_flag) + if(damage_flag == "bomb" || damage_flag == "melee") + var/turf/T = get_turf(src) + spawn(1) //so the shred survives potential turf change from the explosion. + var/obj/effect/decal/cleanable/shreds/Shreds = new(T) + Shreds.desc = "The sad remains of what used to be [name]." + deconstruct(FALSE) + else + ..() \ No newline at end of file diff --git a/code/modules/clothing/ears/ears.dm b/code/modules/clothing/ears/ears.dm index 74164f0e245..2ba883a6f89 100644 --- a/code/modules/clothing/ears/ears.dm +++ b/code/modules/clothing/ears/ears.dm @@ -7,7 +7,7 @@ flags_2 = HEALS_EARS_2 strip_delay = 15 put_on_delay = 25 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/clothing/ears/headphones name = "headphones" @@ -16,7 +16,6 @@ icon_state = "headphones0" item_state = null actions_types = list(/datum/action/item_action/toggle_headphones) - burn_state = FLAMMABLE /obj/item/clothing/ears/headphones/attack_self(mob/user) on = !on diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index b5ac9aa405f..ce29fa8f7b1 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -104,7 +104,8 @@ origin_tech = "magnets=2;engineering=1" prescription_upgradable = 0 scan_reagents = 1 //You can see reagents while wearing science goggles - + resistance_flags = ACID_PROOF + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/eyes.dmi', "Grey" = 'icons/mob/species/grey/eyes.dmi', @@ -449,7 +450,7 @@ flags = NODROP flags_cover = null lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - + resistance_flags = LAVA_PROOF | FIRE_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/eyes.dmi', "Grey" = 'icons/mob/species/grey/eyes.dmi', diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 72a94d3086c..cbf9d0695ce 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -6,7 +6,7 @@ siemens_coefficient = 0 permeability_coefficient = 0.05 item_color="yellow" - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/gloves/color/yellow/power description_antag = "These are a pair of power gloves, and can be used to fire bolts of electricity while standing over powered power cables." @@ -58,7 +58,7 @@ siemens_coefficient = 1 //Set to a default of 1, gets overridden in New() permeability_coefficient = 0.05 item_color="yellow" - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/gloves/color/fyellow/New() ..() @@ -82,7 +82,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF + resistance_flags = NONE var/can_be_cut = 1 @@ -131,7 +131,7 @@ desc = "These gloves will protect the wearer from electric shock." siemens_coefficient = 0 permeability_coefficient = 0.05 - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/gloves/color/rainbow name = "rainbow gloves" @@ -203,7 +203,7 @@ permeability_coefficient = 0.01 item_color="white" transfer_prints = TRUE - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/gloves/color/latex/nitrile name = "nitrile gloves" @@ -237,3 +237,4 @@ heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT strip_delay = 60 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 50) \ No newline at end of file diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 8ed40c0890d..fef737982fa 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -36,7 +36,8 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF + resistance_flags = NONE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) /obj/item/clothing/gloves/bracer name = "bone bracers" @@ -51,7 +52,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT resistance_flags = NONE - armor = list(melee = 15, bullet = 25, laser = 15, energy = 15, bomb = 20, bio = 10, rad = 0) + armor = list("melee" = 15, "bullet" = 25, "laser" = 15, "energy" = 15, "bomb" = 20, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) /obj/item/clothing/gloves/botanic_leather desc = "These leather gloves protect against thorns, barbs, prickles, spikes and other harmful objects of floral origin." @@ -63,7 +64,8 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF + resistance_flags = NONE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 30) /obj/item/clothing/gloves/batmangloves desc = "Used for handling all things bat related." diff --git a/code/modules/clothing/head/beanie.dm b/code/modules/clothing/head/beanie.dm index af7e805b232..b912a07c212 100644 --- a/code/modules/clothing/head/beanie.dm +++ b/code/modules/clothing/head/beanie.dm @@ -81,7 +81,7 @@ desc = "A beanie made from durathread, its resilient fibres provide some protection to the wearer." icon_state = "beaniedurathread" item_color = null - armor = list(melee = 15, bullet = 5, laser = 15, energy = 5, bomb = 10, bio = 0, rad = 0) + armor = list("melee" = 15, "bullet" = 5, "laser" = 15, "energy" = 5, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 5) /obj/item/clothing/head/beanie/waldo name = "red striped bobble hat" diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 2cfc2adccaf..cc5c3248b19 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -64,7 +64,6 @@ desc = "A Collectable Welding Helmet. Now with 80% less lead! Not for actual welding. Any welding done while wearing this Helmet is done so at the owner's own risk!" icon_state = "welding" item_state = "welding" - burn_state = FIRE_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi', @@ -135,14 +134,12 @@ desc = "Go Red! I mean Green! I mean Red! No Green!" icon_state = "thunderdome" item_state = "thunderdome" - burn_state = FIRE_PROOF /obj/item/clothing/head/collectable/swat name = "collectable SWAT helmet" desc = "Now you can be in the Deathsquad too!" icon_state = "swat" item_state = "swat" - burn_state = FIRE_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi' diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 9109821937d..18b92433f83 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -7,10 +7,10 @@ var/brightness_on = 4 //luminosity when on var/on = FALSE item_color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite) - armor = list(melee = 15, bullet = 5, laser = 20, energy = 10, bomb = 20, bio = 10, rad = 20) + armor = list("melee" = 15, "bullet" = 5, "laser" = 20, "energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50) flags_inv = 0 actions_types = list(/datum/action/item_action/toggle_helmet_light) - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF dog_fashion = /datum/dog_fashion/head/hardhat sprite_sheets = list( "Grey" = 'icons/mob/species/grey/head.dmi' diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 7a9b78cfb19..d47e3c32365 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -5,14 +5,13 @@ flags = HEADBANGPROTECT flags_cover = HEADCOVERSEYES item_state = "helmetmaterials" - armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 35, "bullet" = 30, "laser" = 30,"energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) flags_inv = HIDEEARS|HIDEEYES cold_protection = HEAD min_cold_protection_temperature = HELMET_MIN_TEMP_PROTECT heat_protection = HEAD max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT strip_delay = 60 - burn_state = FIRE_PROOF dog_fashion = /datum/dog_fashion/head/helmet sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi', @@ -75,7 +74,7 @@ desc = "A bulletproof helmet that excels in protecting the wearer against traditional projectile weaponry and explosives to a minor extent." icon_state = "swat" item_state = "swat-alt" - armor = list(melee = 15, bullet = 40, laser = 10, energy = 10, bomb = 40, bio = 0, rad = 0) + armor = list("melee" = 15, "bullet" = 60, "laser" = 10, "energy" = 10, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) dog_fashion = null /obj/item/clothing/head/helmet/riot @@ -83,7 +82,7 @@ desc = "It's a helmet specifically designed to protect against close range attacks." icon_state = "riot" item_state = "helmet" - armor = list(melee = 41, bullet = 15, laser = 5, energy = 5, bomb = 5, bio = 2, rad = 0) + armor = list("melee" = 50, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80) flags_inv = HIDEEARS flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH strip_delay = 80 @@ -123,7 +122,7 @@ desc = "They're often used by highly trained Swat Members." icon_state = "swat" item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 30, energy = 30, bomb = 50, bio = 90, rad = 20) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30,"energy" = 30, "bomb" = 50, "bio" = 90, "rad" = 20, "fire" = 50, "acid" = 50) flags = null flags_inv = HIDEEARS|HIDEEYES cold_protection = HEAD @@ -145,7 +144,7 @@ icon_state = "thunderdome" flags = null item_state = "thunderdome" - armor = list(melee = 40, bullet = 30, laser = 25, energy = 10, bomb = 25, bio = 10, rad = 0) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 90) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD @@ -157,7 +156,8 @@ name = "roman helmet" desc = "An ancient helmet made of bronze and leather." flags = null - armor = list(melee = 25, bullet = 0, laser = 25, energy = 10, bomb = 10, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 0, "laser" = 25, "energy" = 10, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) + resistance_flags = FIRE_PROOF icon_state = "roman" item_state = "roman" strip_delay = 100 @@ -198,7 +198,7 @@ obj/item/clothing/head/helmet/redtaghelm icon_state = "redtaghelm" flags = null item_state = "redtaghelm" - armor = list(melee = 15, bullet = 10, laser = 20, energy = 10, bomb = 20, bio = 0, rad = 0) + armor = list("melee" = 15, "bullet" = 10, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50) // Offer about the same protection as a hardhat. flags_inv = HIDEEARS|HIDEEYES dog_fashion = null @@ -209,7 +209,7 @@ obj/item/clothing/head/helmet/bluetaghelm icon_state = "bluetaghelm" flags = null item_state = "bluetaghelm" - armor = list(melee = 15, bullet = 10, laser = 20, energy = 10, bomb = 20, bio = 0, rad = 0) + armor = list("melee" = 15, "bullet" = 10, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50) // Offer about the same protection as a hardhat. flags_inv = HIDEEARS|HIDEEYES dog_fashion = null @@ -243,14 +243,14 @@ obj/item/clothing/head/blob desc = "Deus Vult." icon_state = "knight_templar" item_state = "knight_templar" - armor = list(melee = 20, bullet = 7, laser = 2, energy = 2, bomb = 2, bio = 2, rad = 0) + armor = list(melee = 20, bullet = 7, laser = 2, energy = 2, bomb = 2, bio = 2, rad = 0, fire = 80, acid = 80) /obj/item/clothing/head/helmet/skull name = "skull helmet" desc = "An intimidating tribal helmet, it doesn't look very comfortable." flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE flags_cover = HEADCOVERSEYES - armor = list(melee = 25, bullet = 25, laser = 25, energy = 10, bomb = 10, bio = 5, rad = 20) + armor = list("melee" = 35, "bullet" = 25, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) icon_state = "skull" item_state = "skull" strip_delay = 100 @@ -260,7 +260,8 @@ obj/item/clothing/head/blob desc = "A helmet made from durathread and leather." icon_state = "durathread" item_state = "durathread" - armor = list(melee = 25, bullet = 10, laser = 20, energy = 10, bomb = 30, bio = 15, rad = 20) + resistance_flags = FLAMMABLE + armor = list("melee" = 20, "bullet" = 10, "laser" = 30, "energy" = 5, "bomb" = 15, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 50) strip_delay = 60 //Commander diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index b6333241128..8bffa1d268f 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -16,7 +16,7 @@ icon_state = "captain" desc = "It's good being the king." item_state = "caphat" - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 15, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) strip_delay = 60 dog_fashion = /datum/dog_fashion/head/captain @@ -32,7 +32,7 @@ name = "head of personnel's cap" icon_state = "hopcap" desc = "The symbol of true bureaucratic micromanagement." - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 15, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) dog_fashion = /datum/dog_fashion/head/hop //Nanotrasen Representative @@ -78,7 +78,7 @@ desc = "Someone who wears this will look very smart." icon_state = "detective" allowed = list(/obj/item/reagent_containers/food/snacks/candy/candy_corn, /obj/item/pen) - armor = list(melee = 25, bullet = 5, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 5, "laser" = 25, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 50) dog_fashion = /datum/dog_fashion/head/detective //Mime @@ -93,14 +93,14 @@ desc = "A beret made from durathread, its resilient fibres provide some protection to the wearer." icon_state = "beretdurathread" item_color = null - armor = list(melee = 15, bullet = 5, laser = 15, energy = 5, bomb = 10, bio = 0, rad = 0) + armor = list("melee" = 15, "bullet" = 5, "laser" = 15, "energy" = 5, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 5) //Security /obj/item/clothing/head/HoS name = "head of security cap" desc = "The robust standard-issue cap of the Head of Security. For showing the officers who's in charge." icon_state = "hoscap" - armor = list(melee = 40, bullet = 30, laser = 25, energy = 10, bomb = 25, bio = 10, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 10, "rad" = 0, "fire" = 50, "acid" = 60) strip_delay = 80 /obj/item/clothing/head/HoS/beret @@ -112,7 +112,7 @@ name = "warden's police hat" desc = "It's a special armored hat issued to the Warden of a security force. Protects the head from impacts." icon_state = "policehelm" - armor = list(melee = 30, bullet = 5, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 60) strip_delay = 60 dog_fashion = /datum/dog_fashion/head/warden @@ -121,14 +121,14 @@ desc = "A red cap with an old-fashioned badge on the front for establishing that you are, in fact, the law." icon_state = "customshelm" item_state = "customshelm" - armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30,"energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 50) strip_delay = 60 /obj/item/clothing/head/beret/sec name = "security beret" desc = "A beret with the security insignia emblazoned on it. For officers that are more inclined towards style than safety." icon_state = "beret_officer" - armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30,"energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 50) strip_delay = 60 dog_fashion = null @@ -136,7 +136,7 @@ name = "warden's beret" desc = "A special beret with the Warden's insignia emblazoned on it. For wardens with class." icon_state = "beret_warden" - armor = list(melee = 30, bullet = 5, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 50) /obj/item/clothing/head/beret/eng name = "engineering beret" diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 6a49811e65a..ef49855dbec 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -5,7 +5,7 @@ icon_state = "centcom" desc = "It's good to be emperor." item_state = "centhat" - armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 30, "bullet" = 15, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) strip_delay = 80 /obj/item/clothing/head/hairflower @@ -305,13 +305,6 @@ flags = BLOCKHAIR flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE -/obj/item/clothing/head/crown - name = "bananium crown" - icon_state = "crown" - item_state = "crown" - desc = "A gliterring bananium crown with spessjewels in it. Swaggy." - - /obj/item/clothing/head/fedora name = "fedora" desc = "Someone wearing this definitely makes them cool" @@ -358,14 +351,14 @@ name = "officers beret" desc = "A black beret adorned with the shield—a silver kite shield with an engraved sword—of the Nanotrasen security forces, announcing to the world that the wearer is a defender of Nanotrasen." icon_state = "beret_centcom_officer" - armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30,"energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 50) strip_delay = 60 /obj/item/clothing/head/beret/centcom/officer/navy name = "navy blue officers beret" desc = "A navy blue beret adorned with the shield—a silver kite shield with an engraved sword—of the Nanotrasen security forces, announcing to the world that the wearer is a defender of Nanotrasen." icon_state = "beret_centcom_officer_navy" - armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30,"energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 50) strip_delay = 60 /obj/item/clothing/head/beret/centcom/captain @@ -407,7 +400,7 @@ throw_range = 5 w_class = WEIGHT_CLASS_SMALL attack_verb = list("warned", "cautioned", "smashed") - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/head/jester name = "jester hat" @@ -479,7 +472,8 @@ name = "crown" desc = "A crown fit for a king, a petty king maybe." icon_state = "crown" - armor = list(melee = 15, bullet = 0, laser = 0, energy = 15, bomb = 0, bio = 0, rad = 0) //for a warrior king //energy cause gold is reflective //worse than sec helm overall + armor = list("melee" = 15, "bullet" = 0, "laser" = 0,"energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 50) + resistance_flags = FIRE_PROOF /obj/item/clothing/head/crown/fancy name = "magnificent crown" diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index bd224890576..d939dadffba 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -21,11 +21,11 @@ materials = list(MAT_METAL=1750, MAT_GLASS=400) flash_protect = 2 tint = 2 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 60) flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE) actions_types = list(/datum/action/item_action/toggle) visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/head.dmi', @@ -91,6 +91,7 @@ desc = "It's tasty looking!" icon_state = "cake0" flags_cover = HEADCOVERSEYES + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) var/onfire = 0.0 var/status = 0 var/fire_resist = T0C+1300 //this is the max temp it can stand before you start to cook. although it might not burn away, you take damage @@ -164,11 +165,12 @@ flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH + sprite_sheets = list( "Grey" = 'icons/mob/species/grey/head.dmi' ) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) brightness_on = 2 //luminosity when on @@ -179,7 +181,7 @@ item_state = "hardhat0_reindeer" item_color = "reindeer" flags_inv = 0 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) brightness_on = 1 //luminosity when on dog_fashion = /datum/dog_fashion/head/reindeer diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index 49fcd17869d..b111672e86a 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -107,7 +107,7 @@ desc = "It's baseball hat in tasteful red colour." icon_state = "secsoft" item_color = "sec" - armor = list(melee = 30, bullet = 25, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 30, "bullet" = 25, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 50) strip_delay = 60 dog_fashion = null diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 638aa3c2c84..c37fad48906 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -9,7 +9,7 @@ gas_transfer_coefficient = 0.10 permeability_coefficient = 0.50 actions_types = list(/datum/action/item_action/adjust) - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', "Vox Armalis" = 'icons/mob/species/armalis/mask.dmi', diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index aac3bdcdc30..b6e3164a44d 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -9,7 +9,7 @@ item_state = "gas_alt" gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', "Unathi" = 'icons/mob/species/unathi/mask.dmi', @@ -30,12 +30,13 @@ materials = list(MAT_METAL=4000, MAT_GLASS=2000) flash_protect = 2 tint = 2 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 55) origin_tech = "materials=2;engineering=3" actions_types = list(/datum/action/item_action/toggle) flags_inv = HIDEEARS|HIDEEYES|HIDEFACE flags_cover = MASKCOVERSEYES visor_flags_inv = HIDEEYES + resistance_flags = FIRE_PROOF /obj/item/clothing/mask/gas/welding/attack_self(mob/user) weldingvisortoggle(user) @@ -45,8 +46,8 @@ desc = "A military-grade gas mask that can be connected to an air supply." icon_state = "gas_mining" actions_types = list(/datum/action/item_action/adjust) - armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 0, "bio" = 50, "rad" = 0) - burn_state = FIRE_PROOF + armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 20, "acid" = 40) + resistance_flags = FIRE_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', @@ -88,7 +89,7 @@ desc = "A modernised version of the classic design, this mask will not only filter out toxins but it can also be connected to an air supply." icon_state = "plaguedoctor" item_state = "gas_mask" - armor = list(melee = 0, bullet = 0, laser = 2, energy = 2, bomb = 0, bio = 75, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 2, "energy" = 2, "bomb" = 0, "bio" = 75, "rad" = 0, "fire" = 0, "acid" = 0) /obj/item/clothing/mask/gas/swat name = "\improper SWAT mask" @@ -107,7 +108,7 @@ icon_state = "clown" item_state = "clown_hat" flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | BLOCKHAIR - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE dog_fashion = /datum/dog_fashion/head/clown /obj/item/clothing/mask/gas/clown_hat/attack_self(mob/user) @@ -149,7 +150,7 @@ desc = "The traditional mime's mask. It has an eerie facial posture." icon_state = "mime" item_state = "mime" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/mime/nodrop flags = NODROP @@ -159,26 +160,26 @@ desc = "A mask used when acting as a monkey." icon_state = "monkeymask" item_state = "monkeymask" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/sexymime name = "sexy mime mask" desc = "A traditional female mime's mask." icon_state = "sexymime" item_state = "sexymime" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/cyborg name = "cyborg visor" desc = "Beep boop" icon_state = "death" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/owl_mask name = "owl mask" desc = "Twoooo!" icon_state = "owl" - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE actions_types = list(/datum/action/item_action/hoot) /obj/item/clothing/mask/gas/owl_mask/super_hero diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 924179bdd4c..268c3010cbe 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -206,7 +206,7 @@ flags_cover = MASKCOVERSMOUTH gas_transfer_coefficient = 0.90 permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 25, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 25, "rad" = 0, "fire" = 0, "acid" = 0) actions_types = list(/datum/action/item_action/adjust) sprite_sheets = list( @@ -496,7 +496,7 @@ icon = 'icons/goonstation/objects/clothing/mask.dmi' icon_state = "cursedclown" item_state = "cclown_hat" - unacidable = 1 // HUNKE + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF icon_override = 'icons/goonstation/mob/clothing/mask.dmi' lefthand_file = 'icons/goonstation/mob/inhands/clothing_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/clothing_righthand.dmi' diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index b029f180fa7..7b0baef536f 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -11,7 +11,7 @@ actions_types = list(/datum/action/item_action/toggle) strip_delay = 70 put_on_delay = 70 - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/clothing/shoes/magboots/attack_self(mob/user) if(magpulse) @@ -44,6 +44,7 @@ magboot_state = "advmag" slowdown_active = SHOES_SLOWDOWN origin_tech = null + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/clothing/shoes/magboots/syndie desc = "Reverse-engineered magnetic boots that have a heavy magnetic pull. Property of Gorlex Marauders." diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 9dc2f20fb1d..9c7d8bac080 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -9,15 +9,15 @@ can_cut_open = 1 icon_state = "jackboots" item_state = "jackboots" - armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0) + armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50) strip_delay = 70 - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/shoes/combat/swat //overpowered boots for death squads name = "\improper SWAT shoes" desc = "High speed, no drag combat boots." permeability_coefficient = 0.01 - armor = list(melee = 40, bullet = 30, laser = 25, energy = 25, bomb = 50, bio = 30, rad = 30) + armor = list("melee" = 40, "bullet" = 30, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 30, "rad" = 30, "fire" = 90, "acid" = 50) flags = NOSLIP /obj/item/clothing/shoes/sandal @@ -32,6 +32,12 @@ desc = "A pair of magic, black shoes." name = "magic shoes" icon_state = "black" + resistance_flags = FIRE_PROOF | ACID_PROOF + +/obj/item/clothing/shoes/sandal/magic + name = "magical sandals" + desc = "A pair of sandals imbued with magic." + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/clothing/shoes/galoshes desc = "A pair of yellow rubber boots, designed to prevent slipping on wet surfaces." @@ -42,7 +48,8 @@ slowdown = SHOES_SLOWDOWN+1 strip_delay = 50 put_on_delay = 50 - burn_state = FIRE_PROOF + resistance_flags = NONE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 75) /obj/item/clothing/shoes/galoshes/dry name = "absorbent galoshes" @@ -105,7 +112,7 @@ item_color = "hosred" strip_delay = 50 put_on_delay = 50 - burn_state = FIRE_PROOF + resistance_flags = NONE var/footstep = 1 shoe_sound = "jackboot" @@ -126,7 +133,7 @@ name = "mining boots" desc = "Steel-toed mining boots for mining in hazardous environments. Very good at keeping toes uncrushed." icon_state = "explorer" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/clothing/shoes/winterboots name = "winter boots" @@ -231,6 +238,7 @@ icon_override = 'icons/goonstation/mob/clothing/feet.dmi' lefthand_file = 'icons/goonstation/mob/inhands/clothing_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/clothing_righthand.dmi' + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags = NODROP shoe_sound = "clownstep" @@ -280,6 +288,7 @@ name = "lizard skin boots" desc = "You can hear a faint hissing from inside the boots; you hope it is just a mournful ghost." icon_state = "lizardboots_green" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 0) //lizards like to stay warm /obj/item/clothing/shoes/cowboy/lizardmasterwork name = "\improper Hugs-The-Feet lizard skin boots" @@ -310,7 +319,7 @@ icon_state = "jetboots" item_state = "jetboots" item_color = "hosred" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF actions_types = list(/datum/action/item_action/bhop) permeability_coefficient = 0.05 can_cut_open = FALSE diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index c52fe271966..0412570a161 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -76,7 +76,7 @@ /obj/item/clothing/suit/space/vox w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword/saber,/obj/item/restraints/handcuffs,/obj/item/tank) - armor = list(melee = 40, bullet = 40, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list(melee = 40, bullet = 40, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30, fire = 80, acid = 85) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT icon = 'icons/obj/clothing/species/vox/suits.dmi' @@ -87,7 +87,7 @@ ) /obj/item/clothing/head/helmet/space/vox - armor = list(melee = 40, bullet = 40, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list(melee = 40, bullet = 40, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30, fire = 80, acid = 85) flags = STOPSPRESSUREDMAGE flags_cover = HEADCOVERSEYES icon = 'icons/obj/clothing/species/vox/hats.dmi' diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 700c88008e0..4f6468fb9b7 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -4,7 +4,8 @@ icon_state = "chronohelmet" item_state = "chronohelmet" slowdown = 1 - armor = list(melee = 60, bullet = 30, laser = 60, energy = 60, bomb = 30, bio = 90, rad = 90) + armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 60, "bomb" = 30, "bio" = 90, "rad" = 90, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/clothing/suit/space/chronos/suit = null /obj/item/clothing/head/helmet/space/chronos/dropped() @@ -23,7 +24,8 @@ icon_state = "chronosuit" item_state = "chronosuit" actions_types = list(/datum/action/item_action/toggle) - armor = list(melee = 60, bullet = 60, laser = 60, energy = 60, bomb = 30, bio = 90, rad = 90) + armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 60, "bomb" = 30, "bio" = 90, "rad" = 90, "fire" = 100, "acid" = 1000) + resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/clothing/head/helmet/space/chronos/helmet = null var/obj/effect/chronos_cam/camera = null var/activating = 0 @@ -184,6 +186,12 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/mob/holder = null +/obj/effect/chronos_cam/singularity_act() + return + +/obj/effect/chronos_cam/singularity_pull() + return + /obj/effect/chronos_cam/relaymove(var/mob/user, direction) if(holder) if(user == holder) diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index 9f4590038be..4670eca24a8 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -5,7 +5,8 @@ icon_state = "hardsuit0-ert_commander" item_state = "helm-command" item_color = "ert_commander" - armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50) + armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50, fire = 80, acid = 80) + resistance_flags = FIRE_PROOF var/obj/machinery/camera/camera var/has_camera = TRUE strip_delay = 130 @@ -37,14 +38,14 @@ item_state = "suit-command" w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword/saber,/obj/item/restraints/handcuffs,/obj/item/tank) - armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50) + armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50, fire = 80, acid = 80) allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/t_scanner, /obj/item/rcd, /obj/item/crowbar, \ /obj/item/screwdriver, /obj/item/weldingtool, /obj/item/wirecutters, /obj/item/wrench, /obj/item/multitool, \ /obj/item/radio, /obj/item/analyzer, /obj/item/gun/energy/laser, /obj/item/gun/energy/pulse, \ /obj/item/gun/energy/gun/advtaser, /obj/item/melee/baton, /obj/item/gun/energy/gun, /obj/item/gun/projectile/automatic/lasercarbine, /obj/item/gun/energy/gun/blueshield, /obj/item/gun/energy/immolator/multi) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert strip_delay = 130 - + resistance_flags = FIRE_PROOF sprite_sheets = list( "Drask" = 'icons/mob/species/drask/suit.dmi', "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -190,6 +191,7 @@ item_color = "ert_paranormal" max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT actions_types = list() + resistance_flags = FIRE_PROOF has_camera = FALSE sprite_sheets = list( "Grey" = 'icons/mob/species/grey/helmet.dmi', @@ -204,6 +206,7 @@ icon_state = "hardsuit-paranormal" max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert/paranormal + resistance_flags = FIRE_PROOF sprite_sheets = list( "Tajaran" = 'icons/mob/species/tajaran/suit.dmi', "Unathi" = 'icons/mob/species/unathi/suit.dmi', @@ -219,13 +222,13 @@ name = "inquisitor's helmet" icon_state = "hardsuit0-inquisitor" item_color = "inquisitor" - armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100) + armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100, fire = 80, acid = 80) /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor name = "inquisitor's hardsuit" icon_state = "hardsuit-inquisitor" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert/paranormal/inquisitor - armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100) + armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100, fire = 80, acid = 80) slowdown = 0 /obj/item/clothing/head/helmet/space/hardsuit/ert/paranormal/berserker @@ -233,12 +236,12 @@ desc = "Peering into the eyes of the helmet is enough to seal damnation." icon_state = "hardsuit0-berserker" item_color = "berserker" - armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100) + armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100, fire = 80, acid = 80) /obj/item/clothing/suit/space/hardsuit/ert/paranormal/berserker name = "champion's hardsuit" desc = "Voices echo from the hardsuit, driving the user insane." icon_state = "hardsuit-berserker" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert/paranormal/berserker - armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100) + armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100, fire = 80, acid = 80) slowdown = 0 \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 9e78a4feb16..32b594b1387 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -4,7 +4,8 @@ desc = "A special helmet designed for work in a hazardous, low-pressure environment." icon_state = "hardsuit0-engineering" item_state = "eng_helm" - armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) + max_integrity = 300 + armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 50, "acid" = 75) var/basestate = "hardsuit" allowed = list(/obj/item/flashlight) var/brightness_on = 4 //luminosity when on @@ -87,7 +88,8 @@ desc = "A special space suit for environments that might pose hazards beyond just the vacuum of space. Provides more protection than a standard space suit." icon_state = "hardsuit-engineering" item_state = "eng_hardsuit" - armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) + max_integrity = 300 + armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 50, "acid" = 75) allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/t_scanner, /obj/item/rcd, /obj/item/rpd) siemens_coefficient = 0 var/obj/item/clothing/head/helmet/space/hardsuit/helmet @@ -176,7 +178,8 @@ desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding." icon_state = "hardsuit0-engineering" item_state = "eng_helm" - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75) + resistance_flags = FIRE_PROOF item_color = "engineering" /obj/item/clothing/suit/space/hardsuit/engine @@ -184,9 +187,10 @@ desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding." icon_state = "hardsuit-engineering" item_state = "eng_hardsuit" - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 75, "fire" = 100, "acid" = 75) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine dog_fashion = /datum/dog_fashion/back/hardsuit + resistance_flags = FIRE_PROOF //Atmospherics /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos @@ -195,7 +199,7 @@ icon_state = "hardsuit0-atmos" item_state = "atmos_helm" item_color = "atmos" - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 25) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75) heat_protection = HEAD //Uncomment to enable firesuit protection max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT @@ -204,7 +208,7 @@ desc = "A special suit that protects against hazardous, low pressure environments. Has thermal shielding." icon_state = "hardsuit-atmos" item_state = "atmos_hardsuit" - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 25) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 25, "fire" = 100, "acid" = 75) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos @@ -217,7 +221,7 @@ icon_state = "hardsuit0-white" item_state = "ce_helm" item_color = "white" - armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 100) + armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 90) heat_protection = HEAD //Uncomment to enable firesuit protection max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT @@ -226,7 +230,7 @@ name = "advanced hardsuit" desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish." item_state = "ce_hardsuit" - armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 90) + armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 90, "fire" = 100, "acid" = 90) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS //Uncomment to enable firesuit protection max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/elite @@ -241,8 +245,9 @@ item_state = "mining_helm" item_color = "mining" max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT + resistance_flags = FIRE_PROOF heat_protection = HEAD - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 50) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75) brightness_on = 7 /obj/item/clothing/suit/space/hardsuit/mining @@ -251,7 +256,8 @@ desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating." item_state = "mining_hardsuit" max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 50) + resistance_flags = FIRE_PROOF + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 75) allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/storage/bag/ore, /obj/item/pickaxe, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/mining heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -264,7 +270,7 @@ icon_state = "hardsuit1-syndi" item_state = "syndie_helm" item_color = "syndi" - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 15, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 90) on = 1 var/obj/item/clothing/suit/space/hardsuit/syndi/linkedsuit = null actions_types = list(/datum/action/item_action/toggle_helmet_mode) @@ -342,7 +348,7 @@ w_class = WEIGHT_CLASS_NORMAL var/on = 1 actions_types = list(/datum/action/item_action/toggle_hardsuit_mode) - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 15, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 90) allowed = list(/obj/item/gun, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/melee/energy/sword, /obj/item/restraints/handcuffs, /obj/item/tank) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi jetpack = /obj/item/tank/jetpack/suit @@ -356,10 +362,10 @@ desc = "An elite version of the syndicate helmet, with improved armour and fire shielding. It is in travel mode. Property of Gorlex Marauders." icon_state = "hardsuit0-syndielite" item_color = "syndielite" - armor = list(melee = 60, bullet = 60, laser = 50, energy = 25, bomb = 55, bio = 100, rad = 70) + armor = list("melee" = 60, "bullet" = 60, "laser" = 50, "energy" = 25, "bomb" = 55, "bio" = 100, "rad" = 70, "fire" = 100, "acid" = 100) heat_protection = HEAD max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = TRUE + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/clothing/suit/space/hardsuit/syndi/elite name = "elite syndicate hardsuit" @@ -367,19 +373,19 @@ icon_state = "hardsuit0-syndielite" item_color = "syndielite" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite - armor = list(melee = 60, bullet = 60, laser = 50, energy = 25, bomb = 55, bio = 100, rad = 70) + armor = list("melee" = 60, "bullet" = 60, "laser" = 50, "energy" = 25, "bomb" = 55, "bio" = 100, "rad" = 70, "fire" = 100, "acid" = 100) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = TRUE + resistance_flags = FIRE_PROOF | ACID_PROOF //Strike team hardsuits /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite/sst - armor = list(melee = 70, bullet = 70, laser = 50, energy = 40, bomb = 80, bio = 100, rad = 100) //Almost as good as DS gear, but unlike DS can switch to combat for mobility + armor = list(melee = 70, bullet = 70, laser = 50, energy = 40, bomb = 80, bio = 100, rad = 100, fire = 100, acid = 100) //Almost as good as DS gear, but unlike DS can switch to combat for mobility icon_state = "hardsuit0-sst" item_color = "sst" /obj/item/clothing/suit/space/hardsuit/syndi/elite/sst - armor = list(melee = 70, bullet = 70, laser = 50, energy = 40, bomb = 80, bio = 100, rad = 100) + armor = list(melee = 70, bullet = 70, laser = 50, energy = 40, bomb = 80, bio = 100, rad = 100, fire = 100, acid = 100) icon_state = "hardsuit0-sst" item_color = "sst" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite/sst @@ -413,7 +419,7 @@ item_state = "medical_helm" item_color = "medical" flash_protect = 0 - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75) flags = STOPSPRESSUREDMAGE | THICKMATERIAL scan_reagents = 1 //Generally worn by the CMO, so they'd get utility off of seeing reagents @@ -423,7 +429,7 @@ desc = "A special helmet designed for work in a hazardous, low pressure environment. Built with lightweight materials for extra comfort." item_state = "medical_hardsuit" allowed = list(/obj/item/flashlight,/obj/item/tank,/obj/item/storage/firstaid,/obj/item/healthanalyzer,/obj/item/stack/medical,/obj/item/rad_laser) - armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50) + armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/medical slowdown = 0.5 @@ -434,14 +440,14 @@ icon_state = "hardsuit0-sec" item_state = "sec_helm" item_color = "sec" - armor = list(melee = 35, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50) + armor = list("melee" = 35, "bullet" = 15, "laser" = 30,"energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75) /obj/item/clothing/suit/space/hardsuit/security icon_state = "hardsuit-sec" name = "security hardsuit" desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor." item_state = "sec_hardsuit" - armor = list(melee = 35, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50) + armor = list("melee" = 35, "bullet" = 15, "laser" = 30, "energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 75, "acid" = 75) allowed = list(/obj/item/gun,/obj/item/flashlight,/obj/item/tank,/obj/item/melee/baton,/obj/item/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/restraints/handcuffs) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security @@ -450,13 +456,13 @@ desc = "A special bulky helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor." icon_state = "hardsuit0-hos" item_color = "hos" - armor = list(melee = 45, bullet = 25, laser = 30,energy = 10, bomb = 25, bio = 100, rad = 50) + armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95) /obj/item/clothing/suit/space/hardsuit/security/hos name = "head of security's hardsuit" desc = "A special bulky suit that protects against hazardous, low pressure environments. Has an additional layer of armor." icon_state = "hardsuit-hos" - armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50) + armor = list("melee" = 45, "bullet" = 25, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 100, "rad" = 50, "fire" = 95, "acid" = 95) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security/hos jetpack = /obj/item/tank/jetpack/suit @@ -468,7 +474,7 @@ icon_state = "hardsuit0-singuloth" item_state = "singuloth_helm" item_color = "singuloth" - armor = list(melee = 40, bullet = 5, laser = 20, energy = 5, bomb = 25, bio = 100, rad = 100) + armor = list(melee = 40, bullet = 5, laser = 20, energy = 5, bomb = 25, bio = 100, rad = 100, fire = 95, acid = 95) sprite_sheets = null /obj/item/clothing/suit/space/hardsuit/singuloth @@ -477,7 +483,7 @@ desc = "This is a ceremonial armor from the chapter of the Singuloth Knights. It's made of pure forged adamantium." item_state = "singuloth_hardsuit" flags = STOPSPRESSUREDMAGE - armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 100) + armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 100, fire = 95, acid = 95) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/singuloth sprite_sheets = null @@ -488,9 +494,10 @@ name = "shielded hardsuit" desc = "A hardsuit with built in energy shielding. Will rapidly recharge when not under fire." icon_state = "hardsuit-hos" - helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security/hos + helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded allowed = list(/obj/item/flashlight,/obj/item/tank, /obj/item/gun,/obj/item/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs) - armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50) + armor = list("melee" = 30, "bullet" = 15, "laser" = 30, "energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF var/current_charges = 3 var/max_charges = 3 //How many charges total the shielding has var/recharge_delay = 200 //How long after we've been shot before we can start recharging. 20 seconds here @@ -535,6 +542,10 @@ /obj/item/clothing/suit/space/hardsuit/shielded/special_overlays() return mutable_appearance('icons/effects/effects.dmi', shield_state, MOB_LAYER + 0.01) +/obj/item/clothing/head/helmet/space/hardsuit/shielded + resistance_flags = FIRE_PROOF | ACID_PROOF + + //////Syndicate Version /obj/item/clothing/suit/space/hardsuit/shielded/syndi @@ -543,7 +554,7 @@ icon_state = "hardsuit1-syndi" item_state = "syndie_hardsuit" item_color = "syndi" - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 15, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100) allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword/saber,/obj/item/restraints/handcuffs,/obj/item/tank) slowdown = 0 helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi @@ -574,4 +585,4 @@ icon_state = "hardsuit1-syndi" item_state = "syndie_helm" item_color = "syndi" - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30, "energy" = 15, "bomb" = 35, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100) diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 7bce8a21293..a786364e4e2 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -6,7 +6,7 @@ desc = "A special helmet designed for only the most fashionable of military figureheads." flags_inv = HIDEFACE permeability_coefficient = 0.01 - armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) + armor = list("melee" = 40, "bullet" = 50, "laser" = 50, "energy" = 25, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100) species_restricted = list("exclude", "Wryn") sprite_sheets = list( @@ -30,7 +30,7 @@ item_state = "capspacesuit" w_class = WEIGHT_CLASS_BULKY allowed = list(/obj/item/tank, /obj/item/flashlight,/obj/item/gun/energy, /obj/item/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton,/obj/item/restraints/handcuffs) - armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) + armor = list("melee" = 40, "bullet" = 50, "laser" = 50, "energy" = 25, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100) species_restricted = list("exclude", "Wryn") sprite_sheets = list( @@ -43,9 +43,9 @@ desc = "That's not red paint. That's real blood." icon_state = "deathsquad" item_state = "deathsquad" - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF vision_flags = SEE_MOBS lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE //don't render darkness while wearing these see_in_dark = 8 @@ -58,9 +58,9 @@ icon_state = "deathsquad" item_state = "swat_suit" allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/tank,/obj/item/kitchen/knife/combat) - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF strip_delay = 130 dog_fashion = /datum/dog_fashion/back/deathsquad @@ -71,8 +71,9 @@ icon_state = "heavy" item_state = "swat_suit" allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/tank,/obj/item/kitchen/knife/combat) - armor = list(melee = 40, bullet = 30, laser = 30, energy = 30, bomb = 50, bio = 90, rad = 20) + armor = list("melee" = 40, "bullet" = 30, "laser" = 30,"energy" = 30, "bomb" = 50, "bio" = 90, "rad" = 20, "fire" = 100, "acid" = 100) strip_delay = 120 + resistance_flags = FIRE_PROOF | ACID_PROOF species_restricted = list("exclude", "Wryn") sprite_sheets = list( @@ -83,7 +84,7 @@ name = "officer's beret" desc = "An armored beret commonly used by special operations officers." icon_state = "beret_officer" - armor = list(melee = 65, bullet = 55, laser = 35, energy = 20, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) flags = STOPSPRESSUREDMAGE | THICKMATERIAL /obj/item/clothing/suit/space/deathsquad/officer @@ -94,6 +95,8 @@ blood_overlay_type = "coat" flags_inv = 0 slowdown = 0 + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF w_class = WEIGHT_CLASS_NORMAL //Space santa outfit suit @@ -136,7 +139,7 @@ desc = "Yarr." icon_state = "pirate" item_state = "pirate" - armor = list(melee = 30, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 30, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 60, "acid" = 75) flags = BLOCKHAIR | STOPSPRESSUREDMAGE flags_cover = HEADCOVERSEYES strip_delay = 40 @@ -150,7 +153,7 @@ w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/tank) slowdown = 0 - armor = list(melee = 30, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 30, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 60, "acid" = 75) strip_delay = 40 put_on_delay = 20 @@ -160,7 +163,7 @@ desc = "A brand new paramedic EVA helmet. It seems to mold to your head shape. Used for retrieving bodies in space." icon_state = "paramedic-eva-helmet" item_state = "paramedic-eva-helmet" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 65) species_restricted = list("exclude", "Wryn") sprite_sheets = list( @@ -181,7 +184,7 @@ icon_state = "paramedic-eva" item_state = "paramedic-eva" desc = "A brand new paramedic EVA suit. The nitrile seems a bit too thin to be space proof. Used for retrieving bodies in space." - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 65) species_restricted = list("exclude", "Wryn") sprite_sheets = list( @@ -201,7 +204,7 @@ icon_state = "spacenew" item_state = "s_suit" desc = "A lightweight space suit with the basic ability to protect the wearer from the vacuum of space during emergencies." - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 65) species_restricted = list("exclude", "Wryn") sprite_sheets = list( @@ -223,7 +226,7 @@ item_state = "s_helmet" desc = "A lightweight space helmet with the basic ability to protect the wearer from the vacuum of space during emergencies." flags_inv = HIDEMASK|HIDEEARS|HIDEEYES - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 65) flash_protect = 0 species_restricted = list("exclude", "Wryn") diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 276bb0bf620..73b95c0d3f7 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -7,8 +7,8 @@ strip_delay = 80 flash_protect = 2 tint = 2 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0) - burn_state = FIRE_PROOF + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 100, "acid" = 75) + resistance_flags = FIRE_PROOF var/brightness_on = 4 //luminosity when the light is on var/on = FALSE var/smile = FALSE @@ -85,7 +85,7 @@ desc = "A plasmaman containment helmet designed for security officers, protecting them from being flashed and burning alive, along-side other undesirables." icon_state = "security_envirohelm" item_state = "security_envirohelm" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 100, "acid" = 75) /obj/item/clothing/head/helmet/space/plasmaman/security/warden name = "warden's plasma envirosuit helmet" @@ -152,7 +152,7 @@ desc = "A space-worthy helmet specially designed for engineer plasmamen, the usual purple stripes being replaced by engineering's orange." icon_state = "engineer_envirohelm" item_state = "engineer_envirohelm" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 10) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 10, "fire" = 100, "acid" = 75) /obj/item/clothing/head/helmet/space/plasmaman/engineering/ce name = "chief engineer's plasma envirosuit helmet" diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index dd1a6a895c3..c8b5e79eb32 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -22,7 +22,6 @@ max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT siemens_coefficient = 0.2 permeability_coefficient = 0.1 - unacidable = 1 var/interface_path = "hardsuit.tmpl" var/ai_interface_path = "hardsuit.tmpl" @@ -156,7 +155,6 @@ if(piece.siemens_coefficient > siemens_coefficient) //So that insulated gloves keep their insulation. piece.siemens_coefficient = siemens_coefficient piece.permeability_coefficient = permeability_coefficient - piece.unacidable = unacidable if(islist(armor)) var/list/L = armor piece.armor = L.Copy() diff --git a/code/modules/clothing/spacesuits/syndi.dm b/code/modules/clothing/spacesuits/syndi.dm index 5723cdff52c..44d9946dfd6 100644 --- a/code/modules/clothing/spacesuits/syndi.dm +++ b/code/modules/clothing/spacesuits/syndi.dm @@ -5,7 +5,7 @@ icon_state = "syndicate" item_state = "syndicate" desc = "Has a tag on it: Totally not property of a hostile corporation, honest!" - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 80, "acid" = 85) /obj/item/clothing/suit/space/syndicate name = "red space suit" @@ -14,7 +14,7 @@ desc = "Has a tag on it: Totally not property of a hostile corporation, honest!" w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword/saber,/obj/item/restraints/handcuffs,/obj/item/tank) - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 80, "acid" = 85) //Green syndicate space suit @@ -74,9 +74,9 @@ obj/item/clothing/head/helmet/space/syndicate/black/strike name = "Syndicate Strike Team commando helmet" desc = "A heavily armored black helmet that is only given to high-ranking Syndicate operatives." - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) //Matches DS gear. + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) //Matches DS gear. max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = 1 + resistance_flags = ACID_PROOF /obj/item/clothing/suit/space/syndicate/black name = "Black Space Suit" @@ -86,9 +86,9 @@ obj/item/clothing/head/helmet/space/syndicate/black/strike obj/item/clothing/suit/space/syndicate/black/strike name = "Syndicate Strike Team commando space suit" desc = "A heavily armored, black space suit that is only given to high-ranking Syndicate operatives." - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) //Matches DS gear. + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) //Matches DS gear. max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = 1 + resistance_flags = ACID_PROOF //Black-green syndicate space suit /obj/item/clothing/head/helmet/space/syndicate/black/green @@ -147,9 +147,9 @@ obj/item/clothing/suit/space/syndicate/black/strike obj/item/clothing/head/helmet/space/syndicate/black/red/strike name = "Syndicate Strike Team leader helmet" desc = "A heavily armored, black and red space helmet that is only given to elite Syndicate operatives, it looks particularly menacing." - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) //Matches DS gear. + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) //Matches DS gear. max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = 1 + resistance_flags = ACID_PROOF /obj/item/clothing/suit/space/syndicate/black/red name = "Black and Red Space Suit" @@ -159,9 +159,9 @@ obj/item/clothing/head/helmet/space/syndicate/black/red/strike obj/item/clothing/suit/space/syndicate/black/red/strike name = "Syndicate Strike Team leader space suit" desc = "A heavily armored, black and red space suit that is only given to elite Syndicate operatives, it looks particularly menacing." - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) //Matches DS gear. + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) //Matches DS gear. max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - unacidable = 1 + resistance_flags = ACID_PROOF //Black with yellow/red engineering syndicate space suit diff --git a/code/modules/clothing/spacesuits/void.dm b/code/modules/clothing/spacesuits/void.dm index 5eeaa797742..cd3bb043cae 100644 --- a/code/modules/clothing/spacesuits/void.dm +++ b/code/modules/clothing/spacesuits/void.dm @@ -64,7 +64,7 @@ icon_state = "void-syndi" desc = "A high tech, NASA Centcom branch designed space suit helmet. This one looks rather suspicious." flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 80, "acid" = 85) /obj/item/clothing/suit/space/nasavoid/syndi name = "Blood Red NASA Void Suit" @@ -72,7 +72,7 @@ desc = "A high tech, NASA Centcom branch designed space suit. This one looks rather suspicious." w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/melee/energy/sword/saber,/obj/item/restraints/handcuffs,/obj/item/tank) - armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 40, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 80, "acid" = 85) //random spawner diff --git a/code/modules/clothing/suits/alien.dm b/code/modules/clothing/suits/alien.dm index 1a2fabea889..0f82a9eae7e 100644 --- a/code/modules/clothing/suits/alien.dm +++ b/code/modules/clothing/suits/alien.dm @@ -1,5 +1,5 @@ //Unathi clothing. -/obj/item/clothing/suit/unathi/ +/obj/item/clothing/suit/unathi sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' ) diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index f654f052ab7..037e967f5ee 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -7,8 +7,9 @@ max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT strip_delay = 60 put_on_delay = 40 - burn_state = FIRE_PROOF - + max_integrity = 250 + resistance_flags = NONE + armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' ) @@ -20,7 +21,6 @@ item_state = "armor" blood_overlay_type = "armor" flags_size = ONESIZEFITSALL - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) dog_fashion = /datum/dog_fashion/back /obj/item/clothing/suit/armor/vest/jacket @@ -100,7 +100,7 @@ icon_state = "secjacket_open" item_state = "hos" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - armor = list(melee = 15, bullet = 10, laser = 15, energy = 5, bomb = 15, bio = 0, rad = 0) + armor = list(melee = 15, bullet = 10, laser = 15, energy = 5, bomb = 15, bio = 0, rad = 0, fire = 30, acid = 30) cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS heat_protection = UPPER_TORSO|LOWER_TORSO|ARMS ignore_suitadjust = 0 @@ -114,7 +114,7 @@ icon_state = "hos" item_state = "hos" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 90) flags_inv = HIDEJUMPSUIT cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS @@ -148,7 +148,7 @@ cold_protection = UPPER_TORSO|LOWER_TORSO|HANDS heat_protection = UPPER_TORSO|LOWER_TORSO|HANDS strip_delay = 70 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE dog_fashion = null /obj/item/clothing/suit/armor/vest/warden/alt @@ -162,8 +162,9 @@ icon_state = "capcarapace" item_state = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO - armor = list(melee = 50, bullet = 40, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 40, "laser" = 50, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 90) dog_fashion = null + resistance_flags = FIRE_PROOF /obj/item/clothing/suit/armor/vest/capcarapace/alt name = "captain's parade jacket" @@ -179,7 +180,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - armor = list(melee = 50, bullet = 10, laser = 10, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 50, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80) flags_inv = HIDEJUMPSUIT strip_delay = 80 put_on_delay = 60 @@ -210,7 +211,7 @@ icon_state = "knight_templar" item_state = "knight_templar" allowed = list(/obj/item/nullrod/claymore) - armor = list(melee = 25, bullet = 5, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 5, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80) /obj/item/clothing/suit/armor/vest/durathread name = "durathread vest" @@ -218,8 +219,9 @@ icon_state = "durathread" item_state = "durathread" strip_delay = 60 - burn_state = FLAMMABLE - armor = list(melee = 20, bullet = 10, laser = 30, energy = 5, bomb = 15, bio = 0, rad = 0) + max_integrity = 200 + resistance_flags = FLAMMABLE + armor = list("melee" = 20, "bullet" = 10, "laser" = 30, "energy" = 5, "bomb" = 15, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 50) /obj/item/clothing/suit/armor/bulletproof name = "Bulletproof Vest" @@ -227,7 +229,7 @@ icon_state = "bulletproof" item_state = "armor" blood_overlay_type = "armor" - armor = list(melee = 15, bullet = 80, laser = 10, energy = 10, bomb = 40, bio = 0, rad = 0) + armor = list("melee" = 15, "bullet" = 60, "laser" = 10, "energy" = 10, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) strip_delay = 70 put_on_delay = 50 @@ -237,7 +239,8 @@ icon_state = "armor_reflec" item_state = "armor_reflec" blood_overlay_type = "armor" - armor = list(melee = 10, bullet = 10, laser = 60, energy = 50, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 10, "laser" = 60, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/hit_reflect_chance = 40 /obj/item/clothing/suit/armor/laserproof/IsReflect(var/def_zone) @@ -254,7 +257,7 @@ blood_overlay_type = "armor" flags_size = ONESIZEFITSALL allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/reagent_containers/spray/pepper,/obj/item/flashlight,/obj/item/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/storage/fancy/cigarettes,/obj/item/lighter,/obj/item/detective_scanner,/obj/item/taperecorder) - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE dog_fashion = null //Reactive armor @@ -265,9 +268,9 @@ icon_state = "reactiveoff" item_state = "reactiveoff" blood_overlay_type = "armor" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) actions_types = list(/datum/action/item_action/toggle) - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF hit_reaction_chance = 50 /obj/item/clothing/suit/armor/reactive/attack_self(mob/user) @@ -393,14 +396,14 @@ cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT sprite_sheets = null - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 90) /obj/item/clothing/suit/armor/heavy name = "heavy armor" desc = "A heavily armored suit that protects against moderate damage." icon_state = "heavy" item_state = "swat_suit" - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 90) w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.90 flags = THICKMATERIAL @@ -410,7 +413,7 @@ hide_tail_by_species = list("Vox") /obj/item/clothing/suit/armor/tdome - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) + armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 90) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT flags = THICKMATERIAL @@ -436,7 +439,7 @@ desc = "A set of armor worn by members of the Nanotrasen Emergency Response Team." icon_state = "ertarmor_cmd" item_state = "armor" - armor = list(melee = 30, bullet = 30, laser = 30, energy = 30, bomb = 20, bio = 0, rad = 0) + armor = list(melee = 30, bullet = 30, laser = 30, energy = 30, bomb = 20, bio = 0, rad = 0, fire = 50, acid = 50) //Commander /obj/item/clothing/suit/armor/vest/ert/command @@ -483,8 +486,7 @@ min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT heat_protection = UPPER_TORSO|LOWER_TORSO max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 40, acid = 40) //LAVALAND! @@ -499,7 +501,7 @@ heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF /obj/item/clothing/head/hooded/drake name = "drake helmet" @@ -509,7 +511,7 @@ armor = list("melee" = 70, "bullet" = 30, "laser" = 50, "energy" = 40, "bomb" = 70, "bio" = 60, "rad" = 50, "fire" = 100, "acid" = 100) heat_protection = HEAD max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF flags = BLOCKHAIR flags_cover = HEADCOVERSEYES @@ -519,7 +521,7 @@ item_state = "goliath_cloak" desc = "A staunch, practical cape made out of numerous monster materials, it is coveted amongst exiles & hermits." allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/pickaxe, /obj/item/twohanded/spear, /obj/item/organ/internal/regenerative_core/legion, /obj/item/kitchen/knife/combat/survival) - armor = list(melee = 35, bullet = 10, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) //a fair alternative to bone armor, requiring alternative materials and gaining a suit slot + armor = list("melee" = 35, "bullet" = 10, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) //a fair alternative to bone armor, requiring alternative materials and gaining a suit slot hoodtype = /obj/item/clothing/head/hooded/goliath body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS @@ -528,7 +530,7 @@ icon_state = "golhood" item_state = "golhood" desc = "A protective & concealing hood." - armor = list(melee = 35, bullet = 10, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 35, "bullet" = 10, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) flags = BLOCKHAIR flags_cover = HEADCOVERSEYES @@ -538,5 +540,5 @@ icon_state = "bonearmor" item_state = "bonearmor" blood_overlay_type = "armor" - armor = list(melee = 35, bullet = 25, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 35, "bullet" = 25, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS \ No newline at end of file diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 349a28b5fe3..6a2d582d355 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -6,9 +6,9 @@ permeability_coefficient = 0.01 flags = BLOCKHAIR | THICKMATERIAL flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 80, "fire" = 30, "acid" = 100) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES - burn_state = FIRE_PROOF + resistance_flags = ACID_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi', @@ -31,11 +31,11 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS slowdown = 1 allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/pen,/obj/item/flashlight/pen) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 80, "fire" = 30, "acid" = 100) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL strip_delay = 70 put_on_delay = 70 - burn_state = FIRE_PROOF + resistance_flags = ACID_PROOF sprite_sheets = list( "Tajaran" = 'icons/mob/species/tajaran/suit.dmi', "Unathi" = 'icons/mob/species/unathi/suit.dmi', @@ -62,11 +62,11 @@ //Security biosuit, grey with red stripe across the chest /obj/item/clothing/head/bio_hood/security - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 100, rad = 20) + armor = list("melee" = 25, "bullet" = 15, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 100, "rad" = 80, "fire" = 30, "acid" = 100) icon_state = "bio_security" /obj/item/clothing/suit/bio_suit/security - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 100, rad = 20) + armor = list("melee" = 25, "bullet" = 15, "laser" = 25, "energy" = 10, "bomb" = 25, "bio" = 100, "rad" = 80, "fire" = 30, "acid" = 100) icon_state = "bio_security" diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 87b30fe01dc..dde11f1fcee 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -9,7 +9,7 @@ item_state = "paramedic-vest" allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \ /obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10, fire = 50, acid = 50) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -24,7 +24,7 @@ allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/syringe, \ /obj/item/healthanalyzer, /obj/item/flashlight, \ /obj/item/radio, /obj/item/tank/emergency_oxygen,/obj/item/rad_laser) - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0, fire = 50, acid = 50) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -76,7 +76,7 @@ desc = "An armor-plated piece of fashion for the ruling elite. Protect your upper half in style." icon_state = "capmantle" item_state = "capmantle" - armor = list(melee = 50, bullet = 40, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list(melee = 50, bullet = 40, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50) //Chaplain /obj/item/clothing/suit/hooded/chaplain_hoodie @@ -181,7 +181,7 @@ blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/tank/emergency_oxygen, /obj/item/reagent_containers/spray/pepper, /obj/item/flashlight, /obj/item/gun, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/storage/fancy/cigarettes, /obj/item/lighter, /obj/item/detective_scanner, /obj/item/taperecorder) - armor = list(melee = 25, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 10, "laser" = 25, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 45) cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS flags_size = ONESIZEFITSALL @@ -218,7 +218,7 @@ blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/gun/energy,/obj/item/reagent_containers/spray/pepper,/obj/item/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/flashlight/seclite,/obj/item/melee/classic_baton/telescopic) - armor = list(melee = 25, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 45) cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS flags_size = ONESIZEFITSALL @@ -235,7 +235,7 @@ item_state = "hazard" blood_overlay_type = "armor" allowed = list (/obj/item/flashlight, /obj/item/t_scanner, /obj/item/tank/emergency_oxygen) - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -286,13 +286,13 @@ icon_state = "hosmantle" item_state = "hosmantle" allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic, /obj/item/kitchen/knife/combat) - armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50) min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT heat_protection = UPPER_TORSO|ARMS max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT strip_delay = 60 put_on_delay = 40 - burn_state = FIRE_PROOF + resistance_flags = NONE //Head of Personnel /obj/item/clothing/suit/mantle/armor/head_of_personnel @@ -300,7 +300,7 @@ desc = "An armored shawl for the head of personnel. It's remarkably well kept." icon_state = "hopmantle" item_state = "hopmantle" - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50) //Internal Affairs /obj/item/clothing/suit/storage/internalaffairs @@ -382,4 +382,4 @@ icon_state = "rdmantle" item_state = "rdmantle" allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/food/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/rad_laser) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50) diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 9b7f78f709d..36157df8bc8 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -8,7 +8,7 @@ blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS allowed = list(/obj/item/analyzer,/obj/item/stack/medical,/obj/item/dnainjector,/obj/item/reagent_containers/dropper,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/hypospray,/obj/item/healthanalyzer,/obj/item/flashlight/pen,/obj/item/reagent_containers/glass/bottle,/obj/item/reagent_containers/glass/beaker,/obj/item/reagent_containers/food/pill,/obj/item/storage/pill_bottle,/obj/item/paper,/obj/item/rad_laser) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 50, "acid" = 50) species_exception = list(/datum/species/golem) sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi', diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 8907e874270..1a2cdbd31a2 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -17,7 +17,7 @@ blood_overlay_type = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO allowed = list (/obj/item/gun/energy/laser/tag/blue) - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -31,7 +31,7 @@ blood_overlay_type = "armor" body_parts_covered = UPPER_TORSO|LOWER_TORSO allowed = list (/obj/item/gun/energy/laser/tag/red) - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -138,7 +138,7 @@ w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/toy) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/suit/hastur @@ -351,7 +351,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) allowed = list(/obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi') @@ -372,7 +372,7 @@ name = "captain's winter coat" icon_state = "wintercoat_captain" item_state = "coatcaptain" - armor = list(melee = 25, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 30, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box,/obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic) hoodtype = /obj/item/clothing/head/hooded/winterhood/captain @@ -383,7 +383,7 @@ name = "security winter coat" icon_state = "wintercoat_sec" item_state = "coatsecurity" - armor = list(melee = 10, bullet = 10, laser = 10, energy = 5, bomb = 15, bio = 0, rad = 0) + armor = list("melee" = 25, "bullet" = 15, "laser" = 30, "energy" = 10, "bomb" = 25, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 45) allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic) hoodtype = /obj/item/clothing/head/hooded/winterhood/security @@ -395,7 +395,7 @@ icon_state = "wintercoat_med" item_state = "coatmedical" allowed = list(/obj/item/analyzer, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 50, "rad" = 0, "fire" = 0, "acid" = 45) hoodtype = /obj/item/clothing/head/hooded/winterhood/medical /obj/item/clothing/head/hooded/winterhood/medical @@ -406,7 +406,7 @@ icon_state = "wintercoat_sci" item_state = "coatscience" allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/healthanalyzer,/obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0) hoodtype = /obj/item/clothing/head/hooded/winterhood/science /obj/item/clothing/head/hooded/winterhood/science @@ -416,7 +416,7 @@ name = "engineering winter coat" icon_state = "wintercoat_engi" item_state = "coatengineer" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 20, "fire" = 30, "acid" = 45) allowed = list(/obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/t_scanner, /obj/item/rcd) hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering @@ -456,7 +456,7 @@ icon_state = "wintercoat_miner" item_state = "coatminer" allowed = list(/obj/item/pickaxe, /obj/item/flashlight, /obj/item/tank/emergency_oxygen, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter) - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) hoodtype = /obj/item/clothing/head/hooded/winterhood/miner /obj/item/clothing/head/hooded/winterhood/miner @@ -581,7 +581,7 @@ desc = "A long, thick black leather coat." icon_state = "leathercoat" item_state = "leathercoat" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/clothing/suit/browncoat name = "brown leather coat" @@ -736,7 +736,7 @@ flags_size = ONESIZEFITSALL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/tank/emergency_oxygen,/obj/item/pen,/obj/item/flashlight/pen) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 50) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL /obj/item/clothing/head/mercy_hood @@ -747,7 +747,7 @@ permeability_coefficient = 0.01 flags = BLOCKHAIR flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 50) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES /obj/item/clothing/suit/jacket @@ -781,7 +781,7 @@ strip_delay = 60 put_on_delay = 40 flags_size = ONESIZEFITSALL - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0) + armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50) //End of inheritance from Security armour. /obj/item/clothing/suit/jacket/leather @@ -791,7 +791,7 @@ ignore_suitadjust = 1 actions_types = list() adjust_flavour = null - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/suit/jacket/leather/overcoat name = "leather overcoat" @@ -832,7 +832,7 @@ icon_state = "owl_wings" item_state = "owl_wings" body_parts_covered = ARMS - armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 25, acid = 25) allowed = list(/obj/item/gun/energy,/obj/item/reagent_containers/spray/pepper,/obj/item/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/flashlight/seclite) actions_types = list(/datum/action/item_action/toggle_wings) @@ -882,7 +882,7 @@ permeability_coefficient = 0.01 flags = STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT heat_protection = UPPER_TORSO | LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD @@ -928,7 +928,7 @@ //Syndicate Chaplain Robe (WOLOLO!) /obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe description_antag = "This robe is made of reinforced fibers, granting it superior protection. The robes also wirelessly generate power for the neurotransmitter in the linked missionary staff while being worn." - armor = list(melee = 10, bullet = 10, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 15) + armor = list(melee = 10, bullet = 10, laser = 5, energy = 5, bomb = 0, bio = 0, rad = 15, fire = 30, acid = 30) var/obj/item/nullrod/missionary_staff/linked_staff = null /obj/item/clothing/suit/hooded/chaplain_hoodie/missionary_robe/Destroy() diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index f3b06e30c83..87df2c38b33 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -20,6 +20,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/flashlight,/obj/item/tank/emergency_oxygen,/obj/item/extinguisher) slowdown = 1 + armor = list("melee" = 15, "bullet" = 5, "laser" = 20, "energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL flags = STOPSPRESSUREDMAGE | THICKMATERIAL heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -28,7 +29,7 @@ min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT strip_delay = 60 put_on_delay = 60 - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/clothing/suit/fire/firefighter icon_state = "firesuit" @@ -65,7 +66,7 @@ desc = "Use in case of bomb." icon_state = "bombsuit" flags = BLOCKHAIR | THICKMATERIAL - armor = list(melee = 20, bullet = 0, laser = 20, energy = 10, bomb = 100, bio = 0, rad = 0) + armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH cold_protection = HEAD @@ -74,7 +75,7 @@ max_heat_protection_temperature = HELMET_MAX_TEMP_PROTECT strip_delay = 70 put_on_delay = 70 - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/helmet.dmi', @@ -92,7 +93,7 @@ flags = THICKMATERIAL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS slowdown = 2 - armor = list(melee = 20, bullet = 0, laser = 20, energy = 10, bomb = 100, bio = 0, rad = 0) + armor = list("melee" = 20, "bullet" = 0, "laser" = 20,"energy" = 10, "bomb" = 100, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) flags_inv = HIDEJUMPSUIT|HIDETAIL heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT @@ -100,7 +101,7 @@ min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT strip_delay = 70 put_on_delay = 70 - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' @@ -125,10 +126,10 @@ desc = "A hood with radiation protective properties. Label: Made with lead, do not eat insulation" flags = BLOCKHAIR|THICKMATERIAL flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 60, rad = 100) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30) strip_delay = 60 put_on_delay = 60 - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/head.dmi', @@ -147,11 +148,11 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/flashlight,/obj/item/tank/emergency_oxygen) slowdown = 1.5 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 60, rad = 100) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 60, "rad" = 100, "fire" = 30, "acid" = 30) flags_inv = HIDEJUMPSUIT|HIDETAIL strip_delay = 60 put_on_delay = 60 - burn_state = FIRE_PROOF + resistance_flags = NONE sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index 69ccaf53b7b..f623ba4c087 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -4,9 +4,8 @@ icon_state = "wizard" gas_transfer_coefficient = 0.01 // IT'S MAGICAL OKAY JEEZ +1 TO NOT DIE permeability_coefficient = 0.01 - armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 20, bio = 20, rad = 20) - unacidable = 1 - burn_state = FIRE_PROOF + armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF //Not given any special protective value since the magic robes are full-body protection --NEO strip_delay = 50 put_on_delay = 50 @@ -39,8 +38,9 @@ icon_state = "wizard-fake" gas_transfer_coefficient = 1 permeability_coefficient = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) magical = FALSE + resistance_flags = FLAMMABLE dog_fashion = /datum/dog_fashion/head/blue_wizard /obj/item/clothing/head/wizard/marisa @@ -70,13 +70,12 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS - armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 20, bio = 20, rad = 20) + armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 100, "acid" = 100) allowed = list(/obj/item/teleportation_scroll) flags_inv = HIDEJUMPSUIT - unacidable = 1 strip_delay = 50 put_on_delay = 50 - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF magical = TRUE /obj/item/clothing/suit/wizrobe/red @@ -128,9 +127,8 @@ item_state = "wizrobe" gas_transfer_coefficient = 1 permeability_coefficient = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - unacidable = 0 - burn_state = FLAMMABLE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + resistance_flags = FLAMMABLE magical = FALSE /obj/item/clothing/head/wizard/marisa/fake @@ -139,9 +137,8 @@ icon_state = "marisa" gas_transfer_coefficient = 1 permeability_coefficient = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - unacidable = 0 - burn_state = FLAMMABLE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + resistance_flags = FLAMMABLE magical = FALSE /obj/item/clothing/suit/wizrobe/marisa/fake @@ -151,9 +148,8 @@ item_state = "marisarobe" gas_transfer_coefficient = 1 permeability_coefficient = 1 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - unacidable = 0 - burn_state = FLAMMABLE + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + resistance_flags = FLAMMABLE magical = FALSE //Shielded Armour @@ -173,8 +169,7 @@ helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 20, bio = 20, rad = 20, fire = 100, acid = 100) slowdown = 0 - unacidable = TRUE - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF magical = TRUE /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard @@ -187,8 +182,7 @@ max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 20, bio = 20, rad = 20, fire = 100, acid = 100) actions_types = null //No inbuilt light - unacidable = TRUE - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF magical = TRUE /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard/attack_self(mob/user) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 216ac78f450..11b7919f0ae 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -180,7 +180,7 @@ icon_state = "bronze" item_color = "bronze" materials = list(MAT_METAL=1000) - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF // GOLD (awarded by centcom) /obj/item/clothing/accessory/medal/gold @@ -193,6 +193,7 @@ /obj/item/clothing/accessory/medal/gold/captain name = "medal of captaincy" desc = "A golden medal awarded exclusively to those promoted to the rank of captain. It signifies the codified responsibilities of a captain to Nanotrasen, and their undisputable authority over their crew." + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/clothing/accessory/medal/gold/heroism name = "medal of exceptional heroism" @@ -420,7 +421,7 @@ icon_state = "skull" item_state = "skull" item_color = "skull" - armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 20, "bio" = 20, "rad" = 5) + armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 20, "bio" = 20, "rad" = 5, "fire" = 0, "acid" = 25) allow_duplicates = FALSE /obj/item/clothing/accessory/necklace/talisman @@ -429,7 +430,7 @@ icon_state = "talisman" item_state = "talisman" item_color = "talisman" - armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 20, "bio" = 20, "rad" = 5) + armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 5, "bomb" = 20, "bio" = 20, "rad" = 5, "fire" = 0, "acid" = 25) allow_duplicates = FALSE /obj/item/clothing/accessory/necklace/locket diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 17db1997174..3fe4138785a 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -17,7 +17,7 @@ item_state = "bl_suit" item_color = "black" flags_size = ONESIZEFITSALL - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/color/blackf name = "feminine black jumpsuit" diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index df04075306d..879e0fd22c7 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -145,7 +145,7 @@ name = "janitor's jumpsuit" icon_state = "janitor" item_color = "janitor" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index 943e4d6d0b5..14878e402a1 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -5,9 +5,9 @@ icon_state = "chiefengineer" item_state = "chief" item_color = "chief" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 10, "fire" = 80, "acid" = 40) flags_size = ONESIZEFITSALL - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/rank/chief_engineer/skirt desc = "It's a high visibility jumpskirt given to those engineers insane enough to achieve the rank of \"Chief engineer\". It has minor radiation shielding." @@ -24,7 +24,7 @@ item_state = "atmos_suit" item_color = "atmos" flags_size = ONESIZEFITSALL - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/rank/atmospheric_technician/skirt desc = "It's a jumpskirt worn by atmospheric technicians." @@ -40,9 +40,9 @@ icon_state = "engine" item_state = "engi_suit" item_color = "engine" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 10, "fire" = 60, "acid" = 20) flags_size = ONESIZEFITSALL - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/rank/engineer/skirt @@ -60,6 +60,7 @@ item_state = "robotics" item_color = "robotics" flags_size = ONESIZEFITSALL + resistance_flags = NONE /obj/item/clothing/under/rank/roboticist/skirt desc = "It's a slimming black jumpskirt with reinforced seams; great for industrial work." diff --git a/code/modules/clothing/under/jobs/medsci.dm b/code/modules/clothing/under/jobs/medsci.dm index a4f4f3c8b9f..f5d65b964fc 100644 --- a/code/modules/clothing/under/jobs/medsci.dm +++ b/code/modules/clothing/under/jobs/medsci.dm @@ -7,7 +7,7 @@ icon_state = "director" item_state = "g_suit" item_color = "director" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 10, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 35) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/scientist @@ -17,7 +17,7 @@ item_state = "w_suit" item_color = "toxinswhite" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/scientist/skirt @@ -34,7 +34,7 @@ item_state = "w_suit" item_color = "chemistrywhite" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 50, "acid" = 65) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/chemist/skirt @@ -54,7 +54,7 @@ item_state = "w_suit" item_color = "cmo" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/chief_medical_officer/skirt @@ -72,7 +72,7 @@ item_state = "w_suit" item_color = "geneticswhite" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/geneticist/skirt @@ -89,7 +89,7 @@ item_state = "w_suit" item_color = "virologywhite" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/virologist/skirt @@ -106,7 +106,7 @@ item_state = "nursesuit" item_color = "nursesuit" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/nurse @@ -116,7 +116,7 @@ item_state = "nurse" item_color = "nurse" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/orderly @@ -126,7 +126,7 @@ item_state = "orderly" item_color = "orderly" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/medical @@ -136,7 +136,7 @@ item_state = "w_suit" item_color = "medical" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/medical/skirt @@ -182,7 +182,7 @@ item_state = "paramedic" item_color = "paramedic" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 10, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/psych @@ -212,7 +212,7 @@ item_state = "w_suit" item_color = "genetics_new" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/chemist_new @@ -222,7 +222,7 @@ item_state = "w_suit" item_color = "chemist_new" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 50, "acid" = 65) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/scientist_new @@ -232,7 +232,7 @@ item_state = "w_suit" item_color = "scientist_new" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/virologist_new @@ -242,5 +242,5 @@ item_state = "w_suit" item_color = "virologist_new" permeability_coefficient = 0.50 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 10, "rad" = 0, "fire" = 0, "acid" = 0) flags_size = ONESIZEFITSALL diff --git a/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm b/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm index 617e0284848..937d5111830 100644 --- a/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm +++ b/code/modules/clothing/under/jobs/plasmamen/_plasmamen.dm @@ -1,7 +1,7 @@ /obj/item/clothing/under/plasmaman name = "plasma envirosuit" desc = "A special containment suit that allows plasma-based lifeforms to exist safely in an oxygenated environment, and automatically extinguishes them in a crisis. Despite being airtight, it's not spaceworthy." - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS strip_delay = 80 var/next_extinguish = 0 diff --git a/code/modules/clothing/under/jobs/plasmamen/engineering.dm b/code/modules/clothing/under/jobs/plasmamen/engineering.dm index e83eef2917c..35f99558c1c 100644 --- a/code/modules/clothing/under/jobs/plasmamen/engineering.dm +++ b/code/modules/clothing/under/jobs/plasmamen/engineering.dm @@ -4,7 +4,7 @@ icon_state = "engineer_envirosuit" item_state = "engineer_envirosuit" item_color = "engineer_envirosuit" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 10) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 10, "fire" = 95, "acid" = 95) /obj/item/clothing/under/plasmaman/engineering/ce name = "chief engineer plasma envirosuit" diff --git a/code/modules/clothing/under/jobs/plasmamen/security.dm b/code/modules/clothing/under/jobs/plasmamen/security.dm index d6f85da06f7..f39feb6345e 100644 --- a/code/modules/clothing/under/jobs/plasmamen/security.dm +++ b/code/modules/clothing/under/jobs/plasmamen/security.dm @@ -4,7 +4,7 @@ icon_state = "security_envirosuit" item_state = "security_envirosuit" item_color = "security_envirosuit" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) /obj/item/clothing/under/plasmaman/security/warden name = "warden plasma envirosuit" diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index cfd828aeab1..fa48aff0f4f 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -15,7 +15,7 @@ icon_state = "warden" item_state = "r_suit" item_color = "warden" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) flags_size = ONESIZEFITSALL strip_delay = 50 @@ -33,7 +33,7 @@ icon_state = "security" item_state = "r_suit" item_color = "secred" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) flags_size = ONESIZEFITSALL strip_delay = 50 @@ -51,7 +51,7 @@ icon_state = "dispatch" item_state = "dispatch" item_color = "dispatch" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/security2 @@ -60,7 +60,7 @@ icon_state = "redshirt2" item_state = "r_suit" item_color = "redshirt2" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/security/corp @@ -82,7 +82,7 @@ icon_state = "detective" item_state = "det" item_color = "detective" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) flags_size = ONESIZEFITSALL strip_delay = 50 @@ -99,7 +99,7 @@ icon_state = "hos" item_state = "r_suit" item_color = "hosred" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) flags_size = ONESIZEFITSALL strip_delay = 60 @@ -179,7 +179,7 @@ item_state = "brig_phys" item_color = "brig_phys" permeability_coefficient = 0.50 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) + armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0, fire = 30, acid = 30) flags_size = ONESIZEFITSALL /obj/item/clothing/under/rank/security/brigphys/skirt @@ -189,7 +189,6 @@ item_state = "brig_physf" item_color = "brig_physf" permeability_coefficient = 0.50 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) flags_size = ONESIZEFITSALL //Pod Pilot diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 4cecd9adfc8..9e009014deb 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -66,7 +66,7 @@ icon_state = "solgov" item_state = "ro_suit" item_color = "solgov" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) displays_id = 0 /obj/item/clothing/under/solgov/command @@ -165,7 +165,7 @@ icon_state = "ert_uniform" item_state = "bl_suit" item_color = "ert_uniform" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 30) /obj/item/clothing/under/rank/blueshield/skirt name = "blueshield skirt" @@ -173,7 +173,6 @@ icon_state = "blueshieldf" item_state = "blueshieldf" item_color = "blueshieldf" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) /obj/item/clothing/under/space name = "\improper NASA jumpsuit" @@ -189,7 +188,7 @@ min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT heat_protection = UPPER_TORSO | LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/acj name = "administrative cybernetic jumpsuit" @@ -200,14 +199,14 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100) + armor = list("melee" = 100, "bullet" = 100, "laser" = 100,"energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT heat_protection = UPPER_TORSO | LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT slowdown = -10 siemens_coefficient = 0 - burn_state = LAVA_PROOF + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF | FREEZE_PROOF /obj/item/clothing/under/johnny name = "johnny~~ jumpsuit" @@ -379,7 +378,7 @@ item_state = "gladiator" item_color = "gladiator" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/gladiator/ash_walker desc = "This gladiator uniform appears to be covered in ash and fairly dated." @@ -524,7 +523,7 @@ item_color = "roman" item_state = "armor" strip_delay = 100 - burn_state = FIRE_PROOF + resistance_flags = NONE /obj/item/clothing/under/maid name = "maid costume" @@ -620,58 +619,6 @@ item_state = "vgrey" item_color = "vgrey" -/obj/item/clothing/under/vox/grey - name = "Grey Vox Jumpsuit" - desc = "An assistant's jumpsuit ripped to better fit a vox." - icon_state = "vgrey" - item_state = "vgrey" - item_color = "vgrey" - -/obj/item/clothing/under/vox/robotics - name = "Vox Robotics Jumpsuit" - desc = "A roboticist's jumpsuit ripped to better fit a vox." - icon_state = "vrobotics" - item_state = "vrobotics" - item_color = "vrobotics" - -/obj/item/clothing/under/vox/toxins - name = "Vox Toxins Jumpsuit" - desc = "A Toxin Researcher's jumpsuit ripped to better fit a vox." - icon_state = "vtoxinswhite" - item_state = "vtoxinswhite" - item_color = "vtoxinswhite" - -/obj/item/clothing/under/vox/atmos - name = "Vox Atmos Jumpsuit" - desc = "An Atmos Tech's jumpsuit ripped to better fit a vox." - icon_state = "vatmos" - item_state = "vatmos" - item_color = "vatmos" - -/obj/item/clothing/under/vox/engi - name = "Vox Engineer Jumpsuit" - desc = "An Engineer's jumpsuit ripped to better fit a vox." - icon_state = "vengine" - item_state = "vengine" - item_color = "vengine" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10) - -/obj/item/clothing/under/vox/sec - name = "Vox Security Jumpsuit" - desc = "A Security officer's jumpsuit ripped to better fit a vox." - icon_state = "vred" - item_state = "vred" - item_color = "vred" - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) - -/obj/item/clothing/under/vox/chem - name = "Vox Chemist Jumpsuit" - desc = "A Chemist's jumpsuit ripped to better fit a vox." - icon_state = "vchem" - item_state = "vchem" - item_color = "vchem" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) - /obj/item/clothing/under/psyjump name = "Psychic Amp Jumpsuit" desc = "A suit made of strange materials." @@ -774,7 +721,7 @@ icon_state = "atmos" item_state = "atmos_suit" item_color = "atmos" - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF /obj/item/clothing/under/contortionist/equipped(mob/living/carbon/human/user, slot) if(!user.ventcrawler) @@ -806,6 +753,7 @@ lefthand_file = 'icons/goonstation/mob/inhands/clothing_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/clothing_righthand.dmi' flags = NODROP + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags_size = ONESIZEFITSALL has_sensor = 0 // HUNKE @@ -896,7 +844,7 @@ icon_state = "durathread" item_state = "durathread" item_color = "durathread" - armor = list(melee = 10, bullet = 0, laser = 10, energy = 0, bomb = 5, bio = 0, rad = 0) + armor = list(melee = 10, bullet = 0, laser = 10, energy = 0, bomb = 5, bio = 0, rad = 0, fire = 0, acid = 0) /obj/item/clothing/under/cuban_suit name = "rhumba outfit" diff --git a/code/modules/clothing/under/syndicate.dm b/code/modules/clothing/under/syndicate.dm index a6da9d4391e..6778138d30f 100644 --- a/code/modules/clothing/under/syndicate.dm +++ b/code/modules/clothing/under/syndicate.dm @@ -5,7 +5,7 @@ item_state = "bl_suit" item_color = "syndicate" has_sensor = 0 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 40) /obj/item/clothing/under/syndicate/combat name = "combat turtleneck" @@ -16,7 +16,7 @@ icon_state = "tactifool" item_state = "bl_suit" item_color = "tactifool" - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 40) /obj/item/clothing/under/syndicate/sniper name = "Tactical turtleneck suit" diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm index d8094f5bdf3..714590c5b23 100644 --- a/code/modules/countdown/countdown.dm +++ b/code/modules/countdown/countdown.dm @@ -63,6 +63,12 @@ /obj/effect/countdown/ex_act(severity) //immune to explosions return +/obj/effect/countdown/singularity_pull() + return + +/obj/effect/countdown/singularity_act() + return + /obj/effect/countdown/syndicatebomb name = "syndicate bomb countdown" diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 3863183b2af..d0ad4b8dc41 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -184,8 +184,8 @@ result = /obj/item/ammo_casing/shotgun/frag12 reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1, /datum/reagent/glycerol = 5, - /datum/reagent/sacid = 5, - /datum/reagent/facid = 5,) + /datum/reagent/acid = 5, + /datum/reagent/acid/facid = 5,) tools = list(/obj/item/screwdriver) time = 5 category = CAT_WEAPONRY diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index cc7a27e4fc1..3a0bdb8d795 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -435,7 +435,7 @@ sallet.max_heat_protection_temperature = helm.max_heat_protection_temperature sallet.strip_delay = helm.strip_delay sallet.put_on_delay = helm.put_on_delay - sallet.burn_state = helm.burn_state + sallet.resistance_flags = helm.resistance_flags sallet.flags_cover = helm.flags_cover sallet.visor_flags = helm.visor_flags sallet.visor_flags_inv = helm.visor_flags_inv diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index e0dd80a1e6e..eafd038977d 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -105,7 +105,7 @@ log transactions SSnanoui.update_uis(src) C.use(C.amount) else - ..() + return ..() /obj/machinery/atm/attack_hand(mob/user) if(..()) diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index f3df3027780..98d99e667aa 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -71,7 +71,7 @@ else to_chat(user, "[bicon(src)]Unable to connect to accounts database.") else - ..() + return ..() /obj/item/eftpos/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) diff --git a/code/modules/economy/POS.dm b/code/modules/economy/POS.dm index 1164ead6c19..047c1636ece 100644 --- a/code/modules/economy/POS.dm +++ b/code/modules/economy/POS.dm @@ -533,4 +533,5 @@ var/const/POS_HEADER = {" if(credits_held) new /obj/item/stack/spacecash(loc, credits_held) credits_held=0 - ..() + return + return ..() \ No newline at end of file diff --git a/code/modules/events/dust.dm b/code/modules/events/dust.dm index 5ed631736dd..47753581b87 100644 --- a/code/modules/events/dust.dm +++ b/code/modules/events/dust.dm @@ -94,5 +94,4 @@ return /obj/effect/space_dust/ex_act(severity) - qdel(src) - return + qdel(src) \ No newline at end of file diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 1a6ac2d7706..5e50f045e5b 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -55,9 +55,15 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 GLOB.poi_list.Remove(src) return ..() -/obj/effect/immovablerod/ex_act(test) +/obj/effect/immovablerod/ex_act(severity) return 0 +/obj/effect/immovablerod/singularity_act() + return + +/obj/effect/immovablerod/singularity_pull() + return + /obj/effect/immovablerod/Bump(atom/clong) if(prob(10)) playsound(src, 'sound/effects/bang.ogg', 50, 1) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index ef02ce39b1a..c02514d2a2a 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -505,11 +505,11 @@ switch(damage_type) if(BRUTE) if(damage_amount) - playsound(src, 'sound/weapons/slash.ogg', 50, 1) + playsound(src, 'sound/weapons/slash.ogg', 50, TRUE) else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) + playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) - playsound(src, 'sound/items/welder.ogg', 100, 1) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) /obj/structure/spacevine/obj_destruction() wither() diff --git a/code/modules/events/tear.dm b/code/modules/events/tear.dm index 4ad6dcf485b..1cbabb5e45b 100644 --- a/code/modules/events/tear.dm +++ b/code/modules/events/tear.dm @@ -24,7 +24,6 @@ desc="A tear in the dimensional fabric of space and time." icon='icons/effects/tear.dmi' icon_state="tear" - unacidable = 1 density = 0 anchored = 1 light_range = 3 diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index f827b061b93..95cf9f15799 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -533,11 +533,6 @@ "You tap on the [name].", \ "You hear a knocking sound.") -/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) - . = ..() - if(.) //received damage - check_health() - /obj/machinery/fishtank/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 87b9d6733ac..ea12f0a82d3 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -56,6 +56,12 @@ Gunshots/explosions/opening doors/less rare audio (done) invisibility = INVISIBILITY_OBSERVER var/mob/living/carbon/target = null +/obj/effect/hallucination/singularity_pull() + return + +/obj/effect/hallucination/singularity_act() + return + /obj/effect/hallucination/proc/wake_and_restore() target.hal_screwyhud = SCREWYHUD_NONE target.SetSleeping(0) diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 57a4e4e9bcc..5b759b93d68 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -10,7 +10,7 @@ consume_sound = 'sound/items/drink.ogg' possible_transfer_amounts = list(5,10,15,20,25,30,50) volume = 50 - burn_state = FIRE_PROOF + resistance_flags = NONE antable = FALSE /obj/item/reagent_containers/food/drinks/New() @@ -139,6 +139,7 @@ volume = 5 flags = CONDUCT container_type = OPENCONTAINER + resistance_flags = FIRE_PROOF /obj/item/reagent_containers/food/drinks/trophy/gold_cup name = "gold cup" @@ -185,6 +186,7 @@ desc = "Careful, the beverage you're about to enjoy is extremely hot." icon_state = "coffee" list_reagents = list("coffee" = 30) + resistance_flags = FREEZE_PROOF /obj/item/reagent_containers/food/drinks/ice name = "ice cup" @@ -217,6 +219,7 @@ icon_state = "hot_coco" item_state = "coffee" list_reagents = list("hot_coco" = 30, "sugar" = 5) + resistance_flags = FREEZE_PROOF /obj/item/reagent_containers/food/drinks/chocolate name = "hot chocolate" @@ -224,6 +227,7 @@ icon_state = "hot_coco" item_state = "coffee" list_reagents = list("chocolate" = 30) + resistance_flags = FREEZE_PROOF /obj/item/reagent_containers/food/drinks/weightloss name = "weight-loss shake" diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index bdc473d774e..adee1f7d3c2 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -10,8 +10,8 @@ lefthand_file = 'icons/goonstation/mob/inhands/items_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/items_righthand.dmi' materials = list(MAT_GLASS=500) - burn_state = FLAMMABLE - burntime = 5 + max_integrity = 20 + resistance_flags = ACID_PROOF /obj/item/reagent_containers/food/drinks/drinkingglass/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/food/snacks/egg)) //breaking eggs diff --git a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm index cd158c70e74..afd6d950c91 100644 --- a/code/modules/food_and_drinks/drinks/drinks/shotglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/shotglass.dm @@ -9,7 +9,7 @@ light_color = LIGHT_COLOR_LIGHTBLUE /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() - if(!isShotFlammable() && burn_state == ON_FIRE) + if(!isShotFlammable() && (resistance_flags & ON_FIRE)) extinguish() update_icon() @@ -29,14 +29,14 @@ filling.icon += mix_color_from_reagents(reagents.reagent_list) overlays += filling name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future. - if(burn_state == ON_FIRE) + if(resistance_flags & ON_FIRE) overlays += "shotglass_fire" name = "flaming [name]" else name = "shot glass" /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/proc/clumsilyDrink(mob/living/carbon/human/user) //Clowns beware - if(burn_state != ON_FIRE) + if(!(resistance_flags & ON_FIRE)) return user.visible_message("[user] pours [src] all over [user.p_them()]self!", "You pour [src] all over yourself!", "You hear a 'whoompf' and a sizzle.") extinguish(TRUE) @@ -52,7 +52,7 @@ return TRUE /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = FALSE) - if(!isShotFlammable() || burn_state == ON_FIRE) //You can't light a shot that's not flammable! + if(!isShotFlammable() || (resistance_flags & ON_FIRE)) //You can't light a shot that's not flammable! return ..() set_light(light_intensity, null, light_color) @@ -70,7 +70,7 @@ return /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/attack(mob/living/carbon/human/user) - if((CLUMSY in user.mutations) && prob(50) && burn_state == ON_FIRE) + if((CLUMSY in user.mutations) && prob(50) && (resistance_flags & ON_FIRE)) clumsilyDrink(user) else ..() @@ -85,7 +85,7 @@ /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/attack_self(mob/living/carbon/human/user) ..() - if(burn_state != ON_FIRE) + if(!(resistance_flags & ON_FIRE)) return if((CLUMSY in user.mutations) && prob(50)) clumsilyDrink(user) @@ -96,7 +96,7 @@ /obj/item/reagent_containers/food/drinks/drinkingglass/shotglass/MouseDrop(mob/living/carbon/human/user) if(!ishuman(user)) return - if((CLUMSY in user.mutations) && prob(50) && burn_state == ON_FIRE) + if((CLUMSY in user.mutations) && prob(50) && (resistance_flags & ON_FIRE)) clumsilyDrink(user) else ..() diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index 6293e72e689..08635f57cd0 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -16,7 +16,7 @@ var/antable = TRUE // Will ants come near it? var/ant_location = null var/ant_timer = null - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE container_type = INJECTABLE /obj/item/reagent_containers/food/Initialize(mapload) diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index f218955f3ae..f66d46f0da6 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -7,7 +7,6 @@ name = "meat" desc = "A slab of meat" icon_state = "meat" - health = 180 filling_color = "#FF1C1C" bitesize = 3 list_reagents = list("protein" = 3) @@ -142,7 +141,7 @@ tastes = list("tough meat" = 1) /obj/item/reagent_containers/food/snacks/goliath/burn() - visible_message("[src] finishes cooking!") + visible_message("[src] finishes cooking!") new /obj/item/reagent_containers/food/snacks/goliath_steak(loc) qdel(src) @@ -239,7 +238,7 @@ /obj/item/reagent_containers/food/snacks/goliath_steak name = "goliath steak" desc = "A delicious, lava cooked steak." - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF icon_state = "goliathsteak" trash = null list_reagents = list("protein" = 6, "vitamin" = 2) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index edcb85e0d15..2aee35c225d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -108,7 +108,9 @@ if(default_unfasten_wrench(user, P)) return - default_deconstruction_crowbar(P) + if(default_deconstruction_crowbar(P)) + return + return ..() /obj/machinery/gibber/MouseDrop_T(mob/target, mob/user) if(user.incapacitated() || !ishuman(user)) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 5d758193bae..69eda1e4269 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -8,6 +8,7 @@ icon = 'icons/obj/cooking_machines.dmi' icon_state = "icecream_vat" use_power = IDLE_POWER_USE + max_integrity = 300 idle_power_usage = 20 var/obj/item/reagent_containers/glass/beaker = null var/useramount = 15 //Last used amount @@ -24,6 +25,7 @@ /obj/machinery/icemachine/New() + ..() create_reagents(500) /obj/machinery/icemachine/attackby(obj/item/I, mob/user, params) @@ -49,6 +51,8 @@ I.desc += ". This also has sprinkles." else to_chat(user, "This [I] already has sprinkles.") + return + return ..() /obj/machinery/icemachine/proc/validexchange(reag) @@ -248,3 +252,8 @@ var/datum/browser/popup = new(user, "cream_master","Cream-Master Deluxe", 700, 400, src) popup.set_content(dat) popup.open() + +/obj/machinery/icemachine/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 4) + qdel(src) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm index 3dfdc83cdbc..1554dbb0211 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm @@ -53,6 +53,7 @@ var/list/ingredients_source = list( icon_state = "icecream_vat" density = 1 anchored = 0 + max_integrity = 300 var/list/ingredients = list() var/dispense_flavour = 1 var/obj/item/reagent_containers/glass/held_container @@ -136,7 +137,7 @@ var/list/ingredients_source = list( R.reagents.clear_reagents() return 1 else - ..() + return ..() /obj/machinery/icecream_vat/proc/add(var/add_type, var/amount) if(add_type <= ingredients.len) @@ -214,6 +215,12 @@ var/list/ingredients_source = list( usr << browse(null,"window=icecreamvat") return +/obj/machinery/icecream_vat/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 4) + qdel(src) + + /obj/item/reagent_containers/food/snacks/icecream name = "ice cream cone" desc = "Delicious waffle cone, but no ice cream." diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index 1b8f61bb7bf..22394eaa9f9 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -54,7 +54,8 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) power_change() return - default_deconstruction_crowbar(O) + if(default_deconstruction_crowbar(O)) + return if(istype(O, /obj/item/multitool)) if(!panel_open) @@ -76,6 +77,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) var/obj/item/multitool/M = O M.buffer = src to_chat(user, "You log [src] in the [M]'s buffer.") + return if(stat != 0) //NOPOWER etc return if(istype(O, /obj/item/grab)) @@ -102,7 +104,8 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) to_chat(user, "The machine only accepts monkeys!") else to_chat(user, "The machine only accepts monkeys!") - return + return + return ..() /obj/machinery/monkey_recycler/attack_hand(mob/user) if(stat != 0) //NOPOWER etc diff --git a/code/modules/holiday/christmas.dm b/code/modules/holiday/christmas.dm index a6a88ff2a19..37a482231c2 100644 --- a/code/modules/holiday/christmas.dm +++ b/code/modules/holiday/christmas.dm @@ -68,4 +68,4 @@ icon_state = "xmashat" desc = "A crappy paper hat that you are REQUIRED to wear." flags_inv = 0 - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index ef1a10cd85f..5427ac9f2c9 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -37,7 +37,6 @@ icon_state = "beebox" anchored = TRUE density = TRUE - max_integrity = 300 var/mob/living/simple_animal/hostile/poison/bees/queen/queen_bee = null var/list/bees = list() //bees owned by the box, not those inside it var/list/honeycombs = list() diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 52f188a9d1d..f09d3df2f00 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -40,6 +40,13 @@ beaker.ex_act(severity) ..() +/obj/machinery/biogenerator/handle_atom_del(atom/A) + ..() + if(A == beaker) + beaker = null + update_icon() + updateUsrDialog() + /obj/machinery/biogenerator/RefreshParts() var/E = 0 var/P = 0 diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 17246d6cba1..d9ab7ddb749 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -126,7 +126,7 @@ to_chat(user, "You add [I] to the machine.") interact(user) else - ..() + return ..() /obj/machinery/plantgenes/attack_hand(mob/user) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index c64faba07ad..c83be1a3a7a 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -15,7 +15,7 @@ var/wine_flavor //If NULL, this is automatically set to the fruit's flavor. Determines the flavor of the wine if distill_reagent is NULL. var/wine_power = 0.1 //Determines the boozepwr of the wine if distill_reagent is NULL. Uses 0.1 - 1.2 not tg's boozepower (divide by 100) else you'll end up with 1000% proof alcohol! dried_type = -1 // Saves us from having to define each stupid grown's dried_type as itself. If you don't want a plant to be driable (watermelons) set this to null in the time definition. - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE origin_tech = "biotech=1" /obj/item/reagent_containers/food/snacks/grown/New(newloc, var/obj/item/seeds/new_seed = null) diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm index 171f777abd7..7d494803495 100644 --- a/code/modules/hydroponics/grown/misc.dm +++ b/code/modules/hydroponics/grown/misc.dm @@ -136,6 +136,7 @@ bitesize_mod = 2 tastes = list("cherry" = 1, "explosion" = 1) volume = 125 //Gives enough room for the black powder at max potency + max_integrity = 40 wine_power = 0.8 /obj/item/reagent_containers/food/snacks/grown/cherry_bomb/attack_self(mob/living/user) @@ -145,9 +146,11 @@ log_game("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x],[user.y],[user.z]).") prime() -/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/burn() - prime() - ..() +/obj/item/reagent_containers/food/snacks/grown/cherry_bomb/deconstruct(disassembled = TRUE) + if(!disassembled) + prime() + if(!QDELETED(src)) + qdel(src) /obj/item/reagent_containers/food/snacks/grown/cherry_bomb/ex_act(severity) qdel(src) //Ensuring that it's deleted by its own explosion. Also prevents mass chain reaction with piles of cherry bombs diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index b665f171285..14a4b42ca5f 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -5,7 +5,7 @@ /obj/item/grown // Grown weapons name = "grown_weapon" icon = 'icons/obj/hydroponics/harvest.dmi' - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item. /obj/item/grown/New(newloc, var/obj/item/seeds/new_seed = null) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 45c55f4a7f3..7d59bd3360b 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -80,7 +80,7 @@ hitsound = null materials = null flags = NONE - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/hatchet name = "hatchet" diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 7e31c1a7b7e..620e69e97cb 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -1001,7 +1001,7 @@ update_icon() visible_message("[user] secretes a trickle of green liquid from its tail, refilling [src]'s nutrient tray.","You secrete a trickle of green liquid from your tail, refilling [src]'s nutrient tray.") else - ..() + return ..() /////////////////////////////////////////////////////////////////////////////// /obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk! @@ -1023,4 +1023,4 @@ to_chat(user, "You clear up [src]!") qdel(src) else - ..() + return ..() diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index d9e07d96987..091534633f9 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/hydroponics/seeds.dmi' icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game. w_class = WEIGHT_CLASS_TINY - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/plantname = "Plants" // Name of plant when planted. var/product // A type path. The thing that is created when the plant is harvested. var/species = "" // Used to update icons. Should match the name in the sprites unless all icon_* are overriden. diff --git a/code/modules/library/codex_gigas.dm b/code/modules/library/codex_gigas.dm index 63af7f9374b..e908f35b60b 100644 --- a/code/modules/library/codex_gigas.dm +++ b/code/modules/library/codex_gigas.dm @@ -3,7 +3,7 @@ icon_state ="demonomicon" throw_speed = 1 throw_range = 10 - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF author = "Forces beyond your comprehension" unique = TRUE title = "The codex gigas" diff --git a/code/modules/library/computers/public.dm b/code/modules/library/computers/public.dm index c0f61d26eff..d0a6272970c 100644 --- a/code/modules/library/computers/public.dm +++ b/code/modules/library/computers/public.dm @@ -10,6 +10,7 @@ if(default_unfasten_wrench(user, W)) power_change() return + return ..() /obj/machinery/computer/library/public/interact(var/mob/user) if(interact_check(user)) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index b50433c51a9..4439993326c 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -18,9 +18,9 @@ anchored = 1 density = 1 opacity = 1 - burn_state = FLAMMABLE - burntime = 30 - var/health = 50 + resistance_flags = FLAMMABLE + max_integrity = 200 + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0) var/tmp/busy = 0 var/list/allowed_books = list(/obj/item/book, /obj/item/spellbook, /obj/item/storage/bible, /obj/item/tome) //Things allowed in the bookcase @@ -60,7 +60,7 @@ "You disassemble \the [src].") busy = 0 density = 0 - qdel(src) + deconstruct(TRUE) else busy = 0 return 1 @@ -70,15 +70,6 @@ name = ("bookcase ([sanitize(newname)])") return 1 else - switch(O.damtype) - if("fire") - health -= O.force * 1 - if("brute") - health -= O.force * 0.75 - else - if(health <= 0) - visible_message("The bookcase is smashed apart!") - qdel(src) return ..() /obj/structure/bookcase/attack_hand(var/mob/user as mob) @@ -93,32 +84,12 @@ choice.forceMove(get_turf(src)) update_icon() -/obj/structure/bookcase/ex_act(severity) - switch(severity) - if(1.0) - for(var/obj/item/I in contents) - qdel(I) - qdel(src) - return - if(2.0) - for(var/obj/item/I in contents) - if(prob(50)) - qdel(I) - qdel(src) - return - if(3.0) - if(prob(50)) - qdel(src) - return - return - -/obj/structure/bookcase/Destroy() - for(var/i in 1 to 5) - new /obj/item/stack/sheet/wood(get_turf(src)) +/obj/structure/bookcase/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/wood(loc, 5) for(var/obj/item/I in contents) if(is_type_in_list(I, allowed_books)) I.forceMove(get_turf(src)) - return ..() + qdel(src) /obj/structure/bookcase/update_icon() if(contents.len < 5) @@ -170,7 +141,7 @@ force = 2 w_class = WEIGHT_CLASS_NORMAL //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) attack_verb = list("bashed", "whacked") - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE var/dat // Actual page content var/due_date = 0 // Game time in 1/10th seconds diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index 930e953d5eb..c755da03b2b 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -136,7 +136,7 @@ /atom/movable/lighting_object/singularity_pull() return -/atom/movable/lighting_object/blob_act() +/atom/movable/lighting_object/blob_act(obj/structure/blob/B) return /atom/movable/lighting_object/onTransitZ() diff --git a/code/modules/logic/converter.dm b/code/modules/logic/converter.dm index 76f5fb37d7b..c54e3fe4882 100644 --- a/code/modules/logic/converter.dm +++ b/code/modules/logic/converter.dm @@ -56,7 +56,7 @@ S.toggle_secure() to_chat(user, "You unsecure and detach \the [S] from the I/O connection port.") return - ..() + return ..() /obj/machinery/logic_gate/convert/multitool_menu(var/mob/user, var/obj/item/multitool/P) var/logic_state_string diff --git a/code/modules/logic/logic_base.dm b/code/modules/logic/logic_base.dm index 952001e87f7..50aecd79283 100644 --- a/code/modules/logic/logic_base.dm +++ b/code/modules/logic/logic_base.dm @@ -40,7 +40,7 @@ /obj/machinery/logic_gate/New() if(tamperproof) //doing this during New so we don't have to worry about forgetting to set these vars during editting / defining - unacidable = 1 + resistance_flags |= ACID_PROOF ..() if(SSradio) set_frequency(frequency) @@ -212,6 +212,7 @@ if(panel_open && istype(O, /obj/item/crowbar)) default_deconstruction_crowbar(O) return 1 + return ..() ////////////////////////////////////// // Attack procs // @@ -261,10 +262,9 @@ return 0 ..() -/obj/machinery/logic_gate/blob_act() - if(tamperproof) - return 0 - ..() +/obj/machinery/logic_gate/blob_act(obj/structure/blob/B) + if(!tamperproof) + return ..() /obj/machinery/logic_gate/singularity_act() if(tamperproof) diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index 80498117343..5da6b329dcb 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -153,6 +153,7 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi /obj/item/clothing/gloves/color/black/krav_maga var/datum/martial_art/krav_maga/style = new can_be_cut = FALSE + resistance_flags = NONE /obj/item/clothing/gloves/color/black/krav_maga/equipped(mob/user, slot) if(!ishuman(user)) diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index 3e4d4d143ec..90ee1d58e05 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -8,6 +8,7 @@ var/lastattempt = null var/attempts = 10 var/codelen = 4 + integrity_failure = 0 //no breaking open the crate /obj/structure/closet/crate/secure/loot/New() ..() @@ -171,9 +172,6 @@ else return ..() -/obj/structure/closet/crate/secure/loot/attack_animal(mob/user) - boom(user) - /obj/structure/closet/crate/secure/loot/attackby(obj/item/W, mob/user) if(locked) if(istype(W, /obj/item/card/emag)) @@ -205,16 +203,15 @@ return 1 return ..() +/obj/structure/closet/crate/secure/loot/emag_act(mob/user) + if(locked) + boom(user) + /obj/structure/closet/crate/secure/loot/togglelock(mob/user) if(locked) boom(user) else ..() -/obj/structure/closet/crate/secure/loot/proc/boom(mob/user) - to_chat(user, "The crate's anti-tamper system activates!") - for(var/atom/movable/AM in src) - qdel(AM) - var/turf/T = get_turf(src) - explosion(T, -1, -1, 1, 1) - qdel(src) +/obj/structure/closet/crate/secure/loot/deconstruct(disassembled = TRUE) + boom() \ No newline at end of file diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index fc0e58d9874..261b7ca9b90 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -12,7 +12,7 @@ hoodtype = /obj/item/clothing/head/hooded/explorer armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50) allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe) - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF hide_tail_by_species = list("Vox" , "Vulpkanin" , "Unathi" , "Tajaran") sprite_sheets = list( @@ -34,7 +34,7 @@ min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT max_heat_protection_temperature = FIRE_HELM_MAX_TEMP_PROTECT armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 50, "bio" = 100, "rad" = 50, "fire" = 50, "acid" = 50) - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF sprite_sheets = list( "Vox" = 'icons/mob/species/vox/head.dmi', @@ -50,9 +50,9 @@ item_state = "hostile_env" flags = THICKMATERIAL //not spaceproof max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT - burn_state = LAVA_PROOF + resistance_flags = FIRE_PROOF | LAVA_PROOF slowdown = 0 - armor = list(melee = 70, bullet = 40, laser = 10, energy = 10, bomb = 50, bio = 100, rad = 100) + armor = list("melee" = 70, "bullet" = 40, "laser" = 10, "energy" = 10, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) allowed = list(/obj/item/flashlight, /obj/item/tank, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe) /obj/item/clothing/suit/space/hostile_environment/New() @@ -81,8 +81,8 @@ w_class = WEIGHT_CLASS_NORMAL max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT flags = THICKMATERIAL // no space protection - armor = list(melee = 70, bullet = 40, laser = 10, energy = 10, bomb = 50, bio = 100, rad = 100) - burn_state = LAVA_PROOF + armor = list("melee" = 70, "bullet" = 40, "laser" = 10, "energy" = 10, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | LAVA_PROOF /obj/item/clothing/head/helmet/space/hostile_environment/New() ..() diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm index 9ae6bb19fa0..00e838bdf87 100644 --- a/code/modules/mining/equipment/marker_beacons.dm +++ b/code/modules/mining/equipment/marker_beacons.dm @@ -20,6 +20,8 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( desc = "Prism-brand path illumination devices. Used by miners to mark paths and warn of danger." icon = 'icons/obj/lighting.dmi' icon_state = "marker" + armor = list("melee" = 50, "bullet" = 75, "laser" = 75, "energy" = 75, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 25, "acid" = 0) + max_integrity = 50 merge_type = /obj/item/stack/marker_beacon max_amount = 100 var/picked_color = "random" @@ -85,7 +87,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list( update_icon() /obj/structure/marker_beacon/deconstruct(disassembled = TRUE) - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) var/obj/item/stack/marker_beacon/M = new(loc) M.picked_color = picked_color M.update_icon() diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 5e71a4438b2..3dc8ec15005 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -80,7 +80,7 @@ flags = PREVENT_CLICK_UNDER reinf = TRUE heat_resistance = 1600 - armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100) + armor = list("melee" = 90, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100) smooth = SMOOTH_MORE canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod) explosion_block = 3 @@ -213,7 +213,7 @@ light_color = "#DDFFD3" max_n_of_items = 10 pixel_y = -4 - can_deconstruct = FALSE + flags = NODECONSTRUCT var/empty = FALSE /obj/machinery/smartfridge/survival_pod/Initialize(mapload) @@ -271,8 +271,9 @@ return !arbitraryatmosblockingvar /obj/structure/fans/deconstruct() - if(buildstacktype) - new buildstacktype(loc, buildstackamount) + if(!(flags & NODECONSTRUCT)) + if(buildstacktype) + new buildstacktype(loc, buildstackamount) qdel(src) /obj/structure/fans/attackby(obj/item/W, mob/user, params) @@ -294,11 +295,8 @@ /obj/structure/fans/tiny/invisible name = "air flow blocker" - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF invisibility = INVISIBILITY_ABSTRACT - //Signs /obj/structure/sign/mining name = "nanotrasen mining corps sign" diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index 06f543c5907..1ce1350a73a 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -188,7 +188,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons) return TRUE return FALSE -/obj/effect/extraction_holder/singularity_pull() +/obj/effect/extraction_holder/singularity_act() return /obj/effect/extraction_holder/singularity_pull() diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index fb2b915f146..cf2076ecc6f 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -49,6 +49,7 @@ GLOBAL_LIST(labor_sheet_values) return else to_chat(user, "There's an ID inserted already.") + return return ..() /obj/machinery/mineral/labor_claim_console/attack_hand(mob/user) @@ -91,7 +92,7 @@ GLOBAL_LIST(labor_sheet_values) if(href_list["handle_id"]) if(inserted_id) if(!usr.put_in_hands(inserted_id)) - inserted_id.forceMove(get_turf(src)) + inserted_id.forceMove(get_turf(src)) inserted_id = null else var/obj/item/I = usr.get_active_hand() @@ -143,6 +144,7 @@ GLOBAL_LIST(labor_sheet_values) /**********************Prisoner Collection Unit**************************/ /obj/machinery/mineral/stacking_machine/laborstacker + damage_deflection = 21 var/points = 0 //The unclaimed value of ore stacked. /obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp) @@ -153,6 +155,7 @@ GLOBAL_LIST(labor_sheet_values) if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I)) var/obj/item/stack/sheet/inp = I points += inp.point_value * inp.amount + return return ..() /**********************Point Lookup Console**************************/ @@ -179,5 +182,5 @@ GLOBAL_LIST(labor_sheet_values) to_chat(user, "Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.") else to_chat(user, "Error: Invalid ID") - else - return ..() \ No newline at end of file + return + return ..() \ No newline at end of file diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index af0006edafc..0f7cd5cb2ef 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -26,17 +26,6 @@ base_icon = "[icon_state][rand(1, 4)]" icon_state = base_icon -/obj/structure/flora/ash/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(80)) - qdel(src) - if(3) - if(prob(50)) - qdel(src) - /obj/structure/flora/ash/proc/harvest(user) if(harvested) return 0 @@ -160,6 +149,8 @@ icon = 'icons/obj/lavaland/ash_flora.dmi' icon_state = "mushroom_shavings" w_class = WEIGHT_CLASS_TINY + resistance_flags = FLAMMABLE + max_integrity = 100 seed = /obj/item/seeds/lavaland/polypore wine_power = 0.2 diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index 6a1e563da7a..e9728bc7901 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -168,8 +168,7 @@ force = 25 damtype = BURN hitsound = 'sound/weapons/sear.ogg' - burn_state = LAVA_PROOF - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/turf_type = /turf/simulated/floor/plating/lava/smooth var/transform_string = "lava" var/reset_turf_type = /turf/simulated/floor/plating/asteroid/basalt diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index fcefea23eaf..7b321474880 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -26,8 +26,7 @@ icon_state = "blackbox" luminosity = 8 max_n_of_items = INFINITY - unacidable = 1 - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF pixel_y = -4 use_power = NO_POWER_USE var/memory_saved = FALSE @@ -113,11 +112,10 @@ desc = "A strange chunk of crystal, being in the presence of it fills you with equal parts excitement and dread." icon = 'icons/obj/lavaland/artefacts.dmi' icon_state = "anomaly_crystal" - luminosity = 8 + light_range = 8 use_power = NO_POWER_USE density = 1 - burn_state = LAVA_PROOF - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/activation_method = "touch" var/activation_damage_type = null var/last_use_timer = 0 @@ -140,7 +138,7 @@ /obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params) ActivationReaction(user,"weapon") - ..() + return ..() /obj/machinery/anomalous_crystal/bullet_act(obj/item/projectile/P, def_zone) ..() @@ -440,6 +438,7 @@ icon_state = null //This shouldn't even be visible, so if it DOES show up, at least nobody will notice density = 1 anchored = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE var/mob/living/simple_animal/holder_animal /obj/structure/closet/stasis/process() diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index 353f1615c42..8c5d0176225 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -14,6 +14,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "cultpack" slot_flags = SLOT_BACK + resistance_flags = INDESTRUCTIBLE var/obj/item/storage/backpack/shared/bag /obj/item/shared_storage/red @@ -164,7 +165,7 @@ icon_state = "goliath_boat" icon = 'icons/obj/lavaland/dragonboat.dmi' held_key_type = /obj/item/oar - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF /obj/vehicle/lavaboat/relaymove(mob/user, direction) var/turf/next = get_step(src, direction) @@ -184,7 +185,7 @@ desc = "Not to be confused with the kind Research hassles you for." force = 12 w_class = WEIGHT_CLASS_NORMAL - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF /datum/crafting_recipe/oar name = "goliath bone oar" @@ -207,7 +208,6 @@ desc = "A tiny ship inside a bottle." icon = 'icons/obj/lavaland/artefacts.dmi' icon_state = "ship_bottle" - burn_state = LAVA_PROOF /obj/item/ship_in_a_bottle/attack_self(mob/user) to_chat(user, "You're not sure how they get the ships in these things, but you're pretty sure you know how to get it out.") @@ -396,6 +396,7 @@ desc = "A dread talisman that can render you completely invulnerable." icon = 'icons/obj/lavaland/artefacts.dmi' icon_state = "talisman" + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF actions_types = list(/datum/action/item_action/immortality) var/cooldown = 0 @@ -441,6 +442,9 @@ /obj/effect/immortality_talisman/ex_act() return +/obj/effect/immortality_talisman/singularity_act() + return + /obj/effect/immortality_talisman/singularity_pull() return 0 diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index ebe71af1f58..ae436214b03 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -6,8 +6,7 @@ icon_state = "necrocrate" icon_opened = "necrocrateopen" icon_closed = "necrocrate" - burn_state = LAVA_PROOF - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/structure/closet/crate/necropolis/tendril desc = "It's watching you suspiciously." diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 696be4c6bfb..cd60fc74197 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -368,14 +368,9 @@ to_chat(usr, "Required access not found.") updateUsrDialog() -/obj/machinery/mineral/ore_redemption/ex_act(severity, target) - do_sparks(5, 1, src) - if(severity == 1) - if(prob(50)) - qdel(src) - else if(severity == 2) - if(prob(25)) - qdel(src) +/obj/machinery/mineral/ore_redemption/ex_act(severity) + do_sparks(5, TRUE, src) + ..() /obj/machinery/mineral/ore_redemption/power_change() ..() diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index b6106499eff..3c94d84985f 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -194,7 +194,7 @@ return else RedeemVoucher(I, user) - return + return if(istype(I,/obj/item/card/id)) if(!powered()) return @@ -206,8 +206,8 @@ C.forceMove(src) inserted_id = C interact(user) - return - ..() + return + return ..() /obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer) var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Extraction and Rescue Kit", "Crusher Kit", "Mining Conscription Kit") diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index dd00368a2ab..43e1e6df480 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -5,7 +5,6 @@ name = "Light emitter" anchored = TRUE invisibility = 101 - unacidable = TRUE var/set_luminosity = 8 var/set_cap = 0 diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index 9f1e9ce4f27..230104f58b7 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -5,8 +5,7 @@ icon_state = "moneybag" force = 10 throwforce = 0 - burn_state = FLAMMABLE - burntime = 20 + resistance_flags = FLAMMABLE max_integrity = 100 w_class = WEIGHT_CLASS_BULKY max_w_class = WEIGHT_CLASS_NORMAL diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index c86582c183b..37ff230ff44 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -59,7 +59,7 @@ return ..() /obj/item/stack/ore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - ..() + . = ..() if(isnull(refined_type)) return else @@ -124,6 +124,11 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ to_chat(C, "[src] gets into your eyes! The pain, it burns!") qdel(src) +/obj/item/stack/ore/glass/ex_act(severity) + if(severity == EXPLODE_NONE) + return + qdel(src) + /obj/item/stack/ore/glass/basalt name = "volcanic ash" icon_state = "volcanic_sand" diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 43bc1b57226..ec7afa6e58a 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -10,10 +10,7 @@ pressure_resistance = 5 * ONE_ATMOSPHERE /obj/structure/ore_box/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/t_scanner/adv_mining_scanner)) - attack_hand(user) - return - else if(istype(W, /obj/item/stack/ore)) + if(istype(W, /obj/item/stack/ore)) if(!user.drop_item()) return W.forceMove(src) @@ -30,6 +27,8 @@ if(do_after(user, 50 * C.toolspeed, target = src)) user.visible_message("[user] pries [src] apart.", "You pry apart [src].", "You hear splitting wood.") deconstruct(TRUE, user) + else + return ..() /obj/structure/ore_box/attack_hand(mob/user) if(Adjacent(user)) @@ -63,10 +62,6 @@ to_chat(usr, "You empty the box.") updateUsrDialog() -obj/structure/ore_box/ex_act(severity, target) - if(prob(100 / severity) && severity < 3) - qdel(src) //nothing but ores can get inside unless its a bug and ores just return nothing on ex_act, not point in calling it on them - /obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user) var/obj/item/stack/sheet/wood/W = new (loc, 4) if(user) @@ -84,7 +79,7 @@ obj/structure/ore_box/ex_act(severity, target) CHECK_TICK /obj/structure/ore_box/onTransitZ() - return + return /obj/structure/ore_box/verb/empty_box() set name = "Empty Ore Box" diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index 0f57ac11757..f4832e20384 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -1,15 +1,11 @@ -/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush) - ..(AM, hitpush = 0) +/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) + ..(AM, hitpush = FALSE) /*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other. As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble. In all, this is a lot like the monkey code. /N */ /mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M) - if(!SSticker) - to_chat(M, "You cannot attack people before the game has started.") - return - if(istype(loc, /turf) && istype(loc.loc, /area/start)) to_chat(M, "No attacking people at spawn, you jackass.") return @@ -25,16 +21,14 @@ In all, this is a lot like the monkey code. /N if(INTENT_GRAB) grabbedby(M) - return 1 else if(health > 0) M.do_attack_animation(src, ATTACK_EFFECT_BITE) playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) - var/damage = 1 visible_message("[M.name] bites [src]!", \ "[M.name] bites [src]!") - adjustBruteLoss(damage) + adjustBruteLoss(1) add_attack_logs(M, src, "Alien attack", ATKLOG_ALL) else to_chat(M, "[name] is too injured for that.") @@ -76,6 +70,9 @@ In all, this is a lot like the monkey code. /N if(STAMINA) adjustStaminaLoss(damage) +/mob/living/carbon/alien/acid_act(acidpwr, acid_volume) + return 0 //aliens are immune to acid. + /mob/living/carbon/alien/attack_slime(mob/living/simple_animal/slime/M) if(..()) //successful slime attack var/damage = rand(5, 35) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index fd8d4445717..9ec48c51bb1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -70,34 +70,20 @@ Doesn't work on other aliens/AI.*/ return -/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N +/mob/living/carbon/alien/humanoid/proc/corrosive_acid(atom/target) //If they right click to corrode, an error will flash if its an invalid target./N set name = "Corrossive Acid (200)" set desc = "Drench an object in acid, destroying it over time." set category = "Alien" if(powerc(200)) - if(O in oview(1)) - // OBJ CHECK - if(isobj(O)) - var/obj/I = O - if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid. - to_chat(src, "You cannot dissolve this object.") - return - // TURF CHECK - else if(istype(O, /turf/simulated)) - var/turf/simulated/T = O - if(T.unacidable) - to_chat(src, "You cannot dissolve this object.") - return - else// Not a type we can acid. - return - - adjustPlasma(-200) - new /obj/effect/acid(get_turf(O), O) - visible_message("[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!") + if(target in oview(1)) + if(target.acid_act(200, 100)) + visible_message("[src] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!") + adjustPlasma(-200) + else + to_chat(src, "You cannot dissolve this object.") else - to_chat(src, "Target is too far away.") - return + to_chat(src, "[target] is too far away.") /mob/living/carbon/alien/humanoid/proc/neurotoxin() // ok set name = "Spit Neurotoxin (50)" diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 1d39eb03c88..b77efc64ec8 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -18,18 +18,26 @@ var/const/MAX_ACTIVE_TIME = 400 flags = AIRTIGHT flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES layer = MOB_LAYER + max_integrity = 100 var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case - var/sterile = 0 - var/real = 1 //0 for the toy, 1 for real. Sure I could istype, but fuck that. + var/sterile = FALSE + var/real = TRUE //0 for the toy, 1 for real. Sure I could istype, but fuck that. var/strength = 5 var/attached = 0 +/obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + ..() + if(obj_integrity < 90) + Die() + +/obj/item/clothing/mask/facehugger/attackby(obj/item/O, mob/user, params) + return O.attack_obj(src, user) + /obj/item/clothing/mask/facehugger/attack_alien(mob/user) //can be picked up by aliens - attack_hand(user) - return + return attack_hand(user) /obj/item/clothing/mask/facehugger/attack_hand(mob/user) if((stat == CONSCIOUS && !sterile) && !isalien(user)) @@ -53,16 +61,6 @@ var/const/MAX_ACTIVE_TIME = 400 if(sterile) . += "It looks like the proboscis has been removed." -/obj/item/clothing/mask/facehugger/attackby(obj/item/O,mob/m, params) - if(O.force) - Die() - return - -/obj/item/clothing/mask/facehugger/bullet_act(obj/item/projectile/P) - if(P.damage) - Die() - return - /obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() if(exposed_temperature > 300) @@ -236,9 +234,6 @@ var/const/MAX_ACTIVE_TIME = 400 /obj/item/clothing/mask/facehugger/lamarr name = "Lamarr" - desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite? + desc = "The worst she might do is attempt to... couple with your head." //hope we don't get sued over a harmless reference, rite? sterile = 1 - gender = FEMALE - -/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled - return + gender = FEMALE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 34b5adf8dbf..5d2d684e1a7 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -62,7 +62,7 @@ /mob/living/carbon/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up. return -/mob/living/carbon/brain/blob_act() +/mob/living/carbon/brain/blob_act(obj/structure/blob/B) return /mob/living/carbon/brain/on_forcemove(atom/newloc) @@ -102,7 +102,7 @@ I'm using this for Stat to give it a more nifty interface to work with if(istype(src.loc, /obj/mecha)) var/obj/mecha/M = src.loc stat("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]") - stat("Exosuit Integrity", "[!M.health ? "0" : "[(M.health / initial(M.health)) * 100]"]%") + stat("Exosuit Integrity", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%") /mob/living/carbon/brain/can_safely_leave_loc() return 0 //You're not supposed to be ethereal jaunting, brains diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 3017257069a..bfd7b3786e7 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -1,6 +1,5 @@ /obj/item/organ/internal/brain name = "brain" - health = 400 //They need to live awhile longer than other organs. max_damage = 120 icon_state = "brain2" force = 1.0 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index a56a63bb858..da23de1f6ad 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -15,7 +15,7 @@ qdel(B) return ..() -/mob/living/carbon/blob_act() +/mob/living/carbon/blob_act(obj/structure/blob/B) if(stat == DEAD) return else @@ -1174,3 +1174,10 @@ so that different stomachs can handle things in different ways VB*/ SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() + +/mob/living/carbon/ExtinguishMob() + for(var/X in get_equipped_items()) + var/obj/item/I = X + I.acid_level = 0 //washes off the acid on our clothes + I.extinguish() //extinguishes our clothes + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index a89c73b6db2..648d4c53503 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0) +/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) if(!skipcatch) if(in_throw_mode && canmove && !restrained()) //Makes sure player is in throw mode if(!istype(AM,/obj/item) || !isturf(AM.loc)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e16ef3e1655..e327f151db0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -295,7 +295,7 @@ ..() -/mob/living/carbon/human/blob_act() +/mob/living/carbon/human/blob_act(obj/structure/blob/B) if(stat == DEAD) return show_message("The blob attacks you!") @@ -1588,17 +1588,16 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return threatcount /mob/living/carbon/human/singularity_act() - var/gain = 20 + . = 20 if(mind) if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer") ) - gain = 100 + . = 100 if(mind.assigned_role == "Clown") - gain = rand(-300, 300) - investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up! - gib() - return(gain) + . = rand(-1000, 1000) + ..() //Called afterwards because getting the mind after getting gibbed is sketchy /mob/living/carbon/human/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_THREE) var/list/handlist = list(l_hand, r_hand) for(var/obj/item/hand in handlist) @@ -1606,9 +1605,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X step_towards(hand, src) to_chat(src, "\The [S] pulls \the [hand] from your grip!") apply_effect(current_size * 3, IRRADIATE) - if(mob_negates_gravity()) - return - ..() /mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H) if(H == src) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index e2472513250..b68b77e77de 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -167,6 +167,152 @@ emp_act O.emp_act(severity) ..() +/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit) //todo: update this to utilize check_obscured_slots() //and make sure it's check_obscured_slots(TRUE) to stop aciding through visors etc + var/list/damaged = list() + var/list/inventory_items_to_kill = list() + var/acidity = acidpwr * min(acid_volume * 0.005, 0.1) + //HEAD// + if(!bodyzone_hit || bodyzone_hit == "head") //only if we didn't specify a zone or if that zone is the head. + var/obj/item/clothing/head_clothes = null + if(glasses) + head_clothes = glasses + if(wear_mask) + head_clothes = wear_mask + if(head) + head_clothes = head + if(head_clothes) + if(!(head_clothes.resistance_flags & UNACIDABLE)) + head_clothes.acid_act(acidpwr, acid_volume) + update_inv_glasses() + update_inv_wear_mask() + update_inv_head() + else + to_chat(src, "Your [head_clothes.name] protects your head and face from the acid!") + else + . = get_organ("head") + if(.) + damaged += . + if(l_ear) + inventory_items_to_kill += l_ear + if(r_ear) + inventory_items_to_kill += r_ear + + //CHEST// + if(!bodyzone_hit || bodyzone_hit == "chest") + var/obj/item/clothing/chest_clothes = null + if(w_uniform) + chest_clothes = w_uniform + if(wear_suit) + chest_clothes = wear_suit + if(chest_clothes) + if(!(chest_clothes.resistance_flags & UNACIDABLE)) + chest_clothes.acid_act(acidpwr, acid_volume) + update_inv_w_uniform() + update_inv_wear_suit() + else + to_chat(src, "Your [chest_clothes.name] protects your body from the acid!") + else + . = get_organ("chest") + if(.) + damaged += . + if(wear_id) + inventory_items_to_kill += wear_id + if(wear_pda) + inventory_items_to_kill += wear_pda + if(r_store) + inventory_items_to_kill += r_store + if(l_store) + inventory_items_to_kill += l_store + if(s_store) + inventory_items_to_kill += s_store + + + //ARMS & HANDS// + if(!bodyzone_hit || bodyzone_hit == "l_arm" || bodyzone_hit == "r_arm") + var/obj/item/clothing/arm_clothes = null + if(gloves) + arm_clothes = gloves + if(w_uniform && ((w_uniform.body_parts_covered & HANDS) || (w_uniform.body_parts_covered & ARMS))) + arm_clothes = w_uniform + if(wear_suit && ((wear_suit.body_parts_covered & HANDS) || (wear_suit.body_parts_covered & ARMS))) + arm_clothes = wear_suit + + if(arm_clothes) + if(!(arm_clothes.resistance_flags & UNACIDABLE)) + arm_clothes.acid_act(acidpwr, acid_volume) + update_inv_gloves() + update_inv_w_uniform() + update_inv_wear_suit() + else + to_chat(src, "Your [arm_clothes.name] protects your arms and hands from the acid!") + else + . = get_organ("r_arm") + if(.) + damaged += . + . = get_organ("l_arm") + if(.) + damaged += . + + + //LEGS & FEET// + if(!bodyzone_hit || bodyzone_hit == "l_leg" || bodyzone_hit =="r_leg" || bodyzone_hit == "feet") + var/obj/item/clothing/leg_clothes = null + if(shoes) + leg_clothes = shoes + if(w_uniform && ((w_uniform.body_parts_covered & FEET) || (bodyzone_hit != "feet" && (w_uniform.body_parts_covered & LEGS)))) + leg_clothes = w_uniform + if(wear_suit && ((wear_suit.body_parts_covered & FEET) || (bodyzone_hit != "feet" && (wear_suit.body_parts_covered & LEGS)))) + leg_clothes = wear_suit + if(leg_clothes) + if(!(leg_clothes.resistance_flags & UNACIDABLE)) + leg_clothes.acid_act(acidpwr, acid_volume) + update_inv_shoes() + update_inv_w_uniform() + update_inv_wear_suit() + else + to_chat(src, "Your [leg_clothes.name] protects your legs and feet from the acid!") + else + . = get_organ("r_leg") + if(.) + damaged += . + . = get_organ("l_leg") + if(.) + damaged += . + + + //DAMAGE// + for(var/obj/item/organ/external/affecting in damaged) + affecting.receive_damage(acidity, 2 * acidity) + + if(istype(affecting, /obj/item/organ/external/head)) + var/obj/item/organ/external/head/head_organ = affecting + if(prob(min(acidpwr * acid_volume / 10, 90))) //Applies disfigurement + head_organ.receive_damage(acidity, 2 * acidity) + emote("scream") + head_organ.h_style = "Bald" + head_organ.f_style = "Shaved" + update_hair() + update_fhair() + head_organ.disfigure() + + UpdateDamageIcon() + + //MELTING INVENTORY ITEMS// + //these items are all outside of armour visually, so melt regardless. + if(!bodyzone_hit) + if(back) + inventory_items_to_kill += back + if(belt) + inventory_items_to_kill += belt + if(l_hand) + inventory_items_to_kill += l_hand + if(r_hand) + inventory_items_to_kill += r_hand + + for(var/obj/item/I in inventory_items_to_kill) + I.acid_act(acidpwr, acid_volume) + return 1 + /mob/living/carbon/human/emag_act(user as mob, var/obj/item/organ/external/affecting) if(!istype(affecting)) return @@ -303,7 +449,7 @@ emp_act dna.species.spec_attacked_by(I, user, affecting, user.a_intent, src) //this proc handles being hit by a thrown atom -/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) +/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) var/obj/item/I var/throwpower = 30 if(istype(AM, /obj/item)) @@ -312,11 +458,11 @@ emp_act if(I.thrownby == src) //No throwing stuff at yourself to trigger reactions return ..() if(check_shields(AM, throwpower, "\the [AM.name]", THROWN_PROJECTILE_ATTACK)) - hitpush = 0 - skipcatch = 1 - blocked = 1 + hitpush = FALSE + skipcatch = TRUE + blocked = TRUE else if(I) - if(I.throw_speed >= EMBED_THROWSPEED_THRESHOLD) + if(((throwingdatum ? throwingdatum.speed : I.throw_speed) >= EMBED_THROWSPEED_THRESHOLD) || I.embedded_ignore_throwspeed_threshold) if(can_embed(I)) if(prob(I.embed_chance) && !(PIERCEIMMUNE in dna.species.species_traits)) throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) @@ -326,8 +472,8 @@ emp_act I.forceMove(src) L.receive_damage(I.w_class*I.embedded_impact_pain_multiplier) visible_message("[I] embeds itself in [src]'s [L.name]!","[I] embeds itself in your [L.name]!") - hitpush = 0 - skipcatch = 1 //can't catch the now embedded item + hitpush = FALSE + skipcatch = TRUE //can't catch the now embedded item if(!blocked) dna.species.spec_hitby(AM, src) return ..() @@ -470,36 +616,39 @@ emp_act /mob/living/carbon/human/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == INTENT_HARM) + M.do_attack_animation(src) if(M.damtype == "brute") step_away(src,M,15) - var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head")) + var/obj/item/organ/external/affecting = get_organ(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD)) if(affecting) var/update = 0 + var/dmg = rand(M.force/2, M.force) switch(M.damtype) if("brute") - if(M.force > 20) + if(M.force > 35) // durand and other heavy mechas Paralyse(1) - update |= affecting.receive_damage(rand(M.force/2, M.force), 0) - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) + else if(M.force > 20 && !weakened) // lightweight mechas like gygax + Weaken(2) + update |= affecting.receive_damage(dmg, 0) + playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE) if("fire") - update |= affecting.receive_damage(0, rand(M.force/2, M.force)) - playsound(src, 'sound/items/welder.ogg', 50, 1) + update |= affecting.receive_damage(dmg, 0) + playsound(src, 'sound/items/welder.ogg', 50, TRUE) if("tox") M.mech_toxin_damage(src) else return + if(update) + UpdateDamageIcon() updatehealth("mech melee attack") M.occupant_message("You hit [src].") - visible_message("[src] has been hit by [M.name].", \ - "[src] has been hit by [M.name].") + visible_message("[M.name] hits [src]!", "[M.name] hits you!") add_attack_logs(M.occupant, src, "Mecha-meleed with [M]") else ..() - return - /mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction) playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE) if(shoes && istype(shoes, /obj/item/clothing)) diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index a7f27a5753f..0328e99a6a0 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -732,5 +732,4 @@ H.mind.miming = TRUE /datum/unarmed_attack/golem/tranquillite - attack_sound = null - miss_sound = null \ No newline at end of file + attack_sound = null \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 44c201089d5..92155f745a8 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -266,6 +266,10 @@ ..() flash_eyes() +/mob/living/acid_act(acidpwr, acid_volume) + take_organ_damage(acidpwr * min(1, acid_volume * 0.1)) + return 1 + /mob/living/proc/updatehealth(reason = "none given") if(status_flags & GODMODE) health = maxHealth @@ -791,13 +795,16 @@ add_attack_logs(src, who, "Equipped [what]") /mob/living/singularity_act() - var/gain = 20 investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up! gib() - return(gain) + return 20 -/mob/living/singularity_pull(S) - step_towards(src,S) +/mob/living/singularity_pull(S, current_size) + ..() + if(current_size >= STAGE_SIX) //your puny magboots/wings/whatever will not save you against supermatter singularity + throw_at(S, 14, 3, src, TRUE) + else if(!mob_negates_gravity()) + step_towards(src,S) /mob/living/narsie_act() if(client) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index ce758f0e856..44e2761708e 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -87,22 +87,24 @@ return 0 //this proc handles being hit by a thrown atom -/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0, datum/thrownthing/throwingdatum)//Standardization and logging -Sieve +/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) if(istype(AM, /obj/item)) var/obj/item/I = AM var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest var/dtype = BRUTE var/volume = I.get_volume_by_throwforce_and_or_w_class() - if(istype(I, /obj/item)) - var/obj/item/W = I - dtype = W.damtype - if(W.throwforce > 0) //If the weapon's throwforce is greater than zero... - if(W.hitsound) //...and hitsound is defined... - playsound(loc, W.hitsound, volume, 1, -1) //...play the weapon's hitsound. - else //Otherwise, if hitsound isn't defined... - playsound(loc, 'sound/weapons/genhit1.ogg', volume, 1, -1) //...play genhit1.ogg. + SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, zone) + dtype = I.damtype - else if(I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero... + if(I.throwforce > 0) //If the weapon's throwforce is greater than zero... + if(I.throwhitsound) //...and throwhitsound is defined... + playsound(loc, I.throwhitsound, volume, TRUE, -1) //...play the weapon's throwhitsound. + else if(I.hitsound) //Otherwise, if the weapon's hitsound is defined... + playsound(loc, I.hitsound, volume, TRUE, -1) //...play the weapon's hitsound. + else if(!I.throwhitsound) //Otherwise, if throwhitsound isn't defined... + playsound(loc, 'sound/weapons/genhit.ogg',volume, TRUE, -1) //...play genhit.ogg. + + else if(!I.throwhitsound && I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero... playsound(loc, 'sound/weapons/genhit1.ogg', volume, 1, -1)//...play genhit1.ogg if(!I.throwforce)// Otherwise, if the item's throwforce is 0... playsound(loc, 'sound/weapons/throwtap.ogg', 1, volume, -1)//...play throwtap.ogg. @@ -116,37 +118,36 @@ else return 1 else - playsound(loc, 'sound/weapons/genhit1.ogg', 50, 1, -1) //...play genhit1.ogg.) + playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) ..() /mob/living/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == INTENT_HARM) + M.do_attack_animation(src) if(M.damtype == "brute") step_away(src,M,15) switch(M.damtype) if("brute") Paralyse(1) take_overall_damage(rand(M.force/2, M.force)) - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) + playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE) if("fire") take_overall_damage(0, rand(M.force/2, M.force)) - playsound(src, 'sound/items/welder.ogg', 50, 1) + playsound(src, 'sound/items/welder.ogg', 50, TRUE) if("tox") M.mech_toxin_damage(src) else return updatehealth("mech melee attack") M.occupant_message("You hit [src].") - visible_message("[src] has been hit by [M.name].", \ - "[src] has been hit by [M.name].") + visible_message("[M.name] hits [src]!", "[M.name] hits you!") add_attack_logs(M.occupant, src, "Mecha-meleed with [M]") else step_away(src,M) add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", ATKLOG_ALL) M.occupant_message("You push [src] out of the way.") visible_message("[M] pushes [src] out of the way.") - return //Mobs on Fire /mob/living/proc/IgniteMob() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 9605ae186a7..7822584ab98 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -560,11 +560,12 @@ var/list/ai_verbs_default = list( user.reset_perspective(current) return TRUE -/mob/living/silicon/ai/blob_act() - if(stat != 2) +/mob/living/silicon/ai/blob_act(obj/structure/blob/B) + if(stat != DEAD) adjustBruteLoss(60) - return TRUE - return FALSE + updatehealth() + return 1 + return 0 /mob/living/silicon/ai/restrained() return FALSE diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 115952c0ed1..f88b09c91e8 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -550,14 +550,12 @@ var/list/robot_verbs_default = list( if(thruster_button) thruster_button.icon_state = "ionpulse[ionpulse_on]" -/mob/living/silicon/robot/blob_act() +/mob/living/silicon/robot/blob_act(obj/structure/blob/B) if(stat != DEAD) - adjustBruteLoss(60) - return 1 + adjustBruteLoss(30) else gib() - return 1 - return 0 + return TRUE // this function displays the cyborgs current cell charge in the stat panel /mob/living/silicon/robot/proc/show_cell_power() @@ -1466,4 +1464,4 @@ var/list/robot_verbs_default = list( SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() - + diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index e45ffa984f3..a22d373ba79 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -543,6 +543,14 @@ else ..() +/mob/living/simple_animal/bot/ed209/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) + if(istype(AM, /obj/item)) + var/obj/item/I = AM + if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby)) + var/mob/living/carbon/human/H = I.thrownby + retaliate(H) + ..() + /mob/living/simple_animal/bot/ed209/RangedAttack(atom/A, params) if(!on) return diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index ea559fdc597..b5d63c8c9ca 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -217,7 +217,7 @@ Auto Patrol: []"}, ..() -/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) +/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) if(istype(AM, /obj/item)) var/obj/item/I = AM if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby)) @@ -232,7 +232,7 @@ Auto Patrol: []"}, C.visible_message("[src] is trying to put zipties on [C]!",\ "[src] is trying to put zipties on you!") INVOKE_ASYNC(src, .proc/cuff_callback, C) - + /mob/living/simple_animal/bot/secbot/proc/cuff_callback(mob/living/carbon/C) if(do_after(src, 60, target = C)) if(!C.handcuffed) diff --git a/code/modules/mob/living/simple_animal/bot/syndicate.dm b/code/modules/mob/living/simple_animal/bot/syndicate.dm index ae26bfee220..6aa15ba0270 100644 --- a/code/modules/mob/living/simple_animal/bot/syndicate.dm +++ b/code/modules/mob/living/simple_animal/bot/syndicate.dm @@ -167,7 +167,7 @@ visible_message("[src] blows apart!") do_sparks(3, 1, src) new /obj/effect/decal/cleanable/blood/oil(loc) - var/obj/effect/decal/mecha_wreckage/gygax/dark/wreck = new /obj/effect/decal/mecha_wreckage/gygax/dark(loc) + var/obj/structure/mecha_wreckage/gygax/dark/wreck = new /obj/structure/mecha_wreckage/gygax/dark(loc) wreck.name = "sentry bot wreckage" raise_alert("[src] destroyed.") diff --git a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm index d06ece5d50f..e1e86536f19 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm @@ -46,13 +46,13 @@ visible_message("[P] has a reduced effect on [src]!") ..() -/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM)//No floor tiling them to death, wiseguy +/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //No floor tiling them to death, wiseguy if(istype(AM, /obj/item)) var/obj/item/T = AM if(!stat) Aggro() if(T.throwforce <= 20) - visible_message("The [T.name] [src.throw_message] [src.name]!") + visible_message("The [T.name] [throw_message] [src.name]!") return ..() diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 927056c29db..bf2090d44b9 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -167,7 +167,7 @@ if(M.a_intent == INTENT_HARM) Bruise() -/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM) +/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) ..() if(istype(AM, /obj/item)) var/obj/item/T = AM diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm index 957be60b2cd..b72ec90cf58 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm @@ -139,7 +139,7 @@ icon = 'icons/effects/effects.dmi' anchored = 1 // prevents people dragging it density = 0 // prevents it blocking all movement - health = 20 // two welders, or one laser shot (15 for the normal spider webs) + max_integrity = 20 // two welders, or one laser shot (15 for the normal spider webs) icon_state = "stickyweb1" var/creator_ckey = null diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm index ea4753866c2..62832527293 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm @@ -94,4 +94,4 @@ name = "thick web" desc = "This web is so thick, most cannot see beyond it." opacity = 1 - health = 40 \ No newline at end of file + max_integrity = 40 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm index 215ed78120f..d7d41912233 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm @@ -306,7 +306,7 @@ visible_message("\The [src] emits a bone-chilling shriek!") for(var/obj/machinery/light/L in orange(light_range, src)) if(L.on && prob(light_chance)) - L.broken() + L.break_light_tube() for(var/obj/machinery/camera/C in orange(camera_range, src)) if(C.status && prob(camera_chance)) C.toggle_cam(src, 0) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/red.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/red.dm index 91e70dd837d..3f16eb44837 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/red.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/red.dm @@ -62,6 +62,6 @@ /obj/structure/spider/terrorweb/red - health = 30 + max_integrity = 30 name = "reinforced web" desc = "This web is reinforced with extra strands, for added strength." diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm index 7e90867e783..4bba74001fd 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm @@ -9,7 +9,7 @@ icon_state = "spiderling" anchored = 0 layer = 2.75 - health = 3 + max_integrity = 3 var/stillborn = FALSE var/spider_myqueen = null var/spider_mymother = null @@ -39,10 +39,10 @@ . = ..() -/obj/structure/spider/spiderling/terror_spiderling/die() +/obj/structure/spider/spiderling/terror_spiderling/Destroy() for(var/obj/structure/spider/spiderling/terror_spiderling/S in view(7, src)) S.immediate_ventcrawl = TRUE - . = ..() + return ..() /obj/structure/spider/spiderling/terror_spiderling/proc/score_surroundings(atom/A = src) var/safety_score = 0 @@ -163,7 +163,7 @@ if(stillborn) if(amount_grown >= 300) // Fake spiderlings stick around for awhile, just to be spooky. - die() + qdel(src) else if(!grow_as) grow_as = pick(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray, /mob/living/simple_animal/hostile/poison/terror_spider/green) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index 11aa3d9c5cc..8d18471b1cb 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -136,7 +136,7 @@ if(!L.status) step_to(src,L) L.on = 1 - L.broken() + L.break_light_tube() do_attack_animation(L) visible_message("[src] smashes the [L.name].") return diff --git a/code/modules/mob/living/simple_animal/tribbles.dm b/code/modules/mob/living/simple_animal/tribbles.dm index 56085bb1cc5..b916fa801f0 100644 --- a/code/modules/mob/living/simple_animal/tribbles.dm +++ b/code/modules/mob/living/simple_animal/tribbles.dm @@ -122,95 +122,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles, gestation = 0 to_chat(user, "You fuse some recently cut tubes together, it should be able to reproduce again.") - - -//|| Tribble Cage - Lovingly lifted from the lamarr-cage || -/obj/structure/tribble_cage - name = "Lab Cage" - icon = 'icons/mob/tribbles.dmi' - icon_state = "labcage1" - desc = "A glass lab container for storing interesting creatures." - density = 1 - anchored = 1 - unacidable = 1//Dissolving the case would also delete tribble - var/health = 30 - var/occupied = 1 - var/destroyed = 0 - -/obj/structure/tribble_cage/ex_act(severity) - switch(severity) - if(1) - new /obj/item/shard( src.loc ) - Break() - qdel(src) - if(2) - if(prob(50)) - src.health -= 15 - src.healthcheck() - if(3) - if(prob(50)) - src.health -= 5 - src.healthcheck() - - -/obj/structure/tribble_cage/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - src.healthcheck() - return - - -/obj/structure/tribble_cage/blob_act() - if(prob(75)) - new /obj/item/shard( src.loc ) - Break() - qdel(src) - - -/obj/structure/tribble_cage/proc/healthcheck() - if(src.health <= 0) - if(!( src.destroyed )) - src.density = 0 - src.destroyed = 1 - new /obj/item/shard( src.loc ) - playsound(src, "shatter", 70, 1) - Break() - else - playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1) - return - -/obj/structure/tribble_cage/update_icon() - if(src.destroyed) - src.icon_state = "labcageb[src.occupied]" - else - src.icon_state = "labcage[src.occupied]" - return - - -/obj/structure/tribble_cage/attackby(obj/item/W as obj, mob/user as mob, params) - src.health -= W.force - src.healthcheck() - ..() - return - - -/obj/structure/tribble_cage/attack_hand(mob/user as mob) - if(src.destroyed) - return - else - user.visible_message("[user] kicks the lab cage.", "You kick the lab cage.") - src.health -= 2 - healthcheck() - return - -/obj/structure/tribble_cage/proc/Break() - if(occupied) - new /mob/living/simple_animal/tribble( src.loc ) - occupied = 0 - update_icon() - return - - //||Fur and Fur Products || /obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets) diff --git a/code/modules/mob/update_status.dm b/code/modules/mob/update_status.dm index 446c2aaed8f..29bcced144a 100644 --- a/code/modules/mob/update_status.dm +++ b/code/modules/mob/update_status.dm @@ -61,5 +61,8 @@ /mob/proc/update_stat() return +/mob/proc/update_health_hud() + return + /mob/proc/update_canmove() return 1 diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index bed0533e2d8..b58dfd4cc66 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -32,7 +32,7 @@ integrity_failure = 50 max_integrity = 100 - armor = list(melee = 0, bullet = 20, laser = 20, energy = 100, bomb = 0, bio = 100, rad = 100) + armor = list("melee" = 0, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0) // Important hardware (must be installed for computer to work) diff --git a/code/modules/modular_computers/computers/item/computer_damage.dm b/code/modules/modular_computers/computers/item/computer_damage.dm index 278c2b2a214..08a8ca6aaf4 100644 --- a/code/modules/modular_computers/computers/item/computer_damage.dm +++ b/code/modules/modular_computers/computers/item/computer_damage.dm @@ -16,7 +16,7 @@ break_apart() /obj/item/modular_computer/proc/break_apart() - if(can_deconstruct) + if(!(flags & NODECONSTRUCT)) physical.visible_message("\The [src] breaks apart!") var/turf/newloc = get_turf(src) new /obj/item/stack/sheet/metal(newloc, round(steel_sheet_cost/2)) diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 36c4409fb34..61e26ed9899 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -28,9 +28,6 @@ var/list/global_modular_computers = list() var/base_active_power_usage = 100 // Power usage when the computer is open (screen is active) and can be interacted with. Remember hardware can use power too. var/base_idle_power_usage = 10 // Power usage when the computer is idle and screen is off (currently only applies to laptops) - integrity_failure = 150 - max_integrity = 300 - var/obj/item/modular_computer/processor/cpu = null // CPU that handles most logic while this type only handles power and other specific things. /obj/machinery/modular_computer/New() diff --git a/code/modules/modular_computers/computers/machinery/modular_console.dm b/code/modules/modular_computers/computers/machinery/modular_console.dm index ec19bbe4136..aeb4c18bc2d 100644 --- a/code/modules/modular_computers/computers/machinery/modular_console.dm +++ b/code/modules/modular_computers/computers/machinery/modular_console.dm @@ -15,7 +15,6 @@ max_hardware_size = 4 steel_sheet_cost = 10 light_strength = 2 - obj_integrity = 300 max_integrity = 300 integrity_failure = 150 diff --git a/code/modules/modular_computers/hardware/_hardware.dm b/code/modules/modular_computers/hardware/_hardware.dm index 9752cbf3149..3e82455c53b 100644 --- a/code/modules/modular_computers/hardware/_hardware.dm +++ b/code/modules/modular_computers/hardware/_hardware.dm @@ -75,10 +75,6 @@ return TRUE // Good to go. -// Handles damage checks -/obj/item/computer_hardware/take_damage(damage_amount) - obj_integrity = max(obj_integrity - damage_amount, 0) - /obj/item/computer_hardware/examine(var/mob/user) . = ..() if(damage > damage_failure) diff --git a/code/modules/ninja/suit/head.dm b/code/modules/ninja/suit/head.dm index a7a21f072f3..9d183f4f1a1 100644 --- a/code/modules/ninja/suit/head.dm +++ b/code/modules/ninja/suit/head.dm @@ -5,6 +5,5 @@ name = "ninja hood" icon_state = "s-ninja" item_state = "s-ninja_hood" - armor = list(melee = 60, bullet = 60, laser = 45, energy = 15, bomb = 30, bio = 30, rad = 25) - unacidable = 1 + armor = list("melee" = 60, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 25, "fire" = 100, "acid" = 100) blockTracking = 1 diff --git a/code/modules/ninja/suit/mask.dm b/code/modules/ninja/suit/mask.dm index 2f76673ab13..f88ada9f0b4 100644 --- a/code/modules/ninja/suit/mask.dm +++ b/code/modules/ninja/suit/mask.dm @@ -11,7 +11,6 @@ Contents: desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement." icon_state = "s-ninja(norm)" item_state = "s-ninja_mask" - unacidable = 1 sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', diff --git a/code/modules/ninja/suit/shoes.dm b/code/modules/ninja/suit/shoes.dm index af5f4d3ecc1..8d79cf6d9ae 100644 --- a/code/modules/ninja/suit/shoes.dm +++ b/code/modules/ninja/suit/shoes.dm @@ -5,7 +5,7 @@ icon_state = "s-ninja" permeability_coefficient = 0.01 flags = NOSLIP - armor = list(melee = 60, bullet = 60, laser = 45, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 60, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 100, "acid" = 100) cold_protection = FEET min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT heat_protection = FEET diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index 365cc35cfc6..ed2b0025fad 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -14,8 +14,7 @@ Contents: item_state = "s-ninja_suit" allowed = list(/obj/item/gun, /obj/item/ammo_box, /obj/item/melee/baton, /obj/item/tank, /obj/item/stock_parts/cell) slowdown = 0 - unacidable = 1 - armor = list(melee = 60, bullet = 60, laser = 45, energy = 15, bomb = 30, bio = 30, rad = 30) + armor = list("melee" = 60, "bullet" = 50, "laser" = 30,"energy" = 15, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 100, "acid" = 100) var/suitActive = 0 var/suitBusy = 0 diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index efd1df29a5d..a65610c7382 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -12,7 +12,7 @@ var/obj/item/pen/containedpen var/obj/item/toppaper slot_flags = SLOT_BELT - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/clipboard/New() ..() diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 55f220153b1..c32e1fc8a88 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -55,7 +55,7 @@ /obj/item/paper/contract/infernal var/contractType = 0 - burn_state = LAVA_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/datum/mind/owner icon_state = "evil_contract" diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index bf69185adcb..7d6144bee1b 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -50,9 +50,17 @@ playsound(loc, P.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") + else if(user.a_intent != INTENT_HARM) + to_chat(user, "You can't put [P] in [src]!") else - to_chat(user, "You can't put [P] in [src]!") + return ..() +/obj/structure/filingcabinet/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 2) + for(var/obj/item/I in src) + I.forceMove(loc) + qdel(src) /obj/structure/filingcabinet/attack_hand(mob/user as mob) if(contents.len <= 0) diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 7c7fe156ca0..de894e80106 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -5,7 +5,7 @@ icon_state = "folder" w_class = WEIGHT_CLASS_SMALL pressure_resistance = 2 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/folder/blue desc = "A blue folder." diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 1586870013e..ce5d51aae55 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -17,8 +17,8 @@ pressure_resistance = 0 slot_flags = SLOT_HEAD body_parts_covered = HEAD - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 50 attack_verb = list("bapped") dog_fashion = /datum/dog_fashion/head var/info //What's actually written on the paper. @@ -304,7 +304,7 @@ /obj/item/paper/attackby(obj/item/P, mob/living/user, params) ..() - if(burn_state == ON_FIRE) + if(resistance_flags & ON_FIRE) return var/clown = 0 @@ -404,7 +404,7 @@ /obj/item/paper/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) ..() - if(burn_state >= FLAMMABLE) //Renders paper that has been lit on fire to be illegible. + if(!(resistance_flags & FIRE_PROOF)) info = "Heat-curled corners and sooty words offer little insight. Whatever was once written on this page has been rendered illegible through fire." /obj/item/paper/proc/stamp(var/obj/item/stamp/S) diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 4ee6974f076..68afe9fbd12 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -8,13 +8,13 @@ throw_speed = 3 throw_range = 7 pressure_resistance = 8 - burn_state = FLAMMABLE var/amount = 30 //How much paper is in the bin. var/list/papers = list() //List of papers put in the bin for reference. /obj/item/paper_bin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) - if(!amount) - return + if(amount) + amount = 0 + update_icon() ..() /obj/item/paper_bin/Destroy() diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index a16dc1d2ea3..7fac0e3386a 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -8,8 +8,8 @@ throw_speed = 1 throwforce = 0 w_class = WEIGHT_CLASS_TINY - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 50 no_spin = TRUE var/obj/item/paper/internal_paper diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 98a5acadc9c..5a09e1a55a9 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -11,6 +11,8 @@ idle_power_usage = 30 active_power_usage = 200 power_channel = EQUIP + max_integrity = 300 + integrity_failure = 100 var/emag_cooldown atom_say_verb = "bleeps" var/obj/item/copyitem = null //what's in the copier! @@ -180,34 +182,8 @@ copyitem.forceMove(get_turf(src)) copyitem = null updateUsrDialog() - return - -/obj/machinery/photocopier/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - if(2.0) - if(prob(50)) - qdel(src) - else - if(toner > 0) - new /obj/effect/decal/cleanable/blood/oil(get_turf(src)) - toner = 0 - else - if(prob(50)) - if(toner > 0) - new /obj/effect/decal/cleanable/blood/oil(get_turf(src)) - toner = 0 - return - -/obj/machinery/photocopier/blob_act() - if(prob(50)) - qdel(src) else - if(toner > 0) - new /obj/effect/decal/cleanable/blood/oil(get_turf(src)) - toner = 0 - return + return ..() /obj/machinery/photocopier/proc/copy(var/obj/item/paper/copy) var/obj/item/paper/c = new /obj/item/paper (loc) @@ -328,6 +304,11 @@ P.pixel_x = rand(-9, 9) return P +/obj/machinery/photocopier/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT)) + if(toner > 0) + new /obj/effect/decal/cleanable/blood/oil(get_turf(src)) + toner = 0 /obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user) check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off. diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index c7d79655870..11beb1a7cb6 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -16,7 +16,7 @@ icon_state = "film" item_state = "electropack" w_class = WEIGHT_CLASS_TINY - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /******** @@ -28,8 +28,8 @@ icon_state = "photo" item_state = "paper" w_class = WEIGHT_CLASS_SMALL - burn_state = FLAMMABLE - burntime = 5 + resistance_flags = FLAMMABLE + max_integrity = 50 var/blueprints = 0 // Does this have the blueprints? var/icon/img //Big photo image var/scribble //Scribble on the back. @@ -112,7 +112,7 @@ icon_state = "album" item_state = "briefcase" can_hold = list(/obj/item/photo) - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/storage/photo_album/MouseDrop(obj/over_object as obj) diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 7c691f5093e..b2cf43e5b84 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -12,6 +12,8 @@ var/global/list/obj/item/pda/PDAs = list() item_state = "electronic" w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_ID | SLOT_BELT | SLOT_PDA + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF origin_tech = "programming=2" //Main variables diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 12e8ba163f2..f24b990a608 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -47,8 +47,12 @@ desc = "A control terminal for the area electrical systems." icon_state = "apc0" use_power = NO_POWER_USE + max_integrity = 200 + integrity_failure = 50 + resistance_flags = FIRE_PROOF req_access = list(access_engine_equip) siemens_strength = 1 + damage_deflection = 10 var/area/area var/areastring = null var/obj/item/stock_parts/cell/cell @@ -146,7 +150,7 @@ /obj/machinery/power/apc/New(turf/loc, ndir, building = 0) if(!armor) - armor = list(melee = 20, bullet = 20, laser = 10, energy = 100, bomb = 30, bio = 100, rad = 100) + armor = list("melee" = 20, "bullet" = 20, "laser" = 10, "energy" = 100, "bomb" = 30, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50) ..() GLOB.apcs += src GLOB.apcs = sortAtom(GLOB.apcs) @@ -431,227 +435,261 @@ //attack with an item - open/close cover, insert cell, or (un)lock interface /obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params) - if(istype(user, /mob/living/silicon) && get_dist(src,user)>1) + if(issilicon(user) && get_dist(src,user)>1) return src.attack_hand(user) - if(istype(W, /obj/item/crowbar) && opened) - if(has_electronics==1) - if(terminal) - to_chat(user, "Disconnect wires first.") + if(istype(W, /obj/item/crowbar)) //Using crowbar + if(opened) // a) on open apc + if(has_electronics==1) + if(terminal) + to_chat(user, "Disconnect the wires first!") + return + playsound(src.loc, W.usesound, 50, 1) + to_chat(user, "You are trying to remove the power control board..." ) + if(do_after(user, 50*W.toolspeed, target = src)) + if(has_electronics==1) + has_electronics = 0 + if(stat & BROKEN) + user.visible_message(\ + "[user.name] has broken the power control board inside [src.name]!", + "You break the charred power control board and remove the remains.", + "You hear a crack.") + return + //SSticker.mode:apcs-- //XSI said no and I agreed. -rastaf0 + else if(emagged) // We emag board, not APC's frame + emagged = FALSE + user.visible_message( + "[user.name] has discarded emaged power control board from [src.name]!", + "You discarded shorten board.") + return + else if(malfhack) // AI hacks board, not APC's frame + user.visible_message(\ + "[user.name] has discarded strangely programmed power control board from [src.name]!", + "You discarded strangely programmed board.") + malfai = null + malfhack = 0 + return + else + user.visible_message(\ + "[user.name] has removed the power control board from [src.name]!", + "You remove the power control board.") + new /obj/item/apc_electronics(loc) + return + else if(opened!=2) //cover isn't removed + opened = 0 + coverlocked = TRUE //closing cover relocks it + update_icon() + return + else if(!(stat & BROKEN)) // b) on closed and not broken APC + if(coverlocked && !(stat & MAINT)) // locked... + to_chat(user, "The cover is locked and cannot be opened!") + return + else if(panel_open) // wires are exposed + to_chat(user, "Exposed wires prevents you from opening it!") + return + else + opened = 1 + update_icon() return - playsound(src.loc, W.usesound, 50, 1) - to_chat(user, "You are trying to remove the power control board...")//lpeters - fixed grammar issues - if(do_after(user, 50 * W.toolspeed, target = src)) - if(has_electronics==1) - has_electronics = 0 - if((stat & BROKEN) || malfhack) - user.visible_message(\ - "[user.name] has broken the power control board inside [src.name]!",\ - "You broke the charred power control board and remove the remains.", - "You hear a crack!") - //ticker.mode:apcs-- //XSI said no and I agreed. -rastaf0 - else - user.visible_message(\ - "[user.name] has removed the power control board from [src.name]!",\ - "You remove the power control board.") - new /obj/item/apc_electronics(loc) - else if(opened!=2) //cover isn't removed - opened = 0 - update_icon() - else if(istype(W, /obj/item/crowbar) && !((stat & BROKEN) || malfhack) ) - if(coverlocked && !(stat & MAINT)) - to_chat(user, "The cover is locked and cannot be opened.") - return - else - opened = 1 - update_icon() - else if(istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside + else if (istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside if(cell) - to_chat(user, "There is a power cell already installed.") + to_chat(user, "There is a power cell already installed!") return else if(stat & MAINT) - to_chat(user, "There is no connector for your power cell.") + to_chat(user, "There is no connector for your power cell!") return - user.drop_item() - W.loc = src + if(!user.drop_item()) + return + W.forceMove(src) cell = W user.visible_message(\ - "[user.name] has inserted the power cell to [src.name]!",\ - "You insert the power cell.") - playsound(loc, W.usesound, 50, 1) + "[user.name] has inserted the power cell to [src.name]!",\ + "You insert the power cell.") chargecount = 0 update_icon() + else if(istype(W, /obj/item/screwdriver)) // haxing if(opened) if(cell) - to_chat(user, "Close the APC first.")//Less hints more mystery! - + to_chat(user, "Close the APC first!") //Less hints more mystery! return else - if(has_electronics==1 && terminal) + if(has_electronics==1) has_electronics = 2 stat &= ~MAINT playsound(src.loc, W.usesound, 50, 1) - to_chat(user, "You screw the circuit electronics into place.") + to_chat(user, "You screw the circuit electronics into place.") else if(has_electronics==2) has_electronics = 1 stat |= MAINT playsound(src.loc, W.usesound, 50, 1) - to_chat(user, "You unfasten the electronics.") + to_chat(user, "You unfasten the electronics.") else /* has_electronics==0 */ - to_chat(user, "There is nothing to secure.") + to_chat(user, "There is nothing to secure!") return update_icon() else if(emagged) - to_chat(user, "The interface is broken.") + to_chat(user, "The interface is broken!") + else if((stat & MAINT) && !opened) + ..() //its an empty closed frame... theres no wires to expose! else - wiresexposed = !wiresexposed - to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"].") + panel_open = !panel_open + to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]") update_icon() - else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) // trying to unlock the interface with an ID card - if(emagged) - to_chat(user, "The interface is broken.") - else if(opened) - to_chat(user, "You must close the cover to swipe an ID card.") - else if(wiresexposed) - to_chat(user, "You must close the panel.") - else if(stat & (BROKEN|MAINT)) - to_chat(user, "Nothing happens.") - else - if(src.allowed(usr) && !isWireCut(APC_WIRE_IDSCAN)) - locked = !locked - to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.") - update_icon() - else - to_chat(user, "Access denied.") - else if(istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2) - if(src.loc:intact) - to_chat(user, "You must remove the floor plating in front of the APC first.") + else if(W.GetID()) // trying to unlock the interface with an ID card + togglelock(user) + + else if(istype(W, /obj/item/stack/cable_coil) && opened) + var/turf/host_turf = get_turf(src) + if(!host_turf) + throw EXCEPTION("attackby on APC when it's not on a turf") return + if(host_turf.intact) + to_chat(user, "You must remove the floor plating in front of the APC first!") + return + else if(terminal) // it already have terminal + to_chat(user, "This APC is already wired!") + return + else if(has_electronics == 0) + to_chat(user, "There is nothing to wire!") + return + var/obj/item/stack/cable_coil/C = W - if(C.amount < 10) - to_chat(user, "You need more wires.") + if(C.get_amount() < 10) + to_chat(user, "You need ten lengths of cable for APC!") return - to_chat(user, "You start adding cables to the APC frame...") - playsound(src.loc, C.usesound, 50, 1) - if(do_after(user, 20 * C.toolspeed, target = src)) - if(C.amount >= 10 && !terminal && opened && has_electronics != 2) + user.visible_message("[user.name] adds cables to the APC frame.", \ + "You start adding cables to the APC frame...") + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + if(do_after(user, 20, target = src)) + if(C.get_amount() < 10 || !C) + return + if(C.get_amount() >= 10 && !terminal && opened && has_electronics > 0) var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if(prob(50) && electrocute_mob(usr, N, N, 1, TRUE)) - do_sparks(5, 1, src) + do_sparks(5, TRUE, src) return C.use(10) - user.visible_message(\ - "[user.name] has added cables to the APC frame!",\ - "You add cables to the APC frame.") + to_chat(user, "You add cables to the APC frame.") make_terminal() terminal.connect_to_network() - else if(istype(W, /obj/item/wirecutters) && terminal && opened && has_electronics!=2) - if(src.loc:intact) - to_chat(user, "You must remove the floor plating in front of the APC first.") + + else if(istype(W, /obj/item/wirecutters) && terminal && opened) + terminal.dismantle(user, W) + + else if(istype(W, /obj/item/apc_electronics) && opened) + if(has_electronics!=0) // there are already electronicks inside + to_chat(user, "You cannot put the board inside, there already is one!") return - to_chat(user, "You begin to cut the cables...") - playsound(src.loc, W.usesound, 50, 1) - if(do_after(user, 50 * W.toolspeed, target = src)) - if(terminal && opened && has_electronics!=2) - if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) - do_sparks(5, 1, src) - return - new /obj/item/stack/cable_coil(loc,10) - to_chat(user, "You cut the cables and dismantle the power terminal.") - qdel(terminal) // qdel - else if(istype(W, /obj/item/apc_electronics) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack)) - to_chat(user, "You trying to insert the power control board into the frame...") - playsound(src.loc, W.usesound, 50, 1) - if(do_after(user, 10 * W.toolspeed, target = src)) + else if(stat & BROKEN) + to_chat(user, "You cannot put the board inside, the frame is damaged!") + return + + user.visible_message("[user.name] inserts the power control board into [src].", \ + "You start to insert the power control board into the frame...") + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + if(do_after(user, 10, target = src)) if(has_electronics==0) has_electronics = 1 - locked = 0 + locked = FALSE to_chat(user, "You place the power control board inside the frame.") - qdel(W) // qdel - else if(istype(W, /obj/item/apc_electronics) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack)) - to_chat(user, "You cannot put the board inside, the frame is damaged.") - return + qdel(W) + else if(istype(W, /obj/item/weldingtool) && opened && has_electronics==0 && !terminal) var/obj/item/weldingtool/WT = W if(WT.get_fuel() < 3) - to_chat(user, "You need more welding fuel to complete this task.") + to_chat(user, "You need more welding fuel to complete this task!") return - user.visible_message("[user.name] welds [src].", \ - "You start welding the APC frame...", \ - "You hear welding.") + user.visible_message("[user.name] welds [src].", \ + "You start welding the APC frame...", \ + "You hear welding.") playsound(src.loc, WT.usesound, 50, 1) - if(do_after(user, 50 * WT.toolspeed, target = src)) - if(!src || !WT.remove_fuel(3, user)) return - if(emagged || malfhack || (stat & BROKEN) || opened==2) + if(do_after(user, 50*W.toolspeed, target = src)) + if(!src || !WT.remove_fuel(3, user)) + return + if((stat & BROKEN) || opened==2) new /obj/item/stack/sheet/metal(loc) user.visible_message(\ - "[src] has been cut apart by [user.name] with the weldingtool.",\ - "You disassembled the broken APC frame.",\ - "You hear welding.") + "[user.name] has cut [src] apart with [W].",\ + "You disassembled the broken APC frame.") else new /obj/item/mounted/frame/apc_frame(loc) user.visible_message(\ - "[src] has been cut from the wall by [user.name] with the weldingtool.",\ - "You cut the APC frame from the wall.",\ - "You hear welding.") - qdel(src) // qdel + "[user.name] has cut [src] from the wall with [W].",\ + "You cut the APC frame from the wall.") + qdel(src) + return + + else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened) + if(!(stat & BROKEN || opened==2 || obj_integrity < max_integrity)) // There is nothing to repair + to_chat(user, "You found no reason for repairing this APC") + return + if(!(stat & BROKEN) && opened==2) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover + user.visible_message("[user.name] replaces missing APC's cover.",\ + "You begin to replace APC's cover...") + if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame + to_chat(user, "You replace missing APC's cover.") + qdel(W) + opened = 1 + update_icon() return - else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened && emagged) - emagged = 0 - if(opened==2) - opened = 1 - user.visible_message(\ - "[user.name] has replaced the damaged APC frontal panel with a new one.",\ - "You replace the damaged APC frontal panel with a new one.") - qdel(W) - update_icon() - else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened && ((stat & BROKEN) || malfhack)) if(has_electronics) - to_chat(user, "You cannot repair this APC until you remove the electronics still inside.") + to_chat(user, "You cannot repair this APC until you remove the electronics still inside!") return - to_chat(user, "You begin to replace the damaged APC frame...") - if(do_after(user, 50 * W.toolspeed, target = src)) - user.visible_message(\ - "[user.name] has replaced the damaged APC frame with new one.",\ - "You replace the damaged APC frame with new one.") + user.visible_message("[user.name] replaces the damaged APC frame with a new one.",\ + "You begin to replace the damaged APC frame...") + if(do_after(user, 50, target = src)) + to_chat(user, "You replace the damaged APC frame with a new one.") qdel(W) stat &= ~BROKEN - malfai = null - malfhack = 0 + obj_integrity = max_integrity if(opened==2) opened = 1 update_icon() + return + else if(panel_open && !opened && is_wire_tool(W)) + wires.Interact(user) else - if(((stat & BROKEN) || malfhack) \ - && !opened \ - && ( \ - (W.force >= 5 && W.w_class >= WEIGHT_CLASS_NORMAL) \ - || istype(W,/obj/item/crowbar) \ - ) \ - && prob(20) ) - opened = 2 - user.visible_message("The APC cover was knocked down with the [W.name] by [user.name]!", \ - "You knock down the APC cover with your [W.name]!", \ - "You hear a bang.") + return ..() + +/obj/machinery/power/apc/proc/togglelock(mob/living/user) + if(emagged) + to_chat(user, "The interface is broken!") + else if(opened) + to_chat(user, "You must close the cover to swipe an ID card!") + else if(panel_open) + to_chat(user, "You must close the panel!") + else if(stat & (BROKEN|MAINT)) + to_chat(user, "Nothing happens!") + else + if(allowed(usr) && !isWireCut(APC_WIRE_IDSCAN) && !malfhack) + locked = !locked + to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.") update_icon() else - if(istype(user, /mob/living/silicon)) - return src.attack_hand(user) - if(!opened && wiresexposed && \ - (istype(W, /obj/item/multitool) || \ - istype(W, /obj/item/wirecutters) || istype(W, /obj/item/assembly/signaler))) - return src.attack_hand(user) - if(W.flags & NOBLUDGEON) - return - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - user.visible_message("The [src.name] has been hit with the [W.name] by [user.name]!", \ - "You hit the [src.name] with your [W.name]!", \ - "You hear a bang.") + to_chat(user, "Access denied.") + +/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(stat & BROKEN) + return damage_amount + . = ..() + +/obj/machinery/power/apc/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT)) + set_broken() + +/obj/machinery/power/apc/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) + set_broken() + if(opened != 2) + opened = 2 + coverlocked = FALSE + visible_message("The APC cover is knocked down!") + update_icon() /obj/machinery/power/apc/emag_act(user as mob) if(!(emagged || malfhack)) // trying to unlock with an emag card @@ -696,33 +734,6 @@ src.interact(user) -/obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user) - if(!user) - return - if(!istype(user,/mob/living/carbon/alien/humanoid)) - return - if(indestructible) - return - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - user.visible_message("[user.name] slashes at the [src.name]!", "You slash at the [src.name]!") - playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) - - var/allcut = wires.IsAllCut() - - if(beenhit >= pick(3, 4) && wiresexposed != 1) - wiresexposed = 1 - src.update_icon() - src.visible_message("The [src.name]'s cover flies open, exposing the wires!") - - else if(wiresexposed == 1 && allcut == 0) - wires.CutAll() - src.update_icon() - src.visible_message("The [src.name]'s wires are shredded!") - else - beenhit += 1 - return - /obj/machinery/power/apc/attack_ghost(mob/user) if(wiresexposed) wires.Interact(user) @@ -1300,33 +1311,8 @@ update() ..() -/obj/machinery/power/apc/ex_act(severity) - - switch(severity) - if(1.0) - //set_broken() //now Destroy() do what we need - if(cell) - cell.ex_act(1.0) // more lags woohoo - qdel(src) - return - if(2.0) - if(prob(50)) - set_broken() - if(cell && prob(50)) - cell.ex_act(2.0) - if(3.0) - if(prob(25)) - set_broken() - if(cell && prob(25)) - cell.ex_act(3.0) - return - -/obj/machinery/power/apc/blob_act() - if(prob(75)) - set_broken() - if(cell && prob(5)) - cell.blob_act() - +/obj/machinery/power/apc/blob_act(obj/structure/blob/B) + set_broken() /obj/machinery/power/apc/disconnect_terminal() if(terminal) @@ -1353,12 +1339,12 @@ spawn(0) for(var/obj/machinery/light/L in area) if(prob(chance)) - L.broken(0, 1) + L.break_light_tube(0, 1) stoplag() /obj/machinery/power/apc/proc/null_charge() for(var/obj/machinery/light/L in area) - L.broken(0, 1) + L.break_light_tube(0, 1) stoplag() /obj/machinery/power/apc/proc/setsubsystem(val) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 198c5f64356..811c0711074 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -79,11 +79,12 @@ By design, d1 is the smallest direction and d2 is the highest return ..() // then go ahead and delete the cable /obj/structure/cable/deconstruct(disassembled = TRUE) - var/turf/T = get_turf(src) - if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long - new/obj/item/stack/cable_coil(T, 2, paramcolor = color) - else - new/obj/item/stack/cable_coil(T, 1, paramcolor = color) + if(!(flags & NODECONSTRUCT)) + var/turf/T = get_turf(src) + if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long + new/obj/item/stack/cable_coil(T, 2, paramcolor = color) + else + new/obj/item/stack/cable_coil(T, 1, paramcolor = color) qdel(src) /////////////////////////////////// @@ -218,18 +219,6 @@ By design, d1 is the smallest direction and d2 is the highest if(current_size >= STAGE_FIVE) deconstruct() -//explosion handling -/obj/structure/cable/ex_act(severity) - switch(severity) - if(1) - qdel(src) // qdel - if(2) - if(prob(50)) - deconstruct() - if(3) - if(prob(25)) - deconstruct() - obj/structure/cable/proc/cable_color(var/colorC) if(colorC) if(colorC == "rainbow") diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index c1429ebdee9..9a7818ed321 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -145,23 +145,17 @@ ..() /obj/item/stock_parts/cell/ex_act(severity) - switch(severity) - if(EXPLODE_DEVASTATE) - qdel(src) - if(EXPLODE_HEAVY) - if(prob(50)) - qdel(src) - return - if(prob(50)) - corrupt() - if(EXPLODE_LIGHT) - if(prob(25)) - qdel(src) - return - if(prob(25)) - corrupt() + ..() + if(!QDELETED(src)) + switch(severity) + if(2) + if(prob(50)) + corrupt() + if(3) + if(prob(25)) + corrupt() -/obj/item/stock_parts/cell/blob_act() +/obj/item/stock_parts/cell/blob_act(obj/structure/blob/B) ex_act(EXPLODE_DEVASTATE) /obj/item/stock_parts/cell/proc/get_electrocute_damage() diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 7bbb5ac20f9..3d137a3c298 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -185,7 +185,7 @@ to_chat(user, "You reverse the generator's circulator settings. The cold circulator is now on the [dir2text(cold_dir)] side, and the heat circulator is now on the [dir2text(hot_dir)] side.") update_desc() else - ..() + return ..() /obj/machinery/power/generator/proc/get_menu(include_link = 1) var/t = "" diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 388b523518b..08464600487 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -25,13 +25,17 @@ var/const/GRAV_NEEDS_WRENCH = 3 anchored = 1 density = 1 use_power = NO_POWER_USE - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/sprite_number = 0 /obj/machinery/gravity_generator/ex_act(severity) if(severity == 1) // Very sturdy. set_broken() +/obj/machinery/gravity_generator/blob_act(obj/structure/blob/B) + if(prob(20)) + set_broken() + /obj/machinery/gravity_generator/tesla_act(power, explosive) ..() if(explosive) @@ -175,13 +179,14 @@ var/const/GRAV_NEEDS_WRENCH = 3 // Fixing the gravity generator. /obj/machinery/gravity_generator/main/attackby(obj/item/I as obj, mob/user as mob, params) - var/old_broken_state = broken_state switch(broken_state) if(GRAV_NEEDS_SCREWDRIVER) if(istype(I, /obj/item/screwdriver)) to_chat(user, "You secure the screws of the framework.") playsound(src.loc, I.usesound, 50, 1) broken_state++ + update_icon() + return if(GRAV_NEEDS_WELDING) if(istype(I, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = I @@ -189,6 +194,8 @@ var/const/GRAV_NEEDS_WRENCH = 3 to_chat(user, "You mend the damaged framework.") playsound(src.loc, WT.usesound, 50, 1) broken_state++ + update_icon() + return if(GRAV_NEEDS_PLASTEEL) if(istype(I, /obj/item/stack/sheet/plasteel)) var/obj/item/stack/sheet/plasteel/PS = I @@ -197,17 +204,17 @@ var/const/GRAV_NEEDS_WRENCH = 3 to_chat(user, "You add the plating to the framework.") playsound(src.loc, PS.usesound, 75, 1) broken_state++ + update_icon() else to_chat(user, "You need 10 sheets of plasteel.") + return if(GRAV_NEEDS_WRENCH) if(istype(I, /obj/item/wrench)) to_chat(user, "You secure the plating to the framework.") playsound(src.loc, I.usesound, 75, 1) set_fix() - else - ..() - if(old_broken_state != broken_state) - update_icon() + return + return ..() /obj/machinery/gravity_generator/main/attack_hand(mob/user as mob) if(!..()) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3e272f43091..d02263d8ed8 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -16,7 +16,8 @@ icon_state = "tube-construct-stage1" anchored = 1 layer = 5 - armor = list(melee = 50, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0) + max_integrity = 200 + armor = list("melee" = 50, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50) var/stage = 1 var/fixture_type = "tube" var/sheets_refunded = 2 @@ -114,6 +115,15 @@ else return ..() +/obj/machinery/light_construct/blob_act(obj/structure/blob/B) + if(B && B.loc == loc) + qdel(src) + +/obj/machinery/light_construct/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, sheets_refunded) + qdel(src) + /obj/machinery/light_construct/small name = "small light fixture frame" desc = "A small light fixture under construction." @@ -135,6 +145,7 @@ desc = "A lighting fixture." anchored = 1 layer = 5 // They were appearing under mobs which is a little weird - Ostaf + max_integrity = 100 use_power = ACTIVE_POWER_USE idle_power_usage = 2 active_power_usage = 20 @@ -202,12 +213,12 @@ if("tube") brightness_range = 8 if(prob(2)) - broken(1) + break_light_tube(1) if("bulb") brightness_range = 4 brightness_color = "#a0a080" if(prob(5)) - broken(1) + break_light_tube() spawn(1) update(0) @@ -356,7 +367,7 @@ if(on && (W.flags & CONDUCT)) if(prob(12)) electrocute_mob(user, get_area(src), src, 0.3, TRUE) - broken() + break_light_tube() else user.visible_message("[user.name] hits the light.") @@ -368,21 +379,7 @@ playsound(src.loc, W.usesound, 75, 1) user.visible_message("[user.name] opens [src]'s casing.", \ "You open [src]'s casing.", "You hear a noise.") - var/obj/machinery/light_construct/newlight = null - switch(fitting) - if("tube") - newlight = new /obj/machinery/light_construct(src.loc) - newlight.icon_state = "tube-construct-stage2" - - if("bulb") - newlight = new /obj/machinery/light_construct/small(src.loc) - newlight.icon_state = "bulb-construct-stage2" - newlight.dir = src.dir - newlight.stage = 2 - newlight.fingerprints = src.fingerprints - newlight.fingerprintshidden = src.fingerprintshidden - newlight.fingerprintslast = src.fingerprintslast - qdel(src) + deconstruct() return to_chat(user, "You stick \the [W] into the light socket!") @@ -393,6 +390,57 @@ else return ..() +/obj/machinery/light/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + var/obj/machinery/light_construct/newlight = null + var/cur_stage = 2 + if(!disassembled) + cur_stage = 1 + switch(fitting) + if("tube") + newlight = new /obj/machinery/light_construct(src.loc) + newlight.icon_state = "tube-construct-stage2" + + if("bulb") + newlight = new /obj/machinery/light_construct/small(src.loc) + newlight.icon_state = "bulb-construct-stage2" + newlight.setDir(src.dir) + newlight.stage = cur_stage + if(!disassembled) + newlight.obj_integrity = newlight.max_integrity * 0.5 + if(status != LIGHT_BROKEN) + break_light_tube() + if(status != LIGHT_EMPTY) + drop_light_tube() + new /obj/item/stack/cable_coil(loc, 1, "red") + transfer_fingerprints_to(newlight) + qdel(src) + +/obj/machinery/light/attacked_by(obj/item/I, mob/living/user) + ..() + if(status == LIGHT_BROKEN || status == LIGHT_EMPTY) + if(on && (I.flags & CONDUCT)) + if(prob(12)) + electrocute_mob(user, get_area(src), src, 0.3, TRUE) + +/obj/machinery/light/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + if(. && !QDELETED(src)) + if(prob(damage_amount * 5)) + break_light_tube() + +/obj/machinery/light/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + switch(status) + if(LIGHT_EMPTY) + playsound(loc, 'sound/weapons/smash.ogg', 50, TRUE) + if(LIGHT_BROKEN) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, TRUE) + else + playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) // returns whether this light has power // true if area has power and lightswitch is on @@ -417,29 +465,7 @@ // ai attack - make lights flicker, because why not /obj/machinery/light/attack_ai(mob/user) src.flicker(1) - return -// Aliens smash the bulb but do not get electrocuted./N -/obj/machinery/light/attack_alien(mob/living/carbon/alien/humanoid/user)//So larva don't go breaking light bulbs. - if(status == LIGHT_EMPTY||status == LIGHT_BROKEN) - to_chat(user, "That object is useless to you.") - return - else if(status == LIGHT_OK||status == LIGHT_BURNED) - user.do_attack_animation(src) - visible_message("[user.name] smashed the light!", "You hear a tinkle of breaking glass") - broken() - return - -/obj/machinery/light/attack_animal(mob/living/simple_animal/M) - if(M.melee_damage_upper == 0) return - if(status == LIGHT_EMPTY||status == LIGHT_BROKEN) - to_chat(M, "That object is useless to you.") - return - else if(status == LIGHT_OK||status == LIGHT_BURNED) - M.do_attack_animation(src) - visible_message("[M.name] smashed the light!", "You hear a tinkle of breaking glass") - broken() - return // attack with hand - remove tube/bulb // if hands aren't protected and the light is on, burn the player @@ -482,38 +508,12 @@ return else to_chat(user, "You remove the light [fitting].") - - // create a light tube/bulb item and put it in the user's hand - var/obj/item/light/L = new light_type(get_turf(user)) - L.status = status - L.rigged = rigged - L.brightness_range = brightness_range - L.brightness_power = brightness_power - L.brightness_color = brightness_color - L.materials = lightmaterials - - // light item inherits the switchcount, then zero it - L.switchcount = switchcount - switchcount = 0 - - L.update() - L.add_fingerprint(user) - - user.put_in_hands(L) //puts it in our active hand - - status = LIGHT_EMPTY - update() + drop_light_tube(user) // break the light and make sparks if was on -/obj/machinery/light/attack_tk(mob/user) - if(status == LIGHT_EMPTY) - to_chat(user, "There is no [fitting] in this light.") - return - - to_chat(user, "You telekinetically remove the light [fitting].") - // create a light tube/bulb item and put it in the user's hand +/obj/machinery/light/proc/drop_light_tube(mob/user) var/obj/item/light/L = new light_type() L.status = status L.rigged = rigged @@ -527,13 +527,27 @@ switchcount = 0 L.update() - L.add_fingerprint(user) - L.loc = loc + L.forceMove(loc) + + if(user) //puts it in our active hand + L.add_fingerprint(user) + user.put_in_active_hand(L) status = LIGHT_EMPTY update() + return L -/obj/machinery/light/proc/broken(skip_sound_and_sparks = 0, overloaded = 0) +/obj/machinery/light/attack_tk(mob/user) + if(status == LIGHT_EMPTY) + to_chat(user, "There is no [fitting] in this light.") + return + + to_chat(user, "You telekinetically remove the light [fitting].") + // create a light tube/bulb item and put it in the user's hand + var/obj/item/light/L = drop_light_tube() + L.attack_tk(user) + +/obj/machinery/light/proc/break_light_tube(skip_sound_and_sparks = 0, overloaded = 0) if(status == LIGHT_EMPTY || status == LIGHT_BROKEN) return @@ -557,27 +571,6 @@ explosion(loc,0,0,0,flame_range = 5, adminlog = 0) qdel(src) -// explosion effect -// destroy the whole light fixture or just shatter it - -/obj/machinery/light/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - broken() - if(3.0) - broken() - return - -//blob effect - -/obj/machinery/light/blob_act() - if(prob(75)) - qdel(src) - - // timed process // use power @@ -592,14 +585,14 @@ /obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C - broken() + break_light_tube() // explode the light /obj/machinery/light/proc/explode() var/turf/T = get_turf(src.loc) spawn(0) - broken() // break it first to give a warning + break_light_tube() // break it first to give a warning sleep(2) explosion(T, 0, 0, 2, 2) sleep(1) @@ -715,17 +708,12 @@ else return ..() -// called after an attack with a light item -// shatter light, unless it was an attempt to put it in a light socket -// now only shatter if the intent was harm - -/obj/item/light/afterattack(atom/target, mob/user, proximity) - if(!proximity) return - if(istype(target, /obj/machinery/light)) - return - if(user.a_intent != INTENT_HARM) - return +/obj/item/light/attack(mob/living/M, mob/living/user, def_zone) + ..() + shatter() +/obj/item/light/attack_obj(obj/O, mob/living/user) + ..() shatter() /obj/item/light/proc/shatter() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 203fbd9b734..ee0924578ff 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -307,6 +307,8 @@ return else if(istype(O, /obj/item/crowbar) && panel_open) default_deconstruction_crowbar(O) + else + return ..() /obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob) ..() diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 3e910a613b0..efdd6ab2681 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -9,6 +9,8 @@ var/global/list/rad_collectors = list() density = 1 req_access = list(access_engine_equip) // use_power = NO_POWER_USE + max_integrity = 350 + integrity_failure = 80 var/obj/item/tank/plasma/P = null var/last_power = 0 var/active = 0 @@ -93,16 +95,12 @@ var/global/list/rad_collectors = list() to_chat(user, "Access denied!") return 1 else - ..() - return 1 - - -/obj/machinery/power/rad_collector/ex_act(severity) - switch(severity) - if(2, 3) - eject() - return ..() + return ..() +/obj/machinery/power/rad_collector/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + eject() + stat |= BROKEN /obj/machinery/power/rad_collector/proc/eject() locked = 0 diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 89e37b88c5c..d28518ae32b 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -5,7 +5,8 @@ icon_state = "Contain_F" anchored = 1 density = 0 - unacidable = 1 + move_resist = INFINITY + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF use_power = NO_POWER_USE light_range = 4 layer = OBJ_LAYER + 0.1 @@ -24,14 +25,34 @@ shock_field(user) return 1 +/obj/machinery/field/containment/attackby(obj/item/W, mob/user, params) + shock(user) + return TRUE -/obj/machinery/field/containment/blob_act() - return 0 +/obj/machinery/field/containment/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BURN) + playsound(loc, 'sound/effects/empulse.ogg', 75, TRUE) + if(BRUTE) + playsound(loc, 'sound/effects/empulse.ogg', 75, TRUE) + +/obj/machinery/field/containment/blob_act(obj/structure/blob/B) + return FALSE /obj/machinery/field/containment/ex_act(severity) return 0 +/obj/machinery/field/containment/attack_animal(mob/living/simple_animal/M) + if(!FG1 || !FG2) + qdel(src) + return + if(ismegafauna(M)) + M.visible_message("[M] glows fiercely as the containment field flickers out!") + FG1.calc_power(INFINITY) //rip that 'containment' field + M.adjustHealth(-M.obj_damage) + else + ..() /obj/machinery/field/containment/Crossed(mob/mover, oldloc) if(isliving(mover)) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 9ba302ab19b..8977062c947 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -174,6 +174,15 @@ src.use_power = IDLE_POWER_USE */ return 1 +/obj/machinery/power/emitter/attack_animal(mob/living/simple_animal/M) + if(ismegafauna(M) && anchored) + state = 0 + anchored = FALSE + M.visible_message("[M] rips [src] free from its moorings!") + else + ..() + if(!anchored) + step(src, get_dir(M, src)) /obj/machinery/power/emitter/process() if(stat & (BROKEN)) @@ -333,10 +342,10 @@ if(exchange_parts(user, W)) return - default_deconstruction_crowbar(W) + if(default_deconstruction_crowbar(W)) + return - ..() - return + return ..() /obj/machinery/power/emitter/emag_act(var/mob/living/user as mob) if(!emagged) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index b2f172deb72..d6711be53e1 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -27,7 +27,9 @@ field_generator power level display anchored = 0 density = 1 use_power = NO_POWER_USE - armor = list(melee = 25, bullet = 10, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0) + max_integrity = 500 + //100% immune to lasers and energy projectiles since it absorbs their energy. + armor = list("melee" = 25, "bullet" = 10, "laser" = 100, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70) var/const/num_power_levels = 6 // Total number of power level icon has var/power_level = 0 var/active = FG_OFFLINE @@ -137,8 +139,17 @@ field_generator power level display /obj/machinery/field/generator/emp_act() return 0 +/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M) + if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED) + state = FG_UNSECURED + anchored = FALSE + M.visible_message("[M] rips [src] free from its moorings!") + else + ..() + if(!anchored) + step(src, get_dir(M, src)) -/obj/machinery/field/generator/blob_act() +/obj/machinery/field/generator/blob_act(obj/structure/blob/B) if(active) return 0 else diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 6b76b0c9dbb..c5494f372e7 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -7,6 +7,7 @@ anchored = 0 density = 1 use_power = NO_POWER_USE + resistance_flags = FIRE_PROOF var/energy = 0 var/creation_type = /obj/singularity diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm index befb2a4931a..327c29cebda 100644 --- a/code/modules/power/singularity/particle_accelerator/particle.dm +++ b/code/modules/power/singularity/particle_accelerator/particle.dm @@ -38,6 +38,10 @@ else if(istype(A, /obj/singularity)) var/obj/singularity/S = A S.energy += energy + else if(istype(A, /obj/structure/blob)) + var/obj/structure/blob/B = A + B.take_damage(energy * 0.6) + movement_range = 0 /obj/effect/accelerated_particle/Crossed(atom/A, oldloc) if(isliving(A)) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index d58d800b77e..2942acfdb35 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -62,7 +62,8 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin icon_state = "none" anchored = 0 density = 1 - armor = list(melee = 30, bullet = 20, laser = 20, energy = 0, bomb = 0, bio = 0, rad = 0) + max_integrity = 500 + armor = list("melee" = 30, "bullet" = 20, "laser" = 20, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 80) var/obj/machinery/particle_accelerator/control_box/master = null var/construction_state = 0 var/reference = null @@ -139,9 +140,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(istool(W)) if(process_tool_hit(W,user)) return - ..() - return + return..() +/obj/structure/particle_accelerator/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal (loc, 5) + qdel(src) /obj/structure/particle_accelerator/Move() . = ..() @@ -149,29 +153,9 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin master.toggle_power() investigate_log("was moved whilst active; it powered down.","singulo") - -/obj/structure/particle_accelerator/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(25)) - qdel(src) - return - else - return - - -/obj/structure/particle_accelerator/blob_act() +/obj/machinery/particle_accelerator/control_box/blob_act(obj/structure/blob/B) if(prob(50)) qdel(src) - return - /obj/structure/particle_accelerator/update_icon() switch(construction_state) @@ -325,31 +309,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(istool(W)) if(process_tool_hit(W,user)) return - ..() - return - -/obj/machinery/particle_accelerator/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(25)) - qdel(src) - return - else - return - - -/obj/machinery/particle_accelerator/blob_act() - if(prob(50)) - qdel(src) - return - + return ..() /obj/machinery/particle_accelerator/proc/update_state() return 0 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 12d6c8b831a..531bde2b000 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -8,7 +8,6 @@ layer = MASSIVE_OBJ_LAYER light_range = 6 appearance_flags = 0 - unacidable = 1 //Don't comment this out. var/current_size = 1 var/allowed_size = 1 var/contained = 1 //Are we going to move around? @@ -27,7 +26,7 @@ var/last_warning var/consumedSupermatter = 0 //If the singularity has eaten a supermatter shard and can go to stage six allow_spin = 0 - burn_state = LAVA_PROOF + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF /obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0) //CARN: admin-alert for chuckle-fuckery. @@ -76,7 +75,7 @@ /obj/singularity/Process_Spacemove() //The singularity stops drifting for no man! return 0 -/obj/singularity/blob_act(severity) +/obj/singularity/blob_act(obj/structure/blob/B) return /obj/singularity/ex_act(severity) @@ -96,6 +95,7 @@ /obj/singularity/bullet_act(obj/item/projectile/P) + qdel(P) return 0 //Will there be an impact? Who knows. Will we see it? No. @@ -275,7 +275,7 @@ desc = "[initial(desc)] It glows fiercely with inner fire." name = "supermatter-charged [initial(name)]" consumedSupermatter = 1 - light_range = 10 + set_light(10) return diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index a6a83d07f10..4773df11395 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -172,12 +172,12 @@ var/turf/tempLoc = get_step(src, reverse_direction(tempDir)) if(istype(tempLoc, /turf/space)) to_chat(user, "You can't build a terminal on space.") - return + return else if(istype(tempLoc)) if(tempLoc.intact) to_chat(user, "You must remove the floor plating first.") - return - + return + to_chat(user, "You start adding cable to the [src].") playsound(loc, C.usesound, 50, 1) @@ -224,7 +224,9 @@ return //crowbarring it ! - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() /obj/machinery/power/smes/disconnect_terminal() if(terminal) @@ -353,9 +355,6 @@ add_fingerprint(user) ui_interact(user) -/obj/machinery/power/smes/attack_alien(mob/living/carbon/alien/humanoid/user) - return - /obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) if(stat & BROKEN) return diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 1384c8d21e6..f3ca60effda 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -10,8 +10,9 @@ use_power = NO_POWER_USE idle_power_usage = 0 active_power_usage = 0 + max_integrity = 150 + integrity_failure = 50 var/id = 0 - var/health = 10 var/obscured = 0 var/sunfrac = 0 var/adir = SOUTH // actual dir @@ -49,49 +50,52 @@ S.anchored = 1 S.loc = src if(S.glass_type == /obj/item/stack/sheet/rglass) //if the panel is in reinforced glass - health *= 2 //this need to be placed here, because panels already on the map don't have an assembly linked to + max_integrity *= 2 //this need to be placed here, because panels already on the map don't have an assembly linked to + obj_integrity = max_integrity update_icon() /obj/machinery/power/solar/attackby(obj/item/W, mob/user, params) - - if(istype(W, /obj/item/crowbar)) + if(iscrowbar(W)) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar panel.", "You begin to take the glass off the solar panel...") if(do_after(user, 50 * W.toolspeed, target = src)) - var/obj/item/solar_assembly/S = locate() in src - if(S) - S.loc = src.loc - S.give_glass() playsound(src.loc, W.usesound, 50, 1) user.visible_message("[user] takes the glass off the solar panel.", "You take the glass off the solar panel.") - qdel(src) + deconstruct(TRUE) return - else if(W) - src.add_fingerprint(user) - src.health -= W.force - src.healthcheck() - ..() + return ..() +/obj/machinery/power/solar/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(stat & BROKEN) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 60, TRUE) + else + playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 100, TRUE) -/obj/machinery/power/solar/blob_act() - src.health-- - src.healthcheck() - return +/obj/machinery/power/solar/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE) + stat |= BROKEN + unset_control() + update_icon() - -/obj/machinery/power/solar/proc/healthcheck() - if(src.health <= 0) - if(!(stat & BROKEN)) - broken() +/obj/machinery/power/solar/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + var/obj/item/solar_assembly/S = locate() in src + if(S) + S.forceMove(loc) + S.give_glass(stat & BROKEN) else + playsound(src, "shatter", 70, TRUE) new /obj/item/shard(src.loc) new /obj/item/shard(src.loc) - qdel(src) - return - return - + qdel(src) /obj/machinery/power/solar/update_icon() ..() @@ -140,25 +144,6 @@ stat |= BROKEN unset_control() update_icon() - return - - -/obj/machinery/power/solar/ex_act(severity, target) - ..() - if(!QDELETED(src)) - switch(severity) - if(2) - if(prob(50) && broken()) - new /obj/item/shard(src.loc) - if(3) - if(prob(25) && broken()) - new /obj/item/shard(src.loc) - -/obj/machinery/power/solar/blob_act() - if(prob(75)) - broken() - src.density = 0 - /obj/machinery/power/solar/fake/New(var/turf/loc, var/obj/item/solar_assembly/S) ..(loc, S, 0) @@ -258,14 +243,14 @@ qdel(W) user.visible_message("[user] inserts the electronics into the solar assembly.", "You insert the electronics into the solar assembly.") return 1 + else if(istype(W, /obj/item/crowbar)) + new /obj/item/tracker_electronics(src.loc) + tracker = 0 + playsound(loc, W.usesound, 50, 1) + user.visible_message("[user] takes out the electronics from the solar assembly.", "You take out the electronics from the solar assembly.") + return 1 else - if(istype(W, /obj/item/crowbar)) - new /obj/item/tracker_electronics(src.loc) - tracker = 0 - playsound(loc, W.usesound, 50, 1) - user.visible_message("[user] takes out the electronics from the solar assembly.", "You take out the electronics from the solar assembly.") - return 1 - ..() + return ..() // // Solar Control Computer @@ -280,6 +265,8 @@ density = 1 use_power = IDLE_POWER_USE idle_power_usage = 250 + max_integrity = 200 + integrity_failure = 100 var/icon_screen = "solar" var/icon_keyboard = "power_key" var/id = 0 @@ -438,8 +425,23 @@ A.anchored = 1 qdel(src) else - src.attack_hand(user) - return + return ..() + +/obj/machinery/power/solar_control/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(stat & BROKEN) + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE) + else + playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE) + if(BURN) + playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE) + +/obj/machinery/power/solar_control/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE) + stat |= BROKEN + update_icon() /obj/machinery/power/solar_control/process() lastgen = gen @@ -512,23 +514,6 @@ stat |= BROKEN update_icon() - -/obj/machinery/power/solar_control/ex_act(severity, target) - ..() - if(!QDELETED(src)) - switch(severity) - if(2) - if(prob(50)) - broken() - if(3) - if(prob(25)) - broken() - -/obj/machinery/power/solar_control/blob_act() - if(prob(75)) - broken() - src.density = 0 - // // MISC // diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index c8aeacd900f..463121a7bdf 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -36,6 +36,7 @@ density = 1 anchored = 0 light_range = 4 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF var/gasefficency = 0.125 diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 80c38e0a9fe..058872cde6d 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -33,3 +33,44 @@ invisibility = 0 icon_state = "term" +/obj/machinery/power/proc/can_terminal_dismantle() + . = 0 + +/obj/machinery/power/apc/can_terminal_dismantle() + . = 0 + if(opened) + . = 1 + +/obj/machinery/power/smes/can_terminal_dismantle() + . = 0 + if(panel_open) + . = 1 + + +/obj/machinery/power/terminal/proc/dismantle(mob/living/user, obj/item/W) + if(isturf(loc)) + var/turf/T = loc + if(T.intact) + to_chat(user, "You must first expose the power terminal!") + return + + if(!master || master.can_terminal_dismantle()) + user.visible_message("[user.name] dismantles the power terminal from [master].", \ + "You begin to cut the cables...") + + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + if(do_after(user, 50*W.toolspeed, target = src)) + if(!master || master.can_terminal_dismantle()) + if(prob(50) && electrocute_mob(user, powernet, src, 1, TRUE)) + do_sparks(5, TRUE, master) + return + new /obj/item/stack/cable_coil(loc, 10) + to_chat(user, "You cut the cables and dismantle the power terminal.") + qdel(src) + + +/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user, params) + if(istype(W, /obj/item/wirecutters)) + dismantle(user, W) + else + return ..() \ No newline at end of file diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index cc564c98d4c..6f1e84da526 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -54,7 +54,7 @@ wires.Interact(user) else - ..() + return ..() /obj/machinery/power/tesla_coil/tesla_act(var/power) if(anchored && !panel_open) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 754479a69ca..7d7910b45d4 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -247,7 +247,7 @@ else if(closest_blob) continue - else if(istype(A, /obj/structure)) + else if(isstructure(A)) var/obj/structure/S = A var/dist = get_dist(source, A) if(dist <= zap_range && (dist < closest_dist || !closest_tesla_coil) && !S.being_shocked) diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 0b7f417b52e..5706eb6d3da 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -10,6 +10,8 @@ icon_state = "tracker" density = TRUE use_power = NO_POWER_USE + max_integrity = 250 + integrity_failure = 50 var/id = 0 var/sun_angle = 0 // sun angle as set by sun datum @@ -58,20 +60,34 @@ control.cdir = angle /obj/machinery/power/tracker/attackby(var/obj/item/W, var/mob/user) - - if(istype(W, /obj/item/crowbar)) + if(iscrowbar(W)) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.") if(do_after(user, 50 * W.toolspeed, target = src)) - var/obj/item/solar_assembly/S = locate() in src - if(S) - S.loc = src.loc - S.give_glass() playsound(src.loc, W.usesound, 50, 1) user.visible_message("[user] takes the glass off the tracker.") - qdel(src) // qdel + deconstruct(TRUE) return - ..() + return ..() + +/obj/machinery/power/tracker/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + playsound(loc, 'sound/effects/glassbr3.ogg', 100, TRUE) + stat |= BROKEN + unset_control() + +/obj/machinery/power/solar/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + var/obj/item/solar_assembly/S = locate() in src + if(S) + S.forceMove(loc) + S.give_glass(stat & BROKEN) + else + playsound(src, "shatter", 70, TRUE) + new /obj/item/shard(src.loc) + new /obj/item/shard(src.loc) + qdel(src) // Tracker Electronic diff --git a/code/modules/power/treadmill.dm b/code/modules/power/treadmill.dm index 5a1cc12c701..39c5d732128 100644 --- a/code/modules/power/treadmill.dm +++ b/code/modules/power/treadmill.dm @@ -106,7 +106,7 @@ speed = 0 update_icon() return - ..() + return ..() #undef BASE_MOVE_DELAY #undef MAX_SPEED diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 7b1764c354d..6f3c0856406 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -29,6 +29,7 @@ icon_state = "compressor" anchored = 1 density = 1 + resistance_flags = FIRE_PROOF var/obj/machinery/power/turbine/turbine var/datum/gas_mixture/gas_contained var/turf/simulated/inturf @@ -47,6 +48,7 @@ icon_state = "turbine" anchored = 1 density = 1 + resistance_flags = FIRE_PROOF var/opened = 0 var/obj/machinery/power/compressor/compressor var/turf/simulated/outturf @@ -126,7 +128,9 @@ if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() /obj/machinery/power/compressor/CanAtmosPass(turf/T) return !density @@ -281,7 +285,9 @@ if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() /obj/machinery/power/turbine/interact(mob/user) diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 8f2f0de5cb5..8635e08dfba 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -33,6 +33,7 @@ origin_tech = null ammo_x_offset = 3 selfcharge = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/gun/energy/laser/captain/scattershot name = "scatter shot laser rifle" diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 949ee16fa06..1a8a5afd1eb 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -55,6 +55,7 @@ force = 10 ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/disabler) ammo_x_offset = 4 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/gun/energy/gun/blueshield name = "advanced stun revolver" diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 081c57ddb79..7c881b3be2a 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -3,14 +3,13 @@ icon = 'icons/obj/projectiles.dmi' icon_state = "bullet" density = 0 - unacidable = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF anchored = 1 //There's a reason this is here, Mport. God fucking damn it -Agouri. Find&Fix by Pete. The reason this is here is to stop the curving of emitter shots. flags = ABSTRACT pass_flags = PASSTABLE mouse_opacity = MOUSE_OPACITY_TRANSPARENT hitsound = 'sound/weapons/pierce.ogg' var/hitsound_wall = "" - burn_state = LAVA_PROOF var/def_zone = "" //Aiming at var/mob/firer = null//Who shot it var/obj/item/ammo_casing/ammo_casing = null diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 3719ac81776..ac47b75bf68 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -6,6 +6,7 @@ icon_state = "dispenser" use_power = IDLE_POWER_USE idle_power_usage = 40 + resistance_flags = FIRE_PROOF | ACID_PROOF var/ui_title = "Chem Dispenser 5000" var/cell_type = /obj/item/stock_parts/cell/high var/obj/item/stock_parts/cell/cell @@ -55,7 +56,7 @@ /obj/machinery/chem_dispenser/mutagensaltpeter name = "botanical chemical dispenser" desc = "Creates and dispenses chemicals useful for botany." - can_deconstruct = FALSE + flags = NODECONSTRUCT dispensable_reagents = list( "mutagen", @@ -133,16 +134,16 @@ SSnanoui.update_uis(src) // update all UIs attached to src /obj/machinery/chem_dispenser/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) + if(severity < 3) + if(beaker) + beaker.ex_act(severity) + ..() -/obj/machinery/chem_dispenser/blob_act() - if(prob(50)) - qdel(src) +/obj/machinery/chem_dispenser/handle_atom_del(atom/A) + ..() + if(A == beaker) + beaker = null + overlays.Cut() /obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) // update the ui if it exists, returns null if no ui is passed/found diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 5f5bd8de2d4..9a94ec4a5e4 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -6,6 +6,7 @@ icon_state = "mixer0b" use_power = IDLE_POWER_USE idle_power_usage = 40 + resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/reagent_containers/beaker = null var/desired_temp = T0C var/on = FALSE @@ -74,6 +75,7 @@ to_chat(user, "You add the beaker to the machine!") icon_state = "mixer1b" SSnanoui.update_uis(src) + return if(default_deconstruction_screwdriver(user, "mixer0b", "mixer0b", I)) return @@ -86,6 +88,7 @@ eject_beaker() default_deconstruction_crowbar(I) return 1 + return ..() /obj/machinery/chem_heater/attack_hand(mob/user) ui_interact(user) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 48b76b0de98..90873705378 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -6,6 +6,7 @@ icon_state = "mixer0" use_power = IDLE_POWER_USE idle_power_usage = 20 + resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/reagent_containers/beaker = null var/obj/item/storage/pill_bottle/loaded_pill_bottle = null var/mode = 0 @@ -41,12 +42,21 @@ reagents.maximum_volume += B.reagents.maximum_volume /obj/machinery/chem_master/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) + if(severity < 3) + if(beaker) + beaker.ex_act(severity) + if(loaded_pill_bottle) + loaded_pill_bottle.ex_act(severity) + ..() + +/obj/machinery/chem_master/handle_atom_del(atom/A) + ..() + if(A == beaker) + beaker = null + reagents.clear_reagents() + update_icon() + else if(A == loaded_pill_bottle) + loaded_pill_bottle = null /obj/machinery/chem_master/update_icon() overlays.Cut() @@ -54,7 +64,7 @@ if(powered()) overlays += "waitlight" -/obj/machinery/chem_master/blob_act() +/obj/machinery/chem_master/blob_act(obj/structure/blob/B) if(prob(50)) qdel(src) diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 870ef8cf76a..ced53381c9f 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -8,6 +8,7 @@ circuit = /obj/item/circuitboard/pandemic use_power = IDLE_POWER_USE idle_power_usage = 20 + resistance_flags = ACID_PROOF var/temp_html = "" var/printing = null var/wait = null @@ -342,8 +343,6 @@ else if(istype(I, /obj/item/screwdriver)) if(beaker) - beaker.loc = get_turf(src) - ..() - return + beaker.forceMove(get_turf(src)) else - ..() + return ..() diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 1e3bcb92db5..41a0a747118 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -8,6 +8,7 @@ idle_power_usage = 5 active_power_usage = 100 pass_flags = PASSTABLE + resistance_flags = ACID_PROOF var/operating = 0 var/obj/item/reagent_containers/beaker = new /obj/item/reagent_containers/glass/beaker/large var/limit = null @@ -121,6 +122,11 @@ beaker.ex_act(severity) ..() +/obj/machinery/reagentgrinder/handle_atom_del(atom/A) + if(A == beaker) + beaker = null + update_icon() + /obj/machinery/reagentgrinder/update_icon() if(beaker) icon_state = "juicer1" diff --git a/code/modules/reagents/chemistry/reagents/blob.dm b/code/modules/reagents/chemistry/reagents/blob.dm index bca2cbd9067..903ac9fa350 100644 --- a/code/modules/reagents/chemistry/reagents/blob.dm +++ b/code/modules/reagents/chemistry/reagents/blob.dm @@ -10,6 +10,9 @@ /datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, volume, show_message, touch_protection) return round(volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume. +/datum/reagent/blob/proc/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) //when the blob takes damage, do this + return damage + /datum/reagent/blob/ripping_tendrils //does brute and a little stamina damage name = "Ripping Tendrils" description = "Deals High Brute damage, as well as Stamina damage." diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index f232d2d2066..b8ccede11bd 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -282,7 +282,7 @@ return ..() | update_flags -/datum/reagent/sacid +/datum/reagent/acid name = "Sulphuric acid" id = "sacid" description = "A strong mineral acid with the molecular formula H2SO4." @@ -290,13 +290,14 @@ color = "#00FF32" process_flags = ORGANIC | SYNTHETIC taste_description = "ACID" + var/acidpwr = 10 //the amount of protection removed from the armour -/datum/reagent/sacid/on_mob_life(mob/living/M) +/datum/reagent/acid/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE update_flags |= M.adjustFireLoss(1, FALSE) return ..() | update_flags -/datum/reagent/sacid/reaction_mob(mob/living/M, method = TOUCH, volume) +/datum/reagent/acid/reaction_mob(mob/living/M, method = TOUCH, volume) if(ishuman(M) && !isgrey(M)) var/mob/living/carbon/human/H = M if(method == TOUCH) @@ -325,13 +326,62 @@ H.adjustFireLoss(min(max(4, (volume - 10) * 2), 20)) H.emote("scream") -/datum/reagent/sacid/reaction_obj(obj/O, volume) - if((istype(O,/obj/item) || istype(O,/obj/structure/glowshroom)) && prob(40)) - if(!O.unacidable) - var/obj/effect/decal/cleanable/molten_object/I = new/obj/effect/decal/cleanable/molten_object(O.loc) - I.desc = "Looks like this was \an [O] some time ago." - O.visible_message("[O] melts.") - qdel(O) +/datum/reagent/acid/reaction_obj(obj/O, volume) + if(ismob(O.loc)) //handled in human acid_act() + return + volume = round(volume, 0.1) + O.acid_act(acidpwr, volume) + +/datum/reagent/acid/reaction_turf(turf/T, volume) + if(!istype(T)) + return + volume = round(volume, 0.1) + T.acid_act(acidpwr, volume) + +/datum/reagent/acid/facid + name = "Fluorosulfuric Acid" + id = "facid" + description = "Fluorosulfuric acid is a an extremely corrosive super-acid." + color = "#5050FF" + acidpwr = 42 + +/datum/reagent/acid/facid/on_mob_life(mob/living/M) + var/update_flags = STATUS_UPDATE_NONE + update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE) + return ..() | update_flags + +/datum/reagent/acid/facid/reaction_mob(mob/living/M, method = TOUCH, volume) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(method == TOUCH) + if(volume > 9) + if(!H.wear_mask && !H.head) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.disfigure() + H.adjustFireLoss(min(max(8, (volume - 5) * 3), 75)) + H.emote("scream") + return + else + var/melted_something = FALSE + if(H.wear_mask && !(H.wear_mask.resistance_flags & ACID_PROOF)) + qdel(H.wear_mask) + H.update_inv_wear_mask() + to_chat(H, "Your [H.wear_mask] melts away!") + melted_something = TRUE + + if(H.head && !(H.head.resistance_flags & ACID_PROOF)) + qdel(H.head) + H.update_inv_head() + to_chat(H, "Your [H.head] melts away!") + melted_something = TRUE + if(melted_something) + return + + if(volume >= 5) + H.emote("scream") + H.adjustFireLoss(min(max(8, (volume - 5) * 3), 75)) + to_chat(H, "The blueish acidic substance stings[volume < 5 ? " you, but isn't concentrated enough to harm you" : null]!") /datum/reagent/carpotoxin name = "Carpotoxin" @@ -635,62 +685,6 @@ M.emote("scream") return ..() | update_flags -/datum/reagent/facid - name = "Fluorosulfuric Acid" - id = "facid" - description = "Fluorosulfuric acid is a an extremely corrosive super-acid." - reagent_state = LIQUID - color = "#5050FF" - process_flags = ORGANIC | SYNTHETIC - taste_description = "ACID" - -/datum/reagent/facid/on_mob_life(mob/living/M) - var/update_flags = STATUS_UPDATE_NONE - update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE) - update_flags |= M.adjustFireLoss(1, FALSE) - return ..() | update_flags - -/datum/reagent/facid/reaction_mob(mob/living/M, method = TOUCH, volume) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(method == TOUCH) - if(volume > 9) - if(!H.wear_mask && !H.head) - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - affecting.disfigure() - H.adjustFireLoss(min(max(8, (volume - 5) * 3), 75)) - H.emote("scream") - return - else - var/melted_something = FALSE - if(H.wear_mask && !H.wear_mask.unacidable) - qdel(H.wear_mask) - H.update_inv_wear_mask() - to_chat(H, "Your [H.wear_mask] melts away!") - melted_something = TRUE - - if(H.head && !H.head.unacidable) - qdel(H.head) - H.update_inv_head() - to_chat(H, "Your [H.head] melts away!") - melted_something = TRUE - if(melted_something) - return - - if(volume >= 5) - H.emote("scream") - H.adjustFireLoss(min(max(8, (volume - 5) * 3), 75)) - to_chat(H, "The blueish acidic substance stings[volume < 5 ? " you, but isn't concentrated enough to harm you" : null]!") - -/datum/reagent/facid/reaction_obj(obj/O, volume) - if((istype(O, /obj/item) || istype(O, /obj/structure/glowshroom))) - if(!O.unacidable) - var/obj/effect/decal/cleanable/molten_object/I = new/obj/effect/decal/cleanable/molten_object(O.loc) - I.desc = "Looks like this was \an [O] some time ago." - O.visible_message("[O] melts.") - qdel(O) - /datum/reagent/initropidril name = "Initropidril" id = "initropidril" diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index ef836462543..e42d53f3f5b 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -24,8 +24,11 @@ /datum/reagent/water/reaction_mob(mob/living/M, method = TOUCH, volume) M.water_act(volume, water_temperature, src, method) -/datum/reagent/water/reaction_turf(turf/simulated/T, volume) +/datum/reagent/water/reaction_turf(turf/T, volume) T.water_act(volume, water_temperature, src) + var/obj/effect/acid/A = (locate(/obj/effect/acid) in T) + if(A) + A.acid_level = max(A.acid_level - volume* 50, 0) /datum/reagent/water/reaction_obj(obj/O, volume) O.water_act(volume, water_temperature, src) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index f9077aafab5..41f9524874b 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -45,7 +45,8 @@ obj/item/reagent_containers/proc/add_initial_reagents() if(reagents) for(var/datum/reagent/R in reagents.reagent_list) R.on_ex_act() - ..() + if(!QDELETED(src)) + ..() /obj/item/reagent_containers/attack_self(mob/user) if(has_lid) diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index edf1624ea3a..0114a7bdc76 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -13,6 +13,7 @@ volume = 50 container_type = OPENCONTAINER has_lid = TRUE + resistance_flags = ACID_PROOF var/label_text = "" // the fucking asshole who designed this can go die in a fire - Iamgoofball @@ -343,8 +344,9 @@ amount_per_transfer_from_this = 20 possible_transfer_amounts = list(5,10,15,20,25,30,50,80,100,120) volume = 120 - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 50) //Weak melee protection, because you can wear it on your head slot_flags = SLOT_HEAD + resistance_flags = NONE container_type = OPENCONTAINER /obj/item/reagent_containers/glass/bucket/wooden @@ -352,7 +354,8 @@ icon_state = "woodbucket" item_state = "woodbucket" materials = null - burn_state = FLAMMABLE + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50) + resistance_flags = FLAMMABLE /obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot) ..() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 0c2f20a8e8d..3b71a5bd741 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -11,6 +11,7 @@ amount_per_transfer_from_this = 5 volume = 30 possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30) + resistance_flags = ACID_PROOF container_type = OPENCONTAINER slot_flags = SLOT_BELT var/ignore_flags = FALSE @@ -78,6 +79,7 @@ /obj/item/reagent_containers/hypospray/CMO list_reagents = list("omnizine" = 30) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/item/reagent_containers/hypospray/combat name = "combat stimulant injector" diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm index 5dee4196732..44fa7a722d1 100644 --- a/code/modules/reagents/reagent_containers/iv_bag.dm +++ b/code/modules/reagents/reagent_containers/iv_bag.dm @@ -12,6 +12,7 @@ possible_transfer_amounts = list(1,5,10,15,20,25,30,50) // Everything above 10 is NOT usable on a person and is instead used for transfering to other containers amount_per_transfer_from_this = 1 container_type = OPENCONTAINER + resistance_flags = ACID_PROOF var/label_text var/mode = IV_INJECT var/mob/living/carbon/human/injection_target diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 41fa898905d..c1e4b89e774 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -7,15 +7,21 @@ anchored = 0 pressure_resistance = 2*ONE_ATMOSPHERE container_type = DRAINABLE | AMOUNT_VISIBLE - + max_integrity = 300 var/tank_volume = 1000 //In units, how much the dispenser can hold var/reagent_id = "water" //The ID of the reagent that the dispenser uses var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation +/obj/structure/reagent_dispensers/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + if(. && obj_integrity > 0) + if(tank_volume && (damage_flag == "bullet" || damage_flag == "laser")) + boom() + /obj/structure/reagent_dispensers/attackby(obj/item/I, mob/user, params) if(I.is_refillable()) return FALSE //so we can refill them via their afterattack. - . = ..() + return ..() /obj/structure/reagent_dispensers/New() create_reagents(tank_volume) @@ -34,21 +40,12 @@ chem_splash(loc, 5, list(reagents)) qdel(src) -/obj/structure/reagent_dispensers/ex_act(severity) - switch(severity) - if(1) +/obj/structure/reagent_dispensers/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!disassembled) boom() - if(2) - if(prob(50)) - boom() - if(3) - if(prob(5)) - boom() - -/obj/structure/reagent_dispensers/blob_act() - if(prob(50)) - boom() - + else + qdel(src) //Dispensers /obj/structure/reagent_dispensers/watertank @@ -101,7 +98,7 @@ reagents.set_reagent_temp(1000) //uh-oh qdel(src) -/obj/structure/reagent_dispensers/fueltank/blob_act() +/obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B) boom() /obj/structure/reagent_dispensers/fueltank/ex_act() @@ -263,6 +260,8 @@ user.visible_message("[user] has secured [src]'s floor casters.", \ "You have secured [src]'s floor casters.") anchored = 1 + return + return ..() /obj/structure/reagent_dispensers/beerkeg name = "beer keg" @@ -270,9 +269,10 @@ icon_state = "beer" reagent_id = "beer" -/obj/structure/reagent_dispensers/beerkeg/blob_act() +/obj/structure/reagent_dispensers/beerkeg/blob_act(obj/structure/blob/B) explosion(loc, 0, 3, 5, 7, 10) - qdel(src) + if(!QDELETED(src)) + qdel(src) /obj/structure/reagent_dispensers/beerkeg/nuke name = "Nanotrasen-brand nuclear fission explosive" diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 09fd3dcdba3..0c1c775c1f9 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -11,6 +11,7 @@ density = 0 pressure_resistance = 5*ONE_ATMOSPHERE level = 2 + max_integrity = 200 var/ptype = PIPE_DISPOSALS_STRAIGHT //Use the defines var/base_state var/dpdir = 0 // directions as disposalpipe @@ -187,7 +188,7 @@ update() return - + if(ptype in list(PIPE_DISPOSALS_BIN, PIPE_DISPOSALS_OUTLET, PIPE_DISPOSALS_CHUTE)) // Disposal or outlet var/obj/structure/disposalpipe/trunk/CP = locate() in T if(!CP) // There's no trunk diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 2182df4c9a8..8efd181ac1a 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -15,7 +15,9 @@ anchored = 1 density = 1 on_blueprints = TRUE - armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100) + armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) + max_integrity = 200 + resistance_flags = FIRE_PROOF var/datum/gas_mixture/air_contents // internal reservoir var/mode = 1 // item mode 0=off 1=charging 2=charged var/flush = 0 // true if flush handle is pulled @@ -71,6 +73,11 @@ trunk.remove_trunk_links() return ..() +/obj/machinery/disposal/singularity_pull(S, current_size) + ..() + if(current_size >= STAGE_FIVE) + deconstruct() + /obj/machinery/disposal/Initialize() // this will get a copy of the air turf and take a SEND PRESSURE amount of air from it ..() @@ -162,7 +169,7 @@ if(!user.drop_item()) return if(I) - I.loc = src + I.forceMove(src) to_chat(user, "You place \the [I] into the [src].") for(var/mob/M in viewers(src)) @@ -505,6 +512,7 @@ /obj/structure/disposalholder invisibility = 101 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/datum/gas_mixture/gas = null // gas used to flush, will appear at exit point var/active = 0 // true if the holder is moving, otherwise inactive dir = 0 @@ -679,7 +687,9 @@ var/dpdir = 0 // bitmask of pipe directions dir = 0 // dir will contain dominant direction for junction pipes var/health = 10 // health points 0-10 - armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100) + max_integrity = 200 + armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) + damage_deflection = 10 layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes var/base_icon_state // initial icon state on map @@ -711,8 +721,9 @@ return ..() /obj/structure/disposalpipe/singularity_pull(S, current_size) + ..() if(current_size >= STAGE_FIVE) - qdel(src) + deconstruct() // returns the direction of the next pipe object, given the entrance dir // by default, returns the bitmask of remaining directions @@ -818,20 +829,18 @@ H.vent_gas(T) // all gas vent to turf qdel(H) - return - // call to break the pipe // will expel any holder inside at the time // then delete the pipe // remains : set to leave broken pipe pieces in place -/obj/structure/disposalpipe/proc/broken(var/remains = 0) +/obj/structure/disposalpipe/proc/broken(remains = 0) if(remains) for(var/D in cardinal) if(D & dpdir) var/obj/structure/disposalpipe/broken/P = new(src.loc) - P.dir = D + P.setDir(D) - src.invisibility = 101 // make invisible (since we won't delete the pipe immediately) + invisibility = 101 // make invisible (since we won't delete the pipe immediately) var/obj/structure/disposalholder/H = locate() in src if(H) // holder was present @@ -854,23 +863,17 @@ spawn(2) // delete pipe after 2 ticks to ensure expel proc finished qdel(src) - // pipe affected by explosion /obj/structure/disposalpipe/ex_act(severity) - switch(severity) - if(1.0) + if(1) broken(0) - return - if(2.0) - health -= rand(5,15) + if(2) + health -= rand(5, 15) healthcheck() - return - if(3.0) - health -= rand(0,15) + if(3) + health -= rand(0, 15) healthcheck() - return - // test health for brokenness /obj/structure/disposalpipe/proc/healthcheck() diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index ae2d3da87ae..fd94341d93c 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -10,6 +10,18 @@ var/giftwrapped = 0 var/sortTag = 0 +/obj/structure/bigDelivery/Destroy() + var/turf/T = get_turf(src) + for(var/atom/movable/AM in contents) + AM.forceMove(T) + return ..() + +/obj/structure/bigDelivery/ex_act(severity) + for(var/atom/movable/AM in contents) + AM.ex_act() + CHECK_TICK + ..() + /obj/structure/bigDelivery/attack_hand(mob/user as mob) playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1) if(wrapped) @@ -64,6 +76,8 @@ new /obj/item/c_tube( get_turf(user) ) else to_chat(user, "You need more paper.") + else + return ..() /obj/item/smallDelivery name = "small parcel" @@ -75,6 +89,12 @@ var/giftwrapped = 0 var/sortTag = 0 +/obj/item/smallDelivery/ex_act(severity) + for(var/atom/movable/AM in contents) + AM.ex_act() + CHECK_TICK + ..() + /obj/item/smallDelivery/attack_self(mob/user as mob) if(wrapped && wrapped.loc) //sometimes items can disappear. For example, bombs. --rastaf0 wrapped.loc = user.loc @@ -123,6 +143,8 @@ new /obj/item/c_tube( get_turf(user) ) else to_chat(user, "You need more paper.") + else + return ..() /obj/item/stack/packageWrap name = "package wrapper" @@ -132,7 +154,7 @@ flags = NOBLUDGEON amount = 25 max_amount = 25 - burn_state = FLAMMABLE + resistance_flags = FLAMMABLE /obj/item/stack/packageWrap/afterattack(var/obj/target as obj, mob/user as mob, proximity) if(!proximity) return diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 57a0eaef7da..2ddab9b2f12 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -65,11 +65,6 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). T += M.rating efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas -/obj/machinery/r_n_d/circuit_imprinter/blob_act() - if(prob(50)) - qdel(src) - - /obj/machinery/r_n_d/circuit_imprinter/proc/check_mat(datum/design/being_built, var/M) var/list/all_materials = being_built.reagents_list + being_built.materials diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 908f0bef139..abb20ac091a 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -97,12 +97,11 @@ /obj/machinery/r_n_d/server/ex_act(severity) griefProtection() - ..() + return ..() - -/obj/machinery/r_n_d/server/blob_act() +/obj/machinery/r_n_d/server/blob_act(obj/structure/blob/B) griefProtection() - ..() + return ..() // Backup files to CentComm to help admins recover data after griefer attacks /obj/machinery/r_n_d/server/proc/griefProtection() @@ -149,6 +148,8 @@ griefProtection() default_deconstruction_crowbar(O) return 1 + else + return ..() /obj/machinery/r_n_d/server/attack_hand(mob/user as mob) if(disabled) diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index f6df6ece19b..db6a195fe2d 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -131,7 +131,7 @@ monkeys++ to_chat(user, "You feed [O] to [src]. It now has [monkeys] monkey cubes stored.") qdel(O) - return + return else if(istype(O, /obj/item/slimepotion/slime)) var/replaced = FALSE if(user.drop_item()) @@ -140,7 +140,7 @@ replaced = TRUE current_potion = O to_chat(user, "You load [O] in the console's potion slot[replaced ? ", replacing the one that was there before" : ""].") - return + return else if(istype(O, /obj/item/storage/bag)) var/obj/item/storage/P = O var/loaded = 0 @@ -159,7 +159,7 @@ connected_recycler = I.buffer connected_recycler.connected += src return - ..() + return ..() /datum/action/innate/slime_place name = "Place Slimes" diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index eacbd00ee5d..c71c3f6f8d8 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -393,6 +393,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle17" origin_tech = "biotech=5" + resistance_flags = FIRE_PROOF var/uses = 3 /obj/item/slimepotion/fireproof/afterattack(obj/item/clothing/C, mob/user, proximity_flag) @@ -413,7 +414,7 @@ C.color = "#000080" C.max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT C.heat_protection = C.body_parts_covered - C.burn_state = FIRE_PROOF + C.resistance_flags |= FIRE_PROOF uses -- if(!uses) qdel(src) @@ -433,7 +434,7 @@ layer = FLY_LAYER pixel_x = -64 pixel_y = -64 - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF mouse_opacity = MOUSE_OPACITY_TRANSPARENT var/mob/living/immune = list() // the one who creates the timestop is immune var/list/stopped_atoms = list() diff --git a/code/modules/ruins/lavalandruin_code/ash_walker_den.dm b/code/modules/ruins/lavalandruin_code/ash_walker_den.dm index 168fde07e7d..e95a5381b99 100644 --- a/code/modules/ruins/lavalandruin_code/ash_walker_den.dm +++ b/code/modules/ruins/lavalandruin_code/ash_walker_den.dm @@ -6,10 +6,11 @@ icon = 'icons/mob/nest.dmi' icon_state = "ash_walker_nest" + move_resist = INFINITY // just killing it tears a massive hole in the ground, let's not move it anchored = TRUE density = TRUE - burn_state = LAVA_PROOF + resistance_flags = FIRE_PROOF | LAVA_PROOF max_integrity = 200 var/faction = list("ashwalker") diff --git a/code/modules/ruins/lavalandruin_code/dead_ratvar.dm b/code/modules/ruins/lavalandruin_code/dead_ratvar.dm index fa30c9eb273..4c37572c989 100644 --- a/code/modules/ruins/lavalandruin_code/dead_ratvar.dm +++ b/code/modules/ruins/lavalandruin_code/dead_ratvar.dm @@ -12,9 +12,10 @@ bound_width = 416 bound_height = 64 pixel_y = -10 - unacidable = TRUE - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + +/obj/effect/clockwork + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF // An "overlay" used by clockwork walls and floors to appear normal to mesons. /obj/effect/clockwork/overlay @@ -30,6 +31,7 @@ /obj/effect/clockwork/overlay/singularity_act() return + /obj/effect/clockwork/overlay/singularity_pull() return @@ -75,11 +77,9 @@ icon_state = "wall_gear" climbable = TRUE max_integrity = 100 - can_deconstruct = TRUE anchored = TRUE density = TRUE - unacidable = TRUE - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF | ACID_PROOF desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, or just climb over it." /obj/structure/clockwork/wall_gear/displaced @@ -140,18 +140,21 @@ return ..() /obj/structure/clockwork/wall_gear/deconstruct(disassembled = TRUE) - if(can_deconstruct && disassembled) + if(!(flags & NODECONSTRUCT) && disassembled) new /obj/item/stack/tile/brass(loc, 3) return ..() +//The base clockwork item. Can have an alternate desc and will show up in the list of clockwork objects. +/obj/item/clockwork + resistance_flags = FIRE_PROOF | ACID_PROOF + //Shards of Alloy, suitable only as a source of power for a replica fabricator. /obj/item/clockwork/alloy_shards name = "replicant alloy shards" desc = "Broken shards of some oddly malleable metal. They occasionally move and seem to glow." icon = 'icons/obj/clockwork_objects.dmi' icon_state = "alloy_shards" - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/randomsinglesprite = FALSE var/randomspritemax = 2 var/sprite_shift = 9 @@ -213,6 +216,10 @@ desc = "A dented and scratched gear. It's very heavy." icon_state = "pinion_lock" +//Components: Used in scripture. +/obj/item/clockwork/component + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + /obj/item/clockwork/component/belligerent_eye name = "belligerent eye" desc = "A brass construct with a rotating red center. It's as though it's looking for something to hurt." diff --git a/code/modules/ruins/lavalandruin_code/puzzle.dm b/code/modules/ruins/lavalandruin_code/puzzle.dm index 44383f11a0a..dcd72b44c64 100644 --- a/code/modules/ruins/lavalandruin_code/puzzle.dm +++ b/code/modules/ruins/lavalandruin_code/puzzle.dm @@ -34,7 +34,7 @@ return get_step(center,SOUTH) if(9) return get_step(center,SOUTHEAST) - + /obj/effect/sliding_puzzle/Initialize(mapload) ..() return INITIALIZE_HINT_LATELOAD @@ -56,7 +56,7 @@ /obj/effect/sliding_puzzle/proc/validate() if(finished) return - + if(elements.len < 8) //Someone broke it qdel(src) @@ -86,7 +86,7 @@ shake_camera(M, COLLAPSE_DURATION , 1) for(var/obj/structure/puzzle_element/E in elements) E.collapse() - + dispense_reward() /obj/effect/sliding_puzzle/proc/dispense_reward() @@ -103,7 +103,7 @@ for(var/j in i to current_ordering.len) if(current_ordering[j] < checked_value) swap_tally++ - + return swap_tally % 2 == 0 //swap two tiles in same row @@ -113,13 +113,13 @@ if(empty_tile_id == 1 || empty_tile_id == 2) //Can't swap with empty one so just grab some in second row first_tile_id = 4 other_tile_id = 5 - + var/turf/T1 = get_turf_for_id(first_tile_id) var/turf/T2 = get_turf_for_id(other_tile_id) - + var/obj/structure/puzzle_element/E1 = locate() in T1 var/obj/structure/puzzle_element/E2 = locate() in T2 - + E1.forceMove(T2) E2.forceMove(T1) @@ -340,7 +340,7 @@ for(var/atom/movable/AM in things_to_throw) var/throwtarget = get_edge_target_turf(T, get_dir(T, get_step_away(AM, T))) AM.throw_at(throwtarget, 2, 3) - + //Create puzzle itself cube.prisoner = prisoner cube.setup() diff --git a/code/modules/ruins/lavalandruin_code/syndicate_base.dm b/code/modules/ruins/lavalandruin_code/syndicate_base.dm index 062d9d9a43b..57a5ab5c7f1 100644 --- a/code/modules/ruins/lavalandruin_code/syndicate_base.dm +++ b/code/modules/ruins/lavalandruin_code/syndicate_base.dm @@ -18,7 +18,7 @@ /obj/item/grenade/chem_grenade/adv_release = 5, /obj/item/reagent_containers/food/drinks/bottle/holywater = 1) product_slogans = "It's not pyromania if you're getting paid!;You smell that? Plasma, son. Nothing else in the world smells like that.;I love the smell of Plasma in the morning." - burn_state = FIRE_PROOF + resistance_flags = FIRE_PROOF // Spawners /obj/effect/mob_spawn/human/lavaland_syndicate diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm index 869c280a477..5a65a536b46 100644 --- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm @@ -11,9 +11,7 @@ density = TRUE pixel_x = -32 pixel_y = -32 - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF light_range = 8 light_color = LIGHT_COLOR_LAVA var/open = FALSE @@ -214,9 +212,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) anchored = TRUE pixel_x = -64 pixel_y = -40 - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/open = FALSE var/static/mutable_appearance/top_overlay @@ -247,9 +243,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate) icon_state = "pristine_tile1" layer = ABOVE_OPEN_TURF_LAYER anchored = TRUE - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/tile_key = "pristine_tile" var/tile_random_sprite_max = 24 var/fall_on_cross = STABLE //If the tile has some sort of effect when crossed diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm index 834d3ddc907..e1e3104e643 100644 --- a/code/modules/security_levels/keycard authentication.dm +++ b/code/modules/security_levels/keycard authentication.dm @@ -23,6 +23,7 @@ power_channel = ENVIRON req_access = list(access_keycard_auth) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/machinery/keycard_auth/attack_ai(mob/user as mob) to_chat(user, "The station AI is not to interact with these devices.") @@ -47,6 +48,8 @@ broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices else to_chat(user, "Access denied.") + return + return ..() /obj/machinery/keycard_auth/power_change() if(powered(ENVIRON)) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 783f8203857..820f752aa5d 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -9,7 +9,7 @@ //icon = 'icons/dirsquare.dmi' icon_state = "pinonfar" - unacidable = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF anchored = 1 var/id @@ -837,6 +837,7 @@ var/cooldown //prevents spamming admins possible_destinations = "ferry_home" admin_controlled = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list) if(..()) diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index 0ec9e614110..5c0be6a78a5 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -8,7 +8,7 @@ circuit = /obj/item/circuitboard/shuttle/syndicate shuttleId = "syndicate" possible_destinations = "syndicate_away;syndicate_z5;syndicate_z3;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s;syndicate_custom" - resistance_flags = INDESTRUCTIBLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/challenge = FALSE var/moved = FALSE diff --git a/code/modules/spacepods/construction.dm b/code/modules/spacepods/construction.dm index 95c2f31ca56..a6a7ddb0927 100644 --- a/code/modules/spacepods/construction.dm +++ b/code/modules/spacepods/construction.dm @@ -25,8 +25,7 @@ /obj/structure/spacepod_frame/attackby(obj/item/W as obj, mob/user as mob, params) if(!construct || !construct.action(W, user)) - ..() - return + return ..() /obj/structure/spacepod_frame/attack_hand() return diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index d509b4f745c..c52eca0b342 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -159,7 +159,7 @@ enabled = 1 user.show_message("You enable \the [src]'s power.") else - ..() + return ..() /* /////////////////////////////////////// @@ -272,4 +272,4 @@ else to_chat(user, "This key is already ground!") else - ..() + return ..() diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index be21fe0ef9a..32239466b82 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -19,7 +19,7 @@ opacity = 0 anchored = 1 - unacidable = 1 + resistance_flags = ACID_PROOF layer = 3.9 infra_luminosity = 15 @@ -204,27 +204,26 @@ /obj/spacepod/AllowDrop() return TRUE -/obj/spacepod/blob_act() +/obj/spacepod/blob_act(obj/structure/blob/B) deal_damage(30) - return /obj/spacepod/attack_animal(mob/living/simple_animal/user) if((user.a_intent == INTENT_HELP && user.ckey) || user.melee_damage_upper == 0) user.custom_emote(1, "[user.friendly] [src].") + return FALSE else var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) deal_damage(damage) visible_message("[user] [user.attacktext] [src]!") user.create_attack_log("attacked [src.name]") - return + return TRUE -/obj/spacepod/attack_alien(mob/user as mob) +/obj/spacepod/attack_alien(mob/user) user.changeNext_move(CLICK_CD_MELEE) deal_damage(15) playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) to_chat(user, "You slash at [src]!") visible_message("The [user] slashes at [src.name]'s armor!") - return /obj/spacepod/proc/deal_damage(var/damage) var/oldhealth = health diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 219753d4524..840b2ed5749 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -86,7 +86,7 @@ holder = item holder.flags |= NODROP - holder.unacidable = 1 + holder.resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF holder.slot_flags = null holder.w_class = WEIGHT_CLASS_HUGE holder.materials = null diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 7527ed19f92..98ed11672fb 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -191,7 +191,7 @@ w_class = WEIGHT_CLASS_TINY parent_organ = "head" slot = "brain_tumor" - health = 3 + max_integrity = 3 /obj/item/organ/internal/shadowtumor/New() ..() @@ -205,11 +205,11 @@ if(isturf(loc)) var/turf/T = loc var/light_count = T.get_lumcount()*10 - if(light_count > 4 && health > 0) //Die in the light - health-- - else if(light_count < 2 && health < 3) //Heal in the dark - health++ - if(health <= 0) + if(light_count > 4 && obj_integrity > 0) //Die in the light + obj_integrity-- + else if(light_count < 2 && obj_integrity < max_integrity) //Heal in the dark + obj_integrity++ + if(obj_integrity <= 0) visible_message("[src] collapses in on itself!") qdel(src) @@ -223,7 +223,6 @@ w_class = WEIGHT_CLASS_TINY parent_organ = "head" slot = "brain_tumor" - health = 3 var/organhonked = 0 var/suffering_delay = 900 var/datum/component/waddle @@ -297,7 +296,6 @@ w_class = WEIGHT_CLASS_TINY parent_organ = "groin" slot = "honk_bladder" - health = 3 var/datum/component/squeak /obj/item/organ/internal/honkbladder/insert(mob/living/carbon/M, special = 0) diff --git a/code/modules/surgery/organs/subtypes/skrell.dm b/code/modules/surgery/organs/subtypes/skrell.dm index 0443fa4f49f..3c1e3cd40ce 100644 --- a/code/modules/surgery/organs/subtypes/skrell.dm +++ b/code/modules/surgery/organs/subtypes/skrell.dm @@ -46,7 +46,8 @@ . = ..() /obj/item/organ/internal/headpocket/proc/empty_contents() - pocket.empty_object_contents(0, get_turf(owner)) + for(var/obj/item/I in pocket.contents) + pocket.remove_from_storage(I, get_turf(owner)) /obj/item/organ/internal/headpocket/proc/get_contents() return pocket.contents diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 46e4ee0c18b..4be4dba9aca 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -138,6 +138,7 @@ icon = 'icons/obj/surgery.dmi' icon_state = "saw3" hitsound = 'sound/weapons/circsawhit.ogg' + throwhitsound = 'sound/weapons/pierce.ogg' flags = CONDUCT force = 15.0 sharp = 1 diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 8ff937eea6f..5e9de355664 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -45,11 +45,14 @@ var/obj/item/multitool/M = I M.buffer = src to_chat(user, "You save the data in the [I.name]'s buffer.") + return if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() //CARGO TELEPAD// @@ -87,6 +90,8 @@ new /obj/item/stack/sheet/metal(get_turf(src)) new /obj/item/stack/sheet/glass(get_turf(src)) qdel(src) + else + return ..() ///TELEPAD CALLER/// /obj/item/telepad_beacon diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 0f737823d5b..2835a445f1c 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -73,7 +73,7 @@ to_chat(user, "You upload the data from the [W.name]'s buffer.") updateUsrDialog() else - ..() + return ..() /obj/machinery/computer/telescience/emag_act(user as mob) if(!emagged) diff --git a/code/modules/tram/tram.dm b/code/modules/tram/tram.dm index 0f80c99405e..6ef45b8cc44 100644 --- a/code/modules/tram/tram.dm +++ b/code/modules/tram/tram.dm @@ -135,13 +135,13 @@ tram += src /obj/tram/tram_controller/proc/check_validity(var/atom/movable/AM) - if(!AM) + if(!AM) return FALSE - if(!AM.simulated) + if(!AM.simulated) return FALSE - if(is_type_in_list(AM, blacklist)) + if(is_type_in_list(AM, blacklist)) return FALSE if(AM.anchored) @@ -237,25 +237,6 @@ gen_collision() //Generate collision again return 1 -//////////////////////DAMAGE PROCS -/obj/tram/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - return - if(2.0) - if(prob(50)) - qdel(src) - return - if(3.0) - if(prob(25)) - qdel(src) - return - -/obj/tram/blob_act() - if(prob(50)) - qdel(src) - /obj/tram/attack_animal(var/mob/living/simple_animal/M as mob) if(M.melee_damage_upper == 0) return if(prob(M.melee_damage_upper)) diff --git a/code/modules/vehicle/atv.dm b/code/modules/vehicle/atv.dm index bd81553dbd7..39d3e7e4612 100644 --- a/code/modules/vehicle/atv.dm +++ b/code/modules/vehicle/atv.dm @@ -3,7 +3,10 @@ desc = "An all-terrain vehicle built for traversing rough terrain with ease. One of the few old-earth technologies that are still relevant on most planet-bound outposts." icon = 'icons/vehicles/4wheeler.dmi' icon_state = "atv" + max_integrity = 150 + armor = list("melee" = 50, "bullet" = 25, "laser" = 20, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) key_type = /obj/item/key + integrity_failure = 70 generic_pixel_x = 0 generic_pixel_y = 4 vehicle_move_delay = 1 diff --git a/code/modules/vehicle/secway.dm b/code/modules/vehicle/secway.dm index 85117222247..48821a6e630 100644 --- a/code/modules/vehicle/secway.dm +++ b/code/modules/vehicle/secway.dm @@ -2,7 +2,10 @@ name = "secway" desc = "A brave security cyborg gave its life to help you look like a complete tool." icon_state = "secway" + max_integrity = 100 + armor = list("melee" = 20, "bullet" = 15, "laser" = 10, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) key_type = /obj/item/key/security + integrity_failure = 50 generic_pixel_x = 0 generic_pixel_y = 4 vehicle_move_delay = 1 diff --git a/code/modules/vehicle/vehicle.dm b/code/modules/vehicle/vehicle.dm index edc6dc63a2e..cbaa3dc56e5 100644 --- a/code/modules/vehicle/vehicle.dm +++ b/code/modules/vehicle/vehicle.dm @@ -8,7 +8,8 @@ anchored = 0 can_buckle = TRUE buckle_lying = FALSE - armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0) + max_integrity = 300 + armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 60) var/key_type var/held_key_type //Similar to above, but the vehicle needs the key in hands as opposed to inserted into the ignition var/obj/item/key/inserted_key @@ -39,6 +40,16 @@ . += "Put a key inside it by clicking it with the key." else . += "Alt-click [src] to remove the key." + if(resistance_flags & ON_FIRE) + . += "It's on fire!" + var/healthpercent = obj_integrity/max_integrity * 100 + switch(healthpercent) + if(50 to 99) + . += "It looks slightly damaged." + if(25 to 50) + . += "It appears heavily damaged." + if(0 to 25) + . += "It's falling apart!" /obj/vehicle/attackby(obj/item/I, mob/user, params) if(key_type && !is_key(inserted_key) && is_key(I)) diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index 91693668637..c8214ed8283 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -5,9 +5,7 @@ sustain the zombie, forcing open airlock doors and opening \ child-safe caps on bottles." flags = NODROP|ABSTRACT|DROPDEL - resistance_flags = INDESTRUCTIBLE - burn_state = LAVA_PROOF - unacidable = TRUE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF icon = 'icons/effects/blood.dmi' icon_state = "bloodhand_left" var/icon_left = "bloodhand_left" diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index 7e1bb227ef3..bedd145d308 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/mob/blob.dmi b/icons/mob/blob.dmi index 809c68bd59b..63633844b83 100644 Binary files a/icons/mob/blob.dmi and b/icons/mob/blob.dmi differ diff --git a/icons/obj/power.dmi b/icons/obj/power.dmi index 8ab87cba4bd..7eb6484038c 100644 Binary files a/icons/obj/power.dmi and b/icons/obj/power.dmi differ diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index c33efec0f5f..a912acc2fdf 100755 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ diff --git a/paradise.dme b/paradise.dme index 4bf862793c8..4d1a6500e33 100644 --- a/paradise.dme +++ b/paradise.dme @@ -45,6 +45,7 @@ #include "code\__DEFINES\machines.dm" #include "code\__DEFINES\math.dm" #include "code\__DEFINES\MC.dm" +#include "code\__DEFINES\mecha.dm" #include "code\__DEFINES\medal.dm" #include "code\__DEFINES\misc.dm" #include "code\__DEFINES\mobs.dm" @@ -200,6 +201,7 @@ #include "code\controllers\master.dm" #include "code\controllers\subsystem.dm" #include "code\controllers\verbs.dm" +#include "code\controllers\subsystem\acid.dm" #include "code\controllers\subsystem\afk.dm" #include "code\controllers\subsystem\air.dm" #include "code\controllers\subsystem\alarm.dm" @@ -1051,7 +1053,6 @@ #include "code\game\objects\structures\janicart.dm" #include "code\game\objects\structures\kitchen_spike.dm" #include "code\game\objects\structures\ladders.dm" -#include "code\game\objects\structures\lamarr_cage.dm" #include "code\game\objects\structures\lattice.dm" #include "code\game\objects\structures\loom.dm" #include "code\game\objects\structures\mineral_doors.dm"