diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm index e1f874254d4..dccf2a0dd23 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_ash_walker1.dmm @@ -187,7 +187,7 @@ /area/ruin/unpowered) "z" = ( /obj/item/weapon/shovel, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/engine/cult{ baseturf = /turf/open/floor/plating/lava/smooth }, diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_envy.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_envy.dmm index faf5d439792..ce611c6df76 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_envy.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_envy.dmm @@ -18,7 +18,7 @@ desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!"; icon_state = "mirror_broke"; pixel_x = -28; - shattered = 1 + broken = 1 }, /obj/item/clothing/suit/hooded/bloated_human, /obj/effect/decal/cleanable/blood, @@ -31,7 +31,7 @@ desc = "Oh no, seven years of bad luck!"; icon_state = "mirror_broke"; pixel_x = 28; - shattered = 1 + broken = 1 }, /turf/open/floor/plating{ baseturf = /turf/open/floor/plating/lava/smooth; @@ -44,7 +44,7 @@ desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!"; icon_state = "mirror_broke"; pixel_x = -28; - shattered = 1 + broken = 1 }, /turf/open/floor/plating{ baseturf = /turf/open/floor/plating/lava/smooth @@ -71,7 +71,7 @@ /obj/structure/mirror{ icon_state = "mirror_broke"; pixel_y = 28; - shattered = 1 + broken = 1 }, /obj/item/weapon/kitchen/knife/envy, /turf/open/floor/plating{ @@ -83,7 +83,7 @@ desc = "Oh no, seven years of bad luck!"; icon_state = "mirror_broke"; pixel_x = 28; - shattered = 1 + broken = 1 }, /turf/open/floor/plating{ baseturf = /turf/open/floor/plating/lava/smooth @@ -94,7 +94,7 @@ desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!"; icon_state = "mirror_broke"; pixel_x = -28; - shattered = 1 + broken = 1 }, /turf/open/floor/plating{ baseturf = /turf/open/floor/plating/lava/smooth @@ -112,7 +112,7 @@ desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!"; icon_state = "mirror_broke"; pixel_x = -28; - shattered = 1 + broken = 1 }, /turf/open/floor/plating{ baseturf = /turf/open/floor/plating/lava/smooth; diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm index 103d828b8fa..d531cf28f0a 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_pizzaparty.dmm @@ -88,7 +88,7 @@ name = "pizza spawner" }, /obj/effect/decal/cleanable/dirt, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood{ baseturf = /turf/open/floor/plating/asteroid/basalt/lava_land_surface; initial_gas_mix = "o2=14;n2=23;TEMP=300" diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm index 04afc8e1fb7..54d740040f1 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm @@ -53,7 +53,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -141,7 +141,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -336,7 +336,7 @@ /obj/structure/alien/weeds, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -407,7 +407,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -426,7 +426,7 @@ /obj/structure/alien/weeds, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, diff --git a/_maps/RandomRuins/SpaceRuins/bus.dmm b/_maps/RandomRuins/SpaceRuins/bus.dmm index b33fa9b2433..ce578a0babd 100644 --- a/_maps/RandomRuins/SpaceRuins/bus.dmm +++ b/_maps/RandomRuins/SpaceRuins/bus.dmm @@ -1,75 +1,821 @@ -"aa" = (/turf/open/space,/area/space) -"ab" = (/turf/closed/mineral/ash_rock,/area/ruin/unpowered/no_grav) -"ac" = (/obj/item/trash/sosjerky,/turf/open/space,/area/space) -"ad" = (/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"ae" = (/mob/living/simple_animal/hostile/lizard,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"af" = (/obj/structure/reagent_dispensers/fueltank,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"ag" = (/obj/item/stack/rods{amount = 50},/obj/item/weapon/stock_parts/manipulator/femto,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"ah" = (/obj/item/stack/cable_coil{amount = 5},/obj/item/weapon/shard{icon_state = "small"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"ai" = (/obj/item/weapon/book/random,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aj" = (/obj/structure/fluff/bus/dense,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"ak" = (/obj/structure/fluff/bus/passable{tag = "icon-wheredahoodat"; icon_state = "wheredahoodat"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"al" = (/obj/effect/decal/cleanable/salt,/obj/item/weapon/reagent_containers/food/condiment/saltshaker,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"am" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"an" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/obj/item/weapon/reagent_containers/food/snacks/faggot,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"ao" = (/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"ap" = (/obj/structure/fluff/bus/passable/seat{icon_state = "backseat"; pixel_y = 15; tag = "icon-backseat"},/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aq" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/obj/item/weapon/reagent_containers/food/snacks/faggot,/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"ar" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"as" = (/obj/structure/fluff/bus/passable/seat/driver{icon_state = "driverseat"; pixel_y = 17; tag = "icon-driverseat"},/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb,/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"at" = (/obj/structure/fluff/bus/dense{tag = "icon-hoodtop"; icon_state = "hoodtop"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"au" = (/obj/item/clothing/head/cone,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"av" = (/obj/structure/table,/obj/item/device/paicard,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aw" = (/obj/effect/decal/cleanable/oil,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"ax" = (/obj/structure/fluff/bus/passable,/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"ay" = (/obj/structure/fluff/bus/passable,/obj/item/weapon/storage/firstaid/regular,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"az" = (/obj/structure/fluff/bus/passable,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aA" = (/obj/structure/fluff/bus/passable,/obj/structure/closet/crate/freezer,/obj/item/weapon/reagent_containers/food/snacks/faggot,/obj/item/weapon/reagent_containers/food/snacks/faggot,/obj/item/weapon/reagent_containers/food/snacks/faggot,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aB" = (/obj/structure/fluff/bus/passable,/obj/effect/mine/sound/bwoink,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aC" = (/obj/structure/fluff/bus/passable,/obj/item/weapon/reagent_containers/food/condiment/saltshaker,/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aD" = (/obj/structure/fluff/bus/passable,/obj/item/weapon/reagent_containers/food/snacks/faggot,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aE" = (/obj/structure/fluff/bus/passable{tag = "icon-topdoor"; icon_state = "topdoor"},/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aF" = (/obj/structure/fluff/bus/dense{tag = "icon-hoodbottom"; icon_state = "hoodbottom"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aG" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aH" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/coffee,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aI" = (/obj/structure/fluff/bus/dense{tag = "icon-frontwallbottomrear"; icon_state = "frontwallbottomrear"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aJ" = (/obj/structure/fluff/bus/dense{tag = "icon-frontwallbottom"; icon_state = "frontwallbottom"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aK" = (/obj/structure/fluff/bus/dense{tag = "icon-reartire"; icon_state = "reartire"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aL" = (/obj/structure/fluff/bus/dense{tag = "icon-frontwallbottom"; icon_state = "frontwallbottom"},/obj/effect/decal/cleanable/oil,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aM" = (/obj/structure/fluff/bus/passable{icon_state = "bottomdoor"; layer = 3; tag = "icon-bottomdoor"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aN" = (/obj/structure/fluff/bus/dense{tag = "icon-fronttire"; icon_state = "fronttire"},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aO" = (/obj/effect/decal/cleanable/robot_debris/old,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aP" = (/obj/item/weapon/reagent_containers/food/snacks/faggot,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aQ" = (/obj/item/weapon/reagent_containers/glass/rag,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aR" = (/obj/item/weapon/storage/toolbox/mechanical,/obj/effect/decal/cleanable/oil,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aS" = (/obj/item/clothing/head/helmet/space,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aT" = (/obj/effect/decal/remains/human,/obj/item/clothing/head/helmet/space,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aU" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/obj/effect/decal/cleanable/dirt,/obj/item/weapon/reagent_containers/food/snacks/faggot,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aV" = (/obj/structure/fluff/bus/passable/seat{tag = "icon-backseat"; icon_state = "backseat"},/obj/effect/decal/remains/human,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aW" = (/obj/structure/fluff/bus/passable/seat/driver{icon_state = "driverseat"; pixel_y = 17; tag = "icon-driverseat"},/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"aX" = (/obj/effect/decal/cleanable/shreds,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aY" = (/obj/effect/decal/remains/human,/obj/item/clothing/suit/space,/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) -"aZ" = (/obj/structure/fluff/bus/passable,/obj/effect/decal/cleanable/dirt,/obj/item/weapon/reagent_containers/food/snacks/faggot,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"ba" = (/obj/structure/fluff/bus/passable,/obj/item/weapon/banhammer,/turf/open/floor/plasteel/black{tag = "icon-bus"; icon_state = "bus"},/area/ruin/unpowered/no_grav) -"bb" = (/obj/item/stack/sheet/metal{amount = 50},/turf/open/floor/plating/asteroid/airless,/area/ruin/unpowered/no_grav) +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"aa" = ( +/turf/open/space, +/area/space) +"ab" = ( +/turf/closed/mineral/ash_rock, +/area/ruin/unpowered/no_grav) +"ac" = ( +/obj/item/trash/sosjerky, +/turf/open/space, +/area/space) +"ad" = ( +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"ae" = ( +/mob/living/simple_animal/hostile/lizard, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"af" = ( +/obj/structure/reagent_dispensers/fueltank, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"ag" = ( +/obj/item/stack/rods{ + amount = 50 + }, +/obj/item/weapon/stock_parts/manipulator/femto, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"ah" = ( +/obj/item/stack/cable_coil{ + amount = 5 + }, +/obj/item/weapon/shard{ + icon_state = "small" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"ai" = ( +/obj/item/weapon/book/random, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aj" = ( +/obj/structure/fluff/bus/dense, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"ak" = ( +/obj/structure/fluff/bus/passable{ + tag = "icon-wheredahoodat"; + icon_state = "wheredahoodat" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"al" = ( +/obj/effect/decal/cleanable/salt, +/obj/item/weapon/reagent_containers/food/condiment/saltshaker, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"am" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"an" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"ao" = ( +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"ap" = ( +/obj/structure/fluff/bus/passable/seat{ + icon_state = "backseat"; + pixel_y = 15; + tag = "icon-backseat" + }, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aq" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"ar" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"as" = ( +/obj/structure/fluff/bus/passable/seat/driver{ + icon_state = "driverseat"; + pixel_y = 17; + tag = "icon-driverseat" + }, +/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"at" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-hoodtop"; + icon_state = "hoodtop" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"au" = ( +/obj/item/clothing/head/cone, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"av" = ( +/obj/structure/table, +/obj/item/device/paicard, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aw" = ( +/obj/effect/decal/cleanable/oil, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"ax" = ( +/obj/structure/fluff/bus/passable, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"ay" = ( +/obj/structure/fluff/bus/passable, +/obj/item/weapon/storage/firstaid/regular, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"az" = ( +/obj/structure/fluff/bus/passable, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aA" = ( +/obj/structure/fluff/bus/passable, +/obj/structure/closet/crate/freezer, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aB" = ( +/obj/structure/fluff/bus/passable, +/obj/effect/mine/sound/bwoink, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aC" = ( +/obj/structure/fluff/bus/passable, +/obj/item/weapon/reagent_containers/food/condiment/saltshaker, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aD" = ( +/obj/structure/fluff/bus/passable, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aE" = ( +/obj/structure/fluff/bus/passable{ + tag = "icon-topdoor"; + icon_state = "topdoor" + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aF" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-hoodbottom"; + icon_state = "hoodbottom" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aG" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aH" = ( +/obj/structure/table, +/obj/item/weapon/reagent_containers/food/drinks/coffee, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aI" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-frontwallbottomrear"; + icon_state = "frontwallbottomrear" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aJ" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-frontwallbottom"; + icon_state = "frontwallbottom" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aK" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-reartire"; + icon_state = "reartire" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aL" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-frontwallbottom"; + icon_state = "frontwallbottom" + }, +/obj/effect/decal/cleanable/oil, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aM" = ( +/obj/structure/fluff/bus/passable{ + icon_state = "bottomdoor"; + layer = 3; + tag = "icon-bottomdoor" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aN" = ( +/obj/structure/fluff/bus/dense{ + tag = "icon-fronttire"; + icon_state = "fronttire" + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aO" = ( +/obj/effect/decal/cleanable/robot_debris/old, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aP" = ( +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aQ" = ( +/obj/item/weapon/reagent_containers/glass/rag, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aR" = ( +/obj/item/weapon/storage/toolbox/mechanical, +/obj/effect/decal/cleanable/oil, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aS" = ( +/obj/item/clothing/head/helmet/space, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aT" = ( +/obj/effect/decal/remains/human, +/obj/item/clothing/head/helmet/space, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aU" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/obj/effect/decal/cleanable/dirt, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aV" = ( +/obj/structure/fluff/bus/passable/seat{ + tag = "icon-backseat"; + icon_state = "backseat" + }, +/obj/effect/decal/remains/human, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aW" = ( +/obj/structure/fluff/bus/passable/seat/driver{ + icon_state = "driverseat"; + pixel_y = 17; + tag = "icon-driverseat" + }, +/obj/effect/decal/cleanable/dirt, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"aX" = ( +/obj/effect/decal/cleanable/shreds, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aY" = ( +/obj/effect/decal/remains/human, +/obj/item/clothing/suit/space, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) +"aZ" = ( +/obj/structure/fluff/bus/passable, +/obj/effect/decal/cleanable/dirt, +/obj/item/weapon/reagent_containers/food/snacks/faggot, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"ba" = ( +/obj/structure/fluff/bus/passable, +/obj/item/weapon/banhammer, +/turf/open/floor/plasteel/airless/black{ + icon_state = "bus" + }, +/area/ruin/unpowered/no_grav) +"bb" = ( +/obj/item/stack/sheet/metal{ + amount = 50 + }, +/turf/open/floor/plating/asteroid/airless, +/area/ruin/unpowered/no_grav) (1,1,1) = {" -aaaaaaaaaaaaaaaaaaabababaaabababaaaaaaaaaaaaaa -aaaaaaaaaaaaaaababababababababababaaaaaaaaacaa -aaaaaaaaaaabababababababababababababaaaaaaaaaa -aaaaaaababababababababababababababababaaaaaaaa -aaaaababababababababababababababababababaaaaaa -aaabababababadadaeabababafagahababababababaaaa -aaababababadadadadadadadadadadaiabababababaaaa -aaabababadadajajajajajajajajajakadababababadaa -aaadadadaladamanamaoapaqaramasatauadababadavaa -aaadadawadadaxayazaAaBaCaxaDaEaFadadadabaGaHaa -aaadawadadawaIaJaKaJaJaLaJaJaMaNadaOadadadadaa -aaauadaPadadadadadaQadadadadadadauadadadadadaa -aaaaadajajajajajakadaRadaSaOadadadadaTadadaaaa -aaadadaUamaVaUaWataXadaYadadaPadadadadadadaaaa -aaadadazaZbaazaEaFadadadbbadadadadadadaaaaaaaa -aaadadaIaKaLaJaMaNadauadadadaaaaaaaaaaaaaaaaaa -aaaaadadadadadadadadadaaaaaaaaaaaaaaaaaaaaaaaa -aaaaaaadadadadadadaaaaaaaaaaaaaaaaaaaaaaaaaaaa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +"} +(2,1,1) = {" +aa +aa +aa +aa +aa +ab +ab +ab +ad +ad +ad +au +aa +ad +ad +ad +aa +aa +"} +(3,1,1) = {" +aa +aa +aa +aa +ab +ab +ab +ab +ad +ad +aw +ad +ad +ad +ad +ad +ad +aa +"} +(4,1,1) = {" +aa +aa +aa +ab +ab +ab +ab +ab +ad +aw +ad +aP +aj +aU +az +aI +ad +ad +"} +(5,1,1) = {" +aa +aa +aa +ab +ab +ab +ab +ad +al +ad +ad +ad +aj +am +aZ +aK +ad +ad +"} +(6,1,1) = {" +aa +aa +ab +ab +ab +ab +ad +ad +ad +ad +aw +ad +aj +aV +ba +aL +ad +ad +"} +(7,1,1) = {" +aa +aa +ab +ab +ab +ad +ad +aj +am +ax +aI +ad +aj +aU +az +aJ +ad +ad +"} +(8,1,1) = {" +aa +ab +ab +ab +ab +ad +ad +aj +an +ay +aJ +ad +aj +aW +aE +aM +ad +ad +"} +(9,1,1) = {" +aa +ab +ab +ab +ab +ae +ad +aj +am +az +aK +ad +ak +at +aF +aN +ad +ad +"} +(10,1,1) = {" +ab +ab +ab +ab +ab +ab +ad +aj +ao +aA +aJ +aQ +ad +aX +ad +ad +ad +aa +"} +(11,1,1) = {" +ab +ab +ab +ab +ab +ab +ad +aj +ap +aB +aJ +ad +aR +ad +ad +au +ad +aa +"} +(12,1,1) = {" +ab +ab +ab +ab +ab +ab +ad +aj +aq +aC +aL +ad +ad +aY +ad +ad +aa +aa +"} +(13,1,1) = {" +aa +ab +ab +ab +ab +af +ad +aj +ar +ax +aJ +ad +aS +ad +bb +ad +aa +aa +"} +(14,1,1) = {" +ab +ab +ab +ab +ab +ag +ad +aj +am +aD +aJ +ad +aO +ad +ad +ad +aa +aa +"} +(15,1,1) = {" +ab +ab +ab +ab +ab +ah +ad +aj +as +aE +aM +ad +ad +aP +ad +aa +aa +aa +"} +(16,1,1) = {" +ab +ab +ab +ab +ab +ab +ai +ak +at +aF +aN +ad +ad +ad +ad +aa +aa +aa +"} +(17,1,1) = {" +aa +ab +ab +ab +ab +ab +ab +ad +au +ad +ad +au +ad +ad +ad +aa +aa +aa +"} +(18,1,1) = {" +aa +aa +ab +ab +ab +ab +ab +ab +ad +ad +aO +ad +ad +ad +ad +aa +aa +aa +"} +(19,1,1) = {" +aa +aa +aa +ab +ab +ab +ab +ab +ab +ad +ad +ad +aT +ad +ad +aa +aa +aa +"} +(20,1,1) = {" +aa +aa +aa +aa +ab +ab +ab +ab +ab +ab +ad +ad +ad +ad +aa +aa +aa +aa +"} +(21,1,1) = {" +aa +aa +aa +aa +aa +ab +ab +ab +ad +aG +ad +ad +ad +ad +aa +aa +aa +aa +"} +(22,1,1) = {" +aa +ac +aa +aa +aa +aa +aa +ad +av +aH +ad +ad +aa +aa +aa +aa +aa +aa +"} +(23,1,1) = {" +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa "} diff --git a/_maps/RandomRuins/SpaceRuins/crashedship.dmm b/_maps/RandomRuins/SpaceRuins/crashedship.dmm index cbcc6691acd..0ba85b500c0 100644 --- a/_maps/RandomRuins/SpaceRuins/crashedship.dmm +++ b/_maps/RandomRuins/SpaceRuins/crashedship.dmm @@ -116,7 +116,7 @@ "cl" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/beer,/turf/open/floor/plasteel/bar,/area/awaymission/BMPship/Midship) "cm" = (/obj/structure/table,/obj/item/weapon/kitchen/knife,/turf/open/floor/plasteel/bar,/area/awaymission/BMPship/Midship) "cn" = (/obj/structure/table,/obj/machinery/light/small{dir = 1},/turf/open/floor/plasteel/bar,/area/awaymission/BMPship/Midship) -"co" = (/obj/structure/table,/obj/effect/decal/cleanable/cobweb2,/turf/open/floor/plasteel/bar,/area/awaymission/BMPship/Midship) +"co" = (/obj/structure/table,/obj/effect/decal/cleanable/cobweb/cobweb2,/turf/open/floor/plasteel/bar,/area/awaymission/BMPship/Midship) "cp" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/poddoor/shutters{id = "packerCargo"},/turf/open/floor/plating,/area/awaymission/BMPship/Aft) "cq" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/turf/open/floor/carpet,/area/awaymission/BMPship/Fore) "cr" = (/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice,/turf/open/floor/plasteel/bar,/area/awaymission/BMPship/Midship) diff --git a/_maps/RandomRuins/SpaceRuins/derelict4.dmm b/_maps/RandomRuins/SpaceRuins/derelict4.dmm index 8707019c847..5e7f802c2d9 100644 --- a/_maps/RandomRuins/SpaceRuins/derelict4.dmm +++ b/_maps/RandomRuins/SpaceRuins/derelict4.dmm @@ -22,7 +22,7 @@ /turf/open/floor/plating/airless, /area/ruin/unpowered) "h" = ( -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "i" = ( /obj/structure/chair, @@ -31,15 +31,15 @@ icon_state = "rwindow"; dir = 8 }, -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "j" = ( /obj/structure/chair, -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "k" = ( /obj/effect/spawner/lootdrop/crate_spawner, -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "l" = ( /obj/structure/shuttle/engine/propulsion{ @@ -67,7 +67,7 @@ /area/ruin/unpowered) "p" = ( /obj/structure/table, -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "q" = ( /obj/item/weapon/shard, @@ -76,7 +76,7 @@ icon_state = "chair"; dir = 8 }, -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "r" = ( /obj/structure/chair{ @@ -87,7 +87,7 @@ icon_state = "rwindow"; dir = 8 }, -/turf/open/floor/mineral/titanium/blue, +/turf/open/floor/plasteel/airless/shuttle, /area/ruin/unpowered) "s" = ( /obj/structure/chair{ diff --git a/_maps/RandomRuins/SpaceRuins/intactemptyship.dmm b/_maps/RandomRuins/SpaceRuins/intactemptyship.dmm index 967ca026814..3346128321c 100644 --- a/_maps/RandomRuins/SpaceRuins/intactemptyship.dmm +++ b/_maps/RandomRuins/SpaceRuins/intactemptyship.dmm @@ -38,7 +38,7 @@ icon_state = "heater"; dir = 8 }, -/turf/open/floor/plating, +/turf/open/floor/plating/airless, /area/ruin/powered/authorship) "g" = ( /obj/structure/table/wood, diff --git a/_maps/RandomRuins/SpaceRuins/mechtransport.dmm b/_maps/RandomRuins/SpaceRuins/mechtransport.dmm index 893af75cac3..5007f108b1a 100644 --- a/_maps/RandomRuins/SpaceRuins/mechtransport.dmm +++ b/_maps/RandomRuins/SpaceRuins/mechtransport.dmm @@ -95,7 +95,7 @@ /turf/open/floor/mineral/titanium, /area/ruin/powered) "u" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium, /area/ruin/powered) "v" = ( diff --git a/_maps/RandomRuins/SpaceRuins/oldteleporter.dmm b/_maps/RandomRuins/SpaceRuins/oldteleporter.dmm index 4de656779ce..0e72d6cb29d 100644 --- a/_maps/RandomRuins/SpaceRuins/oldteleporter.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldteleporter.dmm @@ -4,11 +4,11 @@ "d" = (/turf/closed/wall/r_wall,/area/ruin/unpowered/no_grav) "e" = (/turf/open/floor/plasteel/airless,/area/ruin/unpowered/no_grav) "f" = (/turf/open/floor/plasteel/airless{icon_state = "damaged2"},/area/ruin/unpowered/no_grav) -"g" = (/obj/machinery/light_construct/small{dir = 1},/turf/open/floor/plasteel/airless{icon_state = "damaged3"},/area/ruin/unpowered/no_grav) +"g" = (/obj/structure/light_construct/small{dir = 1},/turf/open/floor/plasteel/airless{icon_state = "damaged3"},/area/ruin/unpowered/no_grav) "h" = (/obj/machinery/computer/teleporter,/turf/open/floor/plasteel/airless,/area/ruin/unpowered/no_grav) "i" = (/obj/machinery/teleport/station,/turf/open/floor/plasteel/airless,/area/ruin/unpowered/no_grav) "j" = (/obj/machinery/teleport/hub,/turf/open/floor/plasteel/airless,/area/ruin/unpowered/no_grav) -"k" = (/obj/machinery/light_construct/small{dir = 4},/turf/open/floor/plating/airless,/area/ruin/unpowered/no_grav) +"k" = (/obj/structure/light_construct/small{dir = 4},/turf/open/floor/plating/airless,/area/ruin/unpowered/no_grav) "l" = (/obj/structure/table,/obj/item/weapon/stock_parts/cell{charge = 100;maxcharge = 15000},/turf/open/floor/plasteel/airless,/area/ruin/unpowered/no_grav) "m" = (/turf/open/floor/plasteel/airless{icon_state = "damaged4"},/area/ruin/unpowered/no_grav) "n" = (/obj/machinery/power/apc{dir = 0;name = "Worn-out APC";pixel_y = -24},/turf/open/floor/plasteel/airless,/area/ruin/unpowered/no_grav) diff --git a/_maps/RandomZLevels/Academy.dmm b/_maps/RandomZLevels/Academy.dmm index 3c27dabfd81..30555aca640 100644 --- a/_maps/RandomZLevels/Academy.dmm +++ b/_maps/RandomZLevels/Academy.dmm @@ -573,7 +573,7 @@ /turf/open/floor/plasteel/black, /area/awaymission/academy/headmaster) "bQ" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/cable{ d1 = 4; d2 = 8; @@ -2920,7 +2920,7 @@ }, /area/awaymission/academy/academyaft) "in" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/cafeteria{ dir = 2 }, @@ -3113,7 +3113,7 @@ /turf/open/floor/wood, /area/awaymission/academy/academyaft) "iP" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/engine, /area/awaymission/academy/academyaft) "iQ" = ( @@ -3940,7 +3940,7 @@ /turf/open/floor/engine/cult, /area/awaymission/academy/academycellar) "kZ" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/decal/cleanable/blood/old, /obj/effect/decal/remains/human, /turf/open/floor/engine/cult, @@ -3965,7 +3965,7 @@ /turf/open/floor/engine/cult, /area/awaymission/academy/academycellar) "lf" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/engine/cult, /area/awaymission/academy/academycellar) "lg" = ( diff --git a/_maps/RandomZLevels/caves.dmm b/_maps/RandomZLevels/caves.dmm index 801d47134b8..a375cabe157 100644 --- a/_maps/RandomZLevels/caves.dmm +++ b/_maps/RandomZLevels/caves.dmm @@ -1685,7 +1685,7 @@ /area/awaymission/northblock) "dD" = ( /obj/structure/table/wood, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood{ baseturf = /turf/open/floor/plating/asteroid/basalt }, @@ -1832,7 +1832,7 @@ "dY" = ( /obj/structure/bed, /obj/item/weapon/bedsheet, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/landmark{ name = "awaystart" }, @@ -2122,7 +2122,7 @@ /obj/structure/table, /obj/item/weapon/gun/energy/kinetic_accelerator, /obj/item/weapon/gun/energy/kinetic_accelerator, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel{ baseturf = /turf/open/floor/plating/asteroid/basalt }, diff --git a/_maps/RandomZLevels/centcomAway.dmm b/_maps/RandomZLevels/centcomAway.dmm index 070b4850138..c4fd8ca737f 100644 --- a/_maps/RandomZLevels/centcomAway.dmm +++ b/_maps/RandomZLevels/centcomAway.dmm @@ -2612,7 +2612,7 @@ /area/awaymission/centcomAway/general) "is" = ( /obj/structure/bookcase, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/grimy, /area/awaymission/centcomAway/general) "it" = ( @@ -2899,7 +2899,7 @@ }, /area/awaymission/centcomAway/general) "jk" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/grimy, /area/awaymission/centcomAway/general) "jl" = ( diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index 9142670609e..05e42b79b15 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -82,7 +82,7 @@ /obj/structure/alien/weeds, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -105,7 +105,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -177,7 +177,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -536,7 +536,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -558,7 +558,7 @@ /obj/structure/alien/weeds, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -1970,7 +1970,7 @@ "cG" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -3285,7 +3285,7 @@ /obj/structure/alien/weeds, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -3516,7 +3516,7 @@ /obj/structure/alien/weeds, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -3625,7 +3625,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -4034,7 +4034,7 @@ }, /obj/structure/alien/weeds{ desc = "A large mottled egg."; - health = 100; + obj_integrity = 100; icon_state = "egg_hatched"; name = "egg" }, @@ -5043,7 +5043,7 @@ "gE" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -5744,7 +5744,7 @@ "hx" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -6294,7 +6294,7 @@ desc = "Oh no, seven years of bad luck!"; icon_state = "mirror_broke"; pixel_x = 28; - shattered = 1 + broken = 1 }, /turf/open/floor/plasteel/freezer{ heat_capacity = 1e+006 @@ -8056,7 +8056,7 @@ /obj/item/stack/rods, /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -8074,7 +8074,7 @@ "kQ" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -9643,7 +9643,7 @@ "ns" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -9801,7 +9801,7 @@ "nD" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /obj/item/stack/rods, @@ -9908,7 +9908,7 @@ name = "MO19 Arrivals" }) "nJ" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating{ broken = 1; heat_capacity = 1e+006; @@ -10270,7 +10270,7 @@ "oj" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /turf/open/floor/mineral/titanium, diff --git a/_maps/RandomZLevels/research.dmm b/_maps/RandomZLevels/research.dmm index 3f56227c366..243ef869fe4 100644 --- a/_maps/RandomZLevels/research.dmm +++ b/_maps/RandomZLevels/research.dmm @@ -3531,10 +3531,10 @@ "jp" = ( /obj/structure/barricade/wooden{ desc = "A wooden table hastely flipped over for cover."; - health = 55; + obj_integrity = 55; icon = 'icons/obj/smooth_structures/wood_table.dmi'; icon_state = "wood_table"; - maxhealth = 55; + max_integrity = 55; name = "flipped table" }, /turf/open/floor/plasteel/yellowsiding{ @@ -3648,10 +3648,10 @@ "jG" = ( /obj/structure/barricade/wooden{ desc = "A wooden table hastely flipped over for cover."; - health = 55; + obj_integrity = 55; icon = 'icons/obj/smooth_structures/wood_table.dmi'; icon_state = "wood_table"; - maxhealth = 55; + max_integrity = 55; name = "flipped table" }, /turf/open/floor/plasteel, @@ -3779,10 +3779,10 @@ "kb" = ( /obj/structure/barricade/wooden{ desc = "A wooden table hastely flipped over for cover."; - health = 55; + obj_integrity = 55; icon = 'icons/obj/smooth_structures/wood_table.dmi'; icon_state = "wood_table"; - maxhealth = 55; + max_integrity = 55; name = "flipped table" }, /turf/open/floor/plasteel/yellowsiding, diff --git a/_maps/RandomZLevels/undergroundoutpost45.dmm b/_maps/RandomZLevels/undergroundoutpost45.dmm index 1ded5e1d37f..4cbac2f8645 100644 --- a/_maps/RandomZLevels/undergroundoutpost45.dmm +++ b/_maps/RandomZLevels/undergroundoutpost45.dmm @@ -18069,7 +18069,7 @@ "yN" = ( /obj/structure/grille{ density = 0; - destroyed = 1; + broken = 1; icon_state = "brokengrille" }, /turf/open/floor/plasteel/shuttle{ diff --git a/_maps/map_files/BirdStation/BirdStation.dmm b/_maps/map_files/BirdStation/BirdStation.dmm index 9a7f95d8ccc..0625de04704 100644 --- a/_maps/map_files/BirdStation/BirdStation.dmm +++ b/_maps/map_files/BirdStation/BirdStation.dmm @@ -226,7 +226,6 @@ /area/shuttle/syndicate) "aaG" = ( /obj/machinery/door/poddoor{ - auto_close = 300; id = "smindicate"; name = "outer blast door" }, diff --git a/_maps/map_files/DreamStation/dreamstation04.dmm b/_maps/map_files/DreamStation/dreamstation04.dmm index 721fc91755e..8bdef72816c 100644 --- a/_maps/map_files/DreamStation/dreamstation04.dmm +++ b/_maps/map_files/DreamStation/dreamstation04.dmm @@ -2241,7 +2241,6 @@ /area/shuttle/syndicate) "aeh" = ( /obj/machinery/door/poddoor{ - auto_close = 300; id = "smindicate"; name = "outer blast door" }, @@ -5399,7 +5398,6 @@ icon_state = "4-8" }, /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = 0; pixel_y = -32; tag = "s" @@ -17038,7 +17036,7 @@ "aJP" = ( /obj/structure/cable/green, /obj/machinery/computer/monitor, -/obj/machinery/light_construct, +/obj/structure/light_construct, /turf/open/floor/plating, /area/maintenance/fore) "aJQ" = ( @@ -24360,7 +24358,6 @@ pixel_y = 0 }, /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = 0; pixel_y = -32; tag = "s" @@ -25579,7 +25576,7 @@ dir = 4 }, /obj/structure/closet/wardrobe/chemistry_white, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/asmaint) "bbl" = ( @@ -30813,7 +30810,6 @@ dir = 4 }, /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = 0; pixel_y = -32; tag = "s" @@ -35123,7 +35119,6 @@ "btJ" = ( /obj/structure/closet/secure_closet/detective, /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = 0; pixel_y = -32; tag = "s" @@ -35478,7 +35473,6 @@ /area/hallway/secondary/exit) "bup" = ( /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = -32; pixel_y = 0; tag = "w" @@ -38138,7 +38132,6 @@ /obj/item/weapon/folder/blue, /obj/item/weapon/stamp/hop, /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = 0; pixel_y = -32; tag = "s" @@ -44999,7 +44992,6 @@ /area/crew_quarters/captain) "bLr" = ( /obj/machinery/newscaster{ - hitstaken = 0; pixel_x = -32; pixel_y = 0; tag = "w" @@ -70879,7 +70871,7 @@ pixel_y = 24; req_access_txt = "0" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/asmaint2) "cKy" = ( @@ -72378,6 +72370,7 @@ /area/maintenance/asmaint2) "cNz" = ( /obj/item/weapon/coin/uranium, +/obj/item/device/instrument/eguitar, /turf/open/floor/plating{ burnt = 1; icon_state = "panelscorched" diff --git a/_maps/map_files/EfficiencyStation/EfficiencyStation.dmm b/_maps/map_files/EfficiencyStation/EfficiencyStation.dmm index 3b3e3b58934..65f30caf154 100644 --- a/_maps/map_files/EfficiencyStation/EfficiencyStation.dmm +++ b/_maps/map_files/EfficiencyStation/EfficiencyStation.dmm @@ -321,7 +321,7 @@ /obj/machinery/vending/cigarette{ use_power = 0 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium, /area/shuttle/abandoned) "aaZ" = ( @@ -331,7 +331,6 @@ /area/shuttle/abandoned) "aba" = ( /obj/machinery/door/poddoor{ - auto_close = 300; id = "smindicate"; name = "outer blast door" }, @@ -1406,7 +1405,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium, /area/shuttle/abandoned) "acX" = ( @@ -3191,7 +3190,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/bot, /area/shuttle/abandoned) "agd" = ( @@ -3809,7 +3808,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium, /area/shuttle/abandoned) "aho" = ( @@ -7956,7 +7955,7 @@ dir = 8; on = 1 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/item/device/radio/intercom{ dir = 1; name = "Station Intercom (General)"; @@ -10340,7 +10339,7 @@ d2 = 8; icon_state = "2-8" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/fore) "atv" = ( @@ -22858,7 +22857,7 @@ }, /area/maintenance/fore) "aSa" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/chair/stool{ pixel_y = 8 }, @@ -28205,7 +28204,7 @@ icon_state = "2-8" }, /obj/structure/reagent_dispensers/watertank, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/disposalpipe/segment, /turf/open/floor/plating, /area/maintenance/fpmaint{ @@ -33350,7 +33349,7 @@ /obj/structure/toilet{ dir = 8 }, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 1 }, /turf/open/floor/plasteel{ @@ -33909,7 +33908,7 @@ }, /obj/effect/decal/cleanable/oil, /obj/item/weapon/cigbutt, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 4 }, /turf/open/floor/plasteel{ @@ -34753,7 +34752,7 @@ desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!"; icon_state = "mirror_broke"; pixel_x = -28; - shattered = 1 + broken = 1 }, /obj/effect/decal/cleanable/vomit/old, /obj/effect/decal/cleanable/cobweb, @@ -34803,7 +34802,7 @@ /obj/structure/toilet{ dir = 8 }, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 1 }, /turf/open/floor/plasteel{ @@ -36081,7 +36080,7 @@ desc = "This mirror has been shattered. It looks like the bad luck energies spilling from it are taking immediate effect on your surroundings!"; icon_state = "mirror_broke"; pixel_x = -28; - shattered = 1 + broken = 1 }, /obj/item/weapon/cigbutt, /turf/open/floor/plasteel{ @@ -41684,7 +41683,6 @@ pixel_y = -30 }, /obj/machinery/newscaster{ - hitstaken = 1; pixel_x = 30 }, /turf/open/floor/plasteel/red/side{ @@ -42257,7 +42255,7 @@ d2 = 8; icon_state = "2-8" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating{ broken = 1; icon_state = "platingdmg3" @@ -44232,7 +44230,7 @@ /obj/structure/chair/stool{ pixel_y = 8 }, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 8 }, /turf/open/floor/plating{ @@ -44860,7 +44858,7 @@ /area/maintenance/starboard) "bLc" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 8 }, /obj/effect/spawner/lootdrop/grille_or_trash, @@ -56874,9 +56872,13 @@ }, /area/shuttle/syndicate) "ckj" = ( -/obj/machinery/portable_atmospherics/canister/bz, -/turf/open/floor/plasteel/floorgrime, -/area/toxins/storage) +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/table/wood/bar, +/obj/item/device/instrument/eguitar, +/turf/open/floor/wood, +/area/crew_quarters/theatre) "ckk" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 @@ -92328,7 +92330,7 @@ aWM aZX aWM bbG -bcw +ckj bcw bcw bcw diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index a4545d7ad81..f32dceed424 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -4485,7 +4485,7 @@ /area/ai_monitored/security/armory) "ahW" = ( /obj/item/clothing/head/festive, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/fore) "ahX" = ( @@ -4504,7 +4504,7 @@ /turf/open/floor/plating, /area/maintenance/fore) "aia" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/table, /obj/item/weapon/stock_parts/manipulator, /obj/effect/spawner/lootdrop/maintenance, @@ -5211,7 +5211,7 @@ }) "ajq" = ( /obj/item/stack/sheet/cardboard, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 1 }, /obj/structure/closet/crate, @@ -6662,7 +6662,7 @@ name = "Port Maintenance" }) "alP" = ( -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 4 }, /obj/structure/rack{ @@ -7402,7 +7402,7 @@ }) "anb" = ( /obj/structure/table/reinforced, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 8 }, /obj/item/weapon/paper_bin{ @@ -8659,7 +8659,7 @@ /area/maintenance/starboard) "apo" = ( /obj/structure/closet, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/item/weapon/reagent_containers/food/drinks/beer{ desc = "Takes you to a whole new level of thinking."; name = "Meta-Cider" @@ -8759,7 +8759,7 @@ pixel_x = 32; pixel_y = 0 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/auxsolarstarboard) "apy" = ( @@ -8858,7 +8858,7 @@ /turf/open/floor/plasteel/black, /area/storage/tech) "apG" = ( -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 4 }, /obj/structure/chair{ @@ -9538,7 +9538,7 @@ }) "aqT" = ( /obj/structure/rack, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/item/weapon/storage/toolbox/emergency, /obj/effect/spawner/lootdrop/maintenance, /turf/open/floor/plating, @@ -9574,7 +9574,7 @@ name = "Port Maintenance" }) "aqX" = ( -/obj/machinery/light_construct/small, +/obj/structure/light_construct/small, /obj/item/weapon/toolbox_tiles_sensor, /turf/open/floor/plating, /area/maintenance/fpmaint2{ @@ -10959,7 +10959,7 @@ req_access_txt = "0"; specialfunctions = 4 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/machinery/atmospherics/components/unary/vent_pump{ dir = 4; on = 1 @@ -11839,7 +11839,7 @@ "auK" = ( /obj/item/stack/sheet/cardboard, /obj/item/device/flashlight, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/spawner/lootdrop/maintenance, /turf/open/floor/plating, /area/maintenance/starboard) @@ -14578,7 +14578,7 @@ /obj/item/weapon/twohanded/required/kirbyplants{ icon_state = "plant-22" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood, /area/library) "azw" = ( @@ -17088,7 +17088,7 @@ scrub_N2O = 0; scrub_Toxins = 0 }, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 4 }, /turf/open/floor/plasteel/floorgrime, @@ -17837,7 +17837,7 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 10 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/fpmaint2{ name = "Port Maintenance" @@ -18623,7 +18623,7 @@ }, /obj/item/weapon/folder, /obj/item/weapon/folder, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/cult{ dir = 2 }, @@ -19591,7 +19591,7 @@ /turf/open/floor/plasteel, /area/construction) "aHE" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 1 }, /obj/structure/closet/emcloset, @@ -19631,7 +19631,7 @@ /area/construction) "aHJ" = ( /obj/structure/closet/toolcloset, -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 1 }, /turf/open/floor/plasteel, @@ -21751,7 +21751,7 @@ }, /area/space) "aLA" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 8 }, /turf/open/floor/plating, @@ -21766,7 +21766,7 @@ }, /area/construction) "aLD" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 4 }, /obj/machinery/light_switch{ @@ -29013,7 +29013,6 @@ "aYM" = ( /obj/item/weapon/book/manual/wiki/security_space_law, /obj/machinery/newscaster{ - hitstaken = 1; pixel_x = 0; pixel_y = -32 }, @@ -30642,7 +30641,7 @@ /area/hallway/primary/central) "bbo" = ( /obj/machinery/space_heater, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating{ icon_state = "platingdmg3" }, @@ -30679,7 +30678,7 @@ /obj/machinery/door/window{ base_state = "rightsecure"; dir = 4; - health = 300; + obj_integrity = 300; icon_state = "rightsecure"; layer = 4.1; name = "Secondary AI Core Access"; @@ -30730,7 +30729,7 @@ /obj/machinery/door/window{ base_state = "rightsecure"; dir = 4; - health = 300; + obj_integrity = 300; icon_state = "rightsecure"; name = "Primary AI Core Access"; req_access_txt = "16" @@ -30801,7 +30800,7 @@ /obj/machinery/door/window{ base_state = "leftsecure"; dir = 8; - health = 300; + obj_integrity = 300; icon_state = "leftsecure"; layer = 4.1; name = "Tertiary AI Core Access"; @@ -40681,7 +40680,7 @@ /obj/machinery/door/window{ base_state = "leftsecure"; dir = 8; - health = 300; + obj_integrity = 300; icon_state = "leftsecure"; name = "Primary AI Core Access"; req_access_txt = "16" @@ -44215,7 +44214,7 @@ }) "byc" = ( /obj/structure/closet, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/item/weapon/poster/contraband, /obj/effect/spawner/lootdrop/maintenance, /turf/open/floor/plating, @@ -47115,7 +47114,7 @@ name = "Arrivals" }) "bDi" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/reagent_dispensers/fueltank, /turf/open/floor/plating, /area/maintenance/fpmaint2{ @@ -47269,7 +47268,7 @@ /turf/open/floor/wood, /area/library) "bDB" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood, /area/library) "bDC" = ( @@ -48897,7 +48896,7 @@ name = "Port Maintenance" }) "bGw" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 8 }, /turf/open/floor/wood, @@ -52847,7 +52846,7 @@ /turf/open/floor/wood, /area/security/vacantoffice) "bNk" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 4 }, /turf/open/floor/wood, @@ -52903,7 +52902,7 @@ name = "Port Maintenance" }) "bNq" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/rack{ dir = 8; layer = 2.9 @@ -54202,7 +54201,7 @@ icon_state = "1-2" }, /obj/structure/window/reinforced, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/showcase{ desc = "A flimsy model of a standard NanoTrasen automated loyalty implant machine. With secure positioning harnesses and a robotic surgical injector, brain damage and other serious medical anomalies are now up to 60% less likely!"; icon = 'icons/obj/machines/implantchair.dmi'; @@ -55585,7 +55584,7 @@ name = "Port Maintenance" }) "bRZ" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/closet/emcloset, /turf/open/floor/plating, /area/maintenance/fpmaint2{ @@ -55644,7 +55643,7 @@ /obj/structure/table/wood, /obj/item/weapon/dice/d20, /obj/item/weapon/dice, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood, /area/library) "bSh" = ( @@ -60743,7 +60742,7 @@ name = "Aft Maintenance" }) "caT" = ( -/obj/machinery/light_construct, +/obj/structure/light_construct, /turf/open/floor/plating{ icon_state = "panelscorched" }, @@ -62476,7 +62475,7 @@ d2 = 4; icon_state = "2-4" }, -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 8 }, /turf/open/floor/plating, @@ -62519,7 +62518,7 @@ /obj/structure/rack, /obj/item/stack/sheet/cardboard, /obj/item/device/radio/off, -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 1 }, /obj/effect/spawner/lootdrop/maintenance, @@ -67171,7 +67170,7 @@ pixel_y = 2 }, /obj/structure/table/wood, -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 1 }, /obj/machinery/newscaster{ @@ -67858,7 +67857,7 @@ pixel_y = 2 }, /obj/structure/table, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/machinery/reagentgrinder{ pixel_y = 4 }, @@ -68772,7 +68771,7 @@ name = "Aft Maintenance" }) "cou" = ( -/obj/machinery/light_construct/small{ +/obj/structure/light_construct/small{ dir = 4 }, /obj/machinery/computer/security/telescreen/entertainment{ @@ -81331,7 +81330,7 @@ pixel_x = 3; pixel_y = 2 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/floorgrime, /area/maintenance/aft{ name = "Aft Maintenance" @@ -82126,7 +82125,7 @@ dir = 2; on = 1 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/black, /area/toxins/server{ name = "\improper Research Division Server Room" @@ -82288,6 +82287,7 @@ pixel_x = 32; pixel_y = 0 }, +/obj/item/device/instrument/eguitar, /turf/open/floor/plating/warnplate{ dir = 8 }, @@ -83334,7 +83334,7 @@ name = "Aft Maintenance" }) "cMp" = ( -/obj/machinery/light_construct/small, +/obj/structure/light_construct/small, /obj/structure/table/wood/poker, /obj/item/toy/cards/deck, /obj/structure/sign/poster{ @@ -85018,7 +85018,7 @@ pixel_x = 0; pixel_y = 25 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/table/wood, /turf/open/floor/plasteel/vault, /area/chapel/main) @@ -85592,7 +85592,7 @@ /obj/structure/flora/ausbushes/palebush, /obj/structure/window/reinforced{ dir = 5; - health = 1e+007 + obj_integrity = 10000 }, /turf/open/floor/grass, /area/hallway/secondary/exit{ @@ -86277,7 +86277,7 @@ /obj/structure/flora/ausbushes/sunnybush, /obj/structure/window/reinforced{ dir = 5; - health = 1e+007 + obj_integrity = 10000 }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 @@ -86684,7 +86684,7 @@ pixel_x = -2; pixel_y = 8 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/table/wood, /turf/open/floor/plasteel/black, /area/chapel/main) @@ -86724,7 +86724,7 @@ }, /area/chapel/main) "cSd" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/chair/comfy/black{ dir = 8 }, @@ -89481,7 +89481,6 @@ /area/toxins/xenobiology) "cWS" = ( /obj/machinery/door/poddoor{ - auto_close = 300; id = "smindicate"; name = "outer blast door" }, @@ -90912,7 +90911,7 @@ /obj/effect/spawner/lootdrop/maintenance, /obj/item/weapon/extinguisher, /obj/item/weapon/extinguisher, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/decal/cleanable/dirt{ desc = "A thin layer of dust coating the floor."; name = "dust" @@ -91341,7 +91340,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium/blue, /area/shuttle/abandoned) "daN" = ( @@ -91914,7 +91913,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium, /area/shuttle/abandoned) "dbR" = ( diff --git a/_maps/map_files/TgStation/tgstation.2.1.3.dmm b/_maps/map_files/TgStation/tgstation.2.1.3.dmm index b9bf7fc16cf..4eff9fe875a 100644 --- a/_maps/map_files/TgStation/tgstation.2.1.3.dmm +++ b/_maps/map_files/TgStation/tgstation.2.1.3.dmm @@ -1394,7 +1394,12 @@ /area/security/hos) "adq" = ( /obj/structure/table/wood, -/obj/item/device/instrument/guitar, +/obj/item/device/instrument/guitar{ + pixel_x = -7 + }, +/obj/item/device/instrument/eguitar{ + pixel_x = 5 + }, /turf/open/floor/wood, /area/crew_quarters/theatre) "adr" = ( @@ -7424,7 +7429,7 @@ "apP" = ( /obj/structure/grille, /obj/structure/window/fulltile{ - health = 35 + obj_integrity = 35 }, /turf/open/floor/plating, /area/maintenance/fpmaint2) @@ -7499,7 +7504,7 @@ layer = 2.9 }, /obj/item/weapon/storage/briefcase, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood, /area/lawoffice) "aqc" = ( @@ -7764,7 +7769,7 @@ /turf/open/floor/plating, /area/maintenance/fsmaint2) "aqB" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/fsmaint2) "aqC" = ( @@ -7995,7 +8000,7 @@ pixel_y = 23 }, /obj/structure/closet/secure_closet/personal/cabinet, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/wood, /area/crew_quarters/sleep) "arj" = ( @@ -9541,7 +9546,7 @@ /obj/structure/mirror{ icon_state = "mirror_broke"; pixel_y = 28; - shattered = 1 + broken = 1 }, /obj/machinery/iv_drip, /turf/open/floor/plating, @@ -9550,7 +9555,7 @@ /obj/structure/mirror{ icon_state = "mirror_broke"; pixel_y = 28; - shattered = 1 + broken = 1 }, /obj/item/weapon/shard{ icon_state = "medium" @@ -9563,7 +9568,7 @@ /turf/open/floor/plating, /area/maintenance/fpmaint2) "ava" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/chair, /obj/item/weapon/reagent_containers/blood/random, /turf/open/floor/plating, @@ -10294,7 +10299,7 @@ /turf/open/floor/plating, /area/maintenance/fsmaint2) "awE" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/closet/crate, /obj/effect/spawner/lootdrop/maintenance, /turf/open/floor/plating, @@ -13644,7 +13649,7 @@ /turf/open/floor/plating, /area/maintenance/fsmaint2) "aDX" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/reagent_dispensers/fueltank, /turf/open/floor/plating, /area/maintenance/fsmaint2) @@ -15356,7 +15361,7 @@ "aHx" = ( /obj/structure/grille, /obj/structure/window/fulltile{ - health = 25 + obj_integrity = 25 }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plating, @@ -22315,7 +22320,7 @@ icon_state = "pipe-c" }, /obj/machinery/button/door{ - id = "datboidetective"; + id = "kanyewest"; name = "Privacy Shutters"; pixel_x = 0; pixel_y = 24 @@ -23392,7 +23397,7 @@ /area/security/detectives_office) "baV" = ( /obj/machinery/door/firedoor, -/obj/machinery/door/airlock/glass_security{ +/obj/machinery/door/airlock/security{ name = "Detective's Office"; req_access_txt = "4" }, @@ -33845,13 +33850,12 @@ }) "bxg" = ( /obj/structure/reagent_dispensers/watertank, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plating, /area/maintenance/asmaint) "bxh" = ( /obj/machinery/door/poddoor{ - auto_close = 300; id = "smindicate"; name = "outer blast door" }, @@ -34891,7 +34895,7 @@ dir = 2; on = 1 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plasteel/black, /area/toxins/server) "bzy" = ( @@ -35689,7 +35693,6 @@ pixel_y = 0 }, /obj/machinery/newscaster{ - hitstaken = 1; pixel_x = 0; pixel_y = -32 }, @@ -37692,7 +37695,7 @@ }, /obj/structure/grille, /obj/structure/window/fulltile{ - health = 25 + obj_integrity = 25 }, /turf/open/floor/plating, /area/maintenance/asmaint) @@ -38950,14 +38953,14 @@ /obj/structure/disposalpipe/segment, /obj/structure/grille, /obj/structure/window/fulltile{ - health = 35 + obj_integrity = 35 }, /turf/open/floor/plating, /area/maintenance/asmaint) "bHX" = ( /obj/structure/grille, /obj/structure/window/fulltile{ - health = 25 + obj_integrity = 25 }, /turf/open/floor/plating, /area/maintenance/asmaint) @@ -39773,7 +39776,7 @@ /turf/open/floor/plating, /area/maintenance/asmaint) "bJu" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 4 }, /turf/open/floor/plasteel, @@ -40432,7 +40435,7 @@ /turf/open/floor/plating, /area/maintenance/asmaint) "bKK" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/structure/cable{ d2 = 8; icon_state = "0-8" @@ -41296,7 +41299,7 @@ /turf/open/floor/plating, /area/maintenance/asmaint2) "bMC" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/spawner/lootdrop/maintenance, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plating, @@ -42241,8 +42244,8 @@ }, /obj/structure/grille, /obj/structure/window/reinforced/fulltile, -/obj/machinery/door/poddoor/preopen{ - id = "datboidetective"; +/obj/machinery/door/poddoor/shutters/preopen{ + id = "kanyewest"; layer = 2.9; name = "privacy shutters" }, @@ -43282,7 +43285,7 @@ }, /area/security/checkpoint/engineering) "bRl" = ( -/obj/machinery/light_construct{ +/obj/structure/light_construct{ dir = 8 }, /turf/open/floor/plating, @@ -45351,7 +45354,7 @@ /turf/open/floor/plating, /area/maintenance/aft) "bVE" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/machinery/atmospherics/components/unary/portables_connector/visible, /obj/machinery/portable_atmospherics/canister/oxygen, /turf/open/floor/plating, @@ -47218,7 +47221,7 @@ /turf/open/floor/plating, /area/maintenance/asmaint) "bZO" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/spawner/lootdrop/maintenance, /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{ dir = 8 @@ -50413,7 +50416,7 @@ /obj/structure/rack{ dir = 1 }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plating, /area/maintenance/asmaint2) @@ -51921,7 +51924,7 @@ /area/maintenance/starboardsolar) "cjE" = ( /obj/structure/rack, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/spawner/lootdrop/maintenance, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /turf/open/floor/plating, @@ -55188,7 +55191,7 @@ /turf/open/floor/plating, /area/maintenance/asmaint2) "cqv" = ( -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/plating, /area/maintenance/aft) "cqw" = ( diff --git a/_maps/map_files/generic/z2.dmm b/_maps/map_files/generic/z2.dmm index 98896517220..8b0b9796ac3 100644 --- a/_maps/map_files/generic/z2.dmm +++ b/_maps/map_files/generic/z2.dmm @@ -2915,14 +2915,11 @@ /turf/open/floor/plasteel/black, /area/centcom/evac) "iZ" = ( -/obj/item/weapon/shard{ +/turf/closed/indestructible/fakeglass{ color = "#008000"; - icon_state = "small" + dir = 8; + icon_state = "fakewindows" }, -/obj/structure/grille/broken{ - color = "#008000" - }, -/turf/open/floor/plating/airless, /area/wizard_station) "ja" = ( /turf/closed/indestructible/fakeglass{ @@ -3051,8 +3048,8 @@ }, /area/tdome/tdomeobserve) "ju" = ( -/obj/structure/lattice, -/turf/open/space/transit, +/obj/machinery/computer/camera_advanced, +/turf/open/floor/wood, /area/wizard_station) "jv" = ( /obj/item/weapon/shard{ @@ -3064,9 +3061,7 @@ /area/wizard_station) "jw" = ( /obj/machinery/computer/shuttle, -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage" - }, +/turf/open/floor/engine/cult, /area/wizard_station) "jx" = ( /turf/open/floor/engine/cult/airless, @@ -3180,9 +3175,8 @@ }, /area/wizard_station) "jP" = ( -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage3" - }, +/obj/structure/bookcase/random/adult, +/turf/open/floor/plasteel/white, /area/wizard_station) "jQ" = ( /obj/effect/decal/cleanable/blood/gibs/body, @@ -3305,7 +3299,7 @@ icon_state = "processor"; name = "byond random number generator" }, -/turf/open/floor/plasteel/cult/airless, +/turf/open/floor/engine/cult, /area/wizard_station) "kj" = ( /turf/open/floor/plasteel/cult/airless{ @@ -3323,7 +3317,7 @@ icon_state = "nim"; name = "wizard of yendor showcase" }, -/turf/open/floor/engine/cult/airless, +/turf/open/floor/engine/cult, /area/wizard_station) "km" = ( /turf/closed/indestructible/fakeglass{ @@ -3392,12 +3386,11 @@ }, /area/wizard_station) "kv" = ( -/obj/effect/forcefield, -/obj/structure/door_assembly/door_assembly_uranium{ - anchored = 1; - name = "Bridge" +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Cockpit" }, -/turf/open/floor/plasteel/cult, +/turf/open/floor/engine/cult/airless, /area/wizard_station) "kw" = ( /turf/closed/indestructible/fakeglass{ @@ -3447,7 +3440,7 @@ /area/wizard_station) "kF" = ( /obj/effect/decal/cleanable/blood/splatter, -/turf/open/floor/engine/cult, +/turf/open/floor/grass, /area/wizard_station) "kG" = ( /turf/open/floor/engine/cult, @@ -3507,12 +3500,14 @@ }, /area/shuttle/assault_pod) "kP" = ( -/turf/closed/wall/mineral/titanium, +/turf/open/floor/wood, /area/wizard_station) "kQ" = ( -/turf/closed/indestructible/fakedoor{ - name = "Squad 4 Pod" +/obj/structure/chair/wood/wings{ + icon_state = "wooden_chair_wings"; + dir = 1 }, +/turf/open/floor/wood, /area/wizard_station) "kR" = ( /turf/closed/wall/shuttle{ @@ -3521,8 +3516,7 @@ }, /area/wizard_station) "kS" = ( -/turf/open/floor/plasteel/cult, -/turf/closed/wall/mineral/titanium/interior, +/turf/open/floor/grass, /area/wizard_station) "kT" = ( /obj/effect/forcefield, @@ -3534,10 +3528,11 @@ }, /area/wizard_station) "kV" = ( -/obj/effect/forcefield, -/turf/open/floor/plasteel/cult{ - icon_state = "cultdamage" +/obj/structure/table/wood/fancy, +/obj/item/weapon/storage/pill_bottle/dice{ + icon_state = "magicdicebag" }, +/turf/open/floor/carpet, /area/wizard_station) "kW" = ( /turf/open/floor/plasteel/darkred/side{ @@ -3624,12 +3619,18 @@ /turf/open/floor/plasteel/airless, /area/wizard_station) "ll" = ( -/turf/open/floor/plasteel/airless, +/obj/structure/table/wood/fancy, +/obj/item/weapon/skub{ + pixel_y = 16 + }, +/turf/open/floor/plasteel/white, /area/wizard_station) "lm" = ( -/obj/machinery/door/poddoor/preopen, -/obj/effect/decal/cleanable/blood/splatter, -/turf/open/floor/plating/airless, +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Observation Room" + }, +/turf/open/floor/engine/cult, /area/wizard_station) "ln" = ( /turf/open/floor/plasteel/cult{ @@ -3637,16 +3638,16 @@ }, /area/wizard_station) "lo" = ( -/obj/effect/forcefield, -/turf/open/floor/plasteel/cult{ - icon_state = "cultdamage7" +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Game Room" }, +/turf/open/floor/engine/cult, /area/wizard_station) "lp" = ( -/obj/effect/forcefield, -/turf/open/floor/plasteel/cult{ - icon_state = "cultdamage5" - }, +/obj/structure/table/wood/fancy, +/obj/item/device/camera/spooky, +/turf/open/floor/carpet, /area/wizard_station) "lq" = ( /turf/open/floor/plasteel/black, @@ -3710,10 +3711,8 @@ /area/wizard_station) "lB" = ( /obj/structure/table/wood/poker, -/obj/item/toy/cards/cardhand, -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage2" - }, +/obj/item/toy/cards/deck, +/turf/open/floor/carpet, /area/wizard_station) "lC" = ( /obj/machinery/computer/telecrystals/boss, @@ -3762,7 +3761,7 @@ /area/wizard_station) "lH" = ( /obj/machinery/vending/magivend, -/turf/open/floor/plasteel/cult, +/turf/open/floor/engine/cult, /area/wizard_station) "lI" = ( /turf/open/floor/plasteel/cult{ @@ -3798,9 +3797,9 @@ /turf/open/floor/plasteel/black, /area/syndicate_mothership) "lQ" = ( -/obj/structure/door_assembly/door_assembly_uranium{ - anchored = 1; - name = "Break Room" +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Study" }, /turf/open/floor/engine/cult, /area/wizard_station) @@ -3857,20 +3856,17 @@ /turf/open/floor/engine/cult, /area/wizard_station) "mb" = ( -/obj/structure/rack, -/obj/item/clothing/head/helmet/space/hardsuit/wizard, -/turf/open/floor/engine/cult, +/obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/lizard, +/turf/open/floor/grass, /area/wizard_station) "mc" = ( /obj/effect/decal/cleanable/blood/splatter, /obj/effect/decal/cleanable/blood/gibs/body, -/turf/open/floor/engine/cult, +/turf/open/floor/grass, /area/wizard_station) "md" = ( -/obj/effect/forcefield, -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage" - }, +/obj/effect/decal/remains/xeno/larva, +/turf/open/floor/grass, /area/wizard_station) "me" = ( /obj/structure/flora/grass/brown, @@ -3965,7 +3961,7 @@ "ms" = ( /obj/effect/decal/cleanable/blood/splatter, /obj/structure/rack{ - health = 9999 + obj_integrity = 9999 }, /obj/item/clothing/suit/space/hardsuit/wizard, /turf/open/floor/engine/cult, @@ -4024,7 +4020,7 @@ }, /area/wizard_station) "mA" = ( -/obj/structure/bookcase, +/obj/structure/bookcase/random/reference, /turf/open/floor/engine/cult, /area/wizard_station) "mB" = ( @@ -4048,7 +4044,7 @@ /mob/living/simple_animal/hostile/creature{ name = "Experiment 35b" }, -/turf/open/floor/engine/cult, +/turf/open/floor/grass, /area/wizard_station) "mF" = ( /obj/machinery/door/poddoor/preopen, @@ -4133,14 +4129,12 @@ /obj/effect/landmark/start{ name = "wizard" }, -/turf/open/floor/plasteel/cult{ - icon_state = "cultdamage5" - }, +/turf/open/floor/engine/cult, /area/wizard_station) "mR" = ( /obj/effect/decal/remains/human, /obj/effect/decal/cleanable/blood/splatter, -/turf/open/floor/engine/cult, +/turf/open/floor/grass, /area/wizard_station) "mS" = ( /turf/open/floor/plasteel/cult, @@ -4150,9 +4144,8 @@ }, /area/wizard_station) "mT" = ( -/turf/closed/indestructible/fakedoor{ - name = "Squad 3 Pod" - }, +/obj/effect/decal/remains/xeno, +/turf/open/floor/grass, /area/wizard_station) "mU" = ( /obj/machinery/camera{ @@ -4170,7 +4163,11 @@ /turf/open/floor/engine/cult, /area/wizard_station) "mW" = ( -/obj/structure/destructible/cult/pylon, +/mob/living/simple_animal/bot/medbot/mysterious{ + desc = "If you don't accidentally blow yourself up from time to time you're not really a wizard anyway."; + faction = list("neutral","silicon","creature"); + name = "Nobody's Perfect" + }, /turf/open/floor/engine/cult, /area/wizard_station) "mX" = ( @@ -4189,14 +4186,13 @@ /turf/open/floor/engine/cult, /area/wizard_station) "na" = ( -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage4" - }, +/obj/item/weapon/reagent_containers/food/snacks/meat/slab/xeno, +/turf/open/floor/grass, /area/wizard_station) "nb" = ( -/obj/structure/door_assembly/door_assembly_uranium{ - anchored = 1; - name = "Corridor A" +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Observation Deck" }, /turf/open/floor/engine/cult, /area/wizard_station) @@ -4228,9 +4224,10 @@ /turf/open/floor/plasteel/black, /area/tdome/arena) "nh" = ( -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage2" +/obj/structure/urinal{ + pixel_y = 28 }, +/turf/open/floor/plasteel/white, /area/wizard_station) "ni" = ( /obj/effect/forcefield, @@ -4415,10 +4412,8 @@ /turf/open/floor/carpet, /area/wizard_station) "nL" = ( -/obj/effect/decal/cleanable/blood/gibs/body, -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage" - }, +/obj/item/weapon/soap/homemade, +/turf/open/floor/plasteel/white, /area/wizard_station) "nM" = ( /turf/closed/wall/shuttle{ @@ -4433,9 +4428,7 @@ }, /area/wizard_station) "nO" = ( -/turf/open/floor/plasteel/cult/airless{ - icon_state = "cultdamage7" - }, +/turf/open/floor/plasteel/warning, /area/wizard_station) "nP" = ( /obj/structure/dresser, @@ -4449,9 +4442,12 @@ /turf/open/floor/carpet, /area/wizard_station) "nR" = ( -/turf/closed/indestructible/fakedoor{ - name = "Squad 2 Pod" +/obj/structure/toilet{ + tag = "icon-toilet00 (NORTH)"; + icon_state = "toilet00"; + dir = 1 }, +/turf/open/floor/plasteel/white, /area/wizard_station) "nS" = ( /turf/closed/wall/shuttle, @@ -4646,10 +4642,11 @@ /area/centcom/holding) "ow" = ( /obj/structure/window/reinforced{ + resistance_flags = 3; color = "#008000"; dir = 1 }, -/turf/open/floor/plating/lava/airless, +/turf/open/floor/plating/lava, /area/wizard_station) "ox" = ( /obj/structure/rack, @@ -4663,8 +4660,10 @@ /turf/open/floor/plating/beach/sand, /area/centcom/holding) "oz" = ( -/obj/structure/shuttle/engine/heater, -/turf/open/floor/plating/lava/airless, +/obj/structure/shuttle/engine/heater{ + resistance_flags = 3 + }, +/turf/open/floor/plating/lava, /area/wizard_station) "oA" = ( /obj/structure/rack, @@ -5106,8 +5105,8 @@ /area/ctf) "qd" = ( /obj/structure/window/reinforced/fulltile{ - health = 1e+007; - maxhealth = 1e+007; + obj_integrity = 5000; + max_integrity = 5000; name = "hardened window" }, /turf/open/floor/plating, @@ -5797,6 +5796,152 @@ dir = 8 }, /area/holodeck/rec_center/medical) +"sK" = ( +/obj/structure/table/wood/fancy, +/obj/item/device/radio/intercom{ + desc = "Talk smack through this." + }, +/turf/open/floor/wood, +/area/wizard_station) +"sL" = ( +/obj/structure/chair/wood/wings, +/turf/open/floor/carpet, +/area/wizard_station) +"sM" = ( +/obj/structure/chair/wood/wings{ + tag = "icon-wooden_chair_wings (EAST)"; + icon_state = "wooden_chair_wings"; + dir = 4 + }, +/turf/open/floor/carpet, +/area/wizard_station) +"sN" = ( +/obj/structure/table/wood/poker, +/obj/item/toy/figure/wizard, +/turf/open/floor/carpet, +/area/wizard_station) +"sO" = ( +/obj/structure/chair/wood/wings{ + tag = "icon-wooden_chair_wings (WEST)"; + icon_state = "wooden_chair_wings"; + dir = 8 + }, +/turf/open/floor/carpet, +/area/wizard_station) +"sP" = ( +/obj/structure/chair/wood/wings{ + icon_state = "wooden_chair_wings"; + dir = 1 + }, +/turf/open/floor/carpet, +/area/wizard_station) +"sQ" = ( +/obj/structure/chair/wood/wings{ + tag = "icon-wooden_chair_wings (WEST)"; + icon_state = "wooden_chair_wings"; + dir = 8 + }, +/turf/open/floor/wood, +/area/wizard_station) +"sR" = ( +/obj/item/weapon/statuebust{ + pixel_y = 12 + }, +/obj/structure/table/wood/fancy, +/turf/open/floor/wood, +/area/wizard_station) +"sS" = ( +/obj/structure/table/wood/fancy, +/obj/item/weapon/storage/photo_album, +/turf/open/floor/carpet, +/area/wizard_station) +"sT" = ( +/obj/item/weapon/reagent_containers/food/snacks/meat/slab/corgi, +/turf/open/floor/grass, +/area/wizard_station) +"sU" = ( +/obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/slime, +/turf/open/floor/grass, +/area/wizard_station) +"sV" = ( +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Storage" + }, +/turf/open/floor/engine/cult, +/area/wizard_station) +"sW" = ( +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Bathroom" + }, +/turf/open/floor/engine/cult, +/area/wizard_station) +"sX" = ( +/obj/item/clothing/suit/wizrobe/black, +/obj/item/clothing/head/wizard/black, +/turf/open/floor/plasteel/bot, +/area/wizard_station) +"sY" = ( +/turf/open/floor/plasteel/bot, +/area/wizard_station) +"sZ" = ( +/obj/item/cardboard_cutout, +/turf/open/floor/plasteel/bot, +/area/wizard_station) +"ta" = ( +/obj/structure/punching_bag, +/turf/open/floor/carpet, +/area/wizard_station) +"tb" = ( +/turf/open/floor/plasteel/white, +/area/wizard_station) +"tc" = ( +/obj/structure/mirror/magic{ + pixel_y = 28 + }, +/obj/structure/sink{ + pixel_y = 20 + }, +/turf/open/floor/plasteel/white, +/area/wizard_station) +"td" = ( +/obj/item/weapon/cautery/alien, +/turf/open/floor/plasteel/bot, +/area/wizard_station) +"te" = ( +/obj/item/weapon/coin/antagtoken, +/turf/open/floor/plasteel/bot, +/area/wizard_station) +"tf" = ( +/obj/structure/closet/cardboard, +/obj/item/weapon/banhammer, +/turf/open/floor/plasteel/warning, +/area/wizard_station) +"tg" = ( +/obj/vehicle/scooter/skateboard{ + tag = "icon-skateboard (EAST)"; + icon_state = "skateboard"; + dir = 4 + }, +/turf/open/floor/plasteel/warning, +/area/wizard_station) +"th" = ( +/obj/machinery/door/airlock{ + icon = 'icons/obj/doors/airlocks/station/uranium.dmi'; + name = "Engine Room" + }, +/obj/structure/barricade/wooden, +/turf/open/floor/engine/cult, +/area/wizard_station) +"ti" = ( +/obj/structure/table/wood, +/obj/item/weapon/bikehorn/golden{ + pixel_x = -8; + pixel_y = 8 + }, +/turf/open/floor/engine/cult, +/area/wizard_station) "tj" = ( /turf/closed/indestructible/riveted, /area/awaymission/errorroom) @@ -8619,7 +8764,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -8876,7 +9021,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -9133,7 +9278,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -9390,7 +9535,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -9647,7 +9792,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -9904,7 +10049,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -10161,7 +10306,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -10418,7 +10563,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -10650,9 +10795,9 @@ aa aa aa aa -aa -aa -aa +jc +jc +jc jc sa sb @@ -10660,6 +10805,9 @@ mA sb mV jc +mo +mO +jc aa aa aa @@ -10673,9 +10821,6 @@ aa aa aa aa -aa -aa -ab ab ab ab @@ -10906,10 +11051,10 @@ aa aa aa aa -aa -aa +jc +jc ju -kV +kP lQ kG kG @@ -10917,8 +11062,10 @@ kG kG kG nb -md -ju +kG +kG +jc +jc aa aa aa @@ -10927,7 +11074,6 @@ aa aa aa aa -ju aa aa aa @@ -10989,7 +11135,6 @@ ab ab ab ab -ab "} (21,1,1) = {" ab @@ -11162,20 +11307,26 @@ aa aa aa aa -aa -aa -li -aa -ju +jc +jc +sK +sQ +kP jc kG kG -ln -lI +kG +kG kG jc -ju -ju +kG +nD +kG +jc +jc +jc +jc +jc aa aa aa @@ -11184,12 +11335,6 @@ aa aa aa aa -ju -ju -aa -aa -aa -ab ab ab ab @@ -11418,35 +11563,35 @@ aa aa aa aa -aa -aa -kP -lj -kP -aa jc -lW -mp +jc +kP +kP +kP +kP +jc +sa +sb kG -lz +sb mV jc -aa -aa -aa -aa -aa -aa -aa -aa -aa -ju -nO +kG +kG +kG +jc +sX +td +tf +jc +jc +ku jc aa aa aa -ab +aa +aa ab ab ab @@ -11675,35 +11820,35 @@ aa aa aa aa -aa +jc ju kQ -lk kP -aa +kP +kP jc jc mo -mB -mP +mz +mO jc jc -ju -nh -ju -aa -aa -aa +kG +nD +kG +sV +sY +sY nO -ju -ju -kj -jx +th +kG +kG jc aa aa aa -ab +aa +aa ab ab ab @@ -11929,38 +12074,38 @@ aa aa aa aa -ju -ju jc jc -ju +jc +jc +sK kP -ll kP -ju +kP +sR jc lX -kF -lz -lI +kG +kG +kG mW jc -aa -kj -ju -ju -aa -aa -ju +kG +kG +kG +jc +sZ +te +tg jc jc -ok +th jc jc jc aa aa -ab +aa ab ab ab @@ -12185,29 +12330,29 @@ aa aa aa aa -aa -aa -jN +jc +jc +kG ki jc jc -kS +jc lm -kS -lG +jc +jc jc lY -kF -ln +kG +kG kG kG jc -ju -aa -aa +kG +nD +kG +jc jc jc -ku jc jc kG @@ -12217,7 +12362,7 @@ ow jc aa aa -ab +aa ab ab ab @@ -12443,25 +12588,25 @@ aa aa aa iZ -jv -jO -kj +kG +kG +kG ku -kE -kT -kT -kT +kG +kG +kG +kG lH jc kG kG kG kG -ln +kG ku -ne -ni -nr +kG +kG +kG jc nC nD @@ -12474,7 +12619,7 @@ ow oz oC aa -ab +aa ab ab ab @@ -12701,24 +12846,24 @@ aa aa ja jw -jP -sc +kG +kG kv -kF -kU kG kG -lI +kG +kG +kG lR kG kG hL mQ -lI -nc -kU -nj -ln +kG +nb +kG +nD +kG ny nD nK @@ -12731,7 +12876,7 @@ ow oz oC aa -ab +aa ab ab ab @@ -12957,14 +13102,14 @@ aa aa aa jb -jx -jx -kk +kG +kG +kG ku kG kG -ln -lz +kG +kG lJ jc kG @@ -12973,11 +13118,11 @@ kG kG kG ku -nr -nr -ni +kG +kG +kG jc -nD +ta nD nQ jc @@ -12988,7 +13133,7 @@ ow oz oC aa -ab +aa ab ab ab @@ -13215,14 +13360,14 @@ aa aa jc jc -jQ +kG kl jc jc -kV +jc lo -ln -lI +jc +jc jc lZ kG @@ -13230,22 +13375,22 @@ kG kG kG jc -aa -ju -aa -jc -jc -ku -jc -jc kG +nD +kG +jc +jc +jc +jc +jc +ti kG oo ow jc aa aa -ab +aa ab ab ab @@ -13475,9 +13620,9 @@ jc jc jc jc -aa -ju -lp +nD +sM +nD lp kV jc @@ -13485,24 +13630,24 @@ ma mr mD kG -mW +kG +jc +kG +kG +kG jc -aa -aa -aa -ju nh nL jP jc jc -sc +ku jc jc jc aa aa -ab +aa ab ab ab @@ -13731,12 +13876,12 @@ aa aa aa aa -aa -aa -aa -ju -aa -ju +jc +sL +sN +sP +nD +sS jc jc mo @@ -13744,14 +13889,15 @@ mz mO jc jc -ju -nk -aa -aa -kS -kP +kG +nD +kG +sW +tb +tb nR -kP +jc +aa aa aa aa @@ -13759,7 +13905,6 @@ aa aa aa aa -ab ab ab ab @@ -13988,28 +14133,29 @@ aa aa aa aa -aa -aa -aa -ju -lA -ju jc +jc +sO +nD +sM +nD +iZ mb -ms +kF mE mR -mX +kF +iZ +kG +kG +kG +jc +tc +tb +ll jc aa aa -ju -ju -lm -ll -ll -nT -nX aa aa aa @@ -14073,7 +14219,6 @@ ab ab ab ab -ab "} (33,1,1) = {" ab @@ -14246,34 +14391,34 @@ aa aa aa aa -aa -aa -aa +jc +jc +sL lB -aa +sP +ja +mc +kS +mc +sU +mc +ja +kG +nD +kG +jc +jc +jc jc -mc -kS -mF -kS -mc jc aa aa aa -ju -kS -kP -kP -kP aa aa aa aa aa -aa -aa -ab ab ab ab @@ -14504,23 +14649,24 @@ aa aa aa aa -aa -aa -aa -aa -aa +jc +jc +sO +nD +jb md -kP -mG -kP -mZ -ju -aa -aa -aa -aa -nF -jx +sT +kF +kS +kF +jb +kG +kG +jc +jc +aa +aa +aa aa aa aa @@ -14530,7 +14676,6 @@ aa aa aa aa -ab ab ab ab @@ -14762,32 +14907,32 @@ aa aa aa aa -aa -aa -aa -ju +jc +jc +jc +jc kF -kP -mH +kS +mc mT na -ju -aa -aa -aa -aa -ju jc -ju -ju -ju -kj +mo +mO +jc +aa +aa +aa +aa +aa +aa +aa +aa aa aa aa aa aa -ab ab ab ab @@ -15022,14 +15167,15 @@ aa aa aa aa -aa -ju -kP -mI -kP -aa -ju -ju +jc +jc +jc +jc +jc +jc +jc +aa +aa aa aa aa @@ -15044,7 +15190,6 @@ aa aa aa aa -ab ab ab ab @@ -15280,9 +15425,6 @@ aa aa aa aa -ju -aa -mJ aa aa aa @@ -15301,7 +15443,10 @@ aa aa aa aa -ab +aa +aa +aa +aa ab ab ab @@ -15558,7 +15703,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -15815,7 +15960,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -16072,7 +16217,7 @@ aa aa aa aa -ab +aa ab ab ab @@ -16286,50 +16431,50 @@ ab ab ab ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa ab ab ab @@ -16543,50 +16688,50 @@ ab ab ab ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab -ab +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa +aa ab ab ab diff --git a/_maps/shuttles/emergency_narnar.dmm b/_maps/shuttles/emergency_narnar.dmm index 3295aee638a..a6da04a5188 100644 --- a/_maps/shuttles/emergency_narnar.dmm +++ b/_maps/shuttles/emergency_narnar.dmm @@ -164,9 +164,6 @@ /area/shuttle/escape) "G" = ( /obj/structure/extinguisher_cabinet{ - has_extinguisher = null; - icon_state = "extinguisher_empty"; - opened = 1; pixel_x = 27; pixel_y = 0 }, diff --git a/_maps/shuttles/ferry_lighthouse.dmm b/_maps/shuttles/ferry_lighthouse.dmm index 4c7a8f32df9..839c368a103 100644 --- a/_maps/shuttles/ferry_lighthouse.dmm +++ b/_maps/shuttles/ferry_lighthouse.dmm @@ -82,7 +82,7 @@ /turf/open/floor/wood, /area/shuttle/transport) "as" = ( -/obj/machinery/shield, +/obj/structure/emergency_shield, /turf/open/space, /area/shuttle/transport) "at" = ( diff --git a/_maps/shuttles/whiteship_meta.dmm b/_maps/shuttles/whiteship_meta.dmm index 6a59a3ca020..2a63bb714cf 100644 --- a/_maps/shuttles/whiteship_meta.dmm +++ b/_maps/shuttles/whiteship_meta.dmm @@ -296,7 +296,7 @@ /obj/effect/spawner/lootdrop/maintenance, /obj/item/weapon/extinguisher, /obj/item/weapon/extinguisher, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /obj/effect/decal/cleanable/dirt{ desc = "A thin layer of dust coating the floor."; name = "dust" @@ -716,7 +716,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium/blue, /area/shuttle/abandoned) "br" = ( @@ -1319,7 +1319,7 @@ desc = "A thin layer of dust coating the floor."; name = "dust" }, -/obj/effect/decal/cleanable/cobweb2, +/obj/effect/decal/cleanable/cobweb/cobweb2, /turf/open/floor/mineral/titanium, /area/shuttle/abandoned) "cw" = ( diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index ad3d3d6027b..d96df8be171 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -4,13 +4,32 @@ #define in_range(source, user) (get_dist(source, user) <= 1) -#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable +#define ismovableatom(A) (istype(A, /atom/movable)) -// MOB HELPERS +//Turfs +#define isopenturf(A) (istype(A, /turf/open)) + +#define isspaceturf(A) (istype(A, /turf/open/space)) + +#define isfloorturf(A) (istype(A, /turf/open/floor)) + +#define isclosedturf(A) (istype(A, /turf/closed)) + +#define iswallturf(A) (istype(A, /turf/closed/wall)) + +#define ismineralturf(A) (istype(A, /turf/closed/mineral)) + +//Mobs +#define isliving(A) (istype(A, /mob/living)) + +#define isbrain(A) (istype(A, /mob/living/brain)) + +//Carbon mobs +#define iscarbon(A) (istype(A, /mob/living/carbon)) #define ishuman(A) (istype(A, /mob/living/carbon/human)) -// Human sub-species +//Human sub-species #define isabductor(A) (is_species(A, /datum/species/abductor)) #define isgolem(A) (is_species(A, /datum/species/golem)) #define islizard(A) (is_species(A, /datum/species/lizard)) @@ -22,80 +41,78 @@ #define iszombie(A) (is_species(A, /datum/species/zombie)) #define ishumanbasic(A) (is_species(A, /datum/species/human)) +//more carbon mobs #define ismonkey(A) (istype(A, /mob/living/carbon/monkey)) -#define isbrain(A) (istype(A, /mob/living/brain)) - #define isalien(A) (istype(A, /mob/living/carbon/alien)) -#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid)) - #define islarva(A) (istype(A, /mob/living/carbon/alien/larva)) -#define isslime(A) (istype(A, /mob/living/simple_animal/slime)) +#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid)) -#define isrobot(A) (istype(A, /mob/living/silicon/robot)) +//Silicon mobs +#define issilicon(A) (istype(A, /mob/living/silicon)) -#define isanimal(A) (istype(A, /mob/living/simple_animal)) - -#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi)) - -#define iscrab(A) (istype(A, /mob/living/simple_animal/crab)) - -#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat)) - -#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse)) - -#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct)) - -#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork)) - -#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna)) - -#define isshade(A) (istype(A, /mob/living/simple_animal/shade)) - -#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear)) - -#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp)) - -#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) +#define iscyborg(A) (istype(A, /mob/living/silicon/robot)) #define isAI(A) (istype(A, /mob/living/silicon/ai)) #define ispAI(A) (istype(A, /mob/living/silicon/pai)) -#define iscarbon(A) (istype(A, /mob/living/carbon)) +//Simple animals +#define isanimal(A) (istype(A, /mob/living/simple_animal)) -#define issilicon(A) (istype(A, /mob/living/silicon)) +#define isbot(A) (istype(A, /mob/living/simple_animal/bot)) -#define iscyborg(A) (istype(A, /mob/living/silicon/robot)) +#define iscrab(A) (istype(A, /mob/living/simple_animal/crab)) -#define isliving(A) (istype(A, /mob/living)) +#define isshade(A) (istype(A, /mob/living/simple_animal/shade)) +#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse)) + +#define isslime(A) (istype(A, /mob/living/simple_animal/slime)) + +#define isdrone(A) (istype(A, /mob/living/simple_animal/drone)) + +#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat)) + +#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog)) + +#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi)) + +#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile)) + +#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear)) + +#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp)) + +#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer)) + +#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian)) + +#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork)) + +#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct)) + +#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna)) + +#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) + +//Misc mobs #define isobserver(A) (istype(A, /mob/dead/observer)) #define isnewplayer(A) (istype(A, /mob/new_player)) #define isovermind(A) (istype(A, /mob/camera/blob)) -#define isdrone(A) (istype(A, /mob/living/simple_animal/drone)) - -#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer)) - -#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian)) - -#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile)) +//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 islimb(A) (istype(A, /obj/item/bodypart)) -#define isbot(A) (istype(A, /mob/living/simple_animal/bot)) - -#define ismovableatom(A) (istype(A, /atom/movable)) - -#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs - -// ASSEMBLY HELPERS +#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable +//Assemblies #define isassembly(O) (istype(O, /obj/item/device/assembly)) #define isigniter(O) (istype(O, /obj/item/device/assembly/igniter)) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index a9821785a81..d96f8eca685 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -343,13 +343,12 @@ var/list/bloody_footprints_cache = list() //Fire and Acid stuff, for resistance_flags #define LAVA_PROOF 1 -#define FIRE_PROOF 2 //not flammable (but may or may not take damage from fire) -#define ON_FIRE 4 -#define UNACIDABLE 8 //acid can't even appear on it, let alone melt it. -#define ACID_PROOF 16 //acid stuck on it doesn't melt it. -#define INDESTRUCTIBLE 32 //doesn't take damage -#define EMP_PROOF 64 //immune to emp - +#define FIRE_PROOF 2 //100% immune to fire damage (but not necessarily to lava or heat) +#define FLAMMABLE 4 +#define ON_FIRE 8 +#define UNACIDABLE 16 //acid can't even appear on it, let alone melt it. +#define ACID_PROOF 32 //acid stuck on it doesn't melt it. +#define INDESTRUCTIBLE 64 //doesn't take damage //Ghost orbit types: #define GHOST_ORBIT_CIRCLE "circle" diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 56cf125ad71..dfccaa1320c 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -348,9 +348,9 @@ continue else if(afk_check && M.client.is_afk()) continue - else if(human_check && !istype(M, /mob/living/carbon/human)) + else if(human_check && !ishuman(M)) continue - else if(istype(M, /mob/new_player)) // exclude people in the lobby + else if(isnewplayer(M)) // exclude people in the lobby continue else if(isobserver(M)) // Ghosts are fine if they were playing once (didn't start as observers) var/mob/dead/observer/O = M diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 22b6e15808e..2f787680934 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -166,7 +166,7 @@ if(T && (T.density || T.smooth)) T = get_step(src, turn(adjacencies, 225)) - if(istype(T, /turf/open/space) && !istype(T, /turf/open/space/transit)) + if(isspaceturf(T) && !istype(T, /turf/open/space/transit)) underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) else if(T && !T.density && !T.smooth) underlays += T diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 244229615b2..b524a614498 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -360,7 +360,7 @@ Proc for attack log creation, because really why not var/adminoverride = 0 if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD)) adminoverride = 1 - if(istype(M, /mob/new_player) && !adminoverride) + if(isnewplayer(M) && !adminoverride) continue if(M.stat != DEAD && !adminoverride) continue @@ -375,7 +375,7 @@ Proc for attack log creation, because really why not if(prefs.toggles & DISABLE_ARRIVALRATTLE) continue - if(istype(M, /mob/dead/observer) && follow_target) + if(isobserver(M) && follow_target) var/link = FOLLOW_LINK(M, follow_target) M << "[link] [message]" else diff --git a/code/__HELPERS/pronouns.dm b/code/__HELPERS/pronouns.dm index c3f2d4c18c8..0bb4b3b9184 100644 --- a/code/__HELPERS/pronouns.dm +++ b/code/__HELPERS/pronouns.dm @@ -1,28 +1,34 @@ //pronoun procs, for getting pronouns without using the text macros that only work in certain positions //datums don't have gender, but most of their subtypes do! -/datum/proc/they_pronoun(capitalized, temp_gender) +/datum/proc/p_they(capitalized, temp_gender) . = "it" if(capitalized) . = capitalize(.) -/datum/proc/their_pronoun(capitalized, temp_gender) +/datum/proc/p_their(capitalized, temp_gender) . = "its" if(capitalized) . = capitalize(.) -/datum/proc/them_pronoun(capitalized, temp_gender) +/datum/proc/p_them(capitalized, temp_gender) . = "it" if(capitalized) . = capitalize(.) -/datum/proc/get_has(temp_gender) +/datum/proc/p_have(temp_gender) . = "has" -/datum/proc/get_is(temp_gender) +/datum/proc/p_are(temp_gender) . = "is" +/datum/proc/p_theyre(capitalized, temp_gender) + . = p_they(capitalized, temp_gender) + "'" + copytext(p_are(temp_gender), 2) + +/datum/proc/p_s(temp_gender) //is this a descriptive proc name, or what? + . = "s" + //like clients, which do have gender. -/client/they_pronoun(capitalized, temp_gender) +/client/p_they(capitalized, temp_gender) if(!temp_gender) temp_gender = gender . = "they" @@ -34,7 +40,7 @@ if(capitalized) . = capitalize(.) -/client/their_pronoun(capitalized, temp_gender) +/client/p_their(capitalized, temp_gender) if(!temp_gender) temp_gender = gender . = "their" @@ -46,7 +52,7 @@ if(capitalized) . = capitalize(.) -/client/them_pronoun(capitalized, temp_gender) +/client/p_them(capitalized, temp_gender) if(!temp_gender) temp_gender = gender . = "them" @@ -58,22 +64,28 @@ if(capitalized) . = capitalize(.) -/client/get_has(temp_gender) +/client/p_have(temp_gender) if(!temp_gender) temp_gender = gender . = "has" if(temp_gender == PLURAL || temp_gender == NEUTER) . = "have" -/client/get_is(temp_gender) +/client/p_are(temp_gender) if(!temp_gender) temp_gender = gender . = "is" if(temp_gender == PLURAL || temp_gender == NEUTER) . = "are" +/client/p_s(temp_gender) + if(!temp_gender) + temp_gender = gender + if(temp_gender != PLURAL && temp_gender != NEUTER) + . = "s" + //mobs(and atoms but atoms don't really matter write your own proc overrides) also have gender! -/mob/they_pronoun(capitalized, temp_gender) +/mob/p_they(capitalized, temp_gender) if(!temp_gender) temp_gender = gender . = "it" @@ -87,7 +99,7 @@ if(capitalized) . = capitalize(.) -/mob/their_pronoun(capitalized, temp_gender) +/mob/p_their(capitalized, temp_gender) if(!temp_gender) temp_gender = gender . = "its" @@ -101,7 +113,7 @@ if(capitalized) . = capitalize(.) -/mob/them_pronoun(capitalized, temp_gender) +/mob/p_them(capitalized, temp_gender) if(!temp_gender) temp_gender = gender . = "it" @@ -115,50 +127,63 @@ if(capitalized) . = capitalize(.) -/mob/get_has(temp_gender) +/mob/p_have(temp_gender) if(!temp_gender) temp_gender = gender . = "has" if(temp_gender == PLURAL) . = "have" -/mob/get_is(temp_gender) +/mob/p_are(temp_gender) if(!temp_gender) temp_gender = gender . = "is" if(temp_gender == PLURAL) . = "are" +/mob/p_s(temp_gender) + if(!temp_gender) + temp_gender = gender + if(temp_gender != PLURAL) + . = "s" + //humans need special handling, because they can have their gender hidden -/mob/living/carbon/human/they_pronoun(capitalized, temp_gender) +/mob/living/carbon/human/p_they(capitalized, temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) if((slot_w_uniform in obscured) && skipface) temp_gender = PLURAL return ..() -/mob/living/carbon/human/their_pronoun(capitalized, temp_gender) +/mob/living/carbon/human/p_their(capitalized, temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) if((slot_w_uniform in obscured) && skipface) temp_gender = PLURAL return ..() -/mob/living/carbon/human/them_pronoun(capitalized, temp_gender) +/mob/living/carbon/human/p_them(capitalized, temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) if((slot_w_uniform in obscured) && skipface) temp_gender = PLURAL return ..() -/mob/living/carbon/human/get_has(temp_gender) +/mob/living/carbon/human/p_have(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) if((slot_w_uniform in obscured) && skipface) temp_gender = PLURAL return ..() -/mob/living/carbon/human/get_is(temp_gender) +/mob/living/carbon/human/p_are(temp_gender) + var/list/obscured = check_obscured_slots() + var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) + if((slot_w_uniform in obscured) && skipface) + temp_gender = PLURAL + return ..() + +/mob/living/carbon/human/p_s(temp_gender) var/list/obscured = check_obscured_slots() var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE)) if((slot_w_uniform in obscured) && skipface) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index cdd827a3895..2d1535cd464 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -396,7 +396,22 @@ for(var/t in test_times) return - +//for each body zone, gives the corresponding body_parts_covered bitfield +/proc/body_zone2body_parts_covered(b_zone) + b_zone = check_zone(b_zone) + switch(b_zone) + if("chest") + return CHEST + if("head") + return HEAD + if("r_arm") + return ARM_RIGHT + if("l_arm") + return ARM_LEFT + if("r_leg") + return LEG_RIGHT + if("l_leg") + return LEG_LEFT //Turns a Body_parts_covered bitfield into a list of organ/limb names. //(I challenge you to find a use for this) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index d90ae1925bb..a4427a96e52 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -441,7 +441,7 @@ Turf and target are seperate in case you want to teleport some distance from a t // For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf. /proc/get_atom_on_turf(atom/movable/M) var/atom/loc = M - while(loc && loc.loc && !istype(loc.loc, /turf/)) + while(loc && loc.loc && !isturf(loc.loc)) loc = loc.loc return loc @@ -823,11 +823,11 @@ var/list/WALLITEMS = list( ) var/list/WALLITEMS_EXTERNAL = list( - /obj/machinery/camera, /obj/machinery/camera_assembly, - /obj/machinery/light_construct, /obj/machinery/light) + /obj/machinery/camera, /obj/structure/camera_assembly, + /obj/structure/light_construct, /obj/machinery/light) var/list/WALLITEMS_INVERSE = list( - /obj/machinery/light_construct, /obj/machinery/light) + /obj/structure/light_construct, /obj/machinery/light) /proc/gotwallitem(loc, dir, var/check_external = 0) @@ -971,7 +971,7 @@ var/list/WALLITEMS_INVERSE = list( /proc/is_A_facing_B(atom/A,atom/B) if(!istype(A) || !istype(B)) return 0 - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/LA = A if(LA.lying) return 0 diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index 8ec7d0c3843..901c4b14461 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -133,7 +133,7 @@ if(isAI(usr)) var/mob/living/silicon/ai/AI = usr AI.aicamera.toggle_camera_mode() - else if(isrobot(usr)) + else if(iscyborg(usr)) var/mob/living/silicon/robot/R = usr R.aicamera.toggle_camera_mode() @@ -145,7 +145,7 @@ if(isAI(usr)) var/mob/living/silicon/ai/AI = usr AI.aicamera.viewpictures() - else if(isrobot(usr)) + else if(iscyborg(usr)) var/mob/living/silicon/robot/R = usr R.aicamera.viewpictures() diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 0e8129962ec..93292a2ee4a 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -179,7 +179,7 @@ /datum/hud/proc/toggle_show_robot_modules() - if(!isrobot(mymob)) return + if(!iscyborg(mymob)) return var/mob/living/silicon/robot/R = mymob @@ -187,7 +187,7 @@ update_robot_modules_display() /datum/hud/proc/update_robot_modules_display(mob/viewer) - if(!isrobot(mymob)) return + if(!iscyborg(mymob)) return var/mob/living/silicon/robot/R = mymob diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index adfe508f6c8..dc40fa92d96 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -10,11 +10,14 @@ name = "" icon = 'icons/mob/screen_gen.dmi' layer = ABOVE_HUD_LAYER - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF appearance_flags = APPEARANCE_UI var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. var/datum/hud/hud = null // A reference to the owner HUD, if any. +/obj/screen/take_damage() + return + /obj/screen/Destroy() master = null return ..() diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index ced66536d87..2b20a5ed50f 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -46,6 +46,8 @@ /obj/item/proc/attack_obj(obj/O, mob/living/user) if(flags & NOBLUDGEON) return + if(user.a_intent == "help") //so you don't hit a machine with a tool while trying to disassemble it. + return user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(O) O.attacked_by(src, user) @@ -58,6 +60,7 @@ /obj/attacked_by(obj/item/I, mob/living/user) if(I.force) user.visible_message("[user] has hit [src] with [I]!", "You hit [src] with [I]!") + take_damage(I.force, I.damtype, "melee", 1) /mob/living/attacked_by(obj/item/I, mob/living/user) send_item_attack_message(I, user) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 333d7447396..541b485af80 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -18,6 +18,7 @@ var/server_suffix = 0 // generate numeric suffix based on server port var/lobby_countdown = 120 // In between round countdown. var/round_end_countdown = 25 // Post round murder death kill countdown + var/hub = 0 var/log_ooc = 0 // log OOC channel var/log_access = 0 // log login/logout @@ -264,6 +265,8 @@ if(type == "config") switch(name) + if("hub") + config.hub = 1 if("admin_legacy_system") config.admin_legacy_system = 1 if("ban_legacy_system") diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm new file mode 100644 index 00000000000..23b671bf710 --- /dev/null +++ b/code/controllers/subsystem/acid.dm @@ -0,0 +1,42 @@ +var/datum/subsystem/acid/SSacid + +/datum/subsystem/acid + name = "Acid" + priority = 40 + flags = SS_NO_INIT|SS_BACKGROUND + + var/list/currentrun = list() + var/list/processing = list() + +/datum/subsystem/acid/New() + NEW_SS_GLOBAL(SSacid) + + +/datum/subsystem/acid/stat_entry() + ..("P:[processing.len]") + + +/datum/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.overlays -= acid_overlay + O.priority_overlays -= acid_overlay + processing -= O + + if (MC_TICK_CHECK) + return diff --git a/code/controllers/subsystem/fire_burning.dm b/code/controllers/subsystem/fire_burning.dm new file mode 100644 index 00000000000..2ace744430e --- /dev/null +++ b/code/controllers/subsystem/fire_burning.dm @@ -0,0 +1,42 @@ +var/datum/subsystem/fire_burning/SSfire_burning + +/datum/subsystem/fire_burning + name = "Fire Burning" + priority = 40 + flags = SS_NO_INIT|SS_BACKGROUND + + var/list/currentrun = list() + var/list/processing = list() + +/datum/subsystem/fire_burning/New() + NEW_SS_GLOBAL(SSfire_burning) + + +/datum/subsystem/fire_burning/stat_entry() + ..("P:[processing.len]") + + +/datum/subsystem/fire_burning/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.resistance_flags & ON_FIRE) + O.take_damage(20, BURN, "fire", 0) + else + processing -= O + + if (MC_TICK_CHECK) + return + diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 27972b658c0..8b0968bec10 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -382,7 +382,7 @@ var/datum/subsystem/job/SSjob if(clear) S = T continue - if(istype(S, /obj/effect/landmark) && istype(S.loc, /turf)) + if(istype(S, /obj/effect/landmark) && isturf(S.loc)) H.loc = S.loc if(H.mind) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index d651cabd498..1687cb1b2b8 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -87,7 +87,7 @@ var/datum/subsystem/minimap/SSminimap var/obj/obj var/list/obj_icons // Don't use icons for space, just add objects in space if they exist. - if(istype(tile, /turf/open/space)) + if(isspaceturf(tile)) obj = locate(/obj/structure/lattice/catwalk) in tile if(obj) tile_icon = new /icon('icons/obj/smooth_structures/catwalk.dmi', "catwalk", SOUTH) diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 03fbf1aa4bc..183ef4944e7 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -29,7 +29,7 @@ var/datum/subsystem/persistence/SSpersistence var/list/free_satchels = list() for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION)))) //Nontrivially expensive but it's roundstart only - if(istype(T,/turf/open/floor) && !istype(T,/turf/open/floor/plating/)) + if(isfloorturf(T) && !istype(T,/turf/open/floor/plating/)) free_satchels += new /obj/item/weapon/storage/backpack/satchel/flat/secret(T) if(!isemptylist(free_satchels) && ((free_satchels.len + placed_satchels) >= (50 - expanded_old_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves break @@ -60,7 +60,7 @@ var/datum/subsystem/persistence/SSpersistence F.x = text2num(chosen_satchel[1]) F.y = text2num(chosen_satchel[2]) F.z = ZLEVEL_STATION - if(istype(F.loc,/turf/open/floor) && !istype(F.loc,/turf/open/floor/plating/)) + if(isfloorturf(F.loc) && !istype(F.loc,/turf/open/floor/plating/)) F.hide(1) new path(F) return 1 diff --git a/code/controllers/subsystem/processing/objects.dm b/code/controllers/subsystem/processing/objects.dm index fbb716ba326..7c4852ea3a2 100644 --- a/code/controllers/subsystem/processing/objects.dm +++ b/code/controllers/subsystem/processing/objects.dm @@ -14,14 +14,13 @@ var/datum/subsystem/objects/SSobj var/list/atom_spawners = list() var/list/processing = list() var/list/currentrun = list() - var/list/burning = list() /datum/subsystem/objects/New() NEW_SS_GLOBAL(SSobj) /datum/subsystem/objects/Initialize(timeofdayl) trigger_atom_spawners() - setupGenetics() + setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation. for(var/thing in world) var/atom/A = thing A.initialize() @@ -55,12 +54,6 @@ var/datum/subsystem/objects/SSobj if (MC_TICK_CHECK) return - for(var/obj/burningobj in SSobj.burning) - if(burningobj && (burningobj.resistance_flags & ON_FIRE)) - if(burningobj.burn_world_time < world.time) - burningobj.burn() - else - SSobj.burning.Remove(burningobj) /datum/subsystem/objects/proc/setup_template_objects(list/objects) trigger_atom_spawners(0, ignore_z=TRUE) @@ -73,5 +66,3 @@ var/datum/subsystem/objects/SSobj atom_spawners = SSobj.atom_spawners if (istype(SSobj.processing)) processing = SSobj.processing - if (istype(SSobj.burning)) - burning = SSobj.burning \ No newline at end of file diff --git a/code/controllers/subsystem/server_maintenance.dm b/code/controllers/subsystem/server_maintenance.dm index ee368c4c429..1e4b4ae76fe 100644 --- a/code/controllers/subsystem/server_maintenance.dm +++ b/code/controllers/subsystem/server_maintenance.dm @@ -3,12 +3,16 @@ var/datum/subsystem/server_maint/SSserver /datum/subsystem/server_maint name = "Server Tasks" wait = 6000 - init_order = 19 - flags = SS_NO_TICK_CHECK|SS_NO_INIT + flags = SS_NO_TICK_CHECK /datum/subsystem/server_maint/New() NEW_SS_GLOBAL(SSserver) +/datum/subsystem/server_maint/Initialize(timeofday) + if (config.hub) + world.visibility = 1 + ..() + /datum/subsystem/server_maint/fire() //handle kicking inactive players if(config.kick_inactive > 0) diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 8f320b9109b..5a031643733 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -82,7 +82,7 @@ var/datum/subsystem/shuttle/SSshuttle for(var/i in block(A, B)) var/turf/T = i // Only dying the "pure" space, not the transit tiles - if(!(T.type == /turf/open/space)) + if(istype(T, /turf/open/space/transit) || !isspaceturf(T)) continue if((T.x == A.x) || (T.x == B.x) || (T.y == A.y) || (T.y == B.y)) T.color = "#ffff00" @@ -234,7 +234,7 @@ var/datum/subsystem/shuttle/SSshuttle var/callShuttle = 1 for(var/thing in shuttle_caller_list) - if(istype(thing, /mob/living/silicon/ai)) + if(isAI(thing)) var/mob/living/silicon/ai/AI = thing if(AI.stat || !AI.client) continue diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 4294595a0a7..8719dc10b25 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -349,7 +349,7 @@ var/datum/subsystem/ticker/ticker SSjob.EquipRank(player, player.mind.assigned_role, 0) if(captainless) for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) + if(!isnewplayer(M)) M << "Captainship not forced on anyone." diff --git a/code/datums/antagonists/datum_clockcult.dm b/code/datums/antagonists/datum_clockcult.dm index ad369769eb8..8bca420cb6a 100644 --- a/code/datums/antagonists/datum_clockcult.dm +++ b/code/datums/antagonists/datum_clockcult.dm @@ -46,12 +46,15 @@ owner.attack_log += "\[[time_stamp()]\] Has been converted to the cult of Ratvar!" if(issilicon(owner)) var/mob/living/silicon/S = owner - if(isrobot(S) && !silent_update) + if(iscyborg(S) && !silent_update) S << "You have been desynced from your master AI. In addition, your onboard camera is no longer active and your safeties have been disabled." S << "You can communicate with other servants by using the Hierophant Network action button in the upper left." else if(isbrain(owner) || isclockmob(owner)) owner << "You can communicate with other servants by using the Hierophant Network action button in the upper left." ..() + if(istype(ticker.mode, /datum/game_mode/clockwork_cult)) + var/datum/game_mode/clockwork_cult/C = ticker.mode + C.present_tasks(owner) //Memorize the objectives /datum/antagonist/clockcultist/apply_innate_effects() all_clockwork_mobs += owner @@ -61,7 +64,7 @@ owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons if(issilicon(owner)) var/mob/living/silicon/S = owner - if(isrobot(S)) + if(iscyborg(S)) var/mob/living/silicon/robot/R = S R.UnlinkSelf() R.emagged = 1 @@ -102,14 +105,14 @@ owner.faction -= "ratvar" owner.languages_spoken &= ~RATVAR owner.languages_understood &= ~RATVAR - owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons + addtimer(owner, "update_action_buttons_icon", 1) //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons owner.clear_alert("clockinfo") owner.clear_alert("nocache") for(var/datum/action/innate/function_call/F in owner.actions) //Removes any bound Ratvarian spears qdel(F) if(issilicon(owner)) var/mob/living/silicon/S = owner - if(isrobot(S)) + if(iscyborg(S)) var/mob/living/silicon/robot/R = S R.emagged = initial(R.emagged) S.make_laws() @@ -125,9 +128,9 @@ ticker.mode.servants_of_ratvar -= owner.mind ticker.mode.update_servant_icons_removed(owner.mind) if(owner.mind) - owner.mind.memory = "" //Not sure if there's a better way to do this + owner.mind.wipe_memory() owner.mind.special_role = null owner.attack_log += "\[[time_stamp()]\] Has renounced the cult of Ratvar!" - if(isrobot(owner)) + if(iscyborg(owner)) owner << "Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking." ..() diff --git a/code/datums/antagonists/datum_cult.dm b/code/datums/antagonists/datum_cult.dm index 6bc2fe69381..60dd293581b 100644 --- a/code/datums/antagonists/datum_cult.dm +++ b/code/datums/antagonists/datum_cult.dm @@ -15,8 +15,10 @@ /datum/antagonist/cultist/on_gain() if(ticker && ticker.mode && owner.mind) ticker.mode.cult += owner.mind - ticker.mode.servants_of_ratvar += owner.mind ticker.mode.update_cult_icons_added(owner.mind) + if(istype(ticker.mode, /datum/game_mode/cult)) + var/datum/game_mode/cult/C = ticker.mode + C.memorize_cult_objectives(owner.mind) if(jobban_isbanned(owner, ROLE_CULTIST)) addtimer(ticker.mode, "replace_jobbaned_player", 0, FALSE, owner, ROLE_CULTIST, ROLE_CULTIST) if(owner.mind) @@ -36,11 +38,12 @@ ..() /datum/antagonist/cultist/on_remove() - if(ticker && ticker.mode && owner.mind) - ticker.mode.cult -= owner.mind - ticker.mode.update_cult_icons_removed(owner.mind) + if(owner.mind) + owner.mind.wipe_memory() + if(ticker && ticker.mode) + ticker.mode.cult -= owner.mind + ticker.mode.update_cult_icons_removed(owner.mind) owner << "An unfamiliar white light flashes through your mind, cleansing the taint of the Dark One and all your memories as its servant." - owner.memory = "" owner.attack_log += "\[[time_stamp()]\] Has renounced the cult of Nar'Sie!" if(!silent_update) owner.visible_message("[owner] looks like they just reverted to their old faith!") diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 3fa2fd28f10..0ef22a1645b 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -39,10 +39,12 @@ //title_image = ntitle_image /datum/browser/proc/add_stylesheet(name, file) - stylesheets[name] = file + stylesheets["[ckey(name)].css"] = file + register_asset("[ckey(name)].css", file) /datum/browser/proc/add_script(name, file) - scripts[name] = file + scripts["[ckey(name)].js"] = file + register_asset("[ckey(name)].js", file) /datum/browser/proc/set_content(ncontent) content = ncontent @@ -51,17 +53,12 @@ content += ncontent /datum/browser/proc/get_header() - var/key - var/filename - for (key in stylesheets) - filename = "[ckey(key)].css" - user << browse_rsc(stylesheets[key], filename) - head_content += "" + var/file + for (file in stylesheets) + head_content += "" - for (key in scripts) - filename = "[ckey(key)].js" - user << browse_rsc(scripts[key], filename) - head_content += "" + for (file in scripts) + head_content += "" var/title_attributes = "class='uiTitle'" if (title_image) @@ -98,6 +95,10 @@ var/window_size = "" if (width && height) window_size = "size=[width]x[height];" + if (stylesheets.len) + send_asset_list(user, stylesheets, verify=FALSE) + if (scripts.len) + send_asset_list(user, scripts, verify=FALSE) user << browse(get_content(), "window=[window_id];[window_size][window_options]") if (use_onclose) spawn(0) @@ -275,4 +276,4 @@ if(src && src.mob) //world << "[src] was [src.mob.machine], setting to null" src.mob.unset_machine() - return \ No newline at end of file + return diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 001614a66aa..f4b1fb0c031 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -82,7 +82,7 @@ var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4) - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src switch(target_zone) @@ -117,7 +117,7 @@ Cl = H.shoes passed = prob((Cl.permeability_coefficient*100) - 1) - else if(istype(src, /mob/living/carbon/monkey)) + else if(ismonkey(src)) var/mob/living/carbon/monkey/M = src switch(target_zone) if(1) diff --git a/code/datums/diseases/advance/symptoms/beard.dm b/code/datums/diseases/advance/symptoms/beard.dm index 37ff9f7a4ac..3c26bcd4d65 100644 --- a/code/datums/diseases/advance/symptoms/beard.dm +++ b/code/datums/diseases/advance/symptoms/beard.dm @@ -28,7 +28,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) if(1, 2) diff --git a/code/datums/diseases/advance/symptoms/damage_converter.dm b/code/datums/diseases/advance/symptoms/damage_converter.dm index ab79e52eb87..6216d05b924 100644 --- a/code/datums/diseases/advance/symptoms/damage_converter.dm +++ b/code/datums/diseases/advance/symptoms/damage_converter.dm @@ -87,7 +87,7 @@ Bonus var/get_damage = rand(1, 2) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/list/parts = H.get_damaged_bodyparts(1,1) diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index 900ffbc60b3..add3c6e1c61 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -29,7 +29,7 @@ BONUS if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob M << "[pick("Your scalp itches.", "Your skin feels flakey.")]" - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) if(3, 4) diff --git a/code/datums/diseases/advance/symptoms/skin.dm b/code/datums/diseases/advance/symptoms/skin.dm index 09ffbdf7e81..09b0f0a6de3 100644 --- a/code/datums/diseases/advance/symptoms/skin.dm +++ b/code/datums/diseases/advance/symptoms/skin.dm @@ -28,7 +28,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.skin_tone == "albino") return @@ -72,7 +72,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.skin_tone == "african2") return diff --git a/code/datums/diseases/advance/symptoms/youth.dm b/code/datums/diseases/advance/symptoms/youth.dm index 6d90d2b8cdc..d7607ed4f0e 100644 --- a/code/datums/diseases/advance/symptoms/youth.dm +++ b/code/datums/diseases/advance/symptoms/youth.dm @@ -28,7 +28,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB * 2)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) if(1) diff --git a/code/datums/diseases/magnitis.dm b/code/datums/diseases/magnitis.dm index 769495d1ac2..9518156f582 100644 --- a/code/datums/diseases/magnitis.dm +++ b/code/datums/diseases/magnitis.dm @@ -22,7 +22,8 @@ if(!M.anchored && (M.flags & CONDUCT)) step_towards(M,affected_mob) for(var/mob/living/silicon/S in orange(2,affected_mob)) - if(istype(S, /mob/living/silicon/ai)) continue + if(isAI(S)) + continue step_towards(S,affected_mob) if(3) if(prob(2)) @@ -37,7 +38,8 @@ for(i=0,iThe bluespace interface on your bag of holding interferes with the teleport!" return 1 @@ -185,7 +185,7 @@ var/z = pick(zlevels) var/random_location = locate(x,y,z) - if(!(istype(random_location, /turf/open/floor))) + if(!isfloorturf(random_location)) continue var/turf/open/floor/F = random_location if(!F.air) diff --git a/code/datums/martial.dm b/code/datums/martial.dm index 9b9cfb3c3d6..dfdb9d7e97d 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial.dm @@ -484,7 +484,7 @@ else user.take_bodypart_damage(2*force) return - if(isrobot(target)) + if(iscyborg(target)) return ..() if(!isliving(target)) return ..() diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index 1370278bf6d..ccd36422e68 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -172,4 +172,4 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - resistance_flags = FIRE_PROOF \ No newline at end of file + resistance_flags = 0 \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b7c70b57878..7d12dd05993 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -228,7 +228,7 @@ current.faction = creator.faction.Copy() - if(special_role) + if(creator.mind.special_role) message_admins("[key_name_admin(current)](?) has been created by [key_name_admin(creator)](?), an antagonist.") current << "Despite your creators current allegiances, your true master remains [creator.real_name]. If their loyalities change, so do yours. This will never change unless your creator's body is destroyed." @@ -419,13 +419,13 @@ if (ticker.mode.config_tag=="cult") text = uppertext(text) text = "[text]: " - if (src in ticker.mode.cult) + if(iscultist(current)) text += "loyal|employee|CULTIST" text += "
Give tome|amulet." else if(isloyal(current)) text += "LOYAL|employee|cultist" - else if(is_convertable_to_cult(src)) + else if(is_convertable_to_cult(current)) text += "loyal|EMPLOYEE|cultist" else text += "loyal|EMPLOYEE|cannot serve Nar-Sie" @@ -442,7 +442,7 @@ if(ticker.mode.config_tag == "clockwork cult") text = uppertext(text) text = "[text]: " - if(src in ticker.mode.servants_of_ratvar) + if(is_servant_of_ratvar(current)) text += "loyal|employee|SERVANT" text += "
Give slab" else if(isloyal(current)) @@ -512,9 +512,9 @@ if (ticker.mode.config_tag=="monkey") text = uppertext(text) text = "[text]: " - if (istype(current, /mob/living/carbon/human)) + if (ishuman(current)) text += "healthy|infected|HUMAN|other" - else if (istype(current, /mob/living/carbon/monkey)) + else if (ismonkey(current)) var/found = 0 for(var/datum/disease/D in current.viruses) if(istype(D, /datum/disease/transformation/jungle_fever)) found = 1 @@ -555,7 +555,7 @@ /** SILICON ***/ - if (istype(current, /mob/living/silicon)) + if(issilicon(current)) text = "silicon" var/mob/living/silicon/robot/robot = current if (istype(robot) && robot.emagged) @@ -583,10 +583,7 @@ out += sections[i]+"
" - if (((src in ticker.mode.head_revolutionaries) || \ - (src in ticker.mode.traitors) || \ - (src in ticker.mode.syndicates)) && \ - istype(current,/mob/living/carbon/human) ) + if(((src in ticker.mode.head_revolutionaries) || (src in ticker.mode.traitors) || (src in ticker.mode.syndicates)) && ishuman(current)) text = "Uplink: give" var/obj/item/device/uplink/U = find_syndicate_uplink() @@ -662,7 +659,7 @@ if ("assassinate","protect","debrain","maroon") var/list/possible_targets = list("Free objective") for(var/datum/mind/possible_target in ticker.minds) - if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human)) + if ((possible_target != src) && ishuman(possible_target.current)) possible_targets += possible_target.current var/mob/def_target = null @@ -1223,7 +1220,7 @@ log_admin("[key_name(usr)] has unemag'ed [R].") if("unemagcyborgs") - if (istype(current, /mob/living/silicon/ai)) + if(isAI(current)) var/mob/living/silicon/ai/ai = current for (var/mob/living/silicon/robot/R in ai.connected_robots) R.SetEmagged(0) @@ -1298,7 +1295,7 @@ if(spawnloc) current.loc = spawnloc - if(istype(current, /mob/living/carbon/human)) + if(ishuman(current)) var/mob/living/carbon/human/H = current qdel(H.belt) qdel(H.back) @@ -1367,9 +1364,7 @@ else var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it." current << "Objective #1: [explanation]" - current.memory += "Objective #1: [explanation]
" - current << "The convert rune is join blood self" - current.memory += "The convert rune is join blood self
" + memory += "Objective #1: [explanation]
" var/mob/living/carbon/human/H = current if (!ticker.mode.equip_cultist(current)) @@ -1531,53 +1526,20 @@ else spawn(0) throw EXCEPTION("mind_initialize(): No ticker ready") - if(!mind.name) mind.name = real_name + if(!mind.name) + mind.name = real_name mind.current = src //HUMAN /mob/living/carbon/human/mind_initialize() ..() - if(!mind.assigned_role) mind.assigned_role = "Assistant" //defualt - -//MONKEY -/mob/living/carbon/monkey/mind_initialize() - ..() - -//slime -/mob/living/simple_animal/slime/mind_initialize() - ..() - mind.special_role = "slime" - mind.assigned_role = "slime" + if(!mind.assigned_role) + mind.assigned_role = "Assistant" //defualt //XENO /mob/living/carbon/alien/mind_initialize() ..() mind.special_role = "Alien" - mind.assigned_role = "Alien" - //XENO HUMANOID -/mob/living/carbon/alien/humanoid/royal/queen/mind_initialize() - ..() - mind.special_role = "Queen" - -/mob/living/carbon/alien/humanoid/royal/praetorian/mind_initialize() - ..() - mind.special_role = "Praetorian" - -/mob/living/carbon/alien/humanoid/hunter/mind_initialize() - ..() - mind.special_role = "Hunter" - -/mob/living/carbon/alien/humanoid/drone/mind_initialize() - ..() - mind.special_role = "Drone" - -/mob/living/carbon/alien/humanoid/sentinel/mind_initialize() - ..() - mind.special_role = "Sentinel" - //XENO LARVA -/mob/living/carbon/alien/larva/mind_initialize() - ..() - mind.special_role = "Larva" //AI /mob/living/silicon/ai/mind_initialize() @@ -1594,29 +1556,3 @@ ..() mind.assigned_role = "pAI" mind.special_role = "" - -//BLOB -/mob/camera/blob/mind_initialize() - ..() - mind.special_role = "Blob" - -//Animals -/mob/living/simple_animal/mind_initialize() - ..() - mind.assigned_role = "Animal" - mind.special_role = "Animal" - -/mob/living/simple_animal/pet/dog/corgi/mind_initialize() - ..() - mind.assigned_role = "Corgi" - mind.special_role = "Corgi" - -/mob/living/simple_animal/shade/mind_initialize() - ..() - mind.assigned_role = "Shade" - mind.special_role = "Shade" - -/mob/living/simple_animal/hostile/construct/mind_initialize() - ..() - mind.assigned_role = "[initial(name)]" - mind.special_role = "Cultist" diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 6209aed807e..ab9a9539c64 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -18,7 +18,7 @@ /datum/wires/airlock/interactable(mob/user) var/obj/machinery/door/airlock/A = holder - if(!istype(user, /mob/living/silicon) && A.isElectrified() && A.shock(user, 100)) + if(!issilicon(user) && A.isElectrified() && A.shock(user, 100)) return FALSE if(A.panel_open) return TRUE @@ -104,17 +104,21 @@ if(WIRE_POWER1, WIRE_POWER2) // Cut to loose power, repair all to gain power. if(mend && !is_cut(WIRE_POWER1) && !is_cut(WIRE_POWER2)) A.regainMainPower() - A.shock(usr, 50) + if(usr) + A.shock(usr, 50) else A.loseMainPower() - A.shock(usr, 50) + if(usr) + A.shock(usr, 50) if(WIRE_BACKUP1, WIRE_BACKUP2) // Cut to loose backup power, repair all to gain backup power. if(mend && !is_cut(WIRE_BACKUP1) && !is_cut(WIRE_BACKUP2)) A.regainBackupPower() - A.shock(usr, 50) + if(usr) + A.shock(usr, 50) else A.loseBackupPower() - A.shock(usr, 50) + if(usr) + A.shock(usr, 50) if(WIRE_BOLTS) // Cut to drop bolts, mend does nothing. if(!mend) A.bolt() @@ -136,7 +140,8 @@ else if(A.secondsElectrified != -1) A.secondsElectrified = -1 - A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") + if(usr) + A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])") add_logs(usr, A, "electrified") if(WIRE_SAFETY) // Cut to disable safeties, mend to re-enable. A.safe = mend diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index 2e715eaea59..f045b36093d 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -12,7 +12,7 @@ /datum/wires/vending/interactable(mob/user) var/obj/machinery/vending/V = holder - if(!istype(user, /mob/living/silicon) && V.seconds_electrified && V.shock(user, 100)) + if(!issilicon(user) && V.seconds_electrified && V.shock(user, 100)) return FALSE if(V.panel_open) return TRUE diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 83648e92d7a..9b50ef5c6c8 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -324,7 +324,7 @@ /area/Entered(A) - if(!istype(A,/mob/living)) + if(!isliving(A)) return var/mob/living/L = A @@ -353,7 +353,7 @@ if(!T || !isturf(T)) T = get_turf(src) var/area/A = get_area(T) - if(istype(T, /turf/open/space)) // Turf never has gravity + if(isspaceturf(T)) // Turf never has gravity return 0 else if(A && A.has_gravity) // Areas which always has gravity return 1 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f08316fc060..504f72613c1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -62,11 +62,11 @@ return 0 -/atom/proc/attack_hulk(mob/living/carbon/human/hulk, do_attack_animation = 0) - if(do_attack_animation) - hulk.changeNext_move(CLICK_CD_MELEE) - add_logs(hulk, src, "punched", "hulk powers") - hulk.do_attack_animation(src) +/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + if(does_attack_animation) + user.changeNext_move(CLICK_CD_MELEE) + add_logs(user, src, "punched", "hulk powers") + user.do_attack_animation(src) /atom/proc/CheckParts(list/parts_list) for(var/A in parts_list) @@ -77,7 +77,7 @@ reagents.conditional_update() else if(istype(A, /atom/movable)) var/atom/movable/M = A - if(istype(M.loc, /mob/living)) + if(isliving(M.loc)) var/mob/living/L = M.loc L.unEquip(M) M.loc = src @@ -211,7 +211,7 @@ /atom/proc/blob_act(obj/structure/blob/B) return -/atom/proc/fire_act() +/atom/proc/fire_act(exposed_temperature, exposed_volume) return /atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked) @@ -355,7 +355,7 @@ var/list/blood_splatter_icons = list() return 0 /atom/proc/isinspace() - if(istype(get_turf(src), /turf/open/space)) + if(isspaceturf(get_turf(src))) return 1 else return 0 @@ -371,7 +371,7 @@ var/list/blood_splatter_icons = list() /atom/proc/singularity_pull() return -/atom/proc/acid_act(acidpwr, toxpwr, acid_volume) +/atom/proc/acid_act(acidpwr, acid_volume) return /atom/proc/emag_act() @@ -415,7 +415,7 @@ var/list/blood_splatter_icons = list() return /atom/proc/add_vomit_floor(mob/living/carbon/M, toxvomit = 0) - if(istype(src,/turf) ) + if(isturf(src)) var/obj/effect/decal/cleanable/vomit/V = PoolOrNew(/obj/effect/decal/cleanable/vomit, src) // Make toxins vomit look different if(toxvomit) @@ -438,4 +438,7 @@ var/list/blood_splatter_icons = list() /atom/on_varedit(modified_var) if(!Debug2) - admin_spawned = TRUE \ No newline at end of file + admin_spawned = TRUE + +/atom/proc/mech_melee_attack(obj/mecha/M) + return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index e71b533d3c8..ea1214f2989 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -64,6 +64,7 @@ moving_diagonally = SECOND_DIAG_STEP . = step(src, SOUTH) moving_diagonally = 0 + return if(!loc || (loc == oldloc && oldloc != newloc)) last_move = 0 @@ -247,7 +248,7 @@ while(target && ((dist_travelled < range && loc != finalturf) || !has_gravity(src))) //stop if we reached our destination (or max range) and aren't floating var/slept = 0 - if(!istype(loc, /turf)) + if(!isturf(loc)) hit = 1 break diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 8cd3b7d2f89..abdbfb5206b 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -76,10 +76,10 @@ /proc/RoundHealth(mob/living/M) if(M.stat == DEAD || (M.status_flags & FAKEDEATH)) return "health-100" //what's our health? it doesn't matter, we're dead, or faking - var/maxhealth = M.maxHealth + var/maxi_health = M.maxHealth if(iscarbon(M) && M.health < 0) - maxhealth = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit. - var/resulthealth = (M.health / maxhealth) * 100 + maxi_health = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit. + var/resulthealth = (M.health / maxi_health) * 100 switch(resulthealth) if(100 to INFINITY) return "health100" @@ -302,7 +302,7 @@ var/image/holder = hud_list[DIAG_MECH_HUD] var/icon/I = icon(icon, icon_state, dir) holder.pixel_y = I.Height() - world.icon_size - holder.icon_state = "huddiag[RoundDiagBar(health/initial(health))]" + holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]" /obj/mecha/proc/diag_hud_set_mechcell() diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index a94738c6dc4..7badeff7bbb 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -47,10 +47,10 @@ if(H.stat || H.restrained()) return - if(!istype(H, /mob/living/carbon/human)) + if(!ishuman(H)) return 1 - if(loc == H || (in_range(src, H) && istype(loc, /turf))) + if(loc == H || (in_range(src, H) && isturf(loc))) H.set_machine(src) if(href_list["school"]) if (used) @@ -228,11 +228,14 @@ /obj/item/weapon/antag_spawner/slaughter_demon/attack_self(mob/user) - var/list/demon_candidates = pollCandidates("Do you want to play as a [initial(demon_type.name)]?", null, null, ROLE_ALIEN, 50) if(user.z != 1) user << "You should probably wait until you reach the station." return + var/list/demon_candidates = pollCandidates("Do you want to play as a [initial(demon_type.name)]?", null, null, ROLE_ALIEN, 50) if(demon_candidates.len > 0) + if(used) + user << "You're already smashing the bottle, calm down." + return used = 1 var/client/C = pick(demon_candidates) spawn_antag(C, get_turf(src.loc), initial(demon_type.name)) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 246677cea13..750e18a087c 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -57,20 +57,23 @@ /datum/station_state/proc/count(count_territories) for(var/turf/T in block(locate(1,1,1), locate(world.maxx,world.maxy,1))) - if(istype(T,/turf/open/floor)) - if(!(T:burnt)) + if(isfloorturf(T)) + var/turf/open/floor/TF = T + if(!(TF.burnt)) src.floor += 12 else src.floor += 1 - if(istype(T, /turf/closed/wall)) - if(T:intact) + if(iswallturf(T)) + var/turf/closed/wall/TW = T + if(TW.intact) src.wall += 2 else src.wall += 1 if(istype(T, /turf/closed/wall/r_wall)) - if(T:intact) + var/turf/closed/wall/r_wall/TRW = T + if(TRW.intact) src.r_wall += 2 else src.r_wall += 1 @@ -79,8 +82,10 @@ for(var/obj/O in T.contents) if(istype(O, /obj/structure/window)) src.window += 1 - else if(istype(O, /obj/structure/grille) && (!O:destroyed)) - src.grille += 1 + else if(istype(O, /obj/structure/grille)) + var/obj/structure/grille/GR = O + if(!GR.broken) + src.grille += 1 else if(istype(O, /obj/machinery/door)) src.door += 1 else if(istype(O, /obj/machinery)) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 0a751d1bc8d..66a303d6f16 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -39,9 +39,12 @@ H.color = "#000000" adjustHealth(-maxHealth*0.0125) -/mob/living/simple_animal/hostile/blob/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) +/mob/living/simple_animal/hostile/blob/fire_act(exposed_temperature, exposed_volume) ..() - adjustFireLoss(Clamp(0.01 * exposed_temperature, 1, 5)) + if(exposed_temperature) + adjustFireLoss(Clamp(0.01 * exposed_temperature, 1, 5)) + else + adjustFireLoss(5) /mob/living/simple_animal/hostile/blob/CanPass(atom/movable/mover, turf/target, height = 0) if(istype(mover, /obj/structure/blob)) @@ -87,6 +90,8 @@ verb_yell = "psychically screams" melee_damage_lower = 2 melee_damage_upper = 4 + obj_damage = 20 + environment_smash = 0 attacktext = "hits" attack_sound = 'sound/weapons/genhit1.ogg' flying = 1 @@ -204,7 +209,7 @@ damage_coeff = list(BRUTE = 0.5, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) melee_damage_lower = 20 melee_damage_upper = 20 - obj_damage = 20 + obj_damage = 60 attacktext = "slams" attack_sound = 'sound/effects/blobattack.ogg' verb_say = "gurgles" @@ -234,7 +239,7 @@ damagesources++ if(damagesources) for(var/i in 1 to damagesources) - adjustHealth(maxHealth*0.025) //take 2.5% maxhealth as damage when not near the blob or if the naut has no factory, 5% if both + adjustHealth(maxHealth*0.025) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both var/list/viewing = list() for(var/mob/M in viewers(src)) if(M.client) @@ -277,7 +282,7 @@ ..(gibbed) if(factory) factory.naut = null //remove this naut from its factory - factory.maxhealth = initial(factory.maxhealth) + factory.max_integrity = initial(factory.max_integrity) flick("blobbernaut_death", src) /mob/living/simple_animal/hostile/blob/blobbernaut/independent diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 082f36b64d5..2bc1f1bb12f 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -3,8 +3,9 @@ icon = 'icons/mob/blob.dmi' icon_state = "blank_blob" desc = "A huge, pulsating yellow mass." - health = 400 - maxhealth = 400 + obj_integrity = 400 + max_integrity = 400 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 75, acid = 90) explosion_block = 6 point_return = -1 health_regen = 0 //we regen in Life() instead of when pulsed @@ -48,18 +49,15 @@ poi_list -= src return ..() -/obj/structure/blob/core/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - exposed_temperature *= 0.5 - ..() - /obj/structure/blob/core/ex_act(severity, target) 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) + take_damage(damage, BRUTE, "bomb", 0) -/obj/structure/blob/core/check_health() - ..() - if(overmind) //we should have an overmind, but... - overmind.update_health_hud() +/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/Life() if(qdeleted(src)) @@ -70,7 +68,7 @@ if(resource_delay <= world.time) resource_delay = world.time + 10 // 1 second overmind.add_points(point_rate) - health = min(maxhealth, health+core_regen) + obj_integrity = min(max_integrity, obj_integrity+core_regen) if(overmind) overmind.update_health_hud() Pulse_Area(overmind, 12, 4, 3) diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm index 99d31d97b7e..cc0749d0c68 100644 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ b/code/game/gamemodes/blob/blobs/factory.dm @@ -3,8 +3,8 @@ icon = 'icons/mob/blob.dmi' icon_state = "blob_factory" desc = "A thick spire of tendrils." - health = 200 - maxhealth = 200 + obj_integrity = 200 + max_integrity = 200 health_regen = 1 point_return = 25 var/list/spores = list() diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm index 60b517b0f6d..9fa7664e8f2 100644 --- a/code/game/gamemodes/blob/blobs/node.dm +++ b/code/game/gamemodes/blob/blobs/node.dm @@ -3,8 +3,9 @@ icon = 'icons/mob/blob.dmi' icon_state = "blank_blob" desc = "A large, pulsating yellow mass." - health = 200 - maxhealth = 200 + obj_integrity = 200 + max_integrity = 200 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 65, acid = 90) health_regen = 3 point_return = 25 @@ -32,10 +33,6 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/structure/blob/node/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - exposed_temperature *= 0.75 - ..() - /obj/structure/blob/node/Life() Pulse_Area(overmind, 10, 3, 2) color = null diff --git a/code/game/gamemodes/blob/blobs/resource.dm b/code/game/gamemodes/blob/blobs/resource.dm index ff6bd736eaf..bcb6d8a8fd7 100644 --- a/code/game/gamemodes/blob/blobs/resource.dm +++ b/code/game/gamemodes/blob/blobs/resource.dm @@ -3,8 +3,8 @@ icon = 'icons/mob/blob.dmi' icon_state = "blob_resource" desc = "A thin spire of slightly swaying tendrils." - health = 60 - maxhealth = 60 + obj_integrity = 60 + max_integrity = 60 point_return = 15 var/resource_delay = 0 diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm index b7c8d8192ae..45d40dd019e 100644 --- a/code/game/gamemodes/blob/blobs/shield.dm +++ b/code/game/gamemodes/blob/blobs/shield.dm @@ -3,12 +3,14 @@ icon = 'icons/mob/blob.dmi' icon_state = "blob_shield" desc = "A solid wall of slightly twitching tendrils." - health = 150 - maxhealth = 150 + obj_integrity = 150 + max_integrity = 150 brute_resist = 0.25 explosion_block = 3 point_return = 4 atmosblock = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) + /obj/structure/blob/shield/scannerreport() @@ -16,15 +18,12 @@ return "Will prevent the spread of atmospheric changes." return "N/A" -/obj/structure/blob/shield/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - return - /obj/structure/blob/shield/core point_return = 0 /obj/structure/blob/shield/update_icon() ..() - if(health <= 75) + if(obj_integrity <= 75) icon_state = "blob_shield_damaged" name = "weakened strong blob" desc = "A wall of twitching tendrils." diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index dc078d4aea5..5fb0187ccda 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -104,10 +104,10 @@ /mob/camera/blob/update_health_hud() if(blob_core) - hud_used.healths.maptext = "
[round(blob_core.health)]
" + hud_used.healths.maptext = "
[round(blob_core.obj_integrity)]
" for(var/mob/living/simple_animal/hostile/blob/blobbernaut/B in blob_mobs) if(B.hud_used && B.hud_used.blobpwrdisplay) - B.hud_used.blobpwrdisplay.maptext = "
[round(blob_core.health)]
" + B.hud_used.blobpwrdisplay.maptext = "
[round(blob_core.obj_integrity)]
" /mob/camera/blob/proc/add_points(points) blob_points = Clamp(blob_points + points, 0, max_blob_points) @@ -157,7 +157,7 @@ ..() 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]") if(ticker && istype(ticker.mode, /datum/game_mode/blob)) var/datum/game_mode/blob/B = ticker.mode @@ -180,7 +180,7 @@ return 0 else var/area/A = get_area(NewLoc) - if(istype(NewLoc, /turf/open/space) || istype(A, /area/shuttle)) //if unplaced, can't go on shuttles or space tiles + if(isspaceturf(NewLoc) || istype(A, /area/shuttle)) //if unplaced, can't go on shuttles or space tiles return 0 loc = NewLoc return 1 diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 7a631a741b1..8cdca0ae62d 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -148,13 +148,14 @@ if(B.naut) //if it already made a blobbernaut, it can't do it again src << "This factory blob is already sustaining a blobbernaut." return - if(B.health < B.maxhealth * 0.5) + if(B.obj_integrity < B.max_integrity * 0.5) src << "This factory blob is too damaged to sustain a blobbernaut." return if(!can_buy(40)) return - B.maxhealth = initial(B.maxhealth) * 0.25 //factories that produced a blobbernaut have much lower health - B.check_health() + B.max_integrity = initial(B.max_integrity) * 0.25 //factories that produced a blobbernaut have much lower health + B.obj_integrity = min(B.obj_integrity, B.max_integrity) + B.update_icon() B.visible_message("The blobbernaut [pick("rips", "tears", "shreds")] its way out of the factory blob!") playsound(B.loc, 'sound/effects/splat.ogg', 50, 1) var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut(get_turf(B)) @@ -194,7 +195,7 @@ src << "You have no core and are about to die! May you rest in peace." return var/area/A = get_area(T) - if(istype(T, /turf/open/space) || A && !A.blob_allowed) + if(isspaceturf(T) || A && !A.blob_allowed) src << "You cannot relocate your core here!" return if(!can_buy(80)) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index d46eba21ee7..fc5ed905fb8 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -9,8 +9,9 @@ anchored = 1 layer = BELOW_MOB_LAYER 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/maxhealth = 30 + obj_integrity = 30 + max_integrity = 30 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 70) var/health_regen = 2 //how much health this blob regens when pulsed var/pulse_timestamp = 0 //we got pulsed when? var/heal_timestamp = 0 //we got healed when? @@ -27,11 +28,10 @@ blobs += src //Keep track of the blob in the normal list either way setDir(pick(cardinal)) update_icon() - ..(loc) + ..() ConsumeTile() if(atmosblock) air_update_turf(1) - return /obj/structure/blob/proc/creation_action() //When it's created by the overmind, do this. return @@ -45,6 +45,8 @@ playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Expand() is no longer broken, no check necessary. return ..() +/obj/structure/blob/blob_act() + return /obj/structure/blob/Adjacent(var/atom/neighbour) . = ..() @@ -79,13 +81,6 @@ var/atom/movable/mover = caller . = . || mover.checkpass(PASSBLOB) -/obj/structure/blob/proc/check_health(cause) - health = Clamp(health, 0, maxhealth) - if(health <= 0) - if(overmind) - overmind.blob_reagent_datum.death_reaction(src, cause) - qdel(src) //we dead now - /obj/structure/blob/update_icon() //Updates color based on overmind color if we have an overmind. if(overmind) color = overmind.blob_reagent_datum.color @@ -133,7 +128,7 @@ if(pulse_timestamp <= world.time) ConsumeTile() if(heal_timestamp <= world.time) - health = min(maxhealth, health+health_regen) + obj_integrity = min(max_integrity, obj_integrity+health_regen) heal_timestamp = world.time + 20 update_icon() pulse_timestamp = world.time + 10 @@ -143,7 +138,7 @@ /obj/structure/blob/proc/ConsumeTile() for(var/atom/A in loc) A.blob_act(src) - if(istype(loc, /turf/closed/wall)) + 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/blob_attack_animation(atom/A = null, controller) //visually attacks an atom @@ -174,7 +169,7 @@ return 0 var/make_blob = TRUE //can we make a blob? - if(istype(T, /turf/open/space) && !(locate(/obj/structure/lattice) in T) && prob(80)) + if(isspaceturf(T) && !(locate(/obj/structure/lattice) in T) && prob(80)) make_blob = FALSE playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it @@ -210,17 +205,6 @@ blob_attack_animation(T, controller) //if we can't, animate that we attacked return null - -/obj/structure/blob/ex_act(severity, target) - ..() - var/damage = 150 - 20 * severity - take_damage(damage, BRUTE) - -/obj/structure/blob/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - ..() - var/damage = Clamp(0.01 * exposed_temperature, 0, 4) - take_damage(damage, BURN) - /obj/structure/blob/emp_act(severity) if(severity > 0) if(overmind) @@ -232,20 +216,15 @@ ..() if(overmind) if(overmind.blob_reagent_datum.tesla_reaction(src, power)) - take_damage(power/400, BURN) + take_damage(power/400, BURN, "energy") else - take_damage(power/400, BURN) + take_damage(power/400, BURN, "energy") /obj/structure/blob/extinguish() ..() if(overmind) overmind.blob_reagent_datum.extinguish_reaction(src) -/obj/structure/blob/bullet_act(var/obj/item/projectile/Proj) - ..() - take_damage(Proj.damage, Proj.damage_type, Proj) - return 0 - /obj/structure/blob/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/device/analyzer)) user.changeNext_move(CLICK_CD_MELEE) @@ -266,53 +245,50 @@ /obj/structure/blob/proc/typereport(mob/user) user << "Blob Type: [uppertext(initial(name))]" - user << "Health: [health]/[maxhealth]" + user << "Health: [obj_integrity]/[max_integrity]" user << "Effects: [scannerreport()]" -/obj/structure/blob/attacked_by(obj/item/I, mob/living/user) - 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 [I]!") - if(I.damtype == BURN) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - take_damage(I.force, I.damtype, user) - /obj/structure/blob/attack_animal(mob/living/simple_animal/M) if("blob" in M.faction) //sorry, but you can't kill the blob as a blobbernaut return - 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, M.melee_damage_type, M) - return + ..() -/obj/structure/blob/attack_alien(mob/living/carbon/alien/humanoid/M) - 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, M) - return - -/obj/structure/blob/proc/take_damage(damage, damage_type, cause = null, overmind_reagent_trigger = 1) - switch(damage_type) //blobs only take brute and burn damage +/obj/structure/blob/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) if(BRUTE) - damage = max(damage * brute_resist, 0) + if(damage_amount) + playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) if(BURN) - damage = max(damage * fire_resist, 0) - if(CLONE) //this is basically a marker for 'don't modify the damage' + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) +/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 - damage = 0 - if(overmind && overmind_reagent_trigger) - damage = overmind.blob_reagent_datum.damage_reaction(src, health, damage, damage_type, cause) //pass the blob, its health before damage, the damage being done, the type of damage being done, and the cause. - health -= damage - update_icon() - check_health(cause) + 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/obj_destruction(damage_flag) + if(overmind) + overmind.blob_reagent_datum.death_reaction(src, damage_flag) + ..() /obj/structure/blob/proc/change_to(type, controller) if(!ispath(type)) @@ -349,19 +325,19 @@ name = "normal blob" icon_state = "blob" luminosity = 0 - health = 21 - maxhealth = 25 + obj_integrity = 21 + max_integrity = 25 health_regen = 1 brute_resist = 0.25 /obj/structure/blob/normal/scannerreport() - if(health <= 15) + if(obj_integrity <= 15) return "Currently weak to brute damage." return "N/A" /obj/structure/blob/normal/update_icon() ..() - if(health <= 15) + if(obj_integrity <= 15) icon_state = "blob_damaged" name = "fragile blob" desc = "A thin lattice of slightly twitching tendrils." diff --git a/code/game/gamemodes/changeling/cellular_emporium.dm b/code/game/gamemodes/changeling/cellular_emporium.dm index a71c5cfcedd..cc808dc80bb 100644 --- a/code/game/gamemodes/changeling/cellular_emporium.dm +++ b/code/game/gamemodes/changeling/cellular_emporium.dm @@ -45,7 +45,6 @@ AL["helptext"] = initial(ability.helptext) AL["owned"] = changeling.has_sting(ability) var/req_dna = initial(ability.req_dna) - AL["required_absorptions"] = req_dna AL["dna_cost"] = dna_cost AL["can_purchase"] = ((req_dna <= absorbed_dna_count) && (dna_cost <= genetic_points_remaining)) diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index d0ed5163056..6849bf58545 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -165,7 +165,7 @@ return if(istype(target, /obj/structure/table)) var/obj/structure/table/T = target - T.table_destroy() + T.deconstruct(FALSE) else if(istype(target, /obj/machinery/computer)) var/obj/machinery/computer/C = target diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index e9e28c37a4d..3d3bbc634ee 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -23,7 +23,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 @@ -38,7 +38,7 @@ /obj/effect/proc_holder/changeling/dissonant_shriek/sting_action(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, 5, 1) return 1 diff --git a/code/game/gamemodes/clock_cult/clock_items.dm b/code/game/gamemodes/clock_cult/clock_items.dm index b1bea18a140..1e50517e920 100644 --- a/code/game/gamemodes/clock_cult/clock_items.dm +++ b/code/game/gamemodes/clock_cult/clock_items.dm @@ -636,10 +636,10 @@ strip_delay = 50 put_on_delay = 30 body_parts_covered = ARMS - resistance_flags = FIRE_PROOF + resistance_flags = 0 siemens_coefficient = 0 permeability_coefficient = 0.05 - armor = list(melee = 80, bullet = 50, laser = -15, energy = 0, bomb = 35, bio = 0, rad = 0, fire = 20, acid = 20) + armor = list(melee = 80, bullet = 50, laser = -15, energy = 0, bomb = 35, bio = 0, rad = 0, fire = 70, acid = 20) /obj/item/clothing/gloves/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0) if(equipper && !is_servant_of_ratvar(equipper)) @@ -671,7 +671,7 @@ w_class = 3 strip_delay = 50 put_on_delay = 30 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/shoes/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0) if(equipper && !is_servant_of_ratvar(equipper)) diff --git a/code/game/gamemodes/clock_cult/clock_machines.dm b/code/game/gamemodes/clock_cult/clock_machines.dm index 4509cf916c8..1082d9e8bb9 100644 --- a/code/game/gamemodes/clock_cult/clock_machines.dm +++ b/code/game/gamemodes/clock_cult/clock_machines.dm @@ -138,8 +138,8 @@ active_icon = "mending_motor" inactive_icon = "mending_motor_inactive" construction_value = 20 - max_health = 125 - health = 125 + max_integrity = 125 + obj_integrity = 125 break_message = "The prism collapses with a heavy thud!" debris = list(/obj/item/clockwork/alloy_shards/small = 5, \ /obj/item/clockwork/alloy_shards/medium = 1, \ @@ -196,11 +196,11 @@ W.adjustHealth(-15) else if(istype(M, /obj/structure/destructible/clockwork)) var/obj/structure/destructible/clockwork/C = M - if(C.health == C.max_health) + if(C.obj_integrity == C.max_integrity) continue if(!try_use_power(structure_cost)) break - C.health = min(C.health + 15, C.max_health) + C.obj_integrity = min(C.obj_integrity + 15, C.max_integrity) else if(issilicon(M)) var/mob/living/silicon/S = M if(S.health == S.maxHealth || S.stat == DEAD || !is_servant_of_ratvar(S)) @@ -243,8 +243,8 @@ active_icon = "mania_motor" inactive_icon = "mania_motor_inactive" construction_value = 20 - max_health = 80 - health = 80 + max_integrity = 80 + obj_integrity = 80 break_message = "The antenna break off, leaving a pile of shards!" debris = list(/obj/item/clockwork/alloy_shards/large = 1, \ /obj/item/clockwork/alloy_shards/small = 3, \ @@ -505,8 +505,8 @@ active_icon = "obelisk" inactive_icon = "obelisk_inactive" construction_value = 20 - max_health = 150 - health = 150 + max_integrity = 150 + obj_integrity = 150 break_message = "The obelisk falls to the ground, undamaged!" debris = list(/obj/item/clockwork/alloy_shards/small = 3, \ /obj/item/clockwork/component/hierophant_ansible/obelisk = 1) diff --git a/code/game/gamemodes/clock_cult/clock_mobs.dm b/code/game/gamemodes/clock_cult/clock_mobs.dm index 025c1a14765..990c531e97b 100644 --- a/code/game/gamemodes/clock_cult/clock_mobs.dm +++ b/code/game/gamemodes/clock_cult/clock_mobs.dm @@ -33,16 +33,16 @@ src << playstyle_string /mob/living/simple_animal/hostile/clockwork/examine(mob/user) - var/t_He = they_pronoun(TRUE) - var/plurality = (gender == PLURAL) + var/t_He = p_they(TRUE) + var/t_s = p_s() var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" msg += "[desc]\n" if(health < maxHealth) msg += "" - if (src.health >= src.maxHealth/2) - msg += "[t_He] look[plurality ? "":"s"] slightly dented.\n" + if(health >= maxHealth/2) + msg += "[t_He] look[t_s] slightly dented.\n" else - msg += "[t_He] look[plurality ? "":"s"] severely dented!\n" + msg += "[t_He] look[t_s] severely dented!\n" msg += "" msg += "*---------*" @@ -115,11 +115,11 @@ health = 300 //Health is very high, and under most cases it will take enough fatigue to be forced to recall first maxHealth = 300 speed = 1 + obj_damage = 40 melee_damage_lower = 10 melee_damage_upper = 10 attacktext = "slashes" attack_sound = 'sound/weapons/bladeslice.ogg' - environment_smash = 1 weather_immunities = list("lava") flying = 1 loot = list(/obj/item/clockwork/component/replicant_alloy/fallen_armor) diff --git a/code/game/gamemodes/clock_cult/clock_proselytizer.dm b/code/game/gamemodes/clock_cult/clock_proselytizer.dm index 404452d064d..9b3756e5a63 100644 --- a/code/game/gamemodes/clock_cult/clock_proselytizer.dm +++ b/code/game/gamemodes/clock_cult/clock_proselytizer.dm @@ -257,7 +257,7 @@ /obj/structure/grille/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer) var/grilletype = /obj/structure/grille/ratvar var/prosel_time = 15 - if(destroyed) + if(broken) grilletype = /obj/structure/grille/ratvar/broken prosel_time = 5 return list("operation_time" = prosel_time, "new_obj_type" = grilletype, "alloy_cost" = 0, "spawn_dir" = dir) @@ -273,10 +273,10 @@ if(!can_be_repaired) user << "[src] cannot be repaired with a proselytizer!" return - if(health == max_health) + if(obj_integrity == max_integrity) user << "[src] is at maximum integrity!" return - var/amount_to_heal = max_health - health + var/amount_to_heal = max_integrity - obj_integrity var/healing_for_cycle = min(amount_to_heal, repair_amount) if(!proselytizer.can_use_alloy(0)) healing_for_cycle = min(healing_for_cycle, proselytizer.stored_alloy) @@ -288,8 +288,8 @@ "You start repairing [src]...") //hugeass while because we need to re-check after the do_after proselytizer.repairing = src - while(proselytizer && user && src && health != max_health) - amount_to_heal = max_health - health + while(proselytizer && user && src && obj_integrity != max_integrity) + amount_to_heal = max_integrity - obj_integrity if(!amount_to_heal) break healing_for_cycle = min(amount_to_heal, repair_amount) @@ -298,7 +298,7 @@ proselytizer_cost = healing_for_cycle*2 if(!proselytizer.can_use_alloy(proselytizer_cost) || !do_after(user, proselytizer_cost, target = src) || !proselytizer || !proselytizer.can_use_alloy(proselytizer_cost)) break - amount_to_heal = max_health - health + amount_to_heal = max_integrity - obj_integrity if(!amount_to_heal) break healing_for_cycle = min(amount_to_heal, repair_amount) @@ -307,7 +307,7 @@ proselytizer_cost = healing_for_cycle*2 if(!proselytizer.can_use_alloy(proselytizer_cost)) break - health += healing_for_cycle + obj_integrity += healing_for_cycle proselytizer.modify_stored_alloy(-proselytizer_cost) playsound(src, 'sound/machines/click.ogg', 50, 1) @@ -315,7 +315,7 @@ proselytizer.repairing = null if(user) user.visible_message("[user]'s [proselytizer.name] stops covering [src] with black liquid metal.", \ - "You finish repairing [src]. It is now at [health]/[max_health] integrity.") + "You finish repairing [src]. It is now at [obj_integrity]/[max_integrity] integrity.") return /obj/structure/destructible/clockwork/cache/proselytize_vals(mob/living/user, obj/item/clockwork/clockwork_proselytizer/proselytizer) diff --git a/code/game/gamemodes/clock_cult/clock_ratvar.dm b/code/game/gamemodes/clock_cult/clock_ratvar.dm index ec558de31a1..5bab32a7822 100644 --- a/code/game/gamemodes/clock_cult/clock_ratvar.dm +++ b/code/game/gamemodes/clock_cult/clock_ratvar.dm @@ -4,7 +4,6 @@ layer = MASSIVE_OBJ_LAYER density = FALSE resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - /obj/structure/destructible/clockwork/massive/New() ..() poi_list += src @@ -20,8 +19,8 @@ name = "Gateway to the Celestial Derelict" desc = "A massive, thrumming rip in spacetime." clockwork_desc = "A portal to the Celestial Derelict. Massive and intimidating, it is the only thing that can both transport Ratvar and withstand the massive amount of energy he emits." - health = 500 - max_health = 500 + obj_integrity = 500 + max_integrity = 500 mouse_opacity = 2 icon = 'icons/effects/clockwork_effects.dmi' icon_state = "nothing" @@ -59,17 +58,18 @@ countdown = null . = ..() -/obj/structure/destructible/clockwork/massive/celestial_gateway/destroyed() - countdown.stop() - visible_message("The [src] begins to pulse uncontrollably... you might want to run!") - world << sound('sound/effects/clockcult_gateway_disrupted.ogg', 0, channel = 8, volume = 50) - make_glow() - glow.icon_state = "clockwork_gateway_disrupted" - takes_damage = FALSE - sleep(27) - explosion(src, 1, 3, 8, 8) +/obj/structure/destructible/clockwork/massive/celestial_gateway/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!disassembled) + countdown.stop() + visible_message("The [src] begins to pulse uncontrollably... you might want to run!") + world << sound('sound/effects/clockcult_gateway_disrupted.ogg', 0, channel = 8, volume = 50) + make_glow() + glow.icon_state = "clockwork_gateway_disrupted" + resistance_flags |= INDESTRUCTIBLE + sleep(27) + explosion(src, 1, 3, 8, 8) qdel(src) - return 1 /obj/structure/destructible/clockwork/massive/celestial_gateway/proc/make_glow() if(!glow) @@ -77,12 +77,12 @@ glow.linked = src /obj/structure/destructible/clockwork/massive/celestial_gateway/ex_act(severity) - var/damage = max((health * 0.70) / severity, 100) //requires multiple bombs to take down - take_damage(damage, BRUTE) + var/damage = max((obj_integrity * 0.70) / severity, 100) //requires multiple bombs to take down + take_damage(damage, BRUTE, "bomb", 0) /obj/structure/destructible/clockwork/massive/celestial_gateway/proc/get_arrival_text(s_on_time) . = "IMMINENT" - if(!health) + if(!obj_integrity) . = "DETONATING" else if(GATEWAY_RATVAR_ARRIVAL - progress_in_seconds > 0) . = "[round(max((GATEWAY_RATVAR_ARRIVAL - progress_in_seconds) / (GATEWAY_SUMMON_RATE * 0.5), 0), 1)][s_on_time ? "S":""]" @@ -91,7 +91,7 @@ if(!progress_in_seconds || prob(7)) for(var/M in mob_list) M << "You hear otherworldly sounds from the [dir2text(get_dir(get_turf(M), get_turf(src)))]..." - if(!health) + if(!obj_integrity) return 0 progress_in_seconds += GATEWAY_SUMMON_RATE switch(progress_in_seconds) @@ -116,7 +116,7 @@ if(GATEWAY_RATVAR_ARRIVAL to INFINITY) if(!purpose_fulfilled) countdown.stop() - takes_damage = FALSE + resistance_flags |= INDESTRUCTIBLE purpose_fulfilled = TRUE make_glow() animate(glow, transform = matrix() * 1.5, alpha = 255, time = 125) @@ -191,7 +191,7 @@ icon_state = "ratvar" pixel_x = -235 pixel_y = -248 - takes_damage = FALSE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF appearance_flags = 0 var/atom/prey //Whatever Ratvar is chasing var/clashing = FALSE //If Ratvar is FUCKING FIGHTING WITH NAR-SIE diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm index 2689358aaee..ebb60dc031b 100644 --- a/code/game/gamemodes/clock_cult/clock_scripture.dm +++ b/code/game/gamemodes/clock_cult/clock_scripture.dm @@ -170,7 +170,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed /datum/clockwork_scripture/create_object/check_special_requirements() var/turf/T = get_turf(invoker) - if(!space_allowed && istype(T, /turf/open/space)) + if(!space_allowed && isspaceturf(T)) invoker << "You need solid ground to place this object!" return 0 if(one_per_tile && (locate(prevent_path) in T)) @@ -301,7 +301,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed for(var/i in 1 to healseverity) PoolOrNew(/obj/effect/overlay/temp/heal, list(targetturf, "#1E8CE1")) invoker << "You bathe [L] in Inath-neq's power!" - L.visible_message("A blue light washes over [L], mending [L.their_pronoun()] bruises and burns!", \ + L.visible_message("A blue light washes over [L], mending [L.p_their()] bruises and burns!", \ "You feel Inath-neq's power healing your wounds, but a deep nausea overcomes you!") playsound(targetturf, 'sound/magic/Staff_Healing.ogg', 50, 1) return 1 @@ -535,7 +535,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed if(BP.heal_damage(power_damage, power_damage, 1, 0)) //heals one point of burn and brute for every ~100W drained on augumented limbs H.update_damage_overlays() else - if(BP.take_damage(0, power_damage)) + if(BP.receive_damage(0, power_damage)) H.update_damage_overlays() else if(isanimal(invoker)) var/mob/living/simple_animal/A = invoker @@ -825,7 +825,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed return create_marauder() /datum/clockwork_scripture/memory_allocation/proc/create_marauder() - invoker.visible_message("A yellow tendril appears from [invoker]'s [slab.name] and impales itself in [invoker.their_pronoun()] forehead!", \ + invoker.visible_message("A yellow tendril appears from [invoker]'s [slab.name] and impales itself in [invoker.p_their()] forehead!", \ "A tendril flies from [slab] into your forehead. You begin waiting while it painfully rearranges your thought pattern...") invoker.notransform = TRUE //Vulnerable during the process slab.busy = "Thought modification in process" diff --git a/code/game/gamemodes/clock_cult/clock_structures.dm b/code/game/gamemodes/clock_cult/clock_structures.dm index 400c680ba19..937dbccf4df 100644 --- a/code/game/gamemodes/clock_cult/clock_structures.dm +++ b/code/game/gamemodes/clock_cult/clock_structures.dm @@ -41,24 +41,16 @@ desc = clockwork_desc ..() desc = initial(desc) - if(takes_damage) - var/t_It = they_pronoun(TRUE) - var/t_is = get_is() - var/servant_message = "[t_It] [t_is] at [health]/[max_health] integrity" - var/other_message = "[t_It] seems pristine and undamaged" + if(!(resistance_flags & INDESTRUCTIBLE)) + var/t_It = p_they(TRUE) + var/t_is = p_are() + var/servant_message = "[t_It] [t_is] at [obj_integrity]/[max_integrity] integrity" var/heavily_damaged = FALSE - var/healthpercent = (health/max_health) * 100 - if(healthpercent >= 100) - other_message = "[t_It] seems pristine and undamaged" - else if(healthpercent >= 50) - other_message = "[t_It] looks slightly dented" - else if(healthpercent >= 25) - other_message = "[t_It] appears heavily damaged" + var/healthpercent = (obj_integrity/max_integrity) * 100 + if(healthpercent < 50) heavily_damaged = TRUE - else if(healthpercent >= 0) - other_message = "[t_It] [t_is] falling apart" - heavily_damaged = TRUE - user << "[can_see_clockwork ? "[servant_message]":"[other_message]"][heavily_damaged ? "!":"."]" + if(can_see_clockwork) + user << "[servant_message][heavily_damaged ? "!":"."]" /obj/structure/destructible/clockwork/cache //Tinkerer's cache: Stores components for later use. name = "tinkerer's cache" @@ -68,8 +60,8 @@ icon_state = "tinkerers_cache" construction_value = 10 break_message = "The cache's fire winks out before it falls in on itself!" - max_health = 80 - health = 80 + max_integrity = 80 + obj_integrity = 80 var/wall_generation_cooldown var/turf/closed/wall/clockwork/linkedwall //if we've got a linked wall and are producing @@ -91,8 +83,8 @@ cache_check(i) return ..() -/obj/structure/destructible/clockwork/cache/destroyed() - if(takes_damage) +/obj/structure/destructible/clockwork/cache/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) for(var/I in src) var/atom/movable/A = I A.forceMove(get_turf(src)) //drop any daemons we have @@ -178,8 +170,8 @@ desc = "A large brass eye with tendrils trailing below it and a wide red iris." clockwork_desc = "A fragile turret that will deal sustained damage to any non-faithful it sees." icon_state = "ocular_warden" - health = 25 - max_health = 25 + obj_integrity = 25 + max_integrity = 25 construction_value = 15 layer = HIGH_OBJ_LAYER break_message = "The warden's eye gives a glare of utter hate before falling dark!" @@ -189,7 +181,6 @@ var/sight_range = 3 var/atom/movable/target var/list/idle_messages = list(" sulkily glares around.", " lazily drifts from side to side.", " looks around for something to burn.", " slowly turns in circles.") - var/mech_damage_cycle = 0 //so that people in mechs don't get murderspammed with messages /obj/structure/destructible/clockwork/ocular_warden/New() ..() @@ -220,14 +211,9 @@ L.adjust_fire_stacks(damage_per_tick) L.IgniteMob() else if(istype(target,/obj/mecha)) - var/sending_message = FALSE - if(mech_damage_cycle > 1) - mech_damage_cycle = 0 - sending_message = TRUE - else - mech_damage_cycle++ var/obj/mecha/M = target - M.take_directional_damage(damage_per_tick, "fire", get_dir(src, M), 0, 1, sending_message) + M.take_damage(damage_per_tick, BURN, "melee", 1, get_dir(src, M)) //does about half of standard damage to mechs * whatever their fire armor is + setDir(get_dir(get_turf(src), get_turf(target))) if(!target) if(validtargets.len) @@ -265,7 +251,6 @@ /obj/structure/destructible/clockwork/ocular_warden/proc/lose_target() if(!target) return 0 - mech_damage_cycle = 0 target = null visible_message("[src] settles and seems almost disappointed.") return 1 @@ -275,8 +260,7 @@ construction_value = 0 anchored = 0 density = 0 - takes_damage = FALSE - resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/mobtype = /mob/living/simple_animal/hostile/clockwork var/spawn_message = " is an error and you should yell at whoever spawned this shell." @@ -324,8 +308,8 @@ name = "massive gear" icon_state = "wall_gear" climbable = TRUE - max_health = 50 - health = 50 + max_integrity = 50 + obj_integrity = 50 desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, or just climb over it." clockwork_desc = "A massive brass gear. You could probably secure or unsecure it with a wrench, just climb over it, or proselytize it into replicant alloy." break_message = "The gear breaks apart into shards of alloy!" @@ -346,10 +330,10 @@ user << "You need one brass sheet to do this!" return var/turf/T = get_turf(src) - if(istype(T, /turf/closed/wall)) + if(iswallturf(T)) user << "There is already a wall present!" return - if(!istype(T, /turf/open/floor)) + if(!isfloorturf(T)) user << "A floor must be present to build a [anchored ? "false ":""]wall!" return if(locate(/obj/structure/falsewall) in T.contents) @@ -389,7 +373,7 @@ anchored = 1 density = 0 opacity = 0 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/clockwork/New() ..() @@ -697,8 +681,6 @@ icon_state = "sigil" layer = LOW_OBJ_LAYER alpha = 50 - resistance_flags = FIRE_PROOF - burntime = 1 var/affects_servants = FALSE var/stat_affected = CONSCIOUS var/resist_string = "glows blinding white" //string for when a null rod blocks its effects, "glows [resist_string]" @@ -929,7 +911,7 @@ var/obj/effect/overlay/temp/ratvar/sigil/vitality/V = PoolOrNew(/obj/effect/overlay/temp/ratvar/sigil/vitality, get_turf(src)) animate(V, alpha = 0, transform = matrix()*2, time = 8) playsound(L, 'sound/magic/WandODeath.ogg', 50, 1) - L.visible_message("[L] collapses in on [L.them_pronoun()]self as [src] flares bright blue!") + L.visible_message("[L] collapses in on [L.p_them()]self as [src] flares bright blue!") L << "\"[text2ratvar("Your life will not be wasted.")]\"" for(var/obj/item/W in L) L.unEquip(W) @@ -957,7 +939,7 @@ ghost.reenter_corpse() L.revive(1, 1) playsound(L, 'sound/magic/Staff_Healing.ogg', 50, 1) - L.visible_message("[L] suddenly gets back up, [L.their_pronoun()] mouth dripping blue ichor!", \ + L.visible_message("[L] suddenly gets back up, [L.p_their()] mouth dripping blue ichor!", \ "\"[text2ratvar("You will be okay, child.")]\"") vitality -= revival_cost break diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 7597b4b2bbb..79183c029e2 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -163,13 +163,6 @@ cult_mind.current.Paralyse(5) return 1 - -/datum/game_mode/cult/add_cultist(datum/mind/cult_mind, stun) //INHERIT - if (!..(cult_mind)) - return - memorize_cult_objectives(cult_mind) - - /datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = 1, stun) if(cult_mind.current) var/datum/antagonist/cultist/cult_datum = cult_mind.current.has_antag_datum(/datum/antagonist/cultist, TRUE) @@ -194,7 +187,7 @@ /datum/game_mode/cult/proc/get_unconvertables() var/list/ucs = list() for(var/mob/living/carbon/human/player in player_list) - if(player.mind && !is_convertable_to_cult(player.mind)) + if(player.mind && !is_convertable_to_cult(player) && !(player.mind in cultists_to_cult)) ucs += player.mind return ucs diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index c01036257ff..bc6ea9974db 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -7,39 +7,26 @@ debris = list(/obj/item/stack/sheet/runed_metal = 1) /obj/structure/destructible/cult/examine(mob/user) - var/can_see_cult = iscultist(user) || isobserver(user) ..() - if(takes_damage) - var/t_It = they_pronoun(TRUE) - var/t_is = get_is() - var/cultist_message = "[t_It] [t_is] at [health]/[max_health] stability" - var/other_message = "[t_It] seems extremely stable" - var/heavily_damaged = FALSE - var/healthpercent = (health/max_health) * 100 - if(healthpercent >= 100) - other_message = "[t_It] seems extremely stable" - else if(healthpercent >= 50) - other_message = "[t_It] looks slightly unstable" - else if(healthpercent >= 25) - other_message = "[t_It] appears very unstable" - heavily_damaged = TRUE - else if(healthpercent >= 0) - other_message = "[t_It] [t_is] glowing faintly and is extremely unstable" - heavily_damaged = TRUE - user << "[heavily_damaged ? "":""][can_see_cult ? "[cultist_message]":"[other_message]"][heavily_damaged ? "!":"."]" + var/can_see_cult = iscultist(user) || isobserver(user) + var/t_It = p_they(TRUE) + var/t_is = p_are() + if(!(resistance_flags & INDESTRUCTIBLE)) + if(can_see_cult) + user << "[t_It] [t_is] at [round(obj_integrity * 100 / max_integrity)]% stability." user << "\The [src] is [anchored ? "":"not "]secured to the floor." if(can_see_cult && cooldowntime > world.time) - user << "The magic in [src] is too weak, [they_pronoun()] will be ready to use again in [getETA()]." + user << "The magic in [src] is too weak, [t_It] will be ready to use again in [getETA()]." /obj/structure/destructible/cult/attack_animal(mob/living/simple_animal/M) if(istype(M, /mob/living/simple_animal/hostile/construct/builder)) - if(health < max_health) - health = min(max_health, health + 5) + if(obj_integrity < max_integrity) + obj_integrity = min(max_integrity, obj_integrity + 5) Beam(M, icon_state="sendbeam", time=4) M.visible_message("[M] repairs \the [src].", \ - "You repair [src], leaving [they_pronoun()] at [health]/[max_health] stability.") + "You repair [src], leaving [p_they()] at [round(obj_integrity * 100 / max_integrity)]% stability.") else - M << "You cannot repair [src], as [they_pronoun()] [get_is()] undamaged!" + M << "You cannot repair [src], as [p_they()] [p_are()] undamaged!" else ..() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 0b1d11cd3c4..f32896c536b 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -189,7 +189,7 @@ This file contains the arcane tome files. entered_rune_name = input(user, "Choose a rite to scribe.", "Sigils of Power") as null|anything in possible_runes if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) return - if(istype(Turf, /turf/open/space)) + if(isspaceturf(Turf)) user << "You cannot scribe runes in space!" return for(var/T in typesof(/obj/effect/rune)) @@ -234,11 +234,7 @@ This file contains the arcane tome files. priority_announce("Figments from an eldritch god are being summoned by [user] into [locname] from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensionsal Affairs", 'sound/AI/spanomalies.ogg') for(var/B in spiral_range_turfs(1, user, 1)) var/turf/T = B - var/obj/machinery/shield/N = new(T) - N.name = "sanguine barrier" - N.desc = "A potent shield summoned by cultists to defend their rites." - N.icon_state = "shield-red" - N.health = 60 + var/obj/structure/emergency_shield/sanguine/N = new(T) shields |= N else user << "Nar-Sie does not wish to be summoned!" @@ -248,7 +244,7 @@ This file contains the arcane tome files. user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick("l_arm", "r_arm")) if(!do_after(user, initial(rune_to_scribe.scribe_delay), target = get_turf(user))) for(var/V in shields) - var/obj/machinery/shield/S = V + var/obj/structure/emergency_shield/sanguine/S = V if(S && !qdeleted(S)) qdel(S) return @@ -258,7 +254,7 @@ This file contains the arcane tome files. user.visible_message("[user] creates a strange circle in their own blood.", \ "You finish drawing the arcane markings of the Geometer.") for(var/V in shields) - var/obj/machinery/shield/S = V + var/obj/structure/emergency_shield/S = V if(S && !qdeleted(S)) qdel(S) var/obj/effect/rune/R = new rune_to_scribe(Turf, chosen_keyword) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index a04e96cd6ac..abf243b5822 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -21,7 +21,7 @@ To draw a rune, use an arcane tome. anchored = 1 icon = 'icons/obj/rune.dmi' icon_state = "1" - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF layer = ABOVE_NORMAL_TURF_LAYER color = "#FF0000" @@ -357,7 +357,7 @@ var/list/teleport_runes = list() color = "#7D1717" var/mob/living/L = pick(myriad_targets) var/is_clock = is_servant_of_ratvar(L) - var/is_convertable = is_convertable_to_cult(L.mind) + var/is_convertable = is_convertable_to_cult(L) if(L.stat != DEAD && (is_clock || is_convertable)) invocation = "Mah'weyh pleggh at e'ntrath!" ..() @@ -392,7 +392,7 @@ var/list/teleport_runes = list() convertee.adjustBruteLoss(-(brutedamage * 0.75)) convertee.adjustFireLoss(-(burndamage * 0.75)) convertee.visible_message("[convertee] writhes in pain \ - [brutedamage || burndamage ? "even as [convertee.their_pronoun()] wounds heal and close" : "as the markings below [convertee.them_pronoun()] glow a bloody red"]!", \ + [brutedamage || burndamage ? "even as [convertee.p_their()] wounds heal and close" : "as the markings below [convertee.p_them()] glow a bloody red"]!", \ "AAAAAAAAAAAAAA-") ticker.mode.add_cultist(convertee.mind, 1) new /obj/item/weapon/tome(get_turf(src)) @@ -404,7 +404,7 @@ var/list/teleport_runes = list() return 1 /obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers) - if((((ishuman(sacrificial) || isrobot(sacrificial)) && sacrificial.stat != DEAD) || is_sacrifice_target(sacrificial.mind)) && invokers.len < 3) + if((((ishuman(sacrificial) || iscyborg(sacrificial)) && sacrificial.stat != DEAD) || is_sacrifice_target(sacrificial.mind)) && invokers.len < 3) for(var/M in invokers) M << "[sacrificial] is too greatly linked to the world! You need three acolytes!" log_game("Offer rune failed - not enough acolytes and target is living or sac target") @@ -423,7 +423,7 @@ var/list/teleport_runes = list() if(sacrifice_fulfilled) M << "\"Yes! This is the one I desire! You have done well.\"" else - if(ishuman(sacrificial) || isrobot(sacrificial)) + if(ishuman(sacrificial) || iscyborg(sacrificial)) M << "\"I accept this sacrifice.\"" else M << "\"I accept this meager sacrifice.\"" @@ -435,7 +435,7 @@ var/list/teleport_runes = list() stone.invisibility = 0 if(sacrificial) - if(isrobot(sacrificial)) + if(iscyborg(sacrificial)) playsound(sacrificial, 'sound/magic/Disable_Tech.ogg', 100, 1) sacrificial.dust() //To prevent the MMI from remaining else @@ -572,7 +572,7 @@ var/list/teleport_runes = list() mob_to_revive.revive(1, 1) //This does remove disabilities and such, but the rune might actually see some use because of it! mob_to_revive.grab_ghost() mob_to_revive << "\"PASNAR SAVRAE YAM'TOTH. Arise.\"" - mob_to_revive.visible_message("[mob_to_revive] draws in a huge breath, red light shining from [mob_to_revive.their_pronoun()] eyes.", \ + mob_to_revive.visible_message("[mob_to_revive] draws in a huge breath, red light shining from [mob_to_revive.p_their()] eyes.", \ "You awaken suddenly from the void. You're alive!") rune_in_use = 0 @@ -687,11 +687,11 @@ var/list/teleport_runes = list() return affecting.apply_damage(0.1, BRUTE) if(!(user in T)) - user.visible_message("A spectral tendril wraps around [user] and pulls [user.them_pronoun()] back to the rune!") + user.visible_message("A spectral tendril wraps around [user] and pulls [user.p_them()] back to the rune!") Beam(user,icon_state="drainbeam",time=2) user.forceMove(get_turf(src)) //NO ESCAPE :^) if(user.key) - user.visible_message("[user] slowly relaxes, the glow around [user.them_pronoun()] dimming.", \ + user.visible_message("[user] slowly relaxes, the glow around [user.p_them()] dimming.", \ "You are re-united with your physical form. [src] releases its hold over you.") user.color = initial(user.color) user.Weaken(3) @@ -754,7 +754,7 @@ var/list/wall_runes = list() update_state() if(density) spread_density() - user.visible_message("[user] [iscarbon(user) ? "places [user.their_pronoun()] hands on":"stares intently at"] [src], and [density ? "the air above it begins to shimmer" : "the shimmer above it fades"].", \ + user.visible_message("[user] [iscarbon(user) ? "places [user.p_their()] hands on":"stares intently at"] [src], and [density ? "the air above it begins to shimmer" : "the shimmer above it fades"].", \ "You channel your life energy into [src], [density ? "temporarily preventing" : "allowing"] passage above it.") if(iscarbon(user)) var/mob/living/carbon/C = user @@ -990,17 +990,14 @@ var/list/wall_runes = list() ..() visible_message("A cloud of red mist forms above [src], and from within steps... a man.") user << "Your blood begins flowing into [src]. You must remain in place and conscious to maintain the forms of those summoned. This will hurt you slowly but surely..." - var/obj/machinery/shield/N = new(get_turf(src)) - N.name = "Invoker's Shield" - N.desc = "A weak shield summoned by cultists to protect them while they carry out delicate rituals" - N.color = "red" - N.health = 20 - N.mouse_opacity = 0 + var/turf/T = get_turf(src) + var/obj/structure/emergency_shield/invoker/N = new(T) + new_human.key = ghost_to_spawn.key ticker.mode.add_cultist(new_human.mind, 0) new_human << "You are a servant of the Geometer. You have been made semi-corporeal by the cult of Nar-Sie, and you are to serve them at all costs." - while(user in get_turf(src)) + while(user in T) if(user.stat) break user.apply_damage(0.1, BRUTE) diff --git a/code/game/gamemodes/devil/devil.dm b/code/game/gamemodes/devil/devil.dm index 743e95ad910..0aafc57ccb5 100644 --- a/code/game/gamemodes/devil/devil.dm +++ b/code/game/gamemodes/devil/devil.dm @@ -20,7 +20,7 @@ var/global/list/whiteness = list ( /mob/living/proc/check_devil_bane_multiplier(obj/item/weapon, mob/living/attacker) switch(mind.devilinfo.bane) if(BANE_WHITECLOTHES) - if(istype(attacker, /mob/living/carbon/human)) + if(ishuman(attacker)) var/mob/living/carbon/human/H = attacker if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = H.w_uniform diff --git a/code/game/gamemodes/devil/devilinfo.dm b/code/game/gamemodes/devil/devilinfo.dm index 0b9b4b59213..313843d580b 100644 --- a/code/game/gamemodes/devil/devilinfo.dm +++ b/code/game/gamemodes/devil/devilinfo.dm @@ -186,7 +186,7 @@ var/global/list/lawlorify = list ( /datum/devilinfo/proc/regress_humanoid() owner.current << "Your powers weaken, have more contracts be signed to regain power." - if(istype(owner.current, /mob/living/carbon/human)) + if(ishuman(owner.current)) var/mob/living/carbon/human/H = owner.current H.set_species(/datum/species/human, 1) H.regenerate_icons() @@ -209,7 +209,7 @@ var/global/list/lawlorify = list ( /datum/devilinfo/proc/increase_blood_lizard() owner.current << "You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard." sleep(50) - if(istype(owner.current, /mob/living/carbon/human)) + if(ishuman(owner.current)) var/mob/living/carbon/human/H = owner.current H.set_species(/datum/species/lizard, 1) H.underwear = "Nude" @@ -374,7 +374,7 @@ var/global/list/lawlorify = list ( return 0 return 1 if(BANISH_FUNERAL_GARB) - if(istype(body, /mob/living/carbon/human)) + if(ishuman(body)) var/mob/living/carbon/human/H = body if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under/burial)) return 1 diff --git a/code/game/gamemodes/devil/game_mode.dm b/code/game/gamemodes/devil/game_mode.dm index d89cf225143..be5b22c2066 100644 --- a/code/game/gamemodes/devil/game_mode.dm +++ b/code/game/gamemodes/devil/game_mode.dm @@ -31,7 +31,7 @@ /datum/game_mode/proc/finalize_devil(datum/mind/devil_mind) - + var/trueName= randomDevilName() devil_mind.devilinfo = devilInfo(trueName, 1) @@ -93,15 +93,15 @@ hud.leave_hud(devil_mind.current) set_antag_hud(devil_mind.current, null) -/datum/game_mode/proc/update_sintouch_icons_added(datum/mind/sin_mind) +/datum/game_mode/proc/update_sintouched_icons_added(datum/mind/sintouched_mind) var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SINTOUCHED] - hud.join_hud(sin_mind.current) - set_antag_hud(sin_mind.current, "sintouched") + hud.join_hud(sintouched_mind.current) + set_antag_hud(sintouched_mind.current, "sintouched") -/datum/game_mode/proc/update_sintouch_icons_removed(datum/mind/sin_mind) +/datum/game_mode/proc/update_sintouched_icons_removed(datum/mind/sintouched_mind) var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SINTOUCHED] - hud.leave_hud(sin_mind.current) - set_antag_hud(sin_mind.current, null) + hud.leave_hud(sintouched_mind.current) + set_antag_hud(sintouched_mind.current, null) /datum/game_mode/proc/update_soulless_icons_added(datum/mind/soulless_mind) var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SOULLESS] diff --git a/code/game/gamemodes/devil/imp/imp.dm b/code/game/gamemodes/devil/imp/imp.dm index 76696ced406..c5f662f5186 100644 --- a/code/game/gamemodes/devil/imp/imp.dm +++ b/code/game/gamemodes/devil/imp/imp.dm @@ -26,6 +26,7 @@ health = 200 healable = 0 environment_smash = 1 + obj_damage = 40 melee_damage_lower = 10 melee_damage_upper = 15 see_in_dark = 8 diff --git a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm index 32c81ff0cad..4b9532fd11f 100644 --- a/code/game/gamemodes/gang/dominator.dm +++ b/code/game/gamemodes/gang/dominator.dm @@ -6,9 +6,10 @@ density = 1 anchored = 1 layer = HIGH_OBJ_LAYER - var/maxhealth = 200 - var/health = 200 - armor = list(melee = 20, bullet = 50, laser = 50, energy = 0, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 0) + max_integrity = 300 + obj_integrity = 300 + integrity_failure = 100 + armor = list(melee = 20, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 70) var/datum/gang/gang var/operating = 0 //0=standby or broken, 1=takeover var/warned = 0 //if this device has set off the warning at <3 minutes yet @@ -29,7 +30,6 @@ /obj/machinery/dominator/examine(mob/user) ..() if(stat & BROKEN) - user << "It looks completely busted." return var/time @@ -41,7 +41,7 @@ user << "Hostile Takeover of [station_name()] successful. Have a great day." else user << "System on standby." - user << "System Integrity: [round((health/maxhealth)*100,1)]%" + user << "System Integrity: [round((obj_integrity/max_integrity)*100,1)]%" /obj/machinery/dominator/process() ..() @@ -61,35 +61,41 @@ if(!.) STOP_PROCESSING(SSmachine, src) -/obj/machinery/dominator/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/dominator/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) if(BRUTE) - if(sound_effect) - if(damage) - playsound(src, 'sound/effects/bang.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - else - return - health -= damage + if(damage_amount) + playsound(src, 'sound/effects/bang.ogg', 50, 1) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - if(health > (maxhealth/2)) - if(prob(damage*2)) +/obj/machinery/dominator/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + if(.) + if(obj_integrity/max_integrity > 0.66) + if(prob(damage_amount*2)) + spark_system.start() + else if(!(stat & BROKEN)) spark_system.start() - else if(!(stat & BROKEN)) - spark_system.start() - add_overlay("damage") + cut_overlays() + add_overlay("damage") - if(!(stat & BROKEN)) - if(health <= 0) +/obj/machinery/dominator/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + set_broken() + +/obj/machinery/dominator/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) set_broken() - - if(health <= -100) new /obj/item/stack/sheet/plasteel(src.loc) - qdel(src) + qdel(src) + +/obj/machinery/dominator/attacked_by(obj/item/I, mob/living/user) + add_fingerprint(user) + ..() /obj/machinery/dominator/proc/set_broken() if(gang) @@ -130,35 +136,9 @@ return ..() /obj/machinery/dominator/emp_act(severity) - take_damage(100, BURN, 0) + take_damage(100, BURN, "energy", 0) ..() -/obj/machinery/dominator/ex_act(severity, target) - if(target == src) - qdel(src) - return - switch(severity) - if(1) - qdel(src) - if(2) - take_damage(120, BRUTE, 0) - if(3) - take_damage(30, BRUTE, 0) - return - -/obj/machinery/dominator/bullet_act(obj/item/projectile/P) - . = ..() - if(P.damage) - var/damage_amount = P.damage - if(P.forcedodge) - damage_amount *= 0.5 - visible_message("[src] was hit by [P].") - take_damage(damage_amount, P.damage_type, 0) - - -/obj/machinery/dominator/blob_act(obj/structure/blob/B) - take_damage(110, BRUTE, 0) - /obj/machinery/dominator/attack_hand(mob/user) if(operating || (stat & BROKEN)) examine(user) @@ -182,7 +162,7 @@ var/time = round(determine_domination_time(tempgang)/60,0.1) if(alert(user,"With [round((tempgang.territory.len/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready") - if((tempgang.is_dominating) || !tempgang.dom_attempts || !in_range(src, user) || !istype(src.loc, /turf)) + if((tempgang.is_dominating) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc)) return 0 var/area/A = get_area(loc) @@ -208,16 +188,6 @@ if(G != gang) G.message_gangtools("Enemy takeover attempt detected in [locname]: Estimated [time] minutes until our defeat.",1,1) -/obj/machinery/dominator/attack_hulk(mob/user) - ..(user, 1) - user.visible_message("[user] smashes [src].",\ - "You punch [src].",\ - "You hear metal being slammed.") - take_damage(5) - return 1 - -/obj/machinery/dominator/attacked_by(obj/item/I, mob/living/user) - add_fingerprint(user) - ..() + diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm index 3f1a00593d4..2d7fafd31d6 100644 --- a/code/game/gamemodes/gang/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -258,7 +258,7 @@ var/area/usrarea = get_area(usr.loc) var/usrturf = get_turf(usr.loc) - if(initial(usrarea.name) == "Space" || istype(usrturf,/turf/open/space) || usr.z != 1) + if(initial(usrarea.name) == "Space" || isspaceturf(usrturf) || usr.z != 1) usr << "You can only use this on the station!" return diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 76a6de59b02..521fd901b81 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -133,7 +133,7 @@ src.verbs -= /mob/living/silicon/ai/proc/upgrade_turrets //Upgrade AI turrets around the world for(var/obj/machinery/porta_turret/ai/turret in machines) - turret.health += 30 + turret.obj_integrity += 30 turret.eprojectile = /obj/item/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR. turret.eshot_sound = 'sound/weapons/lasercannonfire.ogg' src << "Turrets upgraded." @@ -372,7 +372,7 @@ for(var/n=1;n<4,n++) var/fail var/turf/T = turfs[n] - if(!istype(T, /turf/open/floor)) + if(!isfloorturf(T)) fail = 1 var/datum/camerachunk/C = cameranet.getCameraChunk(T.x, T.y, T.z) if(!C.visibleTurfs[T]) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index a1272ee75da..7aa568483bf 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -29,7 +29,7 @@ var/turf/pickedstart var/turf/pickedgoal var/max_i = 10//number of tries to spawn meteor. - while (!istype(pickedstart, /turf/open/space)) + while(!isspaceturf(pickedstart)) var/startSide = pick(cardinal) pickedstart = spaceDebrisStartLoc(startSide, 1) pickedgoal = spaceDebrisFinishLoc(startSide, 1) @@ -114,7 +114,7 @@ var/turf/T = get_turf(loc) ram_turf(T) - if(prob(10) && !istype(T, /turf/open/space))//randomly takes a 'hit' from ramming + if(prob(10) && !isspaceturf(T))//randomly takes a 'hit' from ramming get_hit() /obj/effect/meteor/Destroy() @@ -140,7 +140,7 @@ //first bust whatever is in the turf for(var/atom/A in T) if(A != src) - if(istype(A, /mob/living)) + if(isliving(A)) A.visible_message("[src] slams into [A].", "[src] slams into you!.") A.ex_act(hitpwr) @@ -292,7 +292,7 @@ /obj/effect/meteor/meaty/ram_turf(turf/T) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) new /obj/effect/decal/cleanable/blood(T) /obj/effect/meteor/meaty/Bump(atom/A) @@ -310,7 +310,7 @@ ..() /obj/effect/meteor/meaty/xeno/ram_turf(turf/T) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) new /obj/effect/decal/cleanable/xenoblood(T) //Station buster Tunguska diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index da641ae216c..7b128975915 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -32,7 +32,7 @@ mode = VEST_STEALTH armor = stealth_armor icon_state = "vest_stealth" - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_wear_suit() for(var/X in actions) @@ -50,7 +50,7 @@ if(disguise == null) return stealth_active = 1 - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/M = loc PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/cloak, list(get_turf(M), M.dir)) @@ -64,7 +64,7 @@ if(!stealth_active) return stealth_active = 0 - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/M = loc PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja, list(get_turf(M), M.dir)) @@ -91,7 +91,7 @@ ActivateStealth() /obj/item/clothing/suit/armor/abductor/vest/proc/Adrenaline() - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) if(combat_cooldown != initial(combat_cooldown)) loc << "Combat injection is still recharging." return @@ -172,7 +172,7 @@ mark(target, user) /obj/item/device/abductor/gizmo/proc/scan(atom/target, mob/living/user) - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) if(console!=null) console.AddSnapshot(target) user << "You scan [target] and add them to the database." @@ -181,7 +181,7 @@ if(marked == target) user << "This specimen is already marked!" return - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) if(isabductor(target)) marked = target user << "You mark [target] for future retrieval." @@ -392,7 +392,7 @@ Congratulations! You are now trained for xenobiology research!"} if(!isabductor(user)) return - if(isrobot(target)) + if(iscyborg(target)) ..() return @@ -581,9 +581,8 @@ Congratulations! You are now trained for xenobiology research!"} can_buckle = 1 buckle_lying = 1 flags = NODECONSTRUCT + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF -/obj/structure/table/optable/abductor/table_destroy() - return //can't destroy the abductor's only optable. /obj/structure/bed/abductor name = "resting contraption" diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index 32a493a4b65..5f95588ac4d 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -100,13 +100,13 @@ /obj/item/organ/gland/pop cooldown_low = 900 cooldown_high = 1800 - uses = 6 + uses = -1 human_only = 1 icon_state = "species" /obj/item/organ/gland/pop/activate() owner << "You feel unlike yourself." - var/species = pick(list(/datum/species/lizard,/datum/species/jelly/slime,/datum/species/pod,/datum/species/fly)) + var/species = pick(list(/datum/species/lizard,/datum/species/jelly/slime,/datum/species/pod,/datum/species/fly,/datum/species/jelly)) owner.set_species(species) /obj/item/organ/gland/ventcrawling @@ -199,13 +199,13 @@ owner << "You feel something moving around inside you..." //spawn cocoon with clone greytide snpc inside if(ishuman(owner)) - var/obj/effect/cocoon/abductor/C = new (get_turf(owner)) + var/obj/structure/spider/cocoon/abductor/C = new (get_turf(owner)) C.Copy(owner) C.Start() owner.gib() return -/obj/effect/cocoon/abductor +/obj/structure/spider/cocoon/abductor name = "slimy cocoon" desc = "Something is moving inside." icon = 'icons/effects/effects.dmi' @@ -214,7 +214,7 @@ density = 1 var/hatch_time = 0 -/obj/effect/cocoon/abductor/proc/Copy(mob/living/carbon/human/H) +/obj/structure/spider/cocoon/abductor/proc/Copy(mob/living/carbon/human/H) var/mob/living/carbon/human/interactive/greytide/clone = new(src) clone.hardset_dna(H.dna.uni_identity,H.dna.struc_enzymes,H.real_name, H.dna.blood_type, H.dna.species.type, H.dna.features) @@ -228,11 +228,11 @@ if(I) clone.equip_to_slot_if_possible(I,slot) -/obj/effect/cocoon/abductor/proc/Start() +/obj/structure/spider/cocoon/abductor/proc/Start() hatch_time = world.time + 600 START_PROCESSING(SSobj, src) -/obj/effect/cocoon/abductor/process() +/obj/structure/spider/cocoon/abductor/process() if(world.time > hatch_time) STOP_PROCESSING(SSobj, src) for(var/mob/M in contents) @@ -241,10 +241,10 @@ qdel(src) /obj/item/organ/gland/plasma - cooldown_low = 2400 - cooldown_high = 3000 + cooldown_low = 1200 + cooldown_high = 1800 origin_tech = "materials=4;biotech=4;plasmatech=6;abductor=3" - uses = 1 + uses = -1 /obj/item/organ/gland/plasma/activate() owner << "You feel bloated." @@ -253,9 +253,9 @@ owner << "A massive stomachache overcomes you." sleep(50) if(!owner) return - owner.visible_message("[owner] explodes in a cloud of plasma!") + owner.visible_message("[owner] vomits a cloud of plasma!") var/turf/open/T = get_turf(owner) if(istype(T)) - T.atmos_spawn_air("plasma=300;TEMP=[T20C]") - owner.gib() + T.atmos_spawn_air("plasma=50;TEMP=[T20C]") + owner.vomit() return diff --git a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm index 9c06517bd95..f893ad1bb84 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm @@ -13,6 +13,7 @@ icon = 'icons/obj/abductor.dmi' icon_state = "camera" + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/machinery/computer/camera_advanced/abductor/CreateEye() ..() diff --git a/code/game/gamemodes/miniantags/abduction/machinery/console.dm b/code/game/gamemodes/miniantags/abduction/machinery/console.dm index 7dfbb31daca..5539f6a878e 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/proc/IsAgent(mob/living/carbon/human/H) @@ -45,7 +46,9 @@ if(experiment != null) var/points = experiment.points + var/credits = experiment.credits dat += "Collected Samples : [points]
" + dat += "Gear Credits: [credits]
" dat += "Transfer data in exchange for supplies:
" dat += "Advanced Baton
" dat += "Agent Helmet
" @@ -198,8 +201,8 @@ return ..() /obj/machinery/abductor/console/proc/Dispense(item,cost=1) - if(experiment && experiment.points >= cost) - experiment.points-=cost + if(experiment && experiment.credits >= cost) + experiment.credits -=cost say("Incoming supply!") if(pad) flick("alien-pad", pad) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 56bc184a7d8..4cbb81c1faa 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -7,6 +7,7 @@ anchored = 1 state_open = 1 var/points = 0 + var/credits = 0 var/list/history = list() var/list/abductee_minds = list() var/flash = " - || - " @@ -170,6 +171,7 @@ SendBack(H) playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) points += point_reward + credits += point_reward return "Experiment successful! [point_reward] new data-points collected." else playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 1) diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index e36d330fb26..06be9a116a0 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -83,6 +83,7 @@ hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD) languages_spoken = SWARMER languages_understood = SWARMER + obj_damage = 0 environment_smash = 0 attacktext = "shocks" attack_sound = 'sound/effects/EMPulse.ogg' @@ -257,14 +258,14 @@ /turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) for(var/turf/T in range(1, src)) - if(istype(T, /turf/open/space) || istype(T.loc, /area/space)) + if(isspaceturf(T) || istype(T.loc, /area/space)) S << "Destroying this object has the potential to cause a hull breach. Aborting." return ..() /obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) for(var/turf/T in range(1, src)) - if(istype(T, /turf/open/space) || istype(T.loc, /area/space)) + if(isspaceturf(T) || istype(T.loc, /area/space)) S << "Destroying this object has the potential to cause a hull breach. Aborting." return ..() @@ -412,7 +413,6 @@ icon_state = "integrate" duration = 5 - /obj/structure/swarmer //Default swarmer effect object visual feedback name = "swarmer ui" desc = null @@ -420,61 +420,29 @@ icon = 'icons/mob/swarmer.dmi' icon_state = "ui_light" layer = MOB_LAYER - + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF luminosity = 1 + obj_integrity = 30 + max_integrity = 30 anchored = 1 - var/health = 30 -/obj/structure/swarmer/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/swarmer/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) + playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health -= damage - if(health <= 0) - qdel(src) - -/obj/structure/swarmer/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type) - -/obj/structure/swarmer/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - -/obj/structure/swarmer/ex_act() - qdel(src) - -/obj/structure/swarmer/blob_act(obj/structure/blob/B) - qdel(src) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) /obj/structure/swarmer/emp_act() qdel(src) -/obj/structure/swarmer/attack_alien(mob/living/user) - user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - take_damage(rand(20,30)) - -/obj/structure/swarmer/attack_animal(mob/living/simple_animal/S) - S.do_attack_animation(src) - S.changeNext_move(CLICK_CD_MELEE) - if(S.obj_damage) - take_damage(S.obj_damage, S.melee_damage_type, 1) - else if(S.melee_damage_upper) - take_damage(rand(S.melee_damage_lower, S.melee_damage_upper), S.melee_damage_type) - /obj/structure/swarmer/trap name = "swarmer trap" desc = "A quickly assembled trap that electrifies living beings and overwhelms machine sensors. Will not retain its form if damaged enough." icon_state = "trap" - luminosity = 1 - health = 10 + obj_integrity = 10 + max_integrity = 10 + density = 0 /obj/structure/swarmer/trap/Crossed(var/atom/movable/AM) if(isliving(AM)) @@ -482,7 +450,7 @@ if(!istype(L, /mob/living/simple_animal/hostile/swarmer)) playsound(loc,'sound/effects/snap.ogg',50, 1, -1) L.electrocute_act(0, src, 1, 1) - if(isrobot(L)) + if(iscyborg(L)) L.Weaken(5) qdel(src) ..() @@ -516,9 +484,8 @@ desc = "A quickly assembled energy blockade. Will not retain its form if damaged enough, but disabler beams and swarmers pass right through." icon_state = "barricade" luminosity = 1 - health = 50 - density = 1 - anchored = 1 + obj_integrity = 50 + max_integrity = 50 /obj/structure/swarmer/blockade/CanPass(atom/movable/O) if(isswarmer(O)) diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index f1b34bdebf9..38624c9dc54 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -21,7 +21,7 @@ maxHealth = 150 health = 150 healable = 0 - environment_smash = 1 + obj_damage = 50 melee_damage_lower = 20 melee_damage_upper = 20 see_in_dark = 8 diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 70902339dbe..fcbe8fd3127 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -284,7 +284,7 @@ if(!src) return var/turf/T = get_turf(src) - if(istype(T, /turf/closed)) + if(isclosedturf(T)) src << "You cannot use abilities from inside of a wall." return 0 for(var/obj/O in T) diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 3d3ca500d96..161ad591082 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -248,7 +248,7 @@ if(T.flags & NOJAUNT) T.flags -= NOJAUNT PoolOrNew(/obj/effect/overlay/temp/revenant, T) - if(!istype(T, /turf/open/floor/plating) && !istype(T, /turf/open/floor/engine/cult) && istype(T, /turf/open/floor) && prob(15)) + if(!istype(T, /turf/open/floor/plating) && !istype(T, /turf/open/floor/engine/cult) && isfloorturf(T) && prob(15)) var/turf/open/floor/floor = T if(floor.intact && floor.floor_tile) PoolOrNew(floor.floor_tile, floor) diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index 2ac221435fc..e424b85fefc 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -28,6 +28,7 @@ health = 200 healable = 0 environment_smash = 1 + obj_damage = 50 melee_damage_lower = 30 melee_damage_upper = 30 see_in_dark = 8 diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 0270d153573..c07253e0ac8 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -166,7 +166,7 @@ /datum/game_mode/proc/are_operatives_dead() for(var/datum/mind/operative_mind in syndicates) - if (istype(operative_mind.current,/mob/living/carbon/human) && (operative_mind.current.stat!=2)) + if(ishuman(operative_mind.current) && (operative_mind.current.stat!=2)) return 0 return 1 diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index ae966ae1738..6b59f02057f 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -18,6 +18,7 @@ var/bomb_set icon = 'icons/obj/machines/nuke.dmi' icon_state = "nuclearbomb_base" density = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/timer_set = 60 var/default_timer_set = 60 @@ -393,13 +394,10 @@ var/bomb_set else . = timer_set -/obj/machinery/nuclearbomb/ex_act(severity, target) - return - /obj/machinery/nuclearbomb/blob_act(obj/structure/blob/B) if(exploding) return - . = ..() + qdel(src) /obj/machinery/nuclearbomb/tesla_act(var/power) ..() @@ -490,6 +488,9 @@ This is here to make the tiles around the station mininuke change when it's arme desc = "Better keep this safe." icon_state = "nucleardisk" persistence_replacement = /obj/item/weapon/disk/fakenucleardisk + obj_integrity = 250 + max_integrity = 250 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 90, acid = 70) /obj/item/weapon/disk/nuclear/New() ..() diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 8fd17b07c30..70293fccd11 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -293,7 +293,7 @@ martyr_compatible = 1 /datum/objective/block/check_completion() - if(!istype(owner.current, /mob/living/silicon)) + if(!issilicon(owner.current)) return 0 if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME) return 1 @@ -301,7 +301,7 @@ var/area/A = SSshuttle.emergency.areaInstance for(var/mob/living/player in player_list) - if(istype(player, /mob/living/silicon)) + if(issilicon(player)) continue if(player.mind) if(player.stat != DEAD) @@ -323,7 +323,7 @@ var/area/A = SSshuttle.emergency.areaInstance for(var/mob/living/player in player_list) - if(get_area(player) == A && player.mind && player.stat != DEAD && istype(player, /mob/living/carbon/human)) + if(get_area(player) == A && player.mind && player.stat != DEAD && ishuman(player)) var/mob/living/carbon/human/H = player if(H.dna.species.id != "human") return 0 @@ -337,7 +337,7 @@ martyr_compatible = 0 /datum/objective/robot_army/check_completion() - if(!istype(owner.current, /mob/living/silicon/ai)) + if(!isAI(owner.current)) return 0 var/mob/living/silicon/ai/A = owner.current diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index e4c4ba20d7b..25473cce9bb 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -105,7 +105,7 @@ /datum/objective_item/steal/functionalai/check_special_completion(obj/item/device/aicard/C) for(var/mob/living/silicon/ai/A in C) - if(istype(A, /mob/living/silicon/ai) && A.stat != 2) //See if any AI's are alive inside that card. + if(isAI(A) && A.stat != 2) //See if any AI's are alive inside that card. return 1 return 0 diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 29d8e89c86b..de27b673c5a 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -85,7 +85,7 @@ /datum/game_mode/proc/forge_traitor_objectives(datum/mind/traitor) - if(istype(traitor.current, /mob/living/silicon)) + if(issilicon(traitor.current)) var/objective_count = 0 if(prob(30)) @@ -200,7 +200,7 @@ /datum/game_mode/proc/finalize_traitor(var/datum/mind/traitor) - if (istype(traitor.current, /mob/living/silicon)) + if(issilicon(traitor.current)) add_law_zero(traitor.current) else equip_traitor(traitor.current) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 7bd85dfdd35..88611b5eb6b 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -172,7 +172,7 @@ return for(var/X in spooky_scaries) - if(!istype(X, /mob/living/carbon/human)) + if(!ishuman(X)) spooky_scaries.Remove(X) continue var/mob/living/carbon/human/H = X @@ -481,8 +481,9 @@ var/global/list/multiverse = list() var/obj/item/link = null var/cooldown_time = 30 //3s var/cooldown = 0 - burntime = 0 - resistance_flags = 0 + obj_integrity = 10 + max_integrity = 10 + resistance_flags = FLAMMABLE /obj/item/voodoo/attackby(obj/item/I, mob/user, params) if(target && cooldown < world.time) @@ -579,7 +580,7 @@ var/global/list/multiverse = list() var/area/A = get_area(src) victim << "You feel a dark presence from [A.name]" -/obj/item/voodoo/fire_act() +/obj/item/voodoo/fire_act(exposed_temperature, exposed_volume) if(target) target.adjust_fire_stacks(20) target.IgniteMob() diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 0cb14a1f13d..4cdd7123f1f 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -53,7 +53,7 @@ user << "There is no power left in the shard.\ " return - if(!istype(M, /mob/living/carbon/human))//If target is not a human. + if(!ishuman(M))//If target is not a human. return ..() if(iscultist(M)) user << "\"Come now, do not capture your fellow's soul.\"" diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 5cb7ec18535..6ea37d3ceee 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -657,7 +657,7 @@ if(H.stat || H.restrained()) return - if(!istype(H, /mob/living/carbon/human)) + if(!ishuman(H)) return 1 if(H.mind.special_role == "apprentice") @@ -665,7 +665,7 @@ return var/datum/spellbook_entry/E = null - if(loc == H || (in_range(src, H) && istype(loc, /turf))) + if(loc == H || (in_range(src, H) && isturf(loc))) H.set_machine(src) if(href_list["buy"]) E = entries[text2num(href_list["buy"])] @@ -833,7 +833,7 @@ desc = "This book is more horse than your mind has room for." /obj/item/weapon/spellbook/oneuse/barnyard/recoil(mob/living/carbon/user) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) user <<"HOR-SIE HAS RISEN" var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead magichead.flags |= NODROP //curses! diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index fd21d4a3826..19e8ce9fb6c 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -7,7 +7,8 @@ anchored = 1 var/obj/item/device/pda/storedpda = null var/list/colorlist = list() - var/health = 100 + obj_integrity = 200 + max_integrity = 200 /obj/machinery/pdapainter/update_icon() @@ -74,29 +75,16 @@ user << "You repair [src]." playsound(loc, 'sound/items/Welder2.ogg', 50, 1) stat &= ~BROKEN - health = initial(health) + obj_integrity = max_integrity update_icon() else user << "[src] does not need repairs." else return ..() -/obj/machinery/pdapainter/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - if(!(stat & BROKEN)) - health -= damage - if(health <= 0) +/obj/machinery/pdapainter/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) stat |= BROKEN update_icon() diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index db81c9efeef..f0d948b3948 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -78,12 +78,6 @@ if(occupant && occupant.stat != DEAD) occupant << "You feel cool air surround you. You go numb as your senses turn inward." -/obj/machinery/sleeper/attack_animal(mob/living/simple_animal/M) - if(M.environment_smash) - M.do_attack_animation(src) - visible_message("[M.name] smashes [src] apart!") - qdel(src) - /obj/machinery/sleeper/emp_act(severity) if(is_operational() && occupant) open_machine() @@ -176,8 +170,8 @@ if(!occupant) return var/amount = occupant.reagents.get_reagent_amount(chem) + 10 <= 20 * efficiency - var/health = occupant.health > min_health || chem == "epinephrine" - return amount && health + var/occ_health = occupant.health > min_health || chem == "epinephrine" + return amount && occ_health /obj/machinery/sleeper/syndie diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index d3f75788571..16bc9f135e4 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -4,6 +4,10 @@ icon_state = "motion3" layer = PROJECTILE_HIT_THRESHHOLD_LAYER anchored = 1 + obj_integrity = 200 + 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 = 1 var/lethal = 0 @@ -77,7 +81,7 @@ if(..()) return if (src.locked) - if (!(istype(usr, /mob/living/silicon)|| IsAdminGhost(usr))) + if(!(issilicon(usr)|| IsAdminGhost(usr))) usr << "Control panel is locked!" return if (href_list["toggleOn"]) diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index 7c5abe61c07..56240c6d9b2 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -100,6 +100,7 @@ icon = 'icons/obj/airlock_machines.dmi' icon_state = "airlock_sensor_off" name = "airlock sensor" + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF anchored = 1 power_channel = ENVIRON diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index f7b172a4454..f957f81704a 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -13,8 +13,6 @@ var/list/announcement_systems = list() verb_ask = "queries" verb_exclaim = "alarms" - var/broken = 0 - idle_power_usage = 20 active_power_usage = 50 @@ -63,7 +61,7 @@ var/list/announcement_systems = list() else overlays -= pinklight - if(broken) + if(stat & BROKEN) add_overlay(errorlight) else overlays -= errorlight @@ -84,9 +82,9 @@ var/list/announcement_systems = list() update_icon() else if(default_deconstruction_crowbar(P)) return - else if(istype(P, /obj/item/device/multitool) && panel_open && broken) + else if(istype(P, /obj/item/device/multitool) && panel_open && (stat & BROKEN)) user << "You reset [src]'s firmware." - broken = 0 + stat &= ~BROKEN update_icon() else return ..() @@ -117,7 +115,7 @@ var/list/announcement_systems = list() //config stuff /obj/machinery/announcement_system/interact(mob/user) - if(broken) + if(stat & BROKEN) visible_message("[src] buzzes.", "You hear a faint buzz.") playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1) return @@ -131,7 +129,7 @@ var/list/announcement_systems = list() popup.open() /obj/machinery/announcement_system/Topic(href, href_list) - if(broken) + if(stat & BROKEN) visible_message("[src] buzzes.", "You hear a faint buzz.") playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1) return @@ -162,13 +160,13 @@ var/list/announcement_systems = list() /obj/machinery/announcement_system/attack_ai(mob/living/silicon/ai/user) if(!isAI(user)) return - if(broken) + if(stat & BROKEN) user << "[src]'s firmware appears to be malfunctioning!" return interact(user) /obj/machinery/announcement_system/proc/act_up() //does funny breakage stuff - broken = 1 + stat |= BROKEN update_icon() arrival = pick("#!@%ERR-34%2 CANNOT LOCAT@# JO# F*LE!", "CRITICAL ERROR 99.", "ERR)#: DA#AB@#E NOT F(*ND!") diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index a3cb942cc2e..75d06eadf48 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -10,10 +10,11 @@ var/device_type = null var/id = null var/initialized = 0 - + armor = list(melee = 50, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 70) anchored = 1 use_power = 1 idle_power_usage = 2 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/machinery/button/New(loc, ndir = 0, built = 0) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 180f3f80d32..558c5d02c1d 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -12,8 +12,10 @@ active_power_usage = 10 layer = WALL_OBJ_LAYER - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - var/health = 50 + armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 50) + obj_integrity = 100 + max_integrity = 100 + integrity_failure = 50 var/list/network = list("SS13") var/c_tag = null var/c_tag_order = 999 @@ -22,7 +24,7 @@ var/start_active = 0 //If it ignores the random chance to start broken on round start var/invuln = null var/obj/item/device/camera_bug/bug = null - var/obj/machinery/camera_assembly/assembly = null + var/obj/structure/camera_assembly/assembly = null //OTHER @@ -112,20 +114,10 @@ ..() qdel(src)//to prevent bomb testing camera from exploding over and over forever -/obj/machinery/camera/blob_act(obj/structure/blob/B) - if(B && B.loc == loc) - take_damage(health, BRUTE, 0) - /obj/machinery/camera/ex_act(severity, target) - if(src.invuln) + if(invuln) return - switch(severity) - if(1) - qdel(src) - if(2) - take_damage(50, BRUTE, 0) - else - take_damage(rand(30,60), BRUTE, 0) + ..() /obj/machinery/camera/proc/setViewRange(num = 7) src.view_range = num @@ -150,7 +142,7 @@ if(panel_open) if(istype(W, /obj/item/weapon/wirecutters)) //enable/disable the camera toggle_cam(user, 1) - health = initial(health) //this is a pretty simplistic way to heal the camera, but there's no reason for this to be complex. + obj_integrity = max_integrity //this is a pretty simplistic way to heal the camera, but there's no reason for this to be complex. return else if(istype(W, /obj/item/device/multitool)) //change focus @@ -161,13 +153,7 @@ else if(istype(W, /obj/item/weapon/weldingtool)) if(weld(W, user)) visible_message("[user] unwelds [src], leaving it as just a frame screwed to the wall.", "You unweld [src], leaving it as just a frame screwed to the wall") - if(!assembly) - assembly = new() - assembly.loc = src.loc - assembly.state = 1 - assembly.setDir(src.dir) - assembly = null - qdel(src) + deconstruct(TRUE) return else if(istype(W, /obj/item/device/analyzer)) @@ -218,7 +204,7 @@ U << "You hold \the [itemname] up to the camera..." U.changeNext_move(CLICK_CD_MELEE) for(var/mob/O in player_list) - if(istype(O, /mob/living/silicon/ai)) + if(isAI(O)) var/mob/living/silicon/ai/AI = O if(AI.control_disabled || (AI.stat == DEAD)) return @@ -253,26 +239,31 @@ return ..() -/obj/machinery/camera/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(src, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(src, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - if(damage < 10) //camera has a damage resistance threshold - return - health = max(0, health - damage) - if(!health && status) +/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 + . = ..() + +/obj/machinery/camera/obj_break(damage_flag) + if(status && !(flags & NODECONSTRUCT)) triggerCameraAlarm() toggle_cam(null, 0) +/obj/machinery/camera/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + if(!assembly) + assembly = new() + assembly.loc = src.loc + assembly.state = 1 + assembly.setDir(dir) + assembly = null + else + var/obj/item/I = new /obj/item/wallframe/camera (loc) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 2) + qdel(src) + /obj/machinery/camera/update_icon() if(!status) icon_state = "[initial(icon_state)]1" @@ -401,10 +392,6 @@ else src.SetLuminosity(0) -/obj/machinery/camera/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - /obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets. var/turf/prev_turf diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 94e97a0e39c..87b08024f3f 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -4,19 +4,21 @@ icon = 'icons/obj/monitors.dmi' icon_state = "cameracase" materials = list(MAT_METAL=400, MAT_GLASS=250) - result_path = /obj/machinery/camera_assembly + result_path = /obj/structure/camera_assembly -/obj/machinery/camera_assembly +/obj/structure/camera_assembly name = "camera assembly" desc = "The basic construction for Nanotrasen-Always-Watching-You cameras." icon = 'icons/obj/monitors.dmi' icon_state = "camera1" + obj_integrity = 150 + max_integrity = 150 // Motion, EMP-Proof, X-Ray var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/device/analyzer) var/list/upgrades = list() var/state = 1 - var/busy = 0 + /* 1 = Wrenched in place 2 = Welded in place @@ -24,12 +26,12 @@ 4 = Screwdriver panel closed and is fully built (you cannot attach upgrades) */ -/obj/machinery/camera_assembly/New(loc, ndir, building) +/obj/structure/camera_assembly/New(loc, ndir, building) ..() if(building) setDir(ndir) -/obj/machinery/camera_assembly/attackby(obj/item/W, mob/living/user, params) +/obj/structure/camera_assembly/attackby(obj/item/W, mob/living/user, params) switch(state) if(1) // State 1 @@ -73,14 +75,14 @@ if(istype(W, /obj/item/weapon/screwdriver)) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - var/input = stripped_input(usr, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13") + var/input = stripped_input(user, "Which networks would you like to connect this camera to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13") if(!input) - usr << "No input found, please hang up and try your call again!" + user << "No input found, please hang up and try your call again!" return var/list/tempnetwork = splittext(input, ",") if(tempnetwork.len < 1) - usr << "No network found, please hang up and try your call again!" + user << "No network found, please hang up and try your call again!" return state = 4 @@ -122,19 +124,18 @@ return ..() -/obj/machinery/camera_assembly/proc/weld(obj/item/weapon/weldingtool/WT, mob/living/user) - if(busy) - return 0 +/obj/structure/camera_assembly/proc/weld(obj/item/weapon/weldingtool/WT, mob/living/user) if(!WT.remove_fuel(0, user)) return 0 - user << "You start to weld \the [src]..." playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) - busy = 1 if(do_after(user, 20, target = src)) - busy = 0 - if(!WT.isOn()) - return 0 - return 1 - busy = 0 - return 0 \ No newline at end of file + if(WT.isOn()) + playsound(loc, 'sound/items/Welder2.ogg', 50, 1) + return 1 + return 0 + +/obj/structure/camera_assembly/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc) + qdel(src) \ No newline at end of file diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 4b6b1e4ce71..e540942b490 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -25,7 +25,8 @@ lostTarget(target) /obj/machinery/camera/proc/newTarget(mob/target) - if (istype(target, /mob/living/silicon/ai)) return 0 + if(isAI(target)) + return 0 if (detectTime == 0) detectTime = world.time // start the clock if (!(target in motionTargets)) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index f4bd51ef02f..34c59562091 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -54,7 +54,7 @@ // Human check var/human = 0 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) human = 1 var/name = M.name @@ -136,7 +136,7 @@ /proc/near_camera(mob/living/M) if (!isturf(M.loc)) return 0 - if(isrobot(M)) + if(iscyborg(M)) var/mob/living/silicon/robot/R = M if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M)) return 0 diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 142f6c21e97..4255cf42eec 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -91,7 +91,7 @@ if(!charging) return - charging.loc = loc + charging.forceMove(loc) user << "You telekinetically remove [charging] from [src]." removecell() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 45934d85022..72b74fe486b 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -370,7 +370,8 @@ go_out() /obj/machinery/clonepod/emp_act(severity) - if(prob(100/(severity*efficiency))) malfunction() + if(prob(100/(severity*efficiency))) + malfunction() ..() /obj/machinery/clonepod/ex_act(severity, target) @@ -378,6 +379,13 @@ if(!qdeleted(src)) go_out() +/obj/machinery/clonepod/deconstruct(disassembled = TRUE) + if(occupant) + locked = FALSE + go_out() + ..() + + /* * Diskette Box */ diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 955cbf118bb..f62a0be4816 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -15,6 +15,7 @@ user << "You wrench the frame into place." anchored = 1 state = 1 + return if(istype(P, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = P if(!WT.remove_fuel(0, user)) @@ -29,6 +30,7 @@ var/obj/item/stack/sheet/metal/M = new (loc, 5) M.add_fingerprint(user) qdel(src) + return if(1) if(istype(P, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) @@ -37,6 +39,7 @@ user << "You unfasten the frame." anchored = 0 state = 0 + return if(istype(P, /obj/item/weapon/circuitboard/computer) && !circuit) if(!user.drop_item()) return @@ -46,15 +49,17 @@ circuit = P circuit.add_fingerprint(user) P.loc = null + return else if(istype(P, /obj/item/weapon/circuitboard) && !circuit) user << "This frame does not accept circuit boards of this type!" - + return if(istype(P, /obj/item/weapon/screwdriver) && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You screw the circuit board into place." state = 2 icon_state = "2" + return if(istype(P, /obj/item/weapon/crowbar) && circuit) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the circuit board." @@ -63,12 +68,14 @@ circuit.loc = src.loc circuit.add_fingerprint(user) circuit = null + return if(2) if(istype(P, /obj/item/weapon/screwdriver) && circuit) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) 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.get_amount() >= 5) @@ -82,6 +89,7 @@ icon_state = "3" else user << "You need five lengths of cable to wire the frame!" + return if(3) if(istype(P, /obj/item/weapon/wirecutters)) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) @@ -91,6 +99,7 @@ var/obj/item/stack/cable_coil/A = new (loc) A.amount = 5 A.add_fingerprint(user) + return if(istype(P, /obj/item/stack/sheet/glass)) var/obj/item/stack/sheet/glass/G = P @@ -106,6 +115,7 @@ user << "You put in the glass panel." state = 4 src.icon_state = "4" + return if(4) if(istype(P, /obj/item/weapon/crowbar)) playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) @@ -114,14 +124,27 @@ icon_state = "3" var/obj/item/stack/sheet/glass/G = new (loc, 2) G.add_fingerprint(user) + return if(istype(P, /obj/item/weapon/screwdriver)) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << "You connect the monitor." var/obj/B = new src.circuit.build_path (src.loc, circuit) transfer_fingerprints_to(B) qdel(src) + return + if(user.a_intent == "harm") + return ..() +/obj/structure/frame/computer/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(state == 4) + new /obj/item/weapon/shard(loc) + new /obj/item/weapon/shard(loc) + if(state >= 3) + new /obj/item/stack/cable_coil(loc , 5) + ..() + /obj/item/weapon/circuitboard name = "circuit board" diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 70d099b1228..1342359a08e 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -27,7 +27,7 @@ if(!Adjacent(user)) user.unset_machine() return - else if(isrobot(user)) + else if(iscyborg(user)) var/list/viewing = viewers(src) if(!viewing.Find(user)) user.unset_machine() @@ -88,7 +88,7 @@ var/camera_fail = 0 if(!C.can_use() || user.machine != src || user.eye_blind || user.incapacitated()) camera_fail = 1 - else if(isrobot(user)) + else if(iscyborg(user)) var/list/viewing = viewers(src) if(!viewing.Find(user)) camera_fail = 1 diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index ba4fbd860ee..65368175f4e 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -337,7 +337,7 @@ var/time_last_changed_position = 0 scan = I authenticated = 0 if ("auth") - if ((!( authenticated ) && (scan || (istype(usr, /mob/living/silicon))) && (modify || mode))) + if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode))) if (check_access(scan)) region_access = list() head_subordinates = list() @@ -368,7 +368,7 @@ var/time_last_changed_position = 0 get_subordinates("Chief Engineer") if(region_access) authenticated = 1 - else if ((!( authenticated ) && (istype(usr, /mob/living/silicon))) && (!modify)) + else if ((!( authenticated ) && issilicon(usr)) && (!modify)) usr << "You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in." if ("logout") region_access = null @@ -417,7 +417,7 @@ var/time_last_changed_position = 0 if (authenticated) var/t2 = modify //var/t1 = input(usr, "What name?", "ID computer", null) as text - if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) + if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc))) var/newName = reject_bad_name(href_list["reg"]) if(newName) modify.registered_name = newName diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 8713750077a..66e00319ec9 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -31,6 +31,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 var/const/STATE_ALERT_LEVEL = 8 var/const/STATE_CONFIRM_LEVEL = 9 var/const/STATE_TOGGLE_EMERGENCY = 10 + var/const/COMMUNICATION_COOLDOWN = 600 + var/const/COMMUNICATION_COOLDOWN_AI = 600 var/status_display_freq = "1435" var/stat_msg1 @@ -111,10 +113,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 usr << "You need to swipe your ID!" if("announce") - if(src.authenticated==2 && !message_cooldown) + if(src.authenticated==2) make_announcement(usr) - else if (src.authenticated==2 && message_cooldown) - usr << "Intercomms recharging. Please stand by." if("crossserver") if(authenticated==2) @@ -296,8 +296,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 if("ai-status") src.aistate = STATE_STATUSDISPLAY if("ai-announce") - if(!ai_message_cooldown) - make_announcement(usr, 1) + make_announcement(usr, 1) if("ai-securitylevel") src.tmp_alertlevel = text2num( href_list["newalertlevel"] ) if(!tmp_alertlevel) tmp_alertlevel = 0 @@ -365,7 +364,7 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - if (istype(user, /mob/living/silicon)) + if(issilicon(user)) var/dat2 = src.interact_ai(user) // give the AI a different interact proc to limit its access if(dat2) dat += dat2 @@ -582,19 +581,22 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 return dat /obj/machinery/computer/communications/proc/make_announcement(mob/living/user, is_silicon) + if((is_silicon && ai_message_cooldown > world.time) || (!is_silicon && message_cooldown > world.time)) + user << "Intercomms recharging. Please stand by." + return var/input = stripped_input(user, "Please choose a message to announce to the station crew.", "What?") if(!input || !user.canUseTopic(src)) return if(is_silicon) + if(ai_message_cooldown > world.time) + return minor_announce(input,"[user.name] Announces:") - ai_message_cooldown = 1 - spawn(600)//One minute cooldown - ai_message_cooldown = 0 + ai_message_cooldown = world.time + COMMUNICATION_COOLDOWN_AI else + if(message_cooldown > world.time) + return priority_announce(html_decode(input), null, 'sound/misc/announce.ogg', "Captain") - message_cooldown = 1 - spawn(600)//One minute cooldown - message_cooldown = 0 + message_cooldown = world.time + COMMUNICATION_COOLDOWN log_say("[key_name(user)] has made a priority announcement: [input]") message_admins("[key_name_admin(user)] has made a priority announcement.") diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 2f49e5f59cb..38ef9137c09 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -7,12 +7,15 @@ use_power = 1 idle_power_usage = 300 active_power_usage = 300 + obj_integrity = 200 + 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/weapon/circuitboard/computer/circuit = null // if circuit==null, computer can't disassembly var/processing = 0 var/brightness_on = 2 var/icon_keyboard = "generic_key" var/icon_screen = "generic" - var/computer_health = 25 var/clockwork = FALSE /obj/machinery/computer/New(location, obj/item/weapon/circuitboard/C) @@ -41,28 +44,6 @@ return 0 return 1 -/obj/machinery/computer/emp_act(severity) - if(severity == 1) - take_damage(rand(15,30), BRUTE, 0) - else - take_damage(rand(15,25), BRUTE, 0) - ..() - -/obj/machinery/computer/ex_act(severity, target) - if(target == src) - qdel(src) - return - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(25)) - qdel(src) - else - take_damage(rand(20,30), BRUTE, 0) - if(3) - take_damage(rand(10,30), BRUTE, 0) - /obj/machinery/computer/ratvar_act() if(!clockwork) clockwork = TRUE @@ -79,10 +60,6 @@ icon_state = initial(icon_state) update_icon() -/obj/machinery/computer/bullet_act(obj/item/projectile/P) - take_damage(P.damage, P.damage_type, 0) - ..() - /obj/machinery/computer/update_icon() cut_overlays() if(stat & NOPOWER) @@ -108,67 +85,61 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user << " You start to disconnect the monitor..." if(do_after(user, 20/I.toolspeed, target = src)) - deconstruct() + deconstruct(TRUE, user) + else + return ..() + +/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, 1) + else + playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) + if(BURN) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) + +/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, 1) + stat |= BROKEN + update_icon() + +/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/frame/computer/A = new /obj/structure/frame/computer(src.loc) A.circuit = circuit A.anchored = 1 - circuit = null - for (var/obj/C in src) - C.loc = src.loc - if (stat & BROKEN) - user << "The broken glass falls out." + if(stat & BROKEN) + if(user) + user << "The broken glass falls out." + else + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) new /obj/item/weapon/shard(src.loc) new /obj/item/weapon/shard(src.loc) A.state = 3 A.icon_state = "3" else - user << "You disconnect the monitor." + if(user) + user << "You disconnect the monitor." A.state = 4 A.icon_state = "4" - qdel(src) - else - return ..() + circuit = null + for(var/obj/C in src) + C.forceMove(loc) -/obj/machinery/computer/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(stat & BROKEN) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - else - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - computer_health = max(computer_health - damage, 0) - if(circuit) //no circuit, no breaking - if(!computer_health && !(stat & BROKEN)) - playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) - stat |= BROKEN - update_icon() - - - -/obj/machinery/computer/deconstruct(mob/user) - on_deconstruction() - var/obj/structure/frame/computer/A = new /obj/structure/frame/computer(src.loc) - A.circuit = circuit - A.anchored = 1 - circuit = null - for(var/obj/C in src) - C.forceMove(loc) - if(stat & BROKEN) - if(user) - user << "The broken glass falls out." - new /obj/item/weapon/shard(src.loc) - new /obj/item/weapon/shard(src.loc) - A.state = 3 - A.icon_state = "3" - else - if(user) - user << "You disconnect the monitor." - A.state = 4 - A.icon_state = "4" - qdel(src) \ No newline at end of file + qdel(src) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index d929f800cdd..0ade3fe48b5 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -215,7 +215,7 @@ var/global/datum/crewmonitor/crewmonitor = new if (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z)) if (isAI(hclient.client.mob)) return TRUE - else if (isrobot(hclient.client.mob)) + else if (iscyborg(hclient.client.mob)) return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents)) else return (locate(/obj/machinery/computer/crew, range(1, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents)) diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 7df6df63362..a4dee33e603 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -72,7 +72,7 @@ /obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change) if(!user) return var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window - if(!( in_range(src, user) || istype(user, /mob/living/silicon) )) + if(!(in_range(src, user) || issilicon(user))) popup.close() return popup.add_stylesheet("scannernew", 'html/browser/scannernew.css') @@ -316,7 +316,7 @@ return if(!isturf(usr.loc)) return - if(!( (isturf(loc) && in_range(src, usr)) || istype(usr, /mob/living/silicon) )) + if(!((isturf(loc) && in_range(src, usr)) || issilicon(usr))) return if(current_screen == "working") return diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 3c066205601..26237a9eeab 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -71,7 +71,7 @@ user << "[src.current.name] selected for law changes." /obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B) - if(!B || !isrobot(B)) + if(!B || !iscyborg(B)) return 0 if(B.scrambledcodes || B.emagged) return 0 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 62c7230851b..5d5ea0d6a07 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -206,13 +206,13 @@ if(!(active2 in data_core.medical)) src.active2 = null - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr)) usr.set_machine(src) if(href_list["temp"]) src.temp = null if(href_list["scan"]) if(src.scan) - if(istype(usr,/mob/living/carbon/human) && !usr.get_active_held_item()) + if(ishuman(usr) && !usr.get_active_held_item()) usr.put_in_hands(scan) else scan.loc = get_turf(src) @@ -243,7 +243,7 @@ sortBy = href_list["sort"] order = initial(order) else if(href_list["login"]) - if(istype(usr, /mob/living/silicon)) + if(issilicon(usr)) src.active1 = null src.active2 = null src.authenticated = 1 diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index b277e7b5e8d..baef6d41826 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -131,7 +131,7 @@ dat += "" //Hacking screen. if(2) - if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) + if(isAI(user) || iscyborg(user)) dat += "Brute-forcing for server key.
It will take 20 seconds for every character that the password has." dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time." else @@ -247,7 +247,7 @@ if(..()) return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) //Authenticate if (href_list["auth"]) if(!linkedServer || linkedServer.stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 8d503badcea..2b26f1e3582 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -88,7 +88,7 @@ /obj/machinery/computer/pod/Topic(href, href_list) if(..()) return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) usr.set_machine(src) if(href_list["power"]) var/t = text2num(href_list["power"]) diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 9df931c720a..583b4cf8f14 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -56,7 +56,7 @@ var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in - if(Tr.z == ZLEVEL_STATION && !istype(M.loc, /turf/open/space)) + if(Tr.z == ZLEVEL_STATION && !isspaceturf(M.loc)) var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc @@ -88,7 +88,7 @@ /obj/machinery/computer/prisoner/Topic(href, href_list) if(..()) return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) usr.set_machine(src) if(href_list["id"]) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 4dda0b11057..f22497b08c2 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -13,10 +13,10 @@ /obj/machinery/computer/robotics/proc/can_control(mob/user, mob/living/silicon/robot/R) if(!istype(R)) return 0 - if(istype(user, /mob/living/silicon/ai)) + if(isAI(user)) if (R.connected_ai != user) return 0 - if(istype(user, /mob/living/silicon/robot)) + if(iscyborg(user)) if (R != user) return 0 if(R.scrambledcodes) @@ -59,7 +59,7 @@ dat += " Slaved to [R.connected_ai.name] |" else dat += " Independent from AI |" - if (istype(user, /mob/living/silicon) || IsAdminGhost(user)) + if(issilicon(user) || IsAdminGhost(user)) if(((issilicon(user) && is_special_character(user)) || IsAdminGhost(user)) && !R.emagged && (user != R || R.syndicate)) dat += "(Hack) " dat += "([R.canmove ? "Lockdown" : "Release"]) " diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index d1b5a3e5baa..05c689e7ea7 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -269,7 +269,7 @@ What a mess.*/ active1 = null if(!( data_core.security.Find(active2) )) active2 = null - if((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr) || IsAdminGhost(usr)) usr.set_machine(src) switch(href_list["choice"]) // SORTING! @@ -295,7 +295,7 @@ What a mess.*/ if("Confirm Identity") if(scan) - if(istype(usr,/mob/living/carbon/human) && !usr.get_active_held_item()) + if(ishuman(usr) && !usr.get_active_held_item()) usr.put_in_hands(scan) else scan.loc = get_turf(src) @@ -315,7 +315,7 @@ What a mess.*/ active2 = null if("Log In") - if(istype(usr, /mob/living/silicon)) + if(issilicon(usr)) var/mob/living/silicon/borg = usr active1 = null active2 = null @@ -734,7 +734,7 @@ What a mess.*/ /obj/machinery/computer/secure_data/proc/get_photo(mob/user) var/obj/item/weapon/photo/P = null - if(istype(user, /mob/living/silicon)) + if(issilicon(user)) var/mob/living/silicon/tempAI = user var/datum/picture/selection = tempAI.GetPhoto() if(selection) diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index abba2eb90ce..ea9437018e0 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -9,6 +9,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F icon_keyboard = "tcstation_key" icon_screen = "syndie" clockwork = TRUE //it'd look weird, at least if ratvar ever got there + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF ///////////////////////////////////////////// /obj/machinery/computer/telecrystals/uplinker diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index def8036d422..ec10b96b79f 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -4,6 +4,8 @@ icon_state = "box_0" density = 1 anchored = 1 + obj_integrity = 250 + max_integrity = 250 var/obj/item/weapon/circuitboard/circuit = null var/state = 1 @@ -12,6 +14,16 @@ if(circuit) user << "It has \a [circuit] installed." + +/obj/structure/frame/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 5) + if(circuit) + circuit.forceMove(loc) + circuit = null + qdel(src) + + /obj/structure/frame/machine name = "machine frame" var/list/components = null @@ -66,10 +78,10 @@ if(1) if(istype(P, /obj/item/weapon/circuitboard/machine)) user << "The frame needs wiring first!" - + return else if(istype(P, /obj/item/weapon/circuitboard)) user << "This frame does not accept circuit boards of this type!" - + return if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/C = P if(C.get_amount() >= 5) @@ -83,7 +95,7 @@ icon_state = "box_1" else user << "You need five length of cable to wire the frame!" - return + return if(istype(P, /obj/item/weapon/screwdriver) && !anchored) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) user.visible_message("[user] disassembles the frame.", \ @@ -94,6 +106,7 @@ var/obj/item/stack/sheet/metal/M = new (loc, 5) M.add_fingerprint(user) qdel(src) + return if(istype(P, /obj/item/weapon/wrench)) user << "You start [anchored ? "un" : ""]securing [name]..." playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) @@ -101,6 +114,7 @@ if(state == 1) user << "You [anchored ? "un" : ""]secure [name]." anchored = !anchored + return if(2) if(istype(P, /obj/item/weapon/wrench)) @@ -109,6 +123,7 @@ if(do_after(user, 40/P.toolspeed, target = src)) user << "You [anchored ? "un" : ""]secure [name]." anchored = !anchored + return if(istype(P, /obj/item/weapon/circuitboard/machine)) if(!anchored) @@ -126,9 +141,11 @@ components = list() req_components = B.req_components.Copy() update_namelist() + return else if(istype(P, /obj/item/weapon/circuitboard)) user << "This frame does not accept circuit boards of this type!" + return if(istype(P, /obj/item/weapon/wirecutters)) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) @@ -137,6 +154,7 @@ icon_state = "box_0" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc ) A.amount = 5 + return if(3) if(istype(P, /obj/item/weapon/crowbar)) @@ -155,6 +173,7 @@ req_components = null components = null icon_state = "box_1" + return if(istype(P, /obj/item/weapon/screwdriver)) var/component_check = 1 @@ -175,6 +194,7 @@ circuit.loc = null new_machine.RefreshParts() qdel(src) + return if(istype(P, /obj/item/weapon/storage/part_replacer) && P.contents.len && get_req_components_amt()) var/obj/item/weapon/storage/part_replacer/replacer = P @@ -224,12 +244,25 @@ if(!user.drop_item()) break user << "You add [P] to [src]." - P.loc = src + P.forceMove(src) components += P req_components[I]-- return 1 user << "You cannot add that to the machine!" return 0 + if(user.a_intent == "harm") + return ..() + + +/obj/structure/frame/machine/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(state >= 2) + new /obj/item/stack/cable_coil(loc , 5) + for(var/X in components) + var/obj/item/I = X + I.forceMove(loc) + ..() + //Machine Frame Circuit Boards diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index e04bcd68c55..1fe145e5565 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -13,86 +13,31 @@ desc = "Looks like this would make good cover." anchored = 1 density = 1 - var/health = 100 - var/maxhealth = 100 + obj_integrity = 100 + max_integrity = 100 var/proj_pass_rate = 50 //How many projectiles will pass the cover. Lower means stronger cover - var/ranged_damage_modifier = 1 //Multiply for ranged damage var/material = METAL - var/debris_type - -/obj/structure/barricade/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - damage = 0 - health -= damage - if(health <= 0) +/obj/structure/barricade/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) make_debris() - qdel(src) + qdel(src) /obj/structure/barricade/proc/make_debris() return -/obj/structure/barricade/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - if(!M.melee_damage_upper && !M.obj_damage || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN)) - return - visible_message("[M] [M.attacktext] [src]!") - add_logs(M, src, "attacked") - if(M.obj_damage) - take_damage(M.obj_damage) - else - take_damage(M.melee_damage_upper) - -/obj/structure/barricade/attack_alien(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - user.visible_message("[user] claws at [src]!") - playsound(user.loc, 'sound/weapons/slash.ogg', 100, 1) - take_damage(50, BRUTE, 0) - /obj/structure/barricade/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm" && material == METAL) var/obj/item/weapon/weldingtool/WT = I - if(health < maxhealth) + if(obj_integrity < max_integrity) if(WT.remove_fuel(0,user)) user << "You begin repairing [src]..." playsound(loc, 'sound/items/Welder.ogg', 40, 1) if(do_after(user, 40/I.toolspeed, target = src)) - health = Clamp(health + 20, 0, maxhealth) + obj_integrity = Clamp(obj_integrity + 20, 0, max_integrity) else return ..() - -/obj/structure/barricade/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force) - -/obj/structure/barricade/bullet_act(obj/item/projectile/P) - . = ..() - visible_message("\The [src] is hit by [P]!") - take_damage(P.damage*ranged_damage_modifier) - -/obj/structure/barricade/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - take_damage(25, BRUTE, 0) - -/obj/structure/barricade/blob_act(obj/structure/blob/B) - take_damage(25, BRUTE, 0) - /obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff. if(height==0) return 1 @@ -130,8 +75,8 @@ desc = "Bags of sand. Self explanatory." icon = 'icons/obj/smooth_structures/sandbags.dmi' icon_state = "sandbags" - health = 280 - maxhealth = 280 + obj_integrity = 280 + max_integrity = 280 proj_pass_rate = 20 pass_flags = LETPASSTHROW material = SAND @@ -147,11 +92,10 @@ icon_state = "barrier0" density = 0 anchored = 0 - health = 180 - maxhealth = 180 + obj_integrity = 180 + max_integrity = 180 proj_pass_rate = 20 - ranged_damage_modifier = 0.5 - armor = list(melee = 10, bullet = 50, laser = 50, energy = 0, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 0) + armor = list(melee = 10, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 0) /obj/structure/barricade/security/New() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 89e3a0ffdb4..e458f081eb1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -29,6 +29,9 @@ var/list/airlock_overlays = list() name = "airlock" icon = 'icons/obj/doors/airlocks/station/public.dmi' icon_state = "closed" + obj_integrity = 300 + max_integrity = 300 + integrity_failure = 70 var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in. var/hackProof = 0 // if 1, this door can't be hacked by the AI @@ -599,7 +602,7 @@ var/list/airlock_overlays = list() return src.attack_hand(user) /obj/machinery/door/airlock/attack_hand(mob/user) - if(!(istype(user, /mob/living/silicon) || IsAdminGhost(user))) + if(!(issilicon(user) || IsAdminGhost(user))) if(src.isElectrified()) if(src.shock(user, 100)) return @@ -639,12 +642,12 @@ var/list/airlock_overlays = list() usr.unset_machine() return - if((in_range(src, usr) && istype(src.loc, /turf)) && panel_open) + if((in_range(src, usr) && isturf(loc)) && panel_open) usr.set_machine(src) - if((istype(usr, /mob/living/silicon) && src.canAIControl(usr)) || IsAdminGhost(usr)) + if((issilicon(usr) && src.canAIControl(usr)) || IsAdminGhost(usr)) //AI //aiDisable - 1 idscan, 2 disrupt main power, 3 disrupt backup power, 4 drop door bolts, 5 un-electrify door, 7 close door, 8 door safties, 9 door speed, 11 emergency access //aiEnable - 1 idscan, 4 raise door bolts, 5 electrify door for 30 seconds, 6 electrify door indefinitely, 7 open door, 8 door safties, 9 door speed, 11 emergency access @@ -926,33 +929,7 @@ var/list/airlock_overlays = list() "You start to remove electronics from the airlock assembly...") if(do_after(user,40/I.toolspeed, target = src)) if(src.loc) - if(assemblytype) - var/obj/structure/door_assembly/A = new assemblytype(src.loc) - A.heat_proof_finished = src.heat_proof //tracks whether there's rglass in - else - new /obj/structure/door_assembly/door_assembly_0(src.loc) - //If you come across a null assemblytype, it will produce the default assembly instead of disintegrating. - - if(emagged) - user << "You discard the damaged electronics." - qdel(src) - return - user << "You remove the airlock electronics." - - var/obj/item/weapon/electronics/airlock/ae - if(!electronics) - ae = new/obj/item/weapon/electronics/airlock( src.loc ) - if(req_one_access) - ae.one_access = 1 - ae.accesses = src.req_one_access - else - ae.accesses = src.req_access - else - ae = electronics - electronics = null - ae.loc = src.loc - - qdel(src) + deconstruct(TRUE, user) return else if(hasPower()) user << "The airlock's motors resist your efforts to force it!" @@ -1218,3 +1195,46 @@ var/list/airlock_overlays = list() secondsElectrified = 0 open() safe = TRUE + + +/obj/machinery/door/airlock/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + stat |= BROKEN + if(!panel_open) + panel_open = 1 + wires.cut_all() + update_icon() + +/obj/machinery/door/airlock/deconstruct(disassembled = TRUE, mob/user) + if(!(flags & NODECONSTRUCT)) + var/obj/structure/door_assembly/A + if(assemblytype) + A = new assemblytype(src.loc) + A.heat_proof_finished = src.heat_proof //tracks whether there's rglass in + else + A = new /obj/structure/door_assembly/door_assembly_0(src.loc) + //If you come across a null assemblytype, it will produce the default assembly instead of disintegrating. + + if(!disassembled) + if(A) + A.obj_integrity = A.max_integrity * 0.5 + else if(emagged) + if(user) + user << "You discard the damaged electronics." + else + if(user) + user << "You remove the airlock electronics." + + var/obj/item/weapon/electronics/airlock/ae + if(!electronics) + ae = new/obj/item/weapon/electronics/airlock( src.loc ) + if(req_one_access) + ae.one_access = 1 + ae.accesses = src.req_one_access + else + ae.accesses = src.req_access + else + ae = electronics + electronics = null + ae.loc = src.loc + qdel(src) diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index 8ad89e2f465..737386b9e19 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -4,10 +4,14 @@ /obj/machinery/door/airlock/command icon = 'icons/obj/doors/airlocks/station/command.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_com + obj_integrity = 450 + max_integrity = 450 /obj/machinery/door/airlock/security icon = 'icons/obj/doors/airlocks/station/security.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_sec + obj_integrity = 450 + max_integrity = 450 /obj/machinery/door/airlock/engineering icon = 'icons/obj/doors/airlocks/station/engineering.dmi' @@ -21,6 +25,8 @@ name = "maintenance access" icon = 'icons/obj/doors/airlocks/station/maintenance.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_mai + obj_integrity = 250 + max_integrity = 250 /obj/machinery/door/airlock/mining name = "mining airlock" @@ -59,6 +65,8 @@ opacity = 0 assemblytype = /obj/structure/door_assembly/door_assembly_com/glass glass = 1 + obj_integrity = 400 + max_integrity = 400 /obj/machinery/door/airlock/glass_engineering icon = 'icons/obj/doors/airlocks/station/engineering.dmi' @@ -71,6 +79,8 @@ opacity = 0 assemblytype = /obj/structure/door_assembly/door_assembly_sec/glass glass = 1 + obj_integrity = 400 + max_integrity = 400 /obj/machinery/door/airlock/glass_medical icon = 'icons/obj/doors/airlocks/station/medical.dmi' @@ -136,6 +146,8 @@ icon = 'icons/obj/doors/airlocks/station/diamond.dmi' var/mineral = "diamond" assemblytype = /obj/structure/door_assembly/door_assembly_diamond + obj_integrity = 1000 + max_integrity = 1000 /obj/machinery/door/airlock/uranium name = "uranium airlock" @@ -241,6 +253,8 @@ overlays_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi' opacity = 1 assemblytype = /obj/structure/door_assembly/door_assembly_centcom + obj_integrity = 1000 + max_integrity = 1000 ////////////////////////////////// /* @@ -254,6 +268,8 @@ opacity = 1 assemblytype = /obj/structure/door_assembly/door_assembly_vault explosion_block = 2 + obj_integrity = 600 + max_integrity = 600 ////////////////////////////////// /* @@ -285,6 +301,8 @@ overlays_file = 'icons/obj/doors/airlocks/highsec/overlays.dmi' assemblytype = /obj/structure/door_assembly/door_assembly_highsecurity explosion_block = 2 + obj_integrity = 500 + max_integrity = 500 ////////////////////////////////// /* @@ -307,6 +325,8 @@ explosion_block = 3 hackProof = 1 aiControlDisabled = 1 + obj_integrity = 700 + max_integrity = 700 ////////////////////////////////// /* diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index a7b193653d7..9bb28c1175a 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -8,8 +8,9 @@ density = 1 layer = OPEN_DOOR_LAYER power_channel = ENVIRON - - armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 100, acid = 0) + obj_integrity = 350 + max_integrity = 350 + armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 70) var/secondsElectrified = 0 var/shockedby = list() @@ -27,6 +28,7 @@ var/locked = 0 //whether the door is bolted or not. var/assemblytype //the type of door frame to drop during deconstruction var/auto_close //TO BE REMOVED, no longer used, it's just preventing a runtime with a map var edit. + var/datum/effect_system/spark_spread/spark_system /obj/machinery/door/New() ..() @@ -37,7 +39,9 @@ update_freelook_sight() air_update_turf(1) airlocks += src - return + spark_system = new /datum/effect_system/spark_spread + spark_system.set_up(2, 1, src) + /obj/machinery/door/Destroy() @@ -45,6 +49,9 @@ air_update_turf(1) update_freelook_sight() airlocks -= src + if(spark_system) + qdel(spark_system) + spark_system = null return ..() //process() @@ -109,28 +116,6 @@ /obj/machinery/door/attack_ai(mob/user) return src.attack_hand(user) - -/obj/machinery/door/attack_paw(mob/user) - if(user.a_intent != "harm") - return src.attack_hand(user) - else - attack_generic(user, 5) - -/obj/machinery/door/proc/attack_generic(mob/user, damage = 0, damage_type = BRUTE) - if(operating) - return - user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user] smashes against the [src.name]!", \ - "You smash against the [src.name]!") - take_damage(damage, damage_type) - -/obj/machinery/door/attack_slime(mob/living/simple_animal/slime/S) - if(!S.is_adult) - attack_generic(S, 0) - else - attack_generic(S, 25) - /obj/machinery/door/attack_hand(mob/user) return try_to_activate_door(user) @@ -174,22 +159,28 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user) else return ..() -/obj/machinery/door/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 10) + return 0 + . = ..() + +/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + if(. && obj_integrity > 0) + if(damage_amount >= 10 && prob(30)) + spark_system.start() + +/obj/machinery/door/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - if(glass) - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) - else - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) + if(glass) + playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + else if(damage_amount) + playsound(loc, 'sound/weapons/smash.ogg', 50, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - - -/obj/machinery/door/blob_act(obj/structure/blob/B) - if(prob(60)) - qdel(src) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) /obj/machinery/door/emp_act(severity) if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) ) @@ -204,15 +195,6 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user) /obj/machinery/door/proc/unelectrify() secondsElectrified = 0 -/obj/machinery/door/ex_act(severity, target) - if(severity == 3) - if(prob(80)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() - return - ..() - /obj/machinery/door/update_icon() if(density) icon_state = "door1" @@ -353,3 +335,4 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user) /obj/machinery/door/proc/disable_lockdown() if(!stat) //Opens only powered doors. open() //Open everything! + diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 89e61042920..499050f431f 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -14,12 +14,16 @@ icon_state = "door_open" opacity = 0 density = 0 + obj_integrity = 300 + max_integrity = 300 heat_proof = 1 glass = 1 var/nextstate = null sub_door = 1 closingLayer = CLOSED_FIREDOOR_LAYER assemblytype = /obj/structure/firelock_frame + armor = list(melee = 30, bullet = 30, laser = 20, energy = 20, bomb = 10, bio = 100, rad = 100, fire = 95, acid = 70) + /obj/machinery/door/firedoor/Bumped(atom/AM) if(panel_open || operating) @@ -52,10 +56,7 @@ playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) user.visible_message("[user] unfastens [src]'s bolts.", \ "You undo [src]'s floor bolts.") - var/obj/structure/firelock_frame/F = new assemblytype(get_turf(src)) - F.constructionStep = CONSTRUCTION_PANEL_OPEN - F.update_icon() - qdel(src) + deconstruct(TRUE) return if(istype(C, /obj/item/weapon/screwdriver)) @@ -123,6 +124,18 @@ . = ..() latetoggle() +/obj/machinery/door/firedoor/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + var/obj/structure/firelock_frame/F = new assemblytype(get_turf(src)) + if(disassembled) + F.constructionStep = CONSTRUCTION_PANEL_OPEN + else + F.constructionStep = CONSTRUCTION_WIRES_EXPOSED + F.obj_integrity = F.max_integrity * 0.5 + F.update_icon() + qdel(src) + + /obj/machinery/door/firedoor/proc/latetoggle() if(operating || stat & NOPOWER || !nextstate) return @@ -160,12 +173,14 @@ else return 1 - /obj/machinery/door/firedoor/heavy name = "heavy firelock" icon = 'icons/obj/doors/Doorfire.dmi' glass = 0 assemblytype = /obj/structure/firelock_frame/heavy + obj_integrity = 550 + max_integrity = 550 + /obj/item/weapon/electronics/firelock name = "firelock circuitry" @@ -217,7 +232,7 @@ return if(istype(C, /obj/item/weapon/wrench)) if(locate(/obj/machinery/door/firedoor) in get_turf(src)) - user << "There's already a firlock there." + user << "There's already a firelock there." return playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1) user.visible_message("[user] starts bolting down [src]...", \ diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 118f2e18e44..e6c83a4307a 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -8,6 +8,10 @@ explosion_block = 3 heat_proof = 1 safe = 0 + obj_integrity = 600 + 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 /obj/machinery/door/poddoor/preopen icon_state = "open" @@ -23,7 +27,7 @@ /obj/machinery/door/poddoor/shuttledock/proc/check() var/turf/T = get_step(src, checkdir) - if(!istype(T,/turf/open/space)) + if(!isspaceturf(T)) addtimer(src, "open", 0, TRUE) else addtimer(src, "close", 0, TRUE) @@ -36,30 +40,14 @@ //"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS. /obj/machinery/door/poddoor/ex_act(severity, target) - if(target == src) - qdel(src) + if(severity == 3) return - switch(severity) - if(1) - if(prob(80)) - qdel(src) - else - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() - if(2) - if(prob(20)) - qdel(src) - else - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() + ..() - if(3) - if(prob(80)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() +/obj/machinery/door/poddoor/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 70) //any melee attack below 70 dmg does nothing + return 0 + . = ..() /obj/machinery/door/poddoor/do_animate(animation) switch(animation) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 8b8e68e0d55..02cb9157938 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -3,9 +3,12 @@ desc = "A strong door." icon = 'icons/obj/doors/windoor.dmi' icon_state = "left" + resistance_flags = ACID_PROOF var/base_state = "left" - var/health = 150 //If you change this, consider changing ../door/window/brigdoor/ health at the bottom of this .dm file - armor = list(melee = 20, bullet = 50, laser = 50, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 0, acid = 0) + obj_integrity = 150 //If you change this, consider changing ../door/window/brigdoor/ health at the bottom of this .dm file + max_integrity = 150 + integrity_failure = 0 + armor = list(melee = 20, bullet = 50, laser = 50, energy = 50, bomb = 10, bio = 100, rad = 100, fire = 70, acid = 100) visible = 0 flags = ON_BORDER opacity = 0 @@ -34,7 +37,7 @@ density = 0 for(var/I in debris) qdel(I) - if(health == 0) + if(obj_integrity == 0) playsound(src, "shatter", 70, 1) electronics = null return ..() @@ -159,40 +162,22 @@ src.operating = 0 return 1 -/obj/machinery/door/window/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/door/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health = max(0, src.health - damage) - if(health <= 0) - shatter() + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) -/obj/machinery/door/window/proc/shatter() - if(!(flags & NODECONSTRUCT)) + +/obj/machinery/door/window/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT) && !disassembled) for(var/obj/fragment in debris) fragment.forceMove(get_turf(src)) transfer_fingerprints_to(fragment) debris -= fragment qdel(src) -/obj/machinery/door/window/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(25)) - shatter() - else - take_damage(120, BRUTE, 0) - if(3) - take_damage(60, BRUTE, 0) - /obj/machinery/door/window/narsie_act() color = "#7D1919" @@ -200,27 +185,11 @@ new/obj/machinery/door/window/clockwork(src.loc, dir) qdel(src) -/obj/machinery/door/window/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(round(P.damage / 2), P.damage_type, 0) - /obj/machinery/door/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > T0C + (reinf ? 1600 : 800)) - take_damage(round(exposed_volume / 200), BURN, 0) + take_damage(round(exposed_volume / 200), BURN, 0, 0) ..() -//When an object is thrown at the window -/obj/machinery/door/window/hitby(atom/movable/AM) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 40 - else if(isobj(AM)) - var/obj/O = AM - tforce = O.throwforce - take_damage(tforce) - - /obj/machinery/door/window/attack_ai(mob/user) return src.attack_hand(user) @@ -319,20 +288,14 @@ if("deny") flick("[src.base_state]deny", src) -/obj/machinery/door/window/attack_hulk(mob/user) - ..(user, 1) - user.visible_message("[user] smashes through the windoor!", \ - "You tear through the windoor!") - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - take_damage(health) - /obj/machinery/door/window/brigdoor name = "secure door" icon_state = "leftsecure" base_state = "leftsecure" var/id = null - health = 300 //Stronger doors for prison (regular window door health is 200) + obj_integrity = 300 //Stronger doors for prison (regular window door health is 200) + max_integrity = 300 reinf = 1 explosion_block = 1 @@ -362,7 +325,7 @@ return ..() /obj/machinery/door/window/clockwork/ratvar_act() - health = initial(health) + obj_integrity = max_integrity /obj/machinery/door/window/clockwork/hasPower() return TRUE //yup that's power all right diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 0934edccff7..941e5098790 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -13,8 +13,9 @@ anchored = 1 density = 1 - var/health = 100 - var/max_health = 100 + obj_integrity = 250 + max_integrity = 250 + integrity_failure = 80 // These allow for different icons when creating custom dispensers var/icon_off = "off" @@ -54,7 +55,7 @@ /obj/machinery/droneDispenser/New() ..() - health = max_health + obj_integrity = max_integrity materials = new(src, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT*MAX_STACK_SIZE*2) @@ -157,9 +158,6 @@ ..() if((mode == DRONE_RECHARGING) && !stat && recharging_text) user << "[recharging_text]" - if(stat & BROKEN) - user << "[src] is smoking and steadily buzzing. \ - It seems to be broken." if(metal_cost) user << "It has [materials.amount(MAT_METAL)] \ units of metal stored." @@ -268,6 +266,11 @@ user << "The [src] isn't accepting the \ [sheets]." + else if(istype(O, /obj/item/weapon/crowbar)) + materials.retrieve_all() + playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) + user << "You retrieve the materials from [src]." + else if(istype(O, /obj/item/weapon/weldingtool)) if(!(stat & BROKEN)) user << "[src] doesn't need repairs." @@ -300,35 +303,26 @@ "You restore [src] to operation.") stat &= ~BROKEN - health = max_health + obj_integrity = max_integrity update_icon() else return ..() -/obj/machinery/droneDispenser/take_damage(damage, damage_type = BRUTE, - sound_effect = TRUE) - // But why would you hurt the dispenser? - switch(damage_type) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - else - return - health = max(health - damage, 0) - if(!health && !(stat & BROKEN)) - if(break_message) - audible_message("[src] \ - [break_message]") - if(break_sound) - playsound(src, break_sound, 50, 1) - stat |= BROKEN - update_icon() +/obj/machinery/droneDispenser/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) + if(break_message) + audible_message("[src] \ + [break_message]") + if(break_sound) + playsound(src, break_sound, 50, 1) + stat |= BROKEN + update_icon() + +/obj/machinery/droneDispenser/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 5) + qdel(src) #undef DRONE_PRODUCTION #undef DRONE_RECHARGING diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 867291018b7..9ed4ea26c3c 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -10,6 +10,7 @@ use_power = 1 idle_power_usage = 2 active_power_usage = 4 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/idSelf /obj/machinery/doorButtons/attackby(obj/O, mob/user) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 3d319be807b..faf731632d8 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -15,13 +15,16 @@ icon = 'icons/obj/monitors.dmi' icon_state = "fire0" anchored = 1 + obj_integrity = 250 + 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 = 1 idle_power_usage = 2 active_power_usage = 6 power_channel = ENVIRON var/detecting = 1 var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone - var/health = 50 /obj/machinery/firealarm/New(loc, dir, building) @@ -40,7 +43,7 @@ update_icon() /obj/machinery/firealarm/update_icon() - src.overlays = list() + cut_overlays() var/area/A = src.loc A = A.loc @@ -51,25 +54,23 @@ else icon_state = "fire0" - if(stat & NOPOWER) - return if(stat & BROKEN) icon_state = "firex" return + if(stat & NOPOWER) + return + add_overlay("overlay_[security_level]") if(detecting) add_overlay("overlay_[A.fire ? "fire" : "clear"]") else add_overlay("overlay_fire") -/obj/machinery/firealarm/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - /obj/machinery/firealarm/emp_act(severity) if(prob(50 / severity)) alarm() + ..() /obj/machinery/firealarm/emag_act(mob/user) if(!emagged) @@ -82,6 +83,7 @@ /obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume) if(!emagged && detecting && !stat && temperature > T0C + 200) alarm() + ..() /obj/machinery/firealarm/proc/alarm() if(!is_operational()) @@ -154,9 +156,7 @@ else if (istype(W, /obj/item/weapon/wirecutters)) buildstage = 1 playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) - var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil() - coil.amount = 5 - coil.loc = user.loc + new /obj/item/stack/cable_coil(user.loc, 5) user << "You cut the wires from \the [src]." update_icon() return @@ -204,26 +204,28 @@ return return ..() -/obj/machinery/firealarm/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - if(!(stat & BROKEN) && buildstage != 0) //can't break the electronics if there isn't any inside. - health -= damage - if(health <= 0) - stat |= BROKEN - update_icon() - else if(prob(33)) - alarm() + +/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/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) + var/obj/item/I = new /obj/item/weapon/electronics/firealarm(loc) + if(!disassembled) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 3) + qdel(src) + /* * Party button @@ -244,7 +246,7 @@ var/area/A = src.loc var/d1 var/dat - if (istype(user, /mob/living/carbon/human) || user.has_unlimited_silicon_privilege) + if(ishuman(user) || user.has_unlimited_silicon_privilege) A = A.loc if (A.party) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 80ff532d236..99de5c77edc 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -11,6 +11,9 @@ var/last_flash = 0 //Don't want it getting spammed like regular flashes var/strength = 5 //How weakened targets are when flashed. var/base_state = "mflash" + obj_integrity = 250 + max_integrity = 250 + integrity_failure = 100 anchored = 1 /obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored @@ -33,6 +36,9 @@ /obj/machinery/flasher/Destroy() remove_from_proximity_list(src, range) + if(bulb) + qdel(bulb) + bulb = null ..() /obj/machinery/flasher/Move() @@ -47,7 +53,7 @@ else icon_state = "[base_state]1" else - stat |= ~NOPOWER + stat |= NOPOWER icon_state = "[base_state]1-p" //Don't want to render prison breaks impossible @@ -59,7 +65,7 @@ playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) if(do_after(user, 30/W.toolspeed, target = src) && bulb) user.visible_message("[user] has disconnected [src]'s flashbulb!", "You disconnect [src]'s flashbulb.") - bulb.loc = src.loc + bulb.forceMove(loc) bulb = null power_change() @@ -68,7 +74,7 @@ if(!user.drop_item()) return user.visible_message("[user] installs [W] into [src].", "You install [W] into [src].") - W.loc = src + W.forceMove(src) bulb = W power_change() else @@ -80,11 +86,7 @@ playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 40/W.toolspeed, target = src)) user << "You unsecure the flasher frame." - var/obj/item/wallframe/flasher/F = new(get_turf(src)) - transfer_fingerprints_to(F) - F.id = id - playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) - qdel(src) + deconstruct(TRUE) else user << "Remove a flashbulb from [src] first!" else @@ -94,8 +96,11 @@ /obj/machinery/flasher/attack_ai() if (anchored) return flash() - else - return + +/obj/machinery/flasher/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 10) //any melee attack below 10 dmg does nothing + return 0 + . = ..() /obj/machinery/flasher/proc/flash() if (!powered() || !bulb) @@ -128,14 +133,34 @@ /obj/machinery/flasher/emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - ..(severity) - return - if(bulb && prob(75/severity)) - flash() - bulb.burn_out() - power_change() - ..(severity) + if(!(stat & (BROKEN|NOPOWER))) + if(bulb && prob(75/severity)) + flash() + bulb.burn_out() + power_change() + ..() + +/obj/machinery/flasher/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT)) + if(!(stat & BROKEN)) + stat |= BROKEN + if(bulb) + bulb.burn_out() + power_change() + +/obj/machinery/flasher/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(bulb) + bulb.forceMove(loc) + bulb = null + if(disassembled) + var/obj/item/wallframe/flasher/F = new(get_turf(src)) + transfer_fingerprints_to(F) + F.id = id + playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1) + else + new /obj/item/stack/sheet/metal (loc, 2) + qdel(src) /obj/machinery/flasher/portable/HasProximity(atom/movable/AM) if (last_flash && world.time < last_flash + 150) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index aa6500e9b37..6545d93f90b 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -39,6 +39,9 @@ var/const/HOLOPAD_MODE = RANGE_BASED flags = HEAR languages_spoken = ROBOT | HUMAN languages_understood = ROBOT | HUMAN + obj_integrity = 300 + 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 AIs that use the holopad var/last_request = 0 //to prevent request spam. ~Carn var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating. diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 36034138b6f..2f0cf01823e 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -9,6 +9,10 @@ use_power = 1 idle_power_usage = 2 active_power_usage = 4 + obj_integrity = 300 + 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 /obj/machinery/igniter/attack_ai(mob/user) return src.attack_hand(user) @@ -118,8 +122,6 @@ return 1 /obj/machinery/sparker/emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - ..(severity) - return - ignite() - ..(severity) \ No newline at end of file + if(!(stat & (BROKEN|NOPOWER))) + ignite() + ..() \ No newline at end of file diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index f9f3439b6ac..ccc199e0f3e 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -95,6 +95,10 @@ 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/process() if(!attached) @@ -154,7 +158,7 @@ set name = "Remove IV Container" set src in view(1) - if(!istype(usr, /mob/living)) + if(!isliving(usr)) usr << "You can't do that!" return @@ -171,7 +175,7 @@ set name = "Toggle Mode" set src in view(1) - if(!istype(usr, /mob/living)) + if(!isliving(usr)) usr << "You can't do that!" return diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 2383172069b..4fdd4377a99 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -69,8 +69,6 @@ updateicon() /obj/machinery/light_switch/emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - ..(severity) - return - power_change() - ..(severity) \ No newline at end of file + if(!(stat & (BROKEN|NOPOWER))) + power_change() + ..() \ No newline at end of file diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 45b975a89e7..112b8f028cc 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -71,6 +71,7 @@ /obj/machinery/limbgrower/on_deconstruction() for(var/obj/item/weapon/reagent_containers/glass/G in component_parts) reagents.trans_to(G, G.reagents.maximum_volume) + ..() /obj/machinery/limbgrower/attackby(obj/item/O, mob/user, params) if (busy) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index c44cae77d61..ce2ac895743 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -99,6 +99,10 @@ Class Procs: verb_say = "beeps" verb_yell = "blares" pressure_resistance = 15 + obj_integrity = 200 + max_integrity = 200 + armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) + var/stat = 0 var/emagged = 0 var/use_power = 1 @@ -149,9 +153,8 @@ Class Procs: return PROCESS_KILL /obj/machinery/emp_act(severity) - if(use_power && stat == 0) + if(use_power && !stat) use_power(7500/severity) - PoolOrNew(/obj/effect/overlay/temp/emp, loc) ..() @@ -166,12 +169,12 @@ Class Procs: /obj/machinery/proc/dropContents() var/turf/T = get_turf(src) for(var/mob/living/L in src) - L.loc = T - L.reset_perspective(null) + L.forceMove(T) L.update_canmove() //so the mob falls if he became unconscious inside the machine. . += L - T.contents += contents + for(var/atom/movable/A in contents) + A.forceMove(T) occupant = null /obj/machinery/proc/close_machine(mob/living/target = null) @@ -189,10 +192,6 @@ Class Procs: updateUsrDialog() update_icon() -/obj/machinery/blob_act(obj/structure/blob/B) - if(density && prob(75)) - qdel(src) - /obj/machinery/proc/auto_use_power() if(!powered(power_channel)) return 0 @@ -240,48 +239,6 @@ Class Procs: //////////////////////////////////////////////////////////////////////////////////////////// -/obj/machinery/mech_melee_attack(obj/mecha/M) - M.do_attack_animation(src) - if(M.damtype == BRUTE || M.damtype == BURN) - visible_message("[M.name] has hit [src].") - take_damage(M.force*2, M.damtype) // multiplied by 2 so we can hit machines hard but not be overpowered against mobs. - return 1 - return 0 - -/obj/machinery/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype, 1) - -/obj/machinery/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - -/obj/machinery/attack_alien(mob/living/carbon/alien/humanoid/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - add_hiddenprint(user) - visible_message("\The [user] slashes at [src]!") - playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) - take_damage(20, BRUTE, 0) - -/obj/machinery/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - if(M.melee_damage_upper || M.obj_damage) - M.visible_message("[M.name] smashes against \the [src.name].",\ - "You smash against the [src.name].") - if(M.obj_damage) - take_damage(M.obj_damage, M.melee_damage_type, 1) - else - take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, 1) /obj/machinery/attack_paw(mob/living/user) @@ -292,11 +249,11 @@ Class Procs: user.do_attack_animation(src) user.visible_message("[user.name] smashes against \the [src.name] with its paws.",\ "You smash against the [src.name] with your paws.") - take_damage(4, BRUTE, 1) + take_damage(4, BRUTE, "melee", 1) /obj/machinery/attack_ai(mob/user) - if(isrobot(user))// For some reason attack_robot doesn't work + if(iscyborg(user))// For some reason attack_robot doesn't work var/mob/living/silicon/robot/R = user if(R.client && R.client.eye == R && !R.low_power_mode)// This is to stop robots from using cameras to remotely control machines; and from using machines when the borg has no power. return attack_hand(user) @@ -344,18 +301,27 @@ Class Procs: . = istype(C) && (panel_open || ignore_panel) && !(flags & NODECONSTRUCT) if(.) playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) - deconstruct() + deconstruct(TRUE) -/obj/machinery/proc/deconstruct() - on_deconstruction() - var/obj/structure/frame/machine/M = new /obj/structure/frame/machine(loc) - transfer_fingerprints_to(M) - M.state = 2 - M.icon_state = "box_1" - for(var/obj/item/I in component_parts) - I.forceMove(loc) +/obj/machinery/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + on_deconstruction() + if(component_parts && component_parts.len) + var/obj/structure/frame/machine/M = new /obj/structure/frame/machine(loc) + M.anchored = anchored + if(!disassembled) + M.obj_integrity = M.max_integrity * 0.5 //the frame is already half broken + transfer_fingerprints_to(M) + M.state = 2 + M.icon_state = "box_1" + for(var/obj/item/I in component_parts) + I.forceMove(loc) qdel(src) +/obj/machinery/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT)) + stat |= BROKEN + /obj/machinery/proc/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/weapon/screwdriver/S) if(istype(S) && !(flags & NODECONSTRUCT)) playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) @@ -432,6 +398,21 @@ Class Procs: /obj/machinery/examine(mob/user) ..() + if(stat & BROKEN) + user << "It looks broken and non functional." + if(!(resistance_flags & INDESTRUCTIBLE)) + if(resistance_flags & ON_FIRE) + user << "It's on fire!" + var/healthpercent = (obj_integrity/max_integrity) * 100 + switch(healthpercent) + if(100 to INFINITY) + user << "It seems pristine and undamaged." + if(50 to 100) + user << "It looks slightly damaged." + if(25 to 50) + user << "It appears heavily damaged." + if(0 to 25) + user << "It's falling apart!" if(user.research_scanner && component_parts) display_parts(user) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 9d6f5fc555e..e487e65223d 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -192,7 +192,8 @@ step_towards(M, center) for(var/mob/living/silicon/S in orange(magnetic_field, center)) - if(istype(S, /mob/living/silicon/ai)) continue + if(isAI(S)) + continue step_towards(S, center) use_power(electricity_level * 5) diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 9b644c909bc..3f8a3c35251 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -10,6 +10,9 @@ level = 1 // underfloor layer = LOW_OBJ_LAYER anchored = 1 + obj_integrity = 500 + 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 diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index ff65967f610..a81c2d36fc9 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -175,7 +175,10 @@ var/list/obj/machinery/newscaster/allCasters = list() verb_say = "beeps" verb_ask = "beeps" verb_exclaim = "beeps" - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 50 var/screen = 0 var/paper_remaining = 15 var/securityCaster = 0 @@ -187,12 +190,10 @@ var/list/obj/machinery/newscaster/allCasters = list() var/obj/item/weapon/photo/photo = null var/channel_name = "" var/c_locked=0 - var/health = 60 var/datum/newscaster/feed_channel/viewing_channel = null var/allow_comments = 1 luminosity = 0 anchored = 1 - var/hitstaken = 0 //TO BE REMOVED, no longer used, the var is present in a map var edit which must be removed. /obj/machinery/newscaster/security_unit name = "security newscaster" @@ -227,12 +228,13 @@ var/list/obj/machinery/newscaster/allCasters = list() icon_state = "newscaster_normal" if(alert) add_overlay("newscaster_alert") - switch(health) - if(45 to 60) + var/hp_percent = obj_integrity * 100 /max_integrity + switch(hp_percent) + if(75 to 100) return - if(30 to 45) + if(50 to 75) add_overlay("crack1") - if(15 to 30) + if(25 to 50) add_overlay("crack2") else add_overlay("crack3") @@ -249,17 +251,9 @@ var/list/obj/machinery/newscaster/allCasters = list() stat |= NOPOWER update_icon() -/obj/machinery/newscaster/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - else - take_damage(rand(40,80), BRUTE, 0) - else - take_damage(rand(20,40), BRUTE, 0) +/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + update_icon() /obj/machinery/newscaster/attack_ai(mob/user) return attack_hand(user) @@ -267,7 +261,7 @@ var/list/obj/machinery/newscaster/allCasters = list() /obj/machinery/newscaster/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return - if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) ) + if(ishuman(user) || issilicon(user)) var/mob/living/human_or_robot_user = user var/dat scan_user(human_or_robot_user) @@ -512,7 +506,7 @@ var/list/obj/machinery/newscaster/allCasters = list() /obj/machinery/newscaster/Topic(href, href_list) if(..()) return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon))) + if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(loc))) || issilicon(usr)) usr.set_machine(src) scan_user(usr) if(href_list["set_channel_name"]) @@ -747,6 +741,7 @@ var/list/obj/machinery/newscaster/allCasters = list() return user << "You repair [src]." playsound(loc, 'sound/items/Welder2.ogg', 50, 1) + obj_integrity = max_integrity stat &= ~BROKEN update_icon() else @@ -754,26 +749,28 @@ var/list/obj/machinery/newscaster/allCasters = list() else return ..() -/obj/machinery/newscaster/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/newscaster/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - if(stat & BROKEN) - playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1) - else - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + if(stat & BROKEN) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1) + else + playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - if(damage < 15) //so it can't be broken with a small weapon. - return - if(!(stat & BROKEN)) - health -= damage - if(health <= 0) - stat |= BROKEN - playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) + + +/obj/machinery/newscaster/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 2) + new /obj/item/weapon/shard(loc) + new /obj/item/weapon/shard(loc) + qdel(src) + +/obj/machinery/newscaster/obj_break() + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + stat |= BROKEN + playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) update_icon() @@ -781,7 +778,7 @@ var/list/obj/machinery/newscaster/allCasters = list() if(user.a_intent != "harm") user << "The newscaster controls are far too complicated for your tiny brain!" else - take_damage(5) + take_damage(5, BRUTE, "melee") /obj/machinery/newscaster/proc/AttachPhoto(mob/user) if(photo) @@ -797,15 +794,15 @@ var/list/obj/machinery/newscaster/allCasters = list() if(!user.drop_item()) return photo.loc = src - if(istype(user,/mob/living/silicon)) + if(issilicon(user)) var/list/nametemp = list() var/find var/datum/picture/selection var/obj/item/device/camera/siliconcam/targetcam = null - if(istype(user,/mob/living/silicon/ai)) + if(isAI(user)) var/mob/living/silicon/ai/R = user targetcam = R.aicamera - else if(istype(user,/mob/living/silicon/robot)) + else if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(R.connected_ai) targetcam = R.connected_ai.aicamera @@ -846,7 +843,7 @@ var/list/obj/machinery/newscaster/allCasters = list() scanned_user ="Unknown" else scanned_user ="Unknown" - else if(istype(user,/mob/living/silicon)) + else if(issilicon(user)) var/mob/living/silicon/ai_user = user scanned_user = "[ai_user.name] ([ai_user.job])" else @@ -1010,7 +1007,7 @@ var/list/obj/machinery/newscaster/allCasters = list() /obj/item/weapon/newspaper/Topic(href, href_list) var/mob/living/U = usr ..() - if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) )) + if((src in U.contents) || (isturf(loc) && in_range(src, U))) U.set_machine(src) if(href_list["next_page"]) if(curr_page == pages+1) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 2d7a16be1e2..def17a8198c 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -24,8 +24,10 @@ var/lasercolor = "" //Something to do with lasertag turrets, blame Sieve for not adding a comment. 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 - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + obj_integrity = 160 //the turret's health + max_integrity = 160 + integrity_failure = 80 + armor = list(melee = 50, bullet = 30, laser = 30, energy = 30, bomb = 30, bio = 0, rad = 0, fire = 90, acid = 90) var/locked = 1 //if the turret's behaviour control access is locked var/controllock = 0 //if the turret responds to control panels @@ -159,8 +161,9 @@ /obj/machinery/porta_turret/Destroy() //deletes its own cover with it - qdel(cover) - cover = null + if(cover) + qdel(cover) + cover = null return ..() @@ -197,7 +200,7 @@ "[stun_all ? "Yes" : "No"]", "[check_anomalies ? "Yes" : "No"]" ) else - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(lasercolor == "b" && istype(H.wear_suit, /obj/item/clothing/suit/redtag)) return @@ -317,12 +320,6 @@ else return ..() -/obj/machinery/porta_turret/attacked_by(obj/item/I, mob/user) - if(I.force) - user.visible_message("[user] has hit [src] with [I]!", "You hit [src] with [I]!") - take_damage(I.force * 0.5, I.damtype) - - /obj/machinery/porta_turret/emag_act(mob/user) if(!emagged) user << "You short out [src]'s threat assessment circuits." @@ -336,7 +333,6 @@ /obj/machinery/porta_turret/bullet_act(obj/item/projectile/P) . = ..() - take_damage(P.damage, P.damage_type, 0) if(!disabled) if(lasercolor == "b") if(istype(P, /obj/item/projectile/beam/lasertag/redtag)) @@ -366,55 +362,26 @@ ..() -/obj/machinery/porta_turret/ex_act(severity, target) - if(severity >= 3) //turret dies if an explosion touches it! - die() - else - qdel(src) +/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + if(.) //damage received + if(prob(30)) + spark_system.start() + if(on && !attacked && !emagged) + attacked = 1 + spawn(60) + attacked = 0 -/obj/machinery/porta_turret/attack_animal(mob/living/simple_animal/user) - user.changeNext_move(CLICK_CD_MELEE) - if(user.melee_damage_upper == 0) - user.emote("[user.friendly] [src]") - else - user.do_attack_animation(src) - var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) - take_damage(damage) +/obj/machinery/porta_turret/deconstruct(disassembled = TRUE) + qdel(src) -/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 40, 1) - else - return - if(!(stat & BROKEN)) - if(damage > 1) //if the force of impact dealt at least 1 damage, the turret gets pissed off - if(prob(30)) - spark_system.start() - if(on && !attacked && !emagged) - attacked = 1 - spawn(60) - attacked = 0 - health -= damage - if(health <= 0) - die() - -/obj/machinery/porta_turret/proc/die() //called when the turret dies, ie, health <= 0 - health = 0 - density = 0 - stat |= BROKEN //enables the BROKEN bit - icon_state = "[base_icon_state]Broken" - invisibility = 0 - spark_system.start() //creates some sparks because they look cool - density = 1 - qdel(cover) //deletes the cover - no need on keeping it there! +/obj/machinery/porta_turret/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT) && !(stat & BROKEN)) + stat |= BROKEN //enables the BROKEN bit + icon_state = "[base_icon_state]Broken" + invisibility = 0 + spark_system.start() //creates some sparks because they look cool + qdel(cover) //deletes the cover - no need on keeping it there! @@ -471,7 +438,7 @@ continue //if the target is a human and not in our faction, analyze threat level - if(istype(C, /mob/living/carbon/human) && !in_faction(C)) + if(ishuman(C) && !in_faction(C)) if(assess_perp(C) >= 4) targets += C @@ -676,7 +643,7 @@ return 10 //Syndicate turrets shoot everything not in their faction /obj/machinery/porta_turret/syndicate/pod - health = 40 + obj_integrity = 40 projectile = /obj/item/projectile/bullet/weakbullet3 eprojectile = /obj/item/projectile/bullet/weakbullet3 @@ -704,6 +671,7 @@ var/ailock = 0 // AI cannot use this req_access = list(access_ai_upload) var/list/obj/machinery/porta_turret/turrets = list() + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/machinery/turretid/New(loc, ndir = 0, built = 0) ..() @@ -742,7 +710,7 @@ user << "You link \the [M.buffer] with \the [src]" return - if (istype(user, /mob/living/silicon)) + if (issilicon(user)) return src.attack_hand(user) if( get_dist(src, user) == 0 ) // trying to unlock the interface @@ -789,10 +757,10 @@ var/area/area = get_area(src) var/t = "" - if(src.locked && (!(istype(user, /mob/living/silicon) || IsAdminGhost(user)))) + if(src.locked && !(issilicon(user) || IsAdminGhost(user))) t += "
Swipe ID card to unlock interface
" else - if (!istype(user, /mob/living/silicon) && !IsAdminGhost(user)) + if(!issilicon(user) && !IsAdminGhost(user)) t += "
Swipe ID card to lock interface
" t += text("Turrets [] - []?
\n", src.enabled?"activated":"deactivated", src, src.enabled?"Disable":"Enable") t += text("Currently set for [] - Change to []?
\n", src.lethal?"lethal":"stun repeatedly", src, src.lethal?"Stun repeatedly":"Lethal") @@ -808,7 +776,7 @@ if(..()) return if (src.locked) - if (!(istype(usr, /mob/living/silicon) || IsAdminGhost(usr))) + if(!(issilicon(usr) || IsAdminGhost(usr))) usr << "Control panel is locked!" return if (href_list["toggleOn"]) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index bb399096382..5e2a860da13 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -10,9 +10,18 @@ anchored = 1 layer = HIGH_OBJ_LAYER density = 0 + obj_integrity = 80 + max_integrity = 80 var/obj/machinery/porta_turret/parent_turret = null +/obj/machinery/porta_turret_cover/Destroy() + if(parent_turret) + parent_turret.cover = null + parent_turret.invisibility = 0 + parent_turret = null + return ..() + //The below code is pretty much just recoded from the initial turret object. It's necessary but uncommented because it's exactly the same! //>necessary //I'm not fixing it because i'm fucking bored of this code already, but someone should just reroute these to the parent turret's procs. @@ -67,6 +76,15 @@ /obj/machinery/porta_turret_cover/attacked_by(obj/item/I, mob/user) parent_turret.attacked_by(I, user) +/obj/machinery/porta_turret_cover/attack_alien(mob/living/carbon/alien/humanoid/user) + parent_turret.attack_alien(user) + +/obj/machinery/porta_turret_cover/attack_animal(mob/living/simple_animal/user) + parent_turret.attack_animal(user) + +/obj/machinery/porta_turret_cover/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + parent_turret.attack_hulk(user) + /obj/machinery/porta_turret_cover/can_be_overridden() . = 0 diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 5254b3b511f..2067cce19f8 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -148,20 +148,17 @@ update_icon() /obj/machinery/recharger/emp_act(severity) - if(stat & (NOPOWER|BROKEN) || !anchored) - ..(severity) - return + if(!(stat & (NOPOWER|BROKEN)) && anchored) + if(istype(charging, /obj/item/weapon/gun/energy)) + var/obj/item/weapon/gun/energy/E = charging + if(E.power_supply) + E.power_supply.emp_act(severity) - if(istype(charging, /obj/item/weapon/gun/energy)) - var/obj/item/weapon/gun/energy/E = charging - if(E.power_supply) - E.power_supply.emp_act(severity) - - else if(istype(charging, /obj/item/weapon/melee/baton)) - var/obj/item/weapon/melee/baton/B = charging - if(B.bcell) - B.bcell.charge = 0 - ..(severity) + else if(istype(charging, /obj/item/weapon/melee/baton)) + var/obj/item/weapon/melee/baton/B = charging + if(B.bcell) + B.bcell.charge = 0 + ..() /obj/machinery/recharger/update_icon(using_power = 0) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier. diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 32c60b66759..f0bdd30586d 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -53,16 +53,9 @@ open_machine() /obj/machinery/recharge_station/emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - ..(severity) - return - if(occupant) - occupant.emp_act(severity) - open_machine() - ..(severity) - -/obj/machinery/recharge_station/ex_act(severity, target) - if(occupant) + if(!(stat & (BROKEN|NOPOWER))) + if(occupant) + occupant.emp_act(severity) open_machine() ..() diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index aa169ff97b6..dd75a88c0b2 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -57,6 +57,9 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/obj/item/device/radio/Radio var/emergency //If an emergency has been called by this device. Acts as both a cooldown and lets the responder know where it the emergency was triggered from luminosity = 0 + obj_integrity = 300 + max_integrity = 300 + armor = list(melee = 70, bullet = 30, laser = 30, energy = 30, bomb = 0, bio = 0, rad = 0, fire = 90, acid = 90) /obj/machinery/requests_console/power_change() ..() diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 89c4e64995f..036959b4ec9 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -1,110 +1,95 @@ -/obj/machinery/shield - name = "emergency energy shield" - desc = "An energy shield used to contain hull breaches." - icon = 'icons/effects/effects.dmi' - icon_state = "shield-old" - density = 1 - opacity = 0 - anchored = 1 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE - var/const/max_health = 200 - var/health = max_health //The shield can only take so much beating (prevents perma-prisons) +/obj/structure/emergency_shield + name = "emergency energy shield" + desc = "An energy shield used to contain hull breaches." + icon = 'icons/effects/effects.dmi' + icon_state = "shield-old" + density = 1 + opacity = 0 + anchored = 1 + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + max_integrity = 200 + obj_integrity = 200 //The shield can only take so much beating (prevents perma-prisons) -/obj/machinery/shield/New() +/obj/structure/emergency_shield/New() src.setDir(pick(1,2,3,4)) ..() air_update_turf(1) -/obj/machinery/shield/Destroy() +/obj/structure/emergency_shield/Destroy() opacity = 0 density = 0 air_update_turf(1) return ..() -/obj/machinery/shield/Move() +/obj/structure/emergency_shield/Move() var/turf/T = loc ..() move_update_air(T) -/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height) +/obj/structure/emergency_shield/CanPass(atom/movable/mover, turf/target, height) if(!height) return 0 else return ..() -/obj/machinery/shield/CanAtmosPass(turf/T) +/obj/structure/emergency_shield/CanAtmosPass(turf/T) return !density -/obj/machinery/shield/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type) - -/obj/machinery/shield/ex_act(severity, target) - switch(severity) - if(1) - take_damage(rand(180,260), BRUTE, 0) - if(2) - take_damage(rand(150,230), BRUTE, 0) - if(3) - take_damage(rand(80,150), BRUTE, 0) - -/obj/machinery/shield/emp_act(severity) +/obj/structure/emergency_shield/emp_act(severity) switch(severity) if(1) qdel(src) if(2) - take_damage(50, BRUTE, 0) + take_damage(50, BRUTE, "energy", 0) -/obj/machinery/shield/blob_act(obj/structure/blob/B) - qdel(src) - - -/obj/machinery/shield/hitby(AM as mob|obj) - var/tforce = 0 - if(ismob(AM)) - tforce = 40 - else - var/obj/O = AM - tforce = O.throwforce - ..() - take_damage(tforce) - -/obj/machinery/shield/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/emergency_shield/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BURN) - if(sound_effect) - playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) + playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) if(BRUTE) - if(sound_effect) - playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) - else - return - opacity = 1 - spawn(20) - opacity = 0 - health -= damage - if(health <= 0) - qdel(src) + playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) + +/obj/structure/emergency_shield/take_damage(damage, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + if(.) //damage was dealt + opacity = 1 + spawn(20) + opacity = 0 + +/obj/structure/emergency_shield/sanguine + name = "sanguine barrier" + desc = "A potent shield summoned by cultists to defend their rites." + icon_state = "shield-red" + obj_integrity = 60 + max_integrity = 60 + +/obj/structure/emergency_shield/invoker + name = "Invoker's Shield" + desc = "A weak shield summoned by cultists to protect them while they carry out delicate rituals" + color = "red" + obj_integrity = 20 + max_integrity = 20 + mouse_opacity = 0 /obj/machinery/shieldgen - name = "anti-breach shielding projector" - desc = "Used to seal minor hull breaches." - icon = 'icons/obj/objects.dmi' - icon_state = "shieldoff" - density = 1 - opacity = 0 - anchored = 0 - pressure_resistance = 2*ONE_ATMOSPHERE - req_access = list(access_engine) - var/const/max_health = 100 - var/health = max_health - var/active = 0 - var/list/deployed_shields = list() - var/locked = 0 - var/shield_range = 4 + name = "anti-breach shielding projector" + desc = "Used to seal minor hull breaches." + icon = 'icons/obj/objects.dmi' + icon_state = "shieldoff" + density = 1 + opacity = 0 + anchored = 0 + pressure_resistance = 2*ONE_ATMOSPHERE + req_access = list(access_engine) + max_integrity = 100 + obj_integrity = 100 + var/active = 0 + var/list/deployed_shields = list() + var/locked = 0 + var/shield_range = 4 /obj/machinery/shieldgen/Destroy() - for(var/obj/machinery/shield/shield_tile in deployed_shields) - qdel(shield_tile) - deployed_shields = null + for(var/obj/structure/emergency_shield/ES in deployed_shields) + qdel(ES) + deployed_shields = list() return ..() @@ -116,9 +101,9 @@ update_icon() for(var/turf/target_tile in range(shield_range, src)) - if (istype(target_tile,/turf/open/space) && !(locate(/obj/machinery/shield) in target_tile)) + if(isspaceturf(target_tile) && !(locate(/obj/structure/emergency_shield) in target_tile)) if(!(stat & BROKEN) || prob(33)) - deployed_shields += new /obj/machinery/shield(target_tile) + deployed_shields += new /obj/structure/emergency_shield(target_tile) /obj/machinery/shieldgen/proc/shields_down() if(!active) @@ -127,8 +112,8 @@ active = 0 update_icon() - for(var/obj/machinery/shield/shield_tile in deployed_shields) - qdel(shield_tile) + for(var/obj/structure/emergency_shield/ES in deployed_shields) + qdel(ES) deployed_shields.Cut() /obj/machinery/shieldgen/process() @@ -137,45 +122,12 @@ qdel(pick(deployed_shields)) -/obj/machinery/shieldgen/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 40, 1) - else - return - health = max(health - damage, 0) - if(health <= 0 && !(stat && BROKEN)) - stat |= BROKEN - update_icon() - -/obj/machinery/shieldgen/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(33)) - qdel(src) - else - take_damage(rand(80,120), BRUTE, 0) - if(3) - take_damage(rand(40,80), BRUTE, 0) - -/obj/machinery/shieldgen/emp_act(severity) - switch(severity) - if(1) - health = 0 +/obj/machinery/shieldgen/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!(stat && BROKEN)) stat |= BROKEN locked = pick(0,1) update_icon() - if(2) - take_damage(rand(80,120), BRUTE, 0) /obj/machinery/shieldgen/attack_hand(mob/user) if(locked) @@ -218,7 +170,7 @@ if(coil.get_amount() < 1) return coil.use(1) - health = max_health + obj_integrity = max_integrity stat &= ~BROKEN user << "You repair \the [src]." update_icon() @@ -252,7 +204,7 @@ /obj/machinery/shieldgen/emag_act() if(!(stat & BROKEN)) stat |= BROKEN - health = 0 + obj_integrity = 0 update_icon() /obj/machinery/shieldgen/update_icon() @@ -261,27 +213,36 @@ else icon_state = (stat & BROKEN) ? "shieldoffbr":"shieldoff" -////FIELD GEN START //shameless copypasta from fieldgen, powersink, and grille + + + + + + + + #define maxstoredpower 500 /obj/machinery/shieldwallgen - name = "shield generator" - desc = "A shield generator." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "Shield_Gen" - anchored = 0 - density = 1 - req_access = list(access_teleporter) - flags = CONDUCT - use_power = 0 - var/active = 0 - var/power = 0 - var/steps = 0 - var/last_check = 0 - var/check_delay = 10 - var/recalc = 0 - var/locked = 1 - var/obj/structure/cable/attached // the attached cable - var/storedpower = 0 + name = "shield wall generator" + desc = "A shield generator." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "Shield_Gen" + anchored = 0 + density = 1 + req_access = list(access_teleporter) + flags = CONDUCT + use_power = 0 + obj_integrity = 300 + max_integrity = 300 + var/active = 0 + var/power = 0 + var/steps = 0 + var/last_check = 0 + var/check_delay = 10 + var/recalc = 0 + var/locked = 1 + var/obj/structure/cable/attached // the attached cable + var/storedpower = 0 /obj/machinery/shieldwallgen/proc/power() if(!anchored) @@ -313,7 +274,7 @@ if(!anchored) user << "\The [src] needs to be firmly secured to the floor first!" return 1 - if(locked && !istype(user, /mob/living/silicon)) + if(locked && !issilicon(user)) user << "The controls are locked!" return 1 if(power != 1) @@ -340,10 +301,8 @@ power() if(power) storedpower -= 50 //this way it can survive longer and survive at all - if(storedpower >= maxstoredpower) - storedpower = maxstoredpower - if(storedpower <= 0) - storedpower = 0 + storedpower = Clamp(storedpower, 0, maxstoredpower) + if(active == 1) if(!anchored) @@ -464,29 +423,25 @@ cleanup(8) return ..() -/obj/machinery/shieldwallgen/bullet_act(obj/item/projectile/P) - . = ..() - storedpower -= P.damage - //////////////Containment Field START /obj/machinery/shieldwall - name = "shield" - desc = "An energy shield." - icon = 'icons/effects/effects.dmi' - icon_state = "shieldwall" - anchored = 1 - density = 1 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE - luminosity = 3 - var/needs_power = 0 - var/active = 1 - var/delay = 5 - var/last_active - var/mob/U - var/obj/machinery/shieldwallgen/gen_primary - var/obj/machinery/shieldwallgen/gen_secondary + name = "shield wall" + desc = "An energy shield." + icon = 'icons/effects/effects.dmi' + icon_state = "shieldwall" + anchored = 1 + density = 1 + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + luminosity = 3 + var/needs_power = 0 + var/active = 1 + var/delay = 5 + var/last_active + var/mob/U + var/obj/machinery/shieldwallgen/gen_primary + var/obj/machinery/shieldwallgen/gen_secondary /obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B) ..() @@ -517,43 +472,42 @@ else gen_secondary.storedpower -=10 +/obj/machinery/shieldwall/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BURN) + playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) + if(BRUTE) + playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) -/obj/machinery/shieldwall/bullet_act(obj/item/projectile/P) +//the shield wall is immune to damage but it drains the stored power of the generators. +/obj/machinery/shieldwall/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() + if(damage_type == BRUTE || damage_type == BURN) + drain_power(damage_amount) + +/obj/machinery/shieldwall/proc/drain_power(drain_amount) if(needs_power) var/obj/machinery/shieldwallgen/G if(prob(50)) G = gen_primary else G = gen_secondary - G.storedpower -= P.damage + G.storedpower -= drain_amount + +/obj/machinery/shieldwall/bullet_act(obj/item/projectile/P) + . = ..() + drain_power(P.damage) /obj/machinery/shieldwall/ex_act(severity, target) if(needs_power) - var/obj/machinery/shieldwallgen/G + var/drain_amount = 20 switch(severity) - if(1) //big boom - if(prob(50)) - G = gen_primary - else - G = gen_secondary - G.storedpower -= 200 - - if(2) //medium boom - if(prob(50)) - G = gen_primary - else - G = gen_secondary - G.storedpower -= 50 - - if(3) //lil boom - if(prob(50)) - G = gen_primary - else - G = gen_secondary - G.storedpower -= 20 - return + if(1) + drain_amount = 200 + if(2) + drain_amount = 50 + drain_power(drain_amount) /obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 988678b30ad..8c78d592598 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -10,6 +10,9 @@ icon_state = "sheater-off" name = "space heater" desc = "Made by Space Amish using traditional space techniques, this heater/cooler is guaranteed not to set the station on fire." + obj_integrity = 250 + 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/weapon/stock_parts/cell/cell var/on = FALSE var/mode = HEATER_MODE_STANDBY diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index a23ec04811d..e6e918aeebf 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -1,4 +1,4 @@ -// SUIT STORAGE UNIT /////////////////close_machine( +// SUIT STORAGE UNIT ///////////////// /obj/machinery/suit_storage_unit name = "suit storage unit" desc = "An industrial unit made to hold space suits. It comes with a built-in UV cauterization mechanism. A small warning label advises that organic matter should not be placed into the unit." @@ -6,6 +6,8 @@ icon_state = "close" anchored = 1 density = 1 + obj_integrity = 250 + max_integrity = 250 var/obj/item/clothing/suit/space/suit = null var/obj/item/clothing/head/helmet/space/helmet = null @@ -112,6 +114,21 @@ storage = new storage_type(src) update_icon() +/obj/machinery/suit_storage_unit/Destroy() + if(suit) + qdel(suit) + suit = null + if(helmet) + qdel(helmet) + helmet = null + if(mask) + qdel(mask) + mask = null + if(storage) + qdel(storage) + storage = null + return ..() + /obj/machinery/suit_storage_unit/update_icon() cut_overlays() @@ -151,18 +168,12 @@ storage = null occupant = null -/obj/machinery/suit_storage_unit/ex_act(severity, target) - switch(severity) - if(1) - if(prob(50)) - open_machine() - dump_contents() - qdel(src) - if(2) - if(prob(50)) - open_machine() - dump_contents() - qdel(src) +/obj/machinery/suit_storage_unit/deconstruct(disassembled = TRUE) + 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) if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A)) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index bc5486dbbf0..20c1beaa9fe 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -100,7 +100,7 @@ /obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/wrench)) if(!anchored) - if(!isturf(src.loc) || istype(src.loc, /turf/open/space)) + if(!isturf(loc) || isspaceturf(loc)) user << "The bomb must be placed on solid ground to attach it." else user << "You firmly wrench the bomb to the floor." @@ -256,7 +256,7 @@ item_state = "eshield0" w_class = 3 origin_tech = "syndicate=5;combat=6" - resistance_flags = 0 //Burnable (but the casing isn't) + resistance_flags = FLAMMABLE //Burnable (but the casing isn't) var/adminlog = null /obj/item/weapon/bombcore/ex_act(severity, target) // Little boom can chain a big boom. diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index 478ef77fe6f..b5af371a275 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -94,7 +94,7 @@ race = "Artificial Life" language = "Humanoid" //Ais and borgs speak human, and binary isnt picked up. - else if(istype(mobtype, /obj)) + else if(isobj(mobtype)) race = "Machinery" language = race diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 90986ffcdff..e3eda91f2ef 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -138,7 +138,7 @@ else if(isAI(user)) var/mob/living/silicon/ai/U = user P = U.aiMulti - else if(isrobot(user) && in_range(user, src)) + else if(iscyborg(user) && in_range(user, src)) if(istype(user.get_active_held_item(), /obj/item/device/multitool)) P = user.get_active_held_item() return P diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index f7ca0ccd18f..74c8430c810 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -120,10 +120,10 @@ //East var/turf/east = locate(T.x + 1, T.y, T.z) - if(istype(east, /turf/open/floor)) + if(isfloorturf(east)) new /obj/machinery/conveyor/auto(east, WEST) // West var/turf/west = locate(T.x - 1, T.y, T.z) - if(istype(west, /turf/open/floor)) + if(isfloorturf(west)) new /obj/machinery/conveyor/auto(west, WEST) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 6a58f4a5acc..c22e1380fbc 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -21,6 +21,10 @@ verb_say = "beeps" verb_ask = "beeps" verb_exclaim = "beeps" + obj_integrity = 300 + max_integrity = 300 + integrity_failure = 100 + armor = list(melee = 20, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) var/active = 1 //No sales pitches if off! var/vend_ready = 1 //Are we ready to vend?? Is it time?? var/vend_delay = 10 //How long does it take to vend? @@ -138,16 +142,34 @@ refill_inventory(VR, coin_records, COIN_CHARGE) refill_inventory(VR, hidden_records, CONTRABAND_CHARGE) -/obj/machinery/vending/ex_act(severity, target) - ..() - if(!qdeleted(src)) - if(prob(25)) - malfunction() -/obj/machinery/vending/blob_act(obj/structure/blob/B) - malfunction() - ..() +/obj/machinery/vending/deconstruct(disassembled = TRUE) + if(!refill_canister) //the non constructable vendors drop metal instead of a machine frame. + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 3) + qdel(src) + else + ..() +/obj/machinery/vending/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + var/dump_amount = 0 + for(var/datum/data/vending_product/R in product_records) + if(R.amount <= 0) //Try to use a record that actually has something to dump. + continue + var/dump_path = R.product_path + if(!dump_path) + continue + + while(R.amount>0) + var/obj/O = new dump_path(loc) + step(O, pick(alldirs)) //we only drop 20% of the total of each products and spread it + R.amount -= 5 //around to not fill the turf with too many objects. + dump_amount++ + if(dump_amount > 15) //so we don't drop too many items (e.g. ClothesMate) + break + stat |= BROKEN + icon_state = "[initial(icon_state)]-broken" /obj/machinery/vending/proc/build_inventory(list/productlist, hidden=0, req_coin=0, start_empty = null) for(var/typepath in productlist) @@ -410,8 +432,8 @@ if(..()) return - if(istype(usr,/mob/living/silicon)) - if(istype(usr,/mob/living/silicon/robot)) + if(issilicon(usr)) + if(iscyborg(usr)) var/mob/living/silicon/robot/R = usr if(!(R.module && istype(R.module,/obj/item/weapon/robot_module/butler) )) usr << "The vending machine refuses to interface with you, as you are not in its target demographic!" @@ -565,23 +587,6 @@ stat |= NOPOWER -//Oh no we're malfunctioning! Dump out some product and break. -/obj/machinery/vending/proc/malfunction() - for(var/datum/data/vending_product/R in product_records) - if(R.amount <= 0) //Try to use a record that actually has something to dump. - continue - var/dump_path = R.product_path - if(!dump_path) - continue - - while(R.amount>0) - new dump_path(loc) - R.amount-- - continue - - stat |= BROKEN - icon_state = "[initial(icon_state)]-broken" - //Somebody cut an important wire and now we're following a new definition of "pitch." /obj/machinery/vending/proc/throw_item() var/obj/throw_item = null @@ -680,6 +685,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/wirecutters = 1, /obj/item/weapon/cartridge/signal = 4) contraband = list(/obj/item/device/flashlight = 5,/obj/item/device/assembly/timer = 2, /obj/item/device/assembly/voice = 2, /obj/item/device/assembly/health = 2) product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!" + 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/coffee name = "\improper Solar's Best Hot Drinks" @@ -718,7 +725,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/reagent_containers/food/drinks/coffee = 12, /obj/item/weapon/tank/internals/emergency_oxygen = 6, /obj/item/clothing/mask/breath = 6) - + 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/cola name = "\improper Robust Softdrinks" @@ -743,6 +751,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C products = list(/obj/item/weapon/cartridge/medical = 10,/obj/item/weapon/cartridge/engineering = 10,/obj/item/weapon/cartridge/security = 10, /obj/item/weapon/cartridge/janitor = 10,/obj/item/weapon/cartridge/signal/toxins = 10,/obj/item/device/pda/heads = 10, /obj/item/weapon/cartridge/captain = 3,/obj/item/weapon/cartridge/quartermaster = 10) + 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/liberationstation name = "\improper Liberation Station" @@ -758,6 +768,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/gun/projectile/shotgun = 2,/obj/item/weapon/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/weapon/bedsheet/patriot = 3) + 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 = "\improper ShadyCigs Deluxe" @@ -791,7 +803,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/reagent_containers/glass/bottle/epinephrine = 4,/obj/item/weapon/reagent_containers/glass/bottle/morphine = 4,/obj/item/weapon/reagent_containers/glass/bottle/salglu_solution = 3, /obj/item/weapon/reagent_containers/glass/bottle/toxin = 3,/obj/item/weapon/reagent_containers/syringe/antiviral = 6,/obj/item/weapon/reagent_containers/pill/salbutamol = 2,/obj/item/device/healthanalyzer = 4, /obj/item/device/sensor_device = 2) contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 3,/obj/item/weapon/reagent_containers/pill/morphine = 4,/obj/item/weapon/reagent_containers/pill/charcoal = 6) - + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF //This one's from bay12 /obj/machinery/vending/plasmaresearch @@ -812,6 +825,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/reagent_containers/pill/patch/silver_sulf = 5,/obj/item/weapon/reagent_containers/pill/charcoal = 2, /obj/item/weapon/reagent_containers/spray/medical/sterilizer = 1) contraband = list(/obj/item/weapon/reagent_containers/pill/tox = 2,/obj/item/weapon/reagent_containers/pill/morphine = 2) + 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/security name = "\improper SecTech" @@ -824,6 +839,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/reagent_containers/food/snacks/donut = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4,/obj/item/weapon/restraints/legcuffs/bola/energy = 7) contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2) premium = list(/obj/item/weapon/coin/antagtoken = 1) + 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/hydronutrients name = "\improper NutriMax" @@ -835,6 +852,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C products = list(/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez = 30,/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z = 20,/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh = 10,/obj/item/weapon/reagent_containers/spray/pestspray = 20, /obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5,/obj/item/weapon/cultivator = 3,/obj/item/weapon/shovel/spade = 3,/obj/item/device/plant_analyzer = 4) contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5) + 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/hydroseeds name = "\improper MegaSeed Servitor" @@ -853,7 +872,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C contraband = list(/obj/item/seeds/amanita = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/liberty = 2,/obj/item/seeds/nettle = 2, /obj/item/seeds/plump = 2,/obj/item/seeds/reishi = 2,/obj/item/seeds/cannabis = 3) premium = list(/obj/item/weapon/reagent_containers/spray/waterflower = 1) - + 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/magivend name = "\improper MagiVend" @@ -865,6 +885,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!" products = list(/obj/item/clothing/head/wizard = 1,/obj/item/clothing/suit/wizrobe = 1,/obj/item/clothing/head/wizard/red = 1,/obj/item/clothing/suit/wizrobe/red = 1,/obj/item/clothing/head/wizard/yellow = 1,/obj/item/clothing/suit/wizrobe/yellow = 1,/obj/item/clothing/shoes/sandal = 1,/obj/item/weapon/staff = 2) contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/wizarditis = 1) //No one can get to the machine to hack it anyways; for the lulz - Microwave + 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" @@ -877,7 +899,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C vend_reply = "Thank you for using AutoDrobe!" products = list(/obj/item/clothing/suit/chickensuit = 1,/obj/item/clothing/head/chicken = 1,/obj/item/clothing/under/gladiator = 1, /obj/item/clothing/head/helmet/gladiator = 1,/obj/item/clothing/under/gimmick/rank/captain/suit = 1,/obj/item/clothing/head/flatcap = 1, - /obj/item/clothing/suit/toggle/labcoat/mad = 1,/obj/item/clothing/glasses/gglasses = 1,/obj/item/clothing/shoes/jackboots = 1, + /obj/item/clothing/suit/toggle/labcoat/mad = 1,/obj/item/clothing/shoes/jackboots = 1, /obj/item/clothing/under/schoolgirl = 1,/obj/item/clothing/under/schoolgirl/red = 1,/obj/item/clothing/under/schoolgirl/green = 1,/obj/item/clothing/under/schoolgirl/orange = 1,/obj/item/clothing/head/kitty = 1,/obj/item/clothing/under/blackskirt = 1,/obj/item/clothing/head/beret = 1, /obj/item/clothing/tie/waistcoat = 1,/obj/item/clothing/under/suit_jacket = 1,/obj/item/clothing/head/that =1,/obj/item/clothing/under/kilt = 1,/obj/item/clothing/head/beret = 1,/obj/item/clothing/tie/waistcoat = 1, /obj/item/clothing/glasses/monocle =1,/obj/item/clothing/head/bowler = 1,/obj/item/weapon/cane = 1,/obj/item/clothing/under/sl_suit = 1, @@ -911,6 +933,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C icon_state = "dinnerware" products = list(/obj/item/weapon/storage/bag/tray = 8,/obj/item/weapon/kitchen/fork = 6,/obj/item/weapon/kitchen/knife = 6,/obj/item/weapon/kitchen/rollingpin = 2,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/apron/chef = 2,/obj/item/weapon/reagent_containers/food/condiment/pack/ketchup = 5,/obj/item/weapon/reagent_containers/food/condiment/pack/hotsauce = 5,/obj/item/weapon/reagent_containers/food/condiment/saltshaker = 5,/obj/item/weapon/reagent_containers/food/condiment/peppermill = 5,/obj/item/weapon/reagent_containers/glass/bowl = 20) contraband = list(/obj/item/weapon/kitchen/rollingpin = 2, /obj/item/weapon/kitchen/knife/butcher = 2) + 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/sovietsoda name = "\improper BODA" @@ -919,6 +943,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C 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/weapon/reagent_containers/food/drinks/drinkingglass/filled/soda = 30) contraband = list(/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/filled/cola = 20) + 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/tool name = "\improper YouTool" @@ -930,6 +956,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/wrench = 5,/obj/item/device/analyzer = 5,/obj/item/device/t_scanner = 5,/obj/item/weapon/screwdriver = 5) contraband = list(/obj/item/weapon/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, fire = 100, acid = 70) + resistance_flags = FIRE_PROOF /obj/machinery/vending/engivend name = "\improper Engi-Vend" @@ -940,6 +968,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/electronics/airlock = 10,/obj/item/weapon/electronics/apc = 10,/obj/item/weapon/electronics/airalarm = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/rcd/loaded = 3, /obj/item/device/geiger_counter = 5) contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3) premium = list(/obj/item/weapon/storage/belt/utility = 3) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF //This one's from bay12 /obj/machinery/vending/engineering @@ -954,6 +984,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/stock_parts/cell = 8, /obj/item/weapon/weldingtool = 8,/obj/item/clothing/head/welding = 8, /obj/item/weapon/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/weapon/stock_parts/scanning_module = 5,/obj/item/weapon/stock_parts/micro_laser = 5, /obj/item/weapon/stock_parts/matter_bin = 5,/obj/item/weapon/stock_parts/manipulator = 5,/obj/item/weapon/stock_parts/console_screen = 5) + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF //This one's from bay12 /obj/machinery/vending/robotics @@ -966,7 +998,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/item/weapon/stock_parts/cell/high = 12, /obj/item/device/assembly/prox_sensor = 3,/obj/item/device/assembly/signaler = 3,/obj/item/device/healthanalyzer = 3, /obj/item/weapon/scalpel = 2,/obj/item/weapon/circular_saw = 2,/obj/item/weapon/tank/internals/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5, /obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5) - + armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF //DON'T FORGET TO CHANGE THE REFILL SIZE IF YOU CHANGE THE MACHINE'S CONTENTS! /obj/machinery/vending/clothing diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index d5c1f0da4fe..ac5e7ba1e68 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -241,6 +241,9 @@ state_open = 0 //close the door update_icon() +/obj/machinery/washing_machine/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 2) + qdel(src) /obj/machinery/washing_machine/open_machine(drop = 1) ..() diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index ff1dced21fd..31e557cdba3 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -1,16 +1,14 @@ /obj/mecha/combat force = 30 internal_damage_threshold = 50 - 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 = 0, bomb = 20, bio = 0, rad = 0, fire = 0, acid = 0) + armor = list(melee = 30, bullet = 30, laser = 15, energy = 20, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100) /obj/mecha/combat/CheckParts(atom/holder) ..() var/obj/item/weapon/stock_parts/capacitor/C = locate() in holder var/obj/item/weapon/stock_parts/scanning_module/SM = locate() in holder step_energy_drain = 20 - (5 * SM.rating) //10 is normal, so on lowest part its worse, on second its ok and on higher its real good up to 0 on best - var/DR = damage_absorption["energy"] - damage_absorption["energy"] = DR - (C.rating / 10) //Each level of capacitor protects the mech against emp by 10% + armor["energy"] += (C.rating * 10) //Each level of capacitor protects the mech against emp by 10% qdel(C) qdel(SM) diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index b9aa9037743..ced8b5bee4a 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -4,10 +4,10 @@ icon_state = "durand" step_in = 4 dir_in = 1 //Facing North. - health = 400 + obj_integrity = 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, fire = 0, acid = 0) + armor = list(melee = 40, bullet = 35, laser = 15, energy = 10, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100) max_temperature = 30000 infra_luminosity = 8 force = 40 diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index 1992d48671e..597ed7827a2 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -4,10 +4,9 @@ icon_state = "gygax" step_in = 3 dir_in = 1 //Facing North. - health = 250 + obj_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 = 40, bullet = 35, laser = 15, energy = 10, bomb = 20, bio = 0, rad = 0, fire = 0, acid = 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 wreckage = /obj/structure/mecha_wreckage/gygax @@ -19,10 +18,9 @@ desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications." name = "\improper Dark Gygax" icon_state = "darkgygax" - health = 300 + obj_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 = 0, fire = 0, acid = 0) + armor = list(melee = 40, bullet = 40, laser = 50, energy = 35, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100) max_temperature = 35000 leg_overload_coeff = 100 operation_req_access = list(access_syndicate) diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index 1dc45391ca1..61de8129602 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -3,10 +3,11 @@ name = "\improper H.O.N.K" icon_state = "honker" step_in = 3 - health = 140 + obj_integrity = 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, fire = 100, acid = 100) max_temperature = 25000 infra_luminosity = 5 operation_req_access = list(access_theatre) @@ -27,7 +28,7 @@ */ /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/datum/gas_mixture/int_tank_air = internal_tank.return_air() var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None" diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index 441577a9c2c..fd1021b8b69 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -3,12 +3,12 @@ name = "\improper Marauder" icon_state = "marauder" step_in = 5 - health = 500 + obj_integrity = 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, fire = 0, acid = 0) + armor = list(melee = 50, bullet = 55, laser = 40, energy = 30, bomb = 30, bio = 0, rad = 0, fire = 100, acid = 100) max_temperature = 60000 - resistance_flags = LAVA_PROOF |FIRE_PROOF | ACID_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF infra_luminosity = 3 operation_req_access = list(access_cent_specops) wreckage = /obj/structure/mecha_wreckage/marauder @@ -47,7 +47,7 @@ icon_state = "seraph" operation_req_access = list(access_cent_specops) step_in = 3 - health = 550 + obj_integrity = 550 wreckage = /obj/structure/mecha_wreckage/seraph internal_damage_threshold = 20 force = 55 diff --git a/code/game/mecha/combat/phazon.dm b/code/game/mecha/combat/phazon.dm index b05a01435f1..74a758bce0b 100644 --- a/code/game/mecha/combat/phazon.dm +++ b/code/game/mecha/combat/phazon.dm @@ -5,10 +5,10 @@ step_in = 2 dir_in = 2 //Facing South. step_energy_drain = 3 - health = 200 + obj_integrity = 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, fire = 0, acid = 0) + armor = list(melee = 30, bullet = 30, laser = 30, energy = 30, bomb = 30, bio = 0, rad = 0, fire = 100, acid = 100) max_temperature = 25000 infra_luminosity = 3 wreckage = /obj/structure/mecha_wreckage/phazon diff --git a/code/game/mecha/combat/reticence.dm b/code/game/mecha/combat/reticence.dm index d25d67f4af3..d0b0d00b176 100644 --- a/code/game/mecha/combat/reticence.dm +++ b/code/game/mecha/combat/reticence.dm @@ -4,10 +4,10 @@ icon_state = "reticence" step_in = 2 dir_in = 1 //Facing North. - health = 100 + obj_integrity = 100 + max_integrity = 100 deflect_chance = 3 - 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, fire = 0, acid = 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/structure/mecha_wreckage/reticence operation_req_access = list(access_theatre) @@ -18,6 +18,7 @@ color = "#87878715" stepsound = null turnsound = null + opacity = 0 /obj/mecha/combat/reticence/loaded/New() ..() @@ -25,4 +26,4 @@ ME.attach(src) ME = new /obj/item/mecha_parts/mecha_equipment/rcd //HAHA IT MAKES WALLS GET IT ME.attach(src) - return \ No newline at end of file + return diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 5c52da34820..ad8dbb9188d 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -13,7 +13,7 @@ /obj/item/mecha_parts/mecha_equipment/drill/action(atom/target) if(!action_checks(target)) return - if(istype(target, /turf/open/space)) + if(isspaceturf(target)) return if(isobj(target)) var/obj/target_obj = target diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index a1daa55e41b..7e8481cb7d7 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -248,8 +248,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(health_boost<0 || chassis.obj_integrity < chassis.max_integrity) + chassis.obj_integrity += min(health_boost, chassis.max_integrity-chassis.obj_integrity) repaired = 1 if(repaired) if(!chassis.use_power(energy_drain)) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index f4f33c7a40c..586e67bebb5 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -31,7 +31,7 @@ return if(!cargo_holder) return - if(istype(target,/obj)) + if(isobj(target)) var/obj/O = target if(!O.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) @@ -50,7 +50,7 @@ else occupant_message("[target] is firmly secured!") - else if(istype(target,/mob/living)) + else if(isliving(target)) var/mob/living/M = target if(M.stat == DEAD) return if(chassis.occupant.a_intent == "harm") @@ -78,9 +78,11 @@ energy_drain = 0 /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target) - if(!action_checks(target)) return - if(!cargo_holder) return - if(istype(target,/obj)) + if(!action_checks(target)) + return + if(!cargo_holder) + return + if(isobj(target)) var/obj/O = target if(!O.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) @@ -99,7 +101,7 @@ else occupant_message("[target] is firmly secured!") - else if(istype(target,/mob/living)) + else if(isliving(target)) var/mob/living/M = target if(M.stat == DEAD) return if(chassis.occupant.a_intent == "harm") @@ -208,7 +210,7 @@ if(istype(target, /turf/open/space/transit))//>implying these are ever made -Sieve return - if(!istype(target, /turf) && !istype(target, /obj/machinery/door/airlock)) + if(!isturf(target) && !istype(target, /obj/machinery/door/airlock)) target = get_turf(target) if(!action_checks(target) || get_dist(chassis, target)>3) return @@ -216,14 +218,14 @@ switch(mode) if(0) - if (istype(target, /turf/closed/wall)) + if(iswallturf(target)) var/turf/closed/wall/W = target occupant_message("Deconstructing [W]...") if(do_after_cooldown(W)) chassis.spark_system.start() W.ChangeTurf(/turf/open/floor/plating) playsound(W, 'sound/items/Deconstruct.ogg', 50, 1) - else if (istype(target, /turf/open/floor)) + else if(isfloorturf(target)) var/turf/open/floor/F = target occupant_message("Deconstructing [F]...") if(do_after_cooldown(target)) @@ -237,14 +239,14 @@ qdel(target) playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) if(1) - if(istype(target, /turf/open/space)) + if(isspaceturf(target)) var/turf/open/space/S = target occupant_message("Building Floor...") if(do_after_cooldown(S)) S.ChangeTurf(/turf/open/floor/plating) playsound(S, 'sound/items/Deconstruct.ogg', 50, 1) chassis.spark_system.start() - else if(istype(target, /turf/open/floor)) + else if(isfloorturf(target)) var/turf/open/floor/F = target occupant_message("Building Wall...") if(do_after_cooldown(F)) @@ -252,7 +254,7 @@ playsound(F, 'sound/items/Deconstruct.ogg', 50, 1) chassis.spark_system.start() if(2) - if(istype(target, /turf/open/floor)) + if(isfloorturf(target)) occupant_message("Building Airlock...") if(do_after_cooldown(target)) chassis.spark_system.start() @@ -386,7 +388,7 @@ last_piece = null /obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(var/turf/new_turf) - if(istype(new_turf, /turf/open/floor)) + if(isfloorturf(new_turf)) var/turf/open/floor/T = new_turf if(!istype(T, /turf/open/floor/plating)) if(!T.broken && !T.burnt) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index ba7ef9d54c2..81f693e4c8f 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -154,7 +154,7 @@ playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1) chassis.occupant_message("HONK") for(var/mob/living/carbon/M in ohearers(6, chassis)) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(istype(H.ears, /obj/item/clothing/ears/earmuffs)) continue diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 5f7135cdc57..b0830304f46 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -114,7 +114,7 @@ if(recharge_port && !qdeleted(recharge_port)) data["recharge_port"] = list("mech" = null) if(recharge_port.recharging_mech && !qdeleted(recharge_port.recharging_mech)) - data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.health, "maxhealth" = initial(recharge_port.recharging_mech.health), "cell" = null) + data["recharge_port"]["mech"] = list("health" = recharge_port.recharging_mech.obj_integrity, "max_integrity" = recharge_port.recharging_mech.max_integrity, "cell" = null) if(recharge_port.recharging_mech.cell && !qdeleted(recharge_port.recharging_mech.cell)) data["recharge_port"]["mech"]["cell"] = list( "critfail" = recharge_port.recharging_mech.cell.crit_fail, diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 12e6d5f0005..a8642407f7c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -29,11 +29,10 @@ var/step_in = 10 //make a step in step_in/10 sec. var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South. var/step_energy_drain = 10 - var/health = 300 //health is health + obj_integrity = 300 //obj_integrity is health + max_integrity = 300 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) - armor = list(melee = 20, bullet = 10, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + 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(FRONT_ARMOUR = 1.5, SIDE_ARMOUR = 1, BACK_ARMOUR = 0.5) var/obj/item/weapon/stock_parts/cell/cell var/state = 0 @@ -240,7 +239,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) user << "It's fully intact." @@ -256,8 +255,6 @@ user << "It's equipped with:" for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment) user << "\icon[ME] [ME]" - return - //processing internal damage, temperature, air regulation, alert updates, lights power use. /obj/mecha/process() @@ -276,7 +273,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_TEMP_CONTROL) internal_temp_regulation = 0 @@ -342,7 +339,7 @@ else occupant.throw_alert("charge",/obj/screen/alert/emptycell) - var/integrity = health/initial(health)*100 + var/integrity = obj_integrity/max_integrity*100 switch(integrity) if(30 to 45) occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 1) @@ -550,7 +547,7 @@ obstacle.mech_melee_attack(src) if(!obstacle || (obstacle && !obstacle.density)) step(src,dir) - if(istype(obstacle, /obj)) + if(isobj(obstacle)) var/obj/O = obstacle if(!O.anchored) step(obstacle, dir) @@ -568,7 +565,7 @@ /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) < internal_damage_threshold) + if(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold) for(var/T in possible_int_damage) if(internal_damage & T) possible_int_damage -= T @@ -576,7 +573,7 @@ if(int_dam_flag) setInternalDamage(int_dam_flag) if(prob(5)) - if(ignore_threshold || health*100/initial(health)You cannot get in the [name], it has been destroyed!
" else if(occupant) user << "[occupant] was faster! Try better next time, loser." diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 0fc08605bcf..a252f25ad08 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -72,7 +72,7 @@ var/obj/mecha/M = src.loc var/cell_charge = M.get_charge() 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"]
diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index 5c2c5ede2ff..a8c31514f66 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -8,174 +8,128 @@ return facing_modifiers[FRONT_ARMOUR] return 1 //always return non-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() + 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_append_to_last("Took [damage_amount] points of damage. Damage type: \"[damage_type]\".",1) -/obj/mecha/proc/take_damage(amount, type="brute", booster_deflection_modifier = 1, booster_damage_modifier = 1, send_message = 1) +/obj/mecha/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + . = ..() + 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_append_to_last("Armor saved.") return 0 - if(amount) - var/damage = absorbDamage(amount,type) - damage = damage * booster_damage_modifier - health -= damage - update_health() - if(send_message) - occupant_message("Taking damage!") - log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1) - return 1 + if(.) + . *= booster_damage_modifier -/obj/mecha/proc/take_directional_damage(amount, type="brute", adir = 0, booster_deflection_modifier = 1, booster_damage_modifier = 1, send_message = 1) - var/facing_modifier = get_armour_facing(dir2angle(adir) - dir2angle(src)) - - booster_damage_modifier /= facing_modifier - booster_deflection_modifier *= facing_modifier - - return take_damage(amount, type, booster_deflection_modifier, booster_damage_modifier, send_message) - - -/obj/mecha/proc/absorbDamage(damage,damage_type) - var/coeff = 1 - if(damage_absorption[damage_type]) - coeff = damage_absorption[damage_type] - return damage*coeff - - -/obj/mecha/proc/update_health() - if(health > 0) - spark_system.start() - else - qdel(src) - -/obj/mecha/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - take_directional_damage(15, "brute", get_dir(src, user)) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - user.visible_message("[user] hits [name]. The metal creaks and bends.") - -/obj/mecha/attack_hand(mob/living/user as mob) +/obj/mecha/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code. user.do_attack_animation(src) log_message("Attack by hand/paw. Attacker - [user].",1) user.visible_message("[user] hits [name]. Nothing happens","You hit [name] with no visible effect.") log_append_to_last("Armor saved.") - return /obj/mecha/attack_paw(mob/user as mob) return attack_hand(user) -/obj/mecha/attack_alien(mob/living/user as mob) +/obj/mecha/attack_alien(mob/living/user) log_message("Attack by alien. Attacker - [user].",1) - user.changeNext_move(CLICK_CD_MELEE) //Now stompy alien killer mechs are actually scary to aliens! - user.do_attack_animation(src) - take_directional_damage(15, "brute", get_dir(src, user)) - 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) - visible_message("The [user] slashes at [name]'s armor!") + playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) + attack_generic(user, 15, BRUTE, "melee", 0) -/obj/mecha/attack_animal(mob/living/simple_animal/user as mob) +/obj/mecha/attack_animal(mob/living/simple_animal/user) log_message("Attack by simple animal. Attacker - [user].",1) - user.changeNext_move(CLICK_CD_MELEE) if(!user.melee_damage_upper && !user.obj_damage) user.emote("[user.friendly] [src]") + return 0 else - user.do_attack_animation(src) - var/damage = rand(user.melee_damage_lower, user.melee_damage_upper) + var/play_soundeffect = 1 + if(user.environment_smash) + play_soundeffect = 0 + playsound(src, 'sound/effects/bang.ogg', 50, 1) + var/animal_damage = rand(user.melee_damage_lower,user.melee_damage_upper) if(user.obj_damage) - damage = user.obj_damage - take_directional_damage(damage, "brute", get_dir(src, user)) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - visible_message("[user] [user.attacktext] [src]!") + animal_damage = user.obj_damage + animal_damage = min(animal_damage, 20*user.environment_smash) + attack_generic(user, animal_damage, user.melee_damage_type, "melee", play_soundeffect) add_logs(user, src, "attacked") + return 1 + + + +/obj/mecha/attack_hulk(mob/living/carbon/human/user) + if(user.a_intent == "harm") + log_message("Attack by hulk. Attacker - [user].",1) + user.changeNext_move(CLICK_CD_MELEE) + add_logs(user, src, "punched", "hulk powers") + user.do_attack_animation(src) + user.visible_message("[user] hits [name]. The metal creaks and bends.") + take_damage(15, BRUTE, "melee", 0, get_dir(src, user)) + +/obj/mecha/blob_act(obj/structure/blob/B) + take_damage(30, BRUTE, "melee", 0, get_dir(src, B)) /obj/mecha/attack_tk() return /obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper log_message("Hit by [A].",1) - var/deflection = 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()) - deflection = 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 - else - deflection = 100 //will bounce off - - if(istype(A, /obj)) - var/obj/O = A - if(O.throwforce) - visible_message("[name] is hit by [A].") - take_directional_damage(O.throwforce, "brute", get_dir(src, A), deflection, dam_coeff) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - return + . = ..() -/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper +/obj/mecha/bullet_act(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("[name] is hit by [Proj].") - take_directional_damage(Proj.damage*dam_coeff,Proj.flag, turn(Proj.dir, 180), deflection, dam_coeff) - 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].",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) - return - -/obj/mecha/blob_act(obj/structure/blob/B) - take_directional_damage(30, "brute", get_dir(src, B)) + . = ..(severity, target) /obj/mecha/emp_act(severity) if(get_charge()) use_power((cell.charge/3)/(severity*2)) - take_damage(30 / 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) - return /obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature>max_temperature) log_message("Exposed to dangerous temperature.",1) - take_damage(5,"fire") - check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL)) - return - + take_damage(5, BURN, 0, 1) /obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params) @@ -271,14 +225,14 @@ else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") user.changeNext_move(CLICK_CD_MELEE) var/obj/item/weapon/weldingtool/WT = W - if(healthYou repair the damaged gas tank.
" else user.visible_message("[user] repairs some damage to [name].") - health += min(10, initial(health)-health) + obj_integrity += min(10, max_integrity-obj_integrity) else user << "The welder must be on for this task!" return 1 @@ -298,21 +252,7 @@ /obj/mecha/attacked_by(obj/item/I, mob/living/user) log_message("Attacked by [I]. Attacker - [user]") - 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()) - deflection *= B.deflect_coeff - dam_coeff *= B.damage_coeff - break - if(prob(deflection)) - user << "\The [I.name] bounces off [name]'s armor." - log_append_to_last("Armor saved.") - else - user.visible_message("[user] hits [src] with [I].", "You hit [src] with [I].") - take_directional_damage(round(I.force*dam_coeff),I.damtype, get_dir(src, user)) - check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - + ..() /obj/mecha/proc/mech_toxin_damage(mob/living/target) playsound(src, 'sound/effects/spray2.ogg', 50, 1) @@ -323,17 +263,7 @@ 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 - visible_message("[M.name] has hit [src].") - take_directional_damage(M.force, damtype, get_dir(src, M)) - add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") - return \ No newline at end of file + if(M.damtype == BRUTE || M.damtype == BURN) + add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") + . = ..() \ No newline at end of file diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 8084c64a43d..0f6623141c1 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/datum/gas_mixture/int_tank_air = internal_tank.return_air() var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None" diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index efb5b3d31b4..f9ae636dff9 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -4,7 +4,8 @@ icon_state = "odysseus" step_in = 3 max_temperature = 15000 - health = 120 + obj_integrity = 120 + max_integrity = 120 wreckage = /obj/structure/mecha_wreckage/odysseus internal_damage_threshold = 35 deflect_chance = 15 diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index b9d693deb91..84155a23b7e 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -6,11 +6,11 @@ var/hi_pres_step_in = 4 //step_in while in high pressure. var/lo_pres_step_in = 2 //step_in while in low/zero pressure. max_temperature = 20000 - health = 200 + obj_integrity = 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 = 0, bomb = 40, bio = 0, rad = 0, fire = 0, acid = 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/structure/mecha_wreckage/ripley var/list/cargo = new @@ -29,7 +29,6 @@ /obj/mecha/working/ripley/Destroy() 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 - damage_absorption["brute"] = initial(damage_absorption["brute"]) for(var/atom/movable/A in cargo) A.loc = loc step_rand(A) @@ -63,11 +62,11 @@ name = "\improper APLU \"Firefighter\"" icon_state = "firefighter" max_temperature = 65000 - health = 250 - resistance_flags = LAVA_PROOF |FIRE_PROOF | ACID_PROOF + obj_integrity = 250 + 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 = 0, bomb = 60, bio = 0, rad = 0, fire = 0, acid = 0) + armor = list(melee = 40, bullet = 30, laser = 30, energy = 30, bomb = 60, bio = 0, rad = 0, fire = 100, acid = 100) max_equip = 5 // More armor, less tools wreckage = /obj/structure/mecha_wreckage/ripley/firefighter diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm index 6cc2831d154..96b1406a0b6 100644 --- a/code/game/objects/effects/alien_acid.dm +++ b/code/game/objects/effects/alien_acid.dm @@ -15,73 +15,92 @@ density = 0 opacity = 0 anchored = 1 - resistance_flags = FIRE_PROOF | UNACIDABLE - var/atom/target - var/ticks = 0 - var/target_strength = 0 + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF + layer = ABOVE_NORMAL_TURF_LAYER + var/turf/target -/obj/effect/acid/New(loc, targ) +/obj/effect/acid/New(loc, acid_pwr, acid_amt) ..(loc) - target = targ + + 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, 1) - 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/closed/mineral)) - var/turf/closed/mineral/M = target - M.ChangeTurf(M.baseturf) - - if(istype(target, /turf/open/floor)) - var/turf/open/floor/F = target - F.ChangeTurf(F.baseturf) - - if(istype(target, /turf/closed/wall)) - var/turf/closed/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(ishuman(L)) + var/mob/living/carbon/human/H = L + if(FLYING in H.dna.species.specflags) + return + else if(isanimal(L)) + var/mob/living/simple_animal/SA = L + if(SA.flying) + return + if(L.m_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, 1) + 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!") +/obj/effect/acid/alien + var/target_strength = 60 - spawn(1) - if(src) - tick() + +/obj/effect/acid/alien/process() + . = ..() + if(.) + if(prob(45)) + playsound(loc, 'sound/items/Welder.ogg', 100, 1) + 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(48) + visible_message("[target] is holding up against the acid!") + if(32) + visible_message("[target] is being melted by the acid!") + if(16) + visible_message("[target] is struggling to withstand the acid!") + if(8) + visible_message("[target] begins to crumble under the acid!") \ No newline at end of file diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index 2e54d2f2b0b..918c4251a88 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -103,7 +103,7 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v desc = "You probably shouldn't be holding this." icon = 'icons/obj/contraband.dmi' force = 0 - resistance_flags = 0 + resistance_flags = FLAMMABLE var/serial_number = 0 var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor var/official = 0 @@ -272,7 +272,7 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v if(!D) return - if(istype(src,/turf/closed/wall) && user && user.loc == temp_loc) //Let's check if everything is still there + if(iswallturf(src) && user && user.loc == temp_loc) //Let's check if everything is still there user << "You place the poster!" else D.roll_and_drop(temp_loc,D.official) diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index e07a94d73e1..97df69802f6 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -52,25 +52,16 @@ gender = NEUTER layer = WALL_OBJ_LAYER icon_state = "cobweb1" + resistance_flags = FLAMMABLE -/obj/effect/decal/cleanable/cobweb/fire_act() - qdel(src) - -/obj/effect/decal/cleanable/cobweb2 - name = "cobweb" - desc = "Somebody should remove that." - gender = NEUTER - layer = WALL_OBJ_LAYER +/obj/effect/decal/cleanable/cobweb/cobweb2 icon_state = "cobweb2" -/obj/effect/decal/cleanable/cobweb2/fire_act() - qdel(src) - -/obj/effect/decal/cleanable/molten_item +/obj/effect/decal/cleanable/molten_object name = "gooey grey mass" desc = "It looks like a melted... something." gender = NEUTER - icon = 'icons/obj/chemical.dmi' + icon = 'icons/effects/effects.dmi' icon_state = "molten" mergeable_decal = 0 @@ -88,9 +79,9 @@ var/list/viruses = list() /obj/effect/decal/cleanable/vomit/attack_hand(var/mob/user) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user - if(H.dna.species.id == "fly") + if(isflyperson(H)) playsound(get_turf(src), 'sound/items/drink.ogg', 50, 1) //slurp H.visible_message("[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.") if(reagents) @@ -150,9 +141,13 @@ gender = PLURAL mergeable_decal = 0 +/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/New() - pixel_x = rand(-5, 5) - pixel_y = rand(-5, 5) + pixel_x = rand(-10, 10) + pixel_y = rand(-10, 10) ..() /obj/effect/decal/cleanable/salt diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index d6f40add970..963165efe99 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -46,6 +46,8 @@ src.reagents.chem_temp = min(src.reagents.chem_temp + added_heat, hotness) src.reagents.handle_reactions() user << "You heat [src] with [W]!" + else + return ..() /obj/effect/decal/cleanable/ex_act() if(reagents) @@ -53,7 +55,7 @@ R.on_ex_act() ..() -/obj/effect/decal/cleanable/fire_act() +/obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume) if(reagents) reagents.chem_temp += 30 reagents.handle_reactions() diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index d54b26ea358..416056f20c7 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -1,6 +1,11 @@ /obj/effect/decal name = "decal" anchored = 1 + resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/decal/ex_act(severity, target) - qdel(src) \ No newline at end of file + qdel(src) + +/obj/effect/decal/fire_act(exposed_temperature, exposed_volume) + if(!(resistance_flags & FIRE_PROOF)) //non fire proof decal or being burned by lava + qdel(src) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index 3911ce019a1..80e6712ad5b 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -57,6 +57,10 @@ for(var/obj/O in range(0,src)) if(O.type == src.type) continue + if(isturf(O.loc)) + var/turf/T = O.loc + if(T.intact && O.level == 1) //hidden under the floor + continue reagents.reaction(O, VAPOR, fraction) var/hit = 0 for(var/mob/living/L in range(0,src)) @@ -140,7 +144,7 @@ return ..() /datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null) - if(istype(loca, /turf/)) + if(isturf(loca)) location = loca else location = get_turf(loca) @@ -177,7 +181,8 @@ name = "foamed metal" desc = "A lightweight foamed metal wall." gender = PLURAL - var/metal = 1 // 1=aluminium, 2=iron + obj_integrity = 20 + max_integrity = 20 /obj/structure/foamedmetal/New() ..() @@ -189,76 +194,16 @@ air_update_turf(1) return ..() - /obj/structure/foamedmetal/Move() var/turf/T = loc ..() move_update_air(T) - -/obj/structure/foamedmetal/proc/updateicon() - if(metal == 1) - icon_state = "metalfoam" - else - icon_state = "ironfoam" - - -/obj/structure/foamedmetal/ex_act(severity, target) - qdel(src) - - -/obj/structure/foamedmetal/blob_act(obj/structure/blob/B) - qdel(src) - - -/obj/structure/foamedmetal/bullet_act() - ..() - if(metal==1 || prob(50)) - qdel(src) - - /obj/structure/foamedmetal/attack_paw(mob/user) attack_hand(user) - -/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) +/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - if(user.environment_smash >= 1) - user.do_attack_animation(src) - user << "You smash apart the foam wall." - qdel(src) - -/obj/structure/foamedmetal/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - if(prob(75 - metal*25)) - user.visible_message("[user] smashes through the foamed metal!", \ - "You smash through the metal foam wall!") - qdel(src) - return 1 - -/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - if(prob(75 - metal*25)) - user.visible_message("[user] smashes through the foamed metal!", \ - "You smash through the metal foam wall!") - qdel(src) - -/obj/structure/foamedmetal/attack_slime(mob/living/simple_animal/slime/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - if(!user.is_adult) - attack_hand(user) - return - if(prob(75 - metal*25)) - user.visible_message("[user] smashes through the foamed metal!", \ - "You smash through the metal foam wall!") - qdel(src) /obj/structure/foamedmetal/attack_hand(mob/user) user.changeNext_move(CLICK_CD_MELEE) @@ -266,24 +211,13 @@ user << "You hit the metal foam but bounce off it!" playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) - -/obj/structure/foamedmetal/attacked_by(obj/item/I, mob/living/user) - playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) //the item attack sound is muffled by the foam. - if(prob(I.force*20 - metal*25)) - user.visible_message("[user] smashes through the foamed metal!", \ - "You smash through the foamed metal with \the [I]!") - qdel(src) - else - user << "You hit the metal foam to no effect!" - /obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5) return !density /obj/structure/foamedmetal/CanAtmosPass() return !density - - /obj/structure/foamedmetal/iron + obj_integrity = 50 + max_integrity = 50 icon_state = "ironfoam" - metal = 2 \ No newline at end of file diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 42eecf20b49..b51923eff97 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -157,7 +157,7 @@ var/blast = 0 /datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A) - if(istype(A,/turf/open)) + if(isopenturf(A)) var/turf/open/T = A if(T.air) var/datum/gas_mixture/G = T.air @@ -227,6 +227,8 @@ for(var/atom/movable/AM in T) if(AM.type == src.type) continue + if(T.intact && AM.level == 1) //hidden under the floor + continue reagents.reaction(AM, TOUCH, fraction) reagents.reaction(T, TOUCH, fraction) @@ -264,7 +266,7 @@ return ..() /datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0) - if(istype(loca, /turf/)) + if(isturf(loca)) location = loca else location = get_turf(loca) diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm index 6488083cd4c..f6f07d16b33 100644 --- a/code/game/objects/effects/effect_system/effects_sparks.dm +++ b/code/game/objects/effects/effect_system/effects_sparks.dm @@ -15,20 +15,20 @@ ..() flick("sparks", src) // replay the animation playsound(src.loc, "sparks", 100, 1) - var/turf/T = src.loc - if (istype(T, /turf)) + var/turf/T = loc + if(isturf(T)) T.hotspot_expose(1000,100) QDEL_IN(src, 20) /obj/effect/particle_effect/sparks/Destroy() - var/turf/T = src.loc - if (istype(T, /turf)) + var/turf/T = loc + if(isturf(T)) T.hotspot_expose(1000,100) return ..() /obj/effect/particle_effect/sparks/Move() ..() - var/turf/T = src.loc + var/turf/T = loc if(isturf(T)) T.hotspot_expose(1000,100) diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index 51d8f30feb8..e0abc98490e 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -1,9 +1,41 @@ //objects in /obj/effect should never be things that are attackable, use obj/structure instead. //Effects are mostly temporary visual effects like sparks, smoke, as well as decals, etc... - /obj/effect icon = 'icons/effects/effects.dmi' - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF +/obj/effect/attackby(obj/item/I, mob/living/user, params) + return +/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + return + +/obj/effect/fire_act(exposed_temperature, exposed_volume) + return + +/obj/effect/acid_act() + return + +/obj/effect/mech_melee_attack(obj/mecha/M) + return 0 + +/obj/effect/blob_act() + return + +/obj/effect/ex_act(severity, target) + if(target == src) + qdel(src) + else + switch(severity) + if(1) + qdel(src) + if(2) + if(prob(60)) + qdel(src) + if(3) + if(prob(25)) + qdel(src) + +/obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + return 0 diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index f33bb7cd3a3..09f8878c709 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -13,7 +13,8 @@ var/list/blacklisted_glowshroom_turfs = typecacheof(list( icon = 'icons/obj/lighting.dmi' icon_state = "glowshroom" //replaced in New layer = ABOVE_NORMAL_TURF_LAYER - var/endurance = 30 + obj_integrity = 30 + max_integrity = 30 var/potency = 30 var/delay = 1200 var/floor = 0 @@ -89,7 +90,9 @@ obj/structure/glowshroom/glowcap child.potency = max(potency + rand(-3,6), 0) child.yield = max(yield + rand(-1,2), 0) child.delay = max(delay + rand(-30,60), 0) - child.endurance = max(endurance + rand(-3,6), 1) + var/newhealth = max(obj_integrity + rand(-3,6), 1) + child.obj_integrity = newhealth + child.max_integrity = newhealth child.generation = generation + 1 CHECK_TICK @@ -126,34 +129,17 @@ obj/structure/glowshroom/glowcap floor = 1 return 1 -/obj/structure/glowshroom/attacked_by(obj/item/I, mob/user) - ..() - if(I.damtype != STAMINA) - endurance -= I.force - CheckEndurance() - -/obj/structure/glowshroom/ex_act(severity, target) - 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, 1) /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, toxpwr, acid_volume) +/obj/structure/glowshroom/acid_act(acidpwr, acid_volume) + . = 1 visible_message("[src] melts away!") - var/obj/effect/decal/cleanable/molten_item/I = new (get_turf(src)) + 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) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 12d40b9f44c..f93888ee479 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -108,7 +108,6 @@ new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc) new /obj/item/clothing/head/flatcap(src.loc) new /obj/item/clothing/suit/toggle/labcoat/mad(src.loc) - new /obj/item/clothing/glasses/gglasses(src.loc) qdel(src) /obj/effect/landmark/costume/elpresidente/New() diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 93a16e2b624..639b2de74c1 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -22,7 +22,6 @@ icon_state = "nothing" anchored = 1 layer = ABOVE_MOB_LAYER - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE mouse_opacity = 0 var/duration = 10 //in deciseconds var/randomdir = TRUE diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 48b7a88f0b7..87fecb85308 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -1,49 +1,31 @@ //generic procs copied from obj/effect/alien /obj/structure/spider name = "web" + icon = 'icons/effects/effects.dmi' desc = "it's stringy and sticky" anchored = 1 density = 0 - var/health = 15 + obj_integrity = 15 -//similar to weeds, but only barfed out by nurses manually -/obj/structure/spider/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if (prob(50)) - qdel(src) - if(3) - if (prob(5)) - qdel(src) -/obj/structure/spider/attacked_by(obj/item/I, mob/user) - ..() - var/damage = I.force - take_damage(damage, I.damtype, 1) -/obj/structure/spider/bullet_act(obj/item/projectile/P) +/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, 1) + + +/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 . = ..() - take_damage(P.damage, P.damage_type, 0) - -/obj/structure/spider/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BURN) - damage *= 2 - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 100, 1) - if(BRUTE)//the stickiness of the web mutes all attack sounds except fire damage type - damage *= 0.25 - else - return - health -= damage - if(health <= 0) - qdel(src) /obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > 300) - take_damage(5, BURN, 0) + take_damage(5, BURN, 0, 0) /obj/structure/spider/stickyweb icon_state = "stickyweb1" @@ -56,7 +38,7 @@ if(height==0) return 1 if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider)) return 1 - else if(istype(mover, /mob/living)) + else if(isliving(mover)) if(prob(50)) mover << "You get stuck in \the [src] for a moment." return 0 @@ -98,7 +80,7 @@ icon_state = "spiderling" anchored = 0 layer = PROJECTILE_HIT_THRESHHOLD_LAYER - health = 3 + obj_integrity = 3 var/amount_grown = 0 var/grow_as = null var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent @@ -121,7 +103,7 @@ /obj/structure/spider/spiderling/process() if(travelling_in_vent) - if(istype(src.loc, /turf)) + if(isturf(loc)) travelling_in_vent = 0 entry_vent = null else if(entry_vent) @@ -197,14 +179,14 @@ name = "cocoon" desc = "Something wrapped in silky spider web" icon_state = "cocoon1" - health = 60 + obj_integrity = 60 /obj/structure/spider/cocoon/New() icon_state = pick("cocoon1","cocoon2","cocoon3") /obj/structure/spider/cocoon/container_resist() var/mob/living/user = usr - var/breakout_time = 2 + var/breakout_time = 1 user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user << "You struggle against the tight bonds... (This will take about [breakout_time] minutes.)" @@ -217,7 +199,8 @@ /obj/structure/spider/cocoon/Destroy() + var/turf/T = get_turf(src) src.visible_message("\The [src] splits open.") for(var/atom/movable/A in contents) - A.loc = src.loc + A.forceMove(T) return ..() diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 1754dfa6e46..1c21051ab65 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -14,7 +14,7 @@ ..() if(!H) return - if(istype(H, /mob/dead/observer) && !affect_ghosts) + if(isobserver(H) && !affect_ghosts) return if(!istype(H, /mob) && mobs_only) return diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index 39db0c0ff93..510c5183af7 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -1,7 +1,7 @@ /proc/empulse(turf/epicenter, heavy_range, light_range, log=0) if(!epicenter) return - if(!istype(epicenter, /turf)) + if(!isturf(epicenter)) epicenter = get_turf(epicenter.loc) if(log) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index e7c04dcd6fa..8504bea3e58 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -133,7 +133,7 @@ //------- TURF FIRES ------- if(T) - if(flame_dist && prob(40) && !istype(T, /turf/open/space) && !T.density) + if(flame_dist && prob(40) && !isspaceturf(T) && !T.density) PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience! if(dist > 0) T.ex_act(dist) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 61323895705..c01cad9f22a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -20,6 +20,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s var/icon/alternate_worn_icon = null//If this is set, update_icons() will find on mob (WORN, NOT INHANDS) states in this file instead, primary use: badminnery/events var/alternate_worn_layer = null//If this is set, update_icons() will force the on mob state (WORN, NOT INHANDS) onto this layer, instead of it's default + obj_integrity = 150 + max_integrity = 150 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + var/hitsound = null var/throwhitsound = null var/w_class = 3 @@ -95,7 +99,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s /obj/item/proc/check_allowed_items(atom/target, not_inside, target_self) - if(((src in target) && !target_self) || (!istype(target.loc, /turf) && !istype(target, /turf) && not_inside)) + if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside)) return 0 else return 1 @@ -120,12 +124,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s if(B && B.loc == loc) qdel(src) -/obj/item/ex_act(severity, target) - if(severity == 1 || target == src) - qdel(src) - if(!qdeleted(src)) - contents_explosion(severity, target) - //user: The mob that is suiciding //damagetype: The type of damage the item will inflict on the user //BRUTELOSS = 1 @@ -141,7 +139,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s set category = "Object" set src in oview(1) - if(!istype(src.loc, /turf) || usr.stat || usr.restrained() || !usr.canmove) + if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove) return var/turf/T = src.loc @@ -220,21 +218,30 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s return if(resistance_flags & ON_FIRE) - var/mob/living/carbon/human/H = user - if(istype(H)) - if(H.gloves && (H.gloves.max_heat_protection_temperature > 360)) + var/mob/living/carbon/C = user + if(istype(C)) + if(C.gloves && (C.gloves.max_heat_protection_temperature > 360)) extinguish() user << "You put out the fire on [src]." else user << "You burn your hand on [src]!" - var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm") - if(affecting && affecting.take_damage( 0, 5 )) // 5 burn damage - H.update_damage_overlays() - + var/obj/item/bodypart/affecting = C.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm") + if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage + C.update_damage_overlays() return else extinguish() + if(acid_level > 20 && !ismob(loc))// so we can still remove the clothes on us that have acid. + var/mob/living/carbon/C = user + if(istype(C)) + if(!C.gloves || (!(C.gloves.resistance_flags & (UNACIDABLE|ACID_PROOF)))) + user << "The acid on [src] burns your hand!" + var/obj/item/bodypart/affecting = C.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm") + if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage + C.update_damage_overlays() + + if(istype(loc, /obj/item/weapon/storage)) //If the item is in a storage item, take it out var/obj/item/weapon/storage/S = loc @@ -284,7 +291,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s /obj/item/attack_ai(mob/user) if(istype(src.loc, /obj/item/weapon/robot_module)) //If the item is part of a cyborg module, equip it - if(!isrobot(user)) + if(!iscyborg(user)) return var/mob/living/silicon/robot/R = user if(!R.low_power_mode) //can't equip modules with an empty cell. @@ -501,36 +508,6 @@ obj/item/proc/item_action_slot_check(slot, mob/user) throw_at_fast(S,14,3, spin=0) else ..() -/obj/item/acid_act(acidpwr, acid_volume) - . = 1 - if(resistance_flags & UNACIDABLE) - return - - var/meltingpwr = acid_volume*acidpwr - var/melting_threshold = 100 - if(meltingpwr <= melting_threshold) // so a single unit can't melt items. You need 5.1+ unit for fluoro and 10.1+ for sulphuric - return - for(var/V in armor) - if(armor[V] > 0) - .-- //it survives the acid... - break - if(. && prob(min(meltingpwr/10,90))) //chance to melt depends on acid power and volume. - var/turf/T = get_turf(src) - if(T) - var/obj/effect/decal/cleanable/molten_item/I = new (T) - I.pixel_x = rand(-16,16) - I.pixel_y = rand(-16,16) - I.desc = "Looks like this was \an [src] some time ago." - if(istype(src,/obj/item/weapon/storage)) - var/obj/item/weapon/storage/S = src - S.do_quick_empty() //melted storage item drops its content. - qdel(src) - else - for(var/armour_value in armor) //but is weakened - armor[armour_value] = max(armor[armour_value]-min(acidpwr,meltingpwr/10),0) - if(!findtext(desc, "it looks slightly melted...")) //it looks slightly melted... it looks slightly melted... it looks slightly melted... etc. - desc += " it looks slightly melted..." //needs a space at the start, formatting - /obj/item/throw_impact(atom/A) var/itempush = 1 if(w_class < 4) @@ -591,3 +568,32 @@ obj/item/proc/item_action_slot_check(slot, mob/user) //when an item modify our speech spans when in our active hand. Override this to modify speech spans. /obj/item/proc/get_held_item_speechspans(mob/living/carbon/user) return + +/obj/item/hitby(atom/movable/AM) + return + +/obj/item/attack_hulk(mob/living/carbon/human/user) + return 0 + +/obj/item/attack_animal(mob/living/simple_animal/M) + return 0 + +/obj/item/mech_melee_attack(obj/mecha/M) + return 0 + +/obj/item/burn() + if(!qdeleted(src)) + var/turf/T = get_turf(src) + var/obj/effect/decal/cleanable/ash/A = new() + A.desc = "Looks like this used to be a [name] some time ago." + A.forceMove(T) //so the ash decal is deleted if on top of lava. + ..() + +/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." + ..() diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index 3fc4875cd4e..a9ef391d7ca 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -16,7 +16,7 @@ return var/turf/loc = get_turf(usr) var/area/A = loc.loc - if(!istype(loc, /turf/open/floor)) + if(!isfloorturf(loc)) usr << "You cannot place [src] on this spot!" return if(A.requires_power == 0 || istype(A, /area/space)) @@ -51,7 +51,7 @@ if(istype(W, /obj/item/weapon/screwdriver)) // For camera-building borgs var/turf/T = get_step(get_turf(user), user.dir) - if(istype(T, /turf/closed/wall)) + if(iswallturf(T)) T.attackby(src, user, params) var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index c5ae2345881..c30b0ed2f5d 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -35,9 +35,10 @@ if(msg) light(msg) -/obj/item/candle/fire_act() +/obj/item/candle/fire_act(exposed_temperature, exposed_volume) if(!src.lit) light() //honk + ..() /obj/item/candle/proc/light(show_message) if(!src.lit) diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index 2a02f5f8139..f7f4864fbb8 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/cardboard_cutout.dmi' icon_state = "cutout_basic" w_class = 4 - resistance_flags = 0 + resistance_flags = FLAMMABLE // Possible restyles for the cutout; // add an entry in change_appearance() if you add to here var/list/possible_appearances = list("Assistant", "Clown", "Mime", diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index a79ee1e4704..04b6a733880 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -129,15 +129,15 @@ /obj/item/toy/crayon/proc/check_empty(mob/user) // When eating a crayon, check_empty() can be called twice producing // two messages unless we check for being deleted first - if(!qdeleted(src)) - . = TRUE + if(qdeleted(src)) + return TRUE . = FALSE // -1 is unlimited charges if(charges == -1) . = FALSE else if(!charges_left) - user << "There is no more of [src.name] \ + user << "There is no more of \the [src.name] \ left!" if(self_contained) qdel(src) @@ -380,6 +380,8 @@ if(edible && (M == user)) user << "You take a bite of the [src.name]. Delicious!" var/eaten = use_charges(5) + if(check_empty(user)) //Prevents divsion by zero + return var/fraction = min(eaten / reagents.total_volume, 1) reagents.reaction(M, INGEST, fraction * volume_multiplier) reagents.trans_to(M, eaten, volume_multiplier) @@ -710,7 +712,7 @@ /obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity) var/diff = ..() - if(!isrobot(user)) + if(!iscyborg(user)) user << "How did you get this?" qdel(src) return FALSE diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 017a6076c8b..71a8585f900 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -14,6 +14,9 @@ var/global/list/obj/item/device/pda/PDAs = list() w_class = 1 slot_flags = SLOT_ID | SLOT_BELT origin_tech = "programming=2" + 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 + //Main variables var/owner = null // String name of owner @@ -759,7 +762,7 @@ var/global/list/obj/item/device/pda/PDAs = list() user << "Card scanned." else //Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand. - if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) ) + if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents)) if(!id_check(user, 2)) return user << "You put the ID into \the [src]'s slot." diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 07bfc457c92..c1727274ae4 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -115,7 +115,7 @@ master.disrupt() /obj/effect/dummy/chameleon/relaymove(mob/user, direction) - if(istype(loc, /turf/open/space) || !direction) + if(isspaceturf(loc) || !direction) return //No magical space movement! if(can_move) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index f2932a64dd6..c7e7602ca53 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -56,7 +56,7 @@ return var/mob/living/carbon/human/H = M //mob has protective eyewear - if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES))) + if(ishuman(M) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES))) user << "You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first." return diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 53e40bfba80..cbdc878dcb3 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -1,8 +1,9 @@ //copy pasta of the space piano, don't hurt me -Pete /obj/item/device/instrument name = "generic instrument" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 var/datum/song/handheld/song var/instrumentId = "generic" var/instrumentExt = "ogg" diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index dfdccf1b8d1..f881152be5a 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -106,7 +106,7 @@ outmsg = "You fail to blind [C] by shining [src] at their eyes!" //robots - else if(isrobot(target)) + else if(iscyborg(target)) var/mob/living/silicon/S = target //20% chance to actually hit the sensors if(prob(effectchance * diode.rating)) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index caf6e0ba55c..bfd6135bf14 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -63,7 +63,7 @@ var/mob/living/carbon/C = usr if(usr.stat || usr.restrained() || C.back == src) return - if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf))))) + if((ishuman(usr) && usr.contents.Find(src)) || usr.contents.Find(master) || (in_range(src, usr) && isturf(loc))) usr.set_machine(src) if(href_list["freq"]) SSradio.remove_object(src, frequency) @@ -124,7 +124,7 @@ /obj/item/device/electropack/attack_self(mob/user) - if(!istype(user, /mob/living/carbon/human)) + if(!ishuman(user)) return user.set_machine(src) var/dat = {"Turned [on ? "On" : "Off"] - diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm index be17fd0631f..21201c2b316 100644 --- a/code/game/objects/items/devices/radio/encryptionkey.dm +++ b/code/game/objects/items/devices/radio/encryptionkey.dm @@ -13,7 +13,9 @@ var/list/channels = list() /obj/item/device/encryptionkey/syndicate - icon_state = "cypherkey" + name = "syndicate encryption key" + desc = "An encryption key for a radio headset. To access the syndicate channel, use :t." + icon_state = "syn_cypherkey" channels = list("Syndicate" = 1) origin_tech = "syndicate=1;engineering=3;bluespace=2" syndie = 1//Signifies that it de-crypts Syndicate transmissions @@ -21,7 +23,7 @@ /obj/item/device/encryptionkey/binary name = "binary translator key" desc = "An encryption key for a radio headset. To access the binary channel, use :b." - icon_state = "cypherkey" + icon_state = "bin_cypherkey" translate_binary = 1 origin_tech = "syndicate=3;engineering=4;bluespace=3" diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 804137dd3ab..fc89e92de9b 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -110,7 +110,7 @@ /obj/item/device/radio/interact(mob/user) if (..()) return - if(b_stat && !istype(user, /mob/living/silicon/ai)) + if(b_stat && !isAI(user)) wires.interact(user) else ui_interact(user) @@ -277,7 +277,7 @@ jobname = "AI" // --- Cyborg --- - else if(isrobot(M)) + else if(iscyborg(M)) var/mob/living/silicon/robot/B = M jobname = "[B.designation] Cyborg" diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 605caa32cd0..42560a9804a 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -47,9 +47,9 @@ mytape = null update_icon() -/obj/item/device/taperecorder/fire_act() +/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume) mytape.ruin() //Fires destroy the tape - return() + ..() /obj/item/device/taperecorder/attack_hand(mob/user) if(loc == user) @@ -248,8 +248,9 @@ var/list/timestamp = list() var/ruined = 0 -/obj/item/device/tape/fire_act() +/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume) ruin() + ..() /obj/item/device/tape/attack_self(mob/user) if(!ruined) diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 5eba01086ed..bdbc0c0bdac 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -26,7 +26,7 @@ playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1) icon_state = "latexballon_bursted" item_state = "lgloves" - if(istype(src.loc, /mob/living)) + if(isliving(loc)) var/mob/living/user = src.loc user.update_inv_hands() loc.assume_air(air_contents) diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 4f6fa7ad3f0..91f64ccebe5 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -58,7 +58,7 @@ w_class = 4 //bulky slowdown = 2.0 //gotta pretend we're balanced. body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS - armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0) + armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0, fire = 60, acid = 60) /obj/item/clothing/suit/armor/plate/crusader/red icon_state = "crusader-red" @@ -72,7 +72,7 @@ icon_state = "crusader" w_class = 3 //normal flags_inv = HIDEHAIR|HIDEEARS|HIDEFACE - armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0) + armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0, fire = 60, acid = 60) /obj/item/clothing/head/helmet/plate/crusader/blue icon_state = "crusader-blue" @@ -86,7 +86,7 @@ desc = "A religious-looking hat." alternate_worn_icon = 'icons/mob/large-worn-icons/64x64/head.dmi' flags = 0 - armor = list(melee = 60, bullet = 60, laser = 60, energy = 50, bomb = 70, bio = 50, rad = 50) //religion protects you from disease and radiation, honk. + armor = list(melee = 60, bullet = 60, laser = 60, energy = 50, bomb = 70, bio = 50, rad = 50, fire = 60, acid = 60) //religion protects you from disease and radiation, honk. worn_x_dimension = 64 worn_y_dimension = 64 @@ -143,7 +143,7 @@ desc = "Metal boots, they look heavy." icon_state = "crusader" w_class = 3 //normal - armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0) //does this even do anything on boots? + armor = list(melee = 50, bullet = 50, laser = 50, energy = 40, bomb = 60, bio = 0, rad = 0, fire = 60, acid = 60) //does this even do anything on boots? flags = NOSLIP cold_protection = FEET min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 5f1e514cde7..bf853d2273c 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -16,7 +16,7 @@ if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK)) playsound(M, 'sound/weapons/Genhit.ogg', 50, 1) return 0 - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(!R.cell.use(charge_cost)) return @@ -43,7 +43,7 @@ var/shockallowed = 0//Can it be a stunarm when emagged. Only PK borgs get this by default. /obj/item/borg/cyborghug/attack_self(mob/living/user) - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/P = user if(P.emagged&&shockallowed == 1) if(mode < 3) @@ -107,7 +107,7 @@ "You electrocute [M] with your touch!") M.update_canmove() else - if(!isrobot(M)) + if(!iscyborg(M)) M.adjustFireLoss(10) user.visible_message("[user] shocks [M]!", \ "You shock [M]!") @@ -161,7 +161,7 @@ update_icon() /obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag) - if(!proximity_flag || !isrobot(user)) + if(!proximity_flag || !iscyborg(user)) return if(mode == "draw") if(is_type_in_list(target, charge_machines)) @@ -282,7 +282,7 @@ user << "The device is still recharging!" return - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(R.cell.charge < 1200) user << "You don't have enough charge to do this!" @@ -302,7 +302,7 @@ playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3) cooldown = world.time + 200 log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user R.connected_ai << "
NOTICE - Peacekeeping 'HARM ALARM' used by: [user]
" diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index f89954ad43a..a84a115c196 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -154,7 +154,7 @@ else if(istype(W, /obj/item/device/mmi)) var/obj/item/device/mmi/M = W if(check_completion()) - if(!istype(loc,/turf)) + if(!isturf(loc)) user << "You can't put the MMI in, the frame has to be standing on the ground to be perfectly precise!" return if(!M.brainmob) diff --git a/code/game/objects/items/stacks/cash.dm b/code/game/objects/items/stacks/cash.dm index 948aeff5910..847c205b60b 100644 --- a/code/game/objects/items/stacks/cash.dm +++ b/code/game/objects/items/stacks/cash.dm @@ -10,7 +10,7 @@ throw_speed = 2 throw_range = 2 w_class = 1 - resistance_flags = 0 + resistance_flags = FLAMMABLE var/value = 1 /obj/item/stack/spacecash/c10 diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 27c78cd1bbe..e7f16358c8b 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -7,8 +7,9 @@ w_class = 1 throw_speed = 3 throw_range = 7 - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 40 + max_integrity = 40 var/heal_brute = 0 var/heal_burn = 0 var/stop_bleeding = 0 diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index a7f84608ffe..bcdce786746 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -15,6 +15,8 @@ icon_state = "sheet-glass" materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT) origin_tech = "materials=1" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 100) + resistance_flags = ACID_PROOF /obj/item/stack/sheet/glass/cyborg materials = list() @@ -60,7 +62,7 @@ /obj/item/stack/sheet/glass/proc/construct_window(mob/user) if(!user || !src) return 0 - if(!istype(user.loc,/turf)) + if(!isturf(user.loc)) return 0 if(!user.IsAdvancedToolUser()) user << "You don't have the dexterity to do this!" @@ -137,6 +139,8 @@ icon_state = "sheet-rglass" materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) origin_tech = "materials=2" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 100) + resistance_flags = ACID_PROOF /obj/item/stack/sheet/rglass/cyborg materials = list() @@ -164,7 +168,7 @@ /obj/item/stack/sheet/rglass/proc/construct_window(mob/user) if(!user || !src) return 0 - if(!istype(user.loc,/turf)) + if(!isturf(user.loc)) return 0 if(!user.IsAdvancedToolUser()) user << "You don't have the dexterity to do this!" @@ -282,6 +286,10 @@ materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT) attack_verb = list("stabbed", "slashed", "sliced", "cut") hitsound = 'sound/weapons/bladeslice.ogg' + resistance_flags = ACID_PROOF + armor = list(melee = 100, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 100) + obj_integrity = 40 + max_integrity = 40 var/cooldown = 0 sharpness = IS_SHARP diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index d7d8f3e66ba..4e5960697ad 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -135,8 +135,9 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \ singular_name = "plasma sheet" origin_tech = "plasmatech=2;materials=2" sheettype = "plasma" - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT) var/global/list/datum/stack_recipe/plasma_recipes = list ( \ @@ -159,7 +160,7 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \ else return ..() -/obj/item/stack/sheet/mineral/plasma/fire_act() +/obj/item/stack/sheet/mineral/plasma/fire_act(exposed_temperature, exposed_volume) atmos_spawn_air("plasma=[amount*10];TEMP=1000") qdel(src) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 78b27c7a287..beff0bb8cab 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -61,6 +61,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ throwforce = 10 flags = CONDUCT origin_tech = "materials=1" + resistance_flags = FIRE_PROOF /obj/item/stack/sheet/metal/ratvar_act() new /obj/item/stack/sheet/brass(loc, amount) @@ -104,6 +105,8 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ throwforce = 10 flags = CONDUCT origin_tech = "materials=2" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 80) + resistance_flags = FIRE_PROOF /obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null) recipes = plasteel_recipes @@ -146,7 +149,8 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \ icon = 'icons/obj/items.dmi' origin_tech = "materials=1;biotech=1" sheettype = "wood" - resistance_flags = 0 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0) + resistance_flags = FLAMMABLE /obj/item/stack/sheet/mineral/wood/New(var/loc, var/amount=null) recipes = wood_recipes @@ -183,7 +187,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \ singular_name = "cloth roll" icon_state = "sheet-cloth" origin_tech = "materials=2" - resistance_flags = 0 + resistance_flags = FLAMMABLE force = 0 throwforce = 0 @@ -216,7 +220,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ singular_name = "cardboard sheet" icon_state = "sheet-card" origin_tech = "materials=1" - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) recipes = cardboard_recipes diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 74be2659ad9..c5bf5fdfe2b 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -78,12 +78,6 @@ var/title as text var/can_build = 1 can_build = can_build && (max_multiplier>0) - /* - if (R.one_per_turf) - can_build = can_build && !(locate(R.result_type) in usr.loc) - if (R.on_floor) - can_build = can_build && istype(usr.loc, /turf/open/floor) - */ if (R.res_amount>1) title+= "[R.res_amount]x [R.title]\s" else @@ -168,7 +162,7 @@ if (R.one_per_turf && (locate(R.result_type) in usr.loc)) usr << "There is another [R.title] here!" return 0 - if (R.on_floor && !istype(usr.loc, /turf/open/floor)) + if(R.on_floor && !isfloorturf(usr.loc)) usr << "\The [R.title] must be constructed on the floor!" return 0 return 1 diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 39f50a2d1c2..8e8cb737265 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -79,7 +79,7 @@ icon_state = "tile_grass" origin_tech = "biotech=1" turf_type = /turf/open/floor/grass - resistance_flags = 0 + resistance_flags = FLAMMABLE //Wood @@ -90,7 +90,7 @@ icon_state = "tile-wood" origin_tech = "biotech=1" turf_type = /turf/open/floor/wood - resistance_flags = 0 + resistance_flags = FLAMMABLE //Carpets @@ -100,7 +100,7 @@ desc = "A piece of carpet. It is the same size as a floor tile." icon_state = "tile-carpet" turf_type = /turf/open/floor/carpet - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/stack/tile/fakespace @@ -109,7 +109,7 @@ desc = "A piece of carpet with a convincing star pattern." icon_state = "tile_space" turf_type = /turf/open/floor/fakespace - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/stack/tile/fakespace/loaded amount = 30 @@ -167,6 +167,8 @@ flags = CONDUCT turf_type = /turf/open/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 /obj/item/stack/tile/plasteel/cyborg desc = "The ground you walk on." //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR diff --git a/code/game/objects/items/stacks/wrap.dm b/code/game/objects/items/stacks/wrap.dm index b90798aeb33..1836c559713 100644 --- a/code/game/objects/items/stacks/wrap.dm +++ b/code/game/objects/items/stacks/wrap.dm @@ -12,7 +12,7 @@ flags = NOBLUDGEON amount = 25 max_amount = 25 - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/stack/wrapping_paper/Destroy() if(!amount) @@ -32,7 +32,7 @@ flags = NOBLUDGEON amount = 25 max_amount = 25 - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/proc/can_be_package_wrapped() //can the item be wrapped with package wrapper into a delivery package return 1 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index e8a53bdaa11..7fad3b35eb6 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -277,7 +277,7 @@ item_state = "arm_blade" attack_verb = list("pricked", "absorbed", "gored") w_class = 2 - resistance_flags = 0 + resistance_flags = FLAMMABLE /* @@ -337,7 +337,7 @@ playsound(src, 'sound/effects/snap.ogg', 50, 1) qdel(src) -/obj/item/toy/snappop/fire_act() +/obj/item/toy/snappop/fire_act(exposed_temperature, exposed_volume) pop_burst() /obj/item/toy/snappop/throw_impact(atom/hit_atom) @@ -638,8 +638,9 @@ /obj/item/toy/cards - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 50 + max_integrity = 50 var/parentdeck = null var/deckstyle = "nanotrasen" var/card_hitsound = null @@ -873,8 +874,7 @@ newobj.card_throw_speed = sourceobj.card_throw_speed newobj.card_throw_range = sourceobj.card_throw_range newobj.card_attack_verb = sourceobj.card_attack_verb - if(sourceobj.resistance_flags & FIRE_PROOF) - newobj.resistance_flags |= FIRE_PROOF + newobj.resistance_flags = sourceobj.resistance_flags /obj/item/toy/cards/singlecard name = "card" @@ -991,7 +991,7 @@ card_throw_speed = 3 card_throw_range = 7 card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut") - resistance_flags = FIRE_PROOF + resistance_flags = 0 /* * Fake nuke @@ -1035,7 +1035,7 @@ if(!..()) playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1) for(var/mob/M in urange(10, src)) - if(!M.stat && !istype(M, /mob/living/silicon/ai))\ + if(!M.stat && !isAI(M)) shake_camera(M, 3, 1) qdel(src) @@ -1051,7 +1051,7 @@ item_state = "carp_plushie" w_class = 2 attack_verb = list("bitten", "eaten", "fin slapped") - resistance_flags = 0 + resistance_flags = FLAMMABLE var/bitesound = 'sound/weapons/bite.ogg' //Attack mob @@ -1082,7 +1082,7 @@ user.visible_message("[user] presses the big red button.", "You press the button, it plays a loud noise!", "The button clicks loudly.") playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, surround = 0) for(var/mob/M in urange(10, src)) // Checks range - if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI + if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI sleep(8) // Short delay to match up with the explosion sound shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second. @@ -1161,7 +1161,7 @@ icon_state = "toy_mouse" w_class = 2.0 var/cooldown = 0 - resistance_flags = 0 + resistance_flags = FLAMMABLE /* diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index aeea6c170d0..f1f38450d91 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/janitor.dmi' desc = "This is rubbish." w_class = 1 - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/trash/raisins name = "\improper 4no raisins" @@ -40,7 +40,7 @@ /obj/item/trash/plate name = "plate" icon_state = "plate" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/trash/pistachios name = "pistachios pack" @@ -53,7 +53,7 @@ /obj/item/trash/tray name = "tray" icon_state = "tray" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/trash/candle name = "candle" @@ -63,7 +63,7 @@ /obj/item/trash/can name = "crushed can" icon_state = "cola" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/trash/attack(mob/M, mob/living/user) return diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 4d69fecb280..cf98f72dd38 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -21,6 +21,8 @@ RCD materials = list(MAT_METAL=100000) origin_tech = "engineering=4;materials=2" req_access_txt = "11" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF var/datum/effect_system/spark_spread/spark_system var/matter = 0 var/max_matter = 160 @@ -230,7 +232,7 @@ RCD return ..() /obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params) - if(isrobot(user)) //Make sure cyborgs can't load their RCDs + if(iscyborg(user)) //Make sure cyborgs can't load their RCDs return var/loaded = 0 if(istype(W, /obj/item/weapon/rcd_ammo)) @@ -302,12 +304,12 @@ RCD if(!proximity) return 0 if(istype(A,/area/shuttle)||istype(A,/turf/open/space/transit)) return 0 - if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window))) + if(!(isturf(A) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window))) return 0 switch(mode) if(1) - if(istype(A, /turf/open/space)) + if(isspaceturf(A)) var/turf/open/space/S = A if(useResource(floorcost, user)) user << "You start building floor..." @@ -316,7 +318,7 @@ RCD return 1 return 0 - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) var/turf/open/floor/F = A if(checkResource(wallcost, user)) user << "You start building wall..." @@ -330,7 +332,7 @@ RCD return 0 if(2) - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) if(checkResource(airlockcost, user)) var/door_check = 1 for(var/obj/machinery/door/D in A) @@ -370,12 +372,12 @@ RCD return 0 if(3) - if(istype(A, /turf/closed/wall)) + if(iswallturf(A)) var/turf/closed/wall/W = A if(istype(W, /turf/closed/wall/r_wall) && !canRturf) return 0 if(checkResource(deconwallcost, user)) - user << "You start deconstructing wall..." + user << "You start deconstructing [W]..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) if(do_after(user, deconwalldelay, target = A)) if(!useResource(deconwallcost, user)) return 0 @@ -384,7 +386,7 @@ RCD return 1 return 0 - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) var/turf/open/floor/F = A if(istype(F, /turf/open/floor/engine) && !canRturf) return 0 @@ -435,7 +437,7 @@ RCD return 0 if (4) - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) if(checkResource(grillecost, user)) if(locate(/obj/structure/grille) in A) user << "There is already a grille there!" @@ -504,7 +506,7 @@ RCD canRturf = 1 /obj/item/weapon/rcd/borg/useResource(amount, mob/user) - if(!isrobot(user)) + if(!iscyborg(user)) return 0 var/mob/living/silicon/robot/borgy = user if(!borgy.cell) @@ -517,7 +519,7 @@ RCD return . /obj/item/weapon/rcd/borg/checkResource(amount, mob/user) - if(!isrobot(user)) + if(!iscyborg(user)) return 0 var/mob/living/silicon/robot/borgy = user if(!borgy.cell) diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index ab6c2cae1ec..b94e7c41697 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -133,6 +133,8 @@ var/global/list/RPD_recipes=list( w_class = 3 materials = list(MAT_METAL=75000, MAT_GLASS=37500) origin_tech = "engineering=4;materials=2" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF var/datum/effect_system/spark_spread/spark_system var/working = 0 var/p_type = PIPE_SIMPLE @@ -562,7 +564,7 @@ var/global/list/RPD_recipes=list( user << "The [src]'s error light flickers! Perhaps you need to only use it on pipes and pipe meters?" return 0 if(ATMOS_MODE) - if(!(istype(A, /turf))) + if(!isturf(A)) user << "The [src]'s error light flickers!" return 0 user << "You start building pipes..." @@ -577,7 +579,7 @@ var/global/list/RPD_recipes=list( return 0 if(METER_MODE) - if(!(istype(A, /turf))) + if(!isturf(A)) user << "The [src]'s error light flickers!" return 0 user << "You start building meter..." diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 3a2b286a2b4..880c78145e4 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -12,6 +12,7 @@ RSF density = 0 anchored = 0 flags = NOBLUDGEON + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) var/matter = 0 var/mode = 1 w_class = 3 @@ -64,13 +65,13 @@ RSF /obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity) if(!proximity) return - if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor))) + if (!(istype(A, /obj/structure/table) || isfloorturf(A))) return if(matter < 1) user << "\The [src] doesn't have enough matter left." return - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(!R.cell || R.cell.charge < 200) user << "You do not have enough power to use [src]." @@ -105,7 +106,7 @@ RSF use_matter(10, user) /obj/item/weapon/rsf/proc/use_matter(charge, mob/user) - if (isrobot(user)) + if (iscyborg(user)) var/mob/living/silicon/robot/R = user R.cell.charge -= charge else @@ -141,7 +142,7 @@ RSF /obj/item/weapon/cookiesynth/attack_self(mob/user) var/mob/living/silicon/robot/P = null - if(isrobot(user)) + if(iscyborg(user)) P = user if(emagged&&!toxin) toxin = 1 @@ -162,12 +163,12 @@ RSF return if(!proximity) return - if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor))) + if (!(istype(A, /obj/structure/table) || isfloorturf(A))) return if(matter < 1) user << "The [src] doesn't have enough matter left. Wait for it to recharge!" return - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(!R.cell || R.cell.charge < 400) user << "You do not have enough power to use [src]." @@ -178,7 +179,7 @@ RSF var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T) if(toxin) S.reagents.add_reagent("chloralhydrate2", 10) - if (isrobot(user)) + if (iscyborg(user)) var/mob/living/silicon/robot/R = user R.cell.charge -= 100 else diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm index 0e17c792a8a..695eaec581f 100644 --- a/code/game/objects/items/weapons/airlock_painter.dm +++ b/code/game/objects/items/weapons/airlock_painter.dm @@ -55,7 +55,7 @@ // Find out if there is an open turf in front of us, // and if not, pick the turf we are standing on. var/turf/T = get_step(get_turf(src), user.dir) - if(!istype(T, /turf/open)) + if(!isopenturf(T)) T = get_turf(src) // they managed to lose their lungs between then and diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index a68fe241fd3..ae47d2f0172 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -77,6 +77,8 @@ icon_state = "id" item_state = "card-id" 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/mining_points = 0 //For redeeming at mining equipment vendors var/list/access = list() var/registered_name = null // The name registered_name on the card @@ -145,12 +147,12 @@ update_label("John Doe", "Clowny") if(istype(O, /obj/item/weapon/card/id)) var/obj/item/weapon/card/id/I = O src.access |= I.access - if(istype(user, /mob/living) && user.mind) + if(isliving(user) && user.mind) if(user.mind.special_role) usr << "The card's microscanners activate as you pass it over the ID, copying its access." /obj/item/weapon/card/id/syndicate/attack_self(mob/user) - if(istype(user, /mob/living) && user.mind) + if(isliving(user) && user.mind) if(user.mind.special_role) if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge") var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 96f223e59cb..7b5c25af4f0 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -34,7 +34,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM else open_flame(heat) -/obj/item/weapon/match/fire_act() +/obj/item/weapon/match/fire_act(exposed_temperature, exposed_volume) matchignite() /obj/item/weapon/match/proc/matchignite() @@ -248,7 +248,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM else return ..() -/obj/item/clothing/mask/cigarette/fire_act() +/obj/item/clothing/mask/cigarette/fire_act(exposed_temperature, exposed_volume) light() /obj/item/clothing/mask/cigarette/is_hot() @@ -448,6 +448,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM slot_flags = SLOT_BELT var/lit = 0 heat = 1500 + resistance_flags = FIRE_PROOF /obj/item/weapon/lighter/greyscale name = "cheap lighter" @@ -579,7 +580,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /////////////// /obj/item/clothing/mask/vape name = "E-Cigarette" - desc = "A classy and highly sophisticated electronic cigarette, for classy and dignified gentlemen. A warning label reads \"Warning: do not fill with flamable materials\""//<<< i'd vape to that. + desc = "A classy and highly sophisticated electronic cigarette, for classy and dignified gentlemen. A warning label reads \"Warning: Do not fill with flammable materials.\""//<<< i'd vape to that. icon = 'icons/obj/clothing/masks.dmi' icon_state = null item_state = null @@ -606,7 +607,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "[param_color]_vape" /obj/item/clothing/mask/vape/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/weapon/reagent_containers/glass)) + if(istype(O, /obj/item/weapon/reagent_containers) && (O.flags & OPENCONTAINER)) if(reagents.total_volume < chem_volume) if(O.reagents.total_volume > 0) O.reagents.trans_to(src,25) @@ -671,7 +672,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/equipped(mob/user, slot) if(slot == slot_wear_mask) if(!screw) - user << "You start puffing on that dank vape" + user << "You start puffing on the vape." reagents.set_reacting(TRUE) START_PROCESSING(SSobj, src) else //it will not start if the vape is opened. diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index a2846e703b0..956688fa448 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -155,7 +155,7 @@ if (!spam_flag) var/turf/T = get_turf(src) for(M in ohearers(7, T)) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if((istype(H.ears, /obj/item/clothing/ears/earmuffs)) || H.ear_deaf) continue diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index e2f9b2fd21d..734a0428179 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -11,7 +11,7 @@ throwforce = 6 w_class = 2 attack_verb = list("bashed", "battered", "judged", "whacked") - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/gavelhammer/suicide_act(mob/user) user.visible_message("[user] has sentenced \himself to death with the [src.name]! It looks like \he's trying to commit suicide.") @@ -26,7 +26,7 @@ force = 2 throwforce = 2 w_class = 1 - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/gavelhammer)) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 07550fb00f8..d23ce40ffc6 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -11,6 +11,7 @@ w_class = 4 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) var/on = 0 //if the paddles are equipped (1) or on the defib (0) var/safety = 1 //if you can zap people with the defibs on harm mode @@ -353,7 +354,7 @@ playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) return if(!wielded) - if(isrobot(user)) + if(iscyborg(user)) user << "You must activate the paddles in your active module before you can use them on someone!" else user << "You need to wield the paddles in both hands before you can use them on someone!" diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index fc5ffa9c2b9..17688f30031 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -14,6 +14,7 @@ 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 var/safety = 1 @@ -172,7 +173,7 @@ reagents.clear_reagents() var/turf/T = get_turf(loc) - if(istype(T, /turf/open)) + if(isopenturf(T)) var/turf/open/theturf = T theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5) diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 9dbfce86b95..deeb9245b1b 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -12,6 +12,7 @@ w_class = 3 materials = list(MAT_METAL=500) origin_tech = "combat=1;plasmatech=2;engineering=2" + resistance_flags = FIRE_PROOF var/status = 0 var/throw_amount = 100 var/lit = 0 //on or off diff --git a/code/game/objects/items/weapons/gift.dm b/code/game/objects/items/weapons/gift.dm index ffeeefe3865..6da16cb6e4a 100644 --- a/code/game/objects/items/weapons/gift.dm +++ b/code/game/objects/items/weapons/gift.dm @@ -13,7 +13,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "giftdeliverypackage3" item_state = "gift1" - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/a_gift/New() ..() diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 4328f3bb274..8c393a65bed 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -9,15 +9,18 @@ throw_range = 7 flags = CONDUCT slot_flags = SLOT_BELT - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 40 + max_integrity = 40 var/active = 0 var/det_time = 50 var/display_timer = 1 -/obj/item/weapon/grenade/burn() - prime() - ..() +/obj/item/weapon/grenade/deconstruct(disassembled = TRUE) + if(!disassembled) + prime() + if(!qdeleted(src)) + qdel(src) /obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user) if(user.disabilities & CLUMSY && prob(50)) diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 16a355a1258..3672e2fb90f 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -26,7 +26,6 @@ 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) diff --git a/code/game/objects/items/weapons/grenades/syndieminibomb.dm b/code/game/objects/items/weapons/grenades/syndieminibomb.dm index bbc2f455aae..0e19162de1e 100644 --- a/code/game/objects/items/weapons/grenades/syndieminibomb.dm +++ b/code/game/objects/items/weapons/grenades/syndieminibomb.dm @@ -29,25 +29,25 @@ icon_state = "frag" /obj/item/weapon/grenade/gluon - desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors." - name = "gluon frag grenade" - icon = 'icons/obj/grenade.dmi' - icon_state = "bluefrag" - item_state = "flashbang" - var/freeze_range = 4 - var/rad_damage = 35 - var/stamina_damage = 30 + desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors." + name = "gluon frag grenade" + icon = 'icons/obj/grenade.dmi' + icon_state = "bluefrag" + item_state = "flashbang" + var/freeze_range = 4 + var/rad_damage = 35 + var/stamina_damage = 30 /obj/item/weapon/grenade/gluon/prime() - update_mob() - playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1) - radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage) - for(var/turf/T in view(freeze_range,loc)) - if(istype(T,/turf/open/floor)) - var/turf/open/floor/F = T - F.wet = TURF_WET_PERMAFROST - addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST) - for(var/mob/living/carbon/L in T) - L.adjustStaminaLoss(stamina_damage) - L.bodytemperature -= 230 - qdel(src) + update_mob() + playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1) + radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage) + for(var/turf/T in view(freeze_range,loc)) + if(isfloorturf(T)) + var/turf/open/floor/F = T + F.wet = TURF_WET_PERMAFROST + addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST) + for(var/mob/living/carbon/L in T) + L.adjustStaminaLoss(stamina_damage) + L.bodytemperature -= 230 + qdel(src) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 439a3584df0..762832bd4e8 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -18,6 +18,7 @@ materials = list(MAT_METAL=500) origin_tech = "engineering=3;combat=3" breakouttime = 600 //Deciseconds = 60s = 1 minute + 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 @@ -186,7 +187,7 @@ return ..() /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user) - if(isrobot(user)) + if(iscyborg(user)) if(!C.handcuffed) playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) C.visible_message("[user] is trying to put zipties on [C]!", \ diff --git a/code/game/objects/items/weapons/holosign_creator.dm b/code/game/objects/items/weapons/holosign_creator.dm index 4fa45cb7d8c..043f625f5df 100644 --- a/code/game/objects/items/weapons/holosign_creator.dm +++ b/code/game/objects/items/weapons/holosign_creator.dm @@ -14,7 +14,7 @@ var/list/signs = list() var/max_signs = 10 var/creation_time = 0 //time to create a holosign in deciseconds. - var/holosign_type = /obj/effect/overlay/holograph/wetsign + var/holosign_type = /obj/structure/holosign/wetsign var/holocreator_busy = 0 //to prevent placing multiple holo barriers at once /obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag) @@ -22,7 +22,7 @@ if(!check_allowed_items(target, 1)) return var/turf/T = get_turf(target) - var/obj/effect/overlay/holograph/H = locate(holosign_type) in T + var/obj/structure/holosign/H = locate(holosign_type) in T if(H) user << "You use [src] to deactivate [H]." qdel(H) @@ -62,7 +62,7 @@ name = "security holobarrier projector" desc = "A holographic projector that creates holographic security barriers." icon_state = "signmaker_sec" - holosign_type = /obj/effect/overlay/holograph/barrier + holosign_type = /obj/structure/holosign/barrier creation_time = 30 max_signs = 6 @@ -70,7 +70,7 @@ name = "engineering holobarrier projector" desc = "A holographic projector that creates holographic engineering barriers." icon_state = "signmaker_engi" - holosign_type = /obj/effect/overlay/holograph/barrier/engineering + holosign_type = /obj/structure/holosign/barrier/engineering creation_time = 30 max_signs = 6 @@ -79,16 +79,16 @@ desc = "A holographic projector that creates fragile energy fields" creation_time = 5 max_signs = 9 - holosign_type = /obj/effect/overlay/holograph/barrier/cyborg + holosign_type = /obj/structure/holosign/barrier/cyborg var/shock = 0 /obj/item/weapon/holosign_creator/cyborg/attack_self(mob/user) - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(shock) user <<"You clear all active holograms, and reset your projector to normal." - holosign_type = /obj/effect/overlay/holograph/barrier/cyborg + holosign_type = /obj/structure/holosign/barrier/cyborg creation_time = 5 if(signs.len) for(var/H in signs) @@ -97,7 +97,7 @@ return else if(R.emagged&&!shock) user <<"You clear all active holograms, and overload your energy projector!" - holosign_type = /obj/effect/overlay/holograph/barrier/cyborg/hacked + holosign_type = /obj/structure/holosign/barrier/cyborg/hacked creation_time = 30 if(signs.len) for(var/H in signs) @@ -114,148 +114,3 @@ qdel(H) user << "You clear all active holograms." -/obj/effect/overlay/holograph - icon = 'icons/effects/effects.dmi' - anchored = 1 - var/holo_integrity = 1 - armor = list(melee = 0, bullet = 50, laser = 50, energy = 50, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - var/obj/item/weapon/holosign_creator/projector - -/obj/effect/overlay/holograph/New(loc, source_projector) - if(source_projector) - projector = source_projector - projector.signs += src - ..() - -/obj/effect/overlay/holograph/Destroy() - if(projector) - projector.signs -= src - projector = null - return ..() - -/obj/effect/overlay/holograph/attacked_by(obj/item/I, mob/user) - ..() - take_damage(I.force * 0.5, I.damtype) - -/obj/effect/overlay/holograph/blob_act(obj/structure/blob/B) - qdel(src) - -/obj/effect/overlay/holograph/attack_animal(mob/living/simple_animal/M) - if(!M.melee_damage_upper && !M.obj_damage) - return - attack_generic(5, M) - -/obj/effect/overlay/holograph/attack_alien(mob/living/carbon/alien/A) - attack_generic(5, A) - -/obj/effect/overlay/holograph/attack_hand(mob/living/user) - attack_generic(1, user) - -/obj/effect/overlay/holograph/mech_melee_attack(obj/mecha/M) - M.do_attack_animation(src) - playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) - visible_message("[M.name] has hit [src].") - qdel(src) - -/obj/effect/overlay/holograph/attack_slime(mob/living/simple_animal/slime/S) - if(S.is_adult) - attack_generic(5, S) - else - attack_generic(2, S) - -/obj/effect/overlay/holograph/proc/attack_generic(damage_amount, mob/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - user.visible_message("[user] hits [src].", \ - "You hit [src]." ) - take_damage(damage_amount) - -/obj/effect/overlay/holograph/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(damage && sound_effect) - playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) - if(BURN) - if(damage && sound_effect) - playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) - else - return - holo_integrity -= damage - if(holo_integrity <= 0) - qdel(src) - -/obj/effect/overlay/holograph/hitby(atom/movable/AM) - ..() - var/tforce = 1 - if(ismob(AM)) - tforce = 5 - else if(isobj(AM)) - var/obj/item/I = AM - tforce = max(1, I.throwforce * 0.2) - take_damage(tforce) - -/obj/effect/overlay/holograph/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage * 0.5, P.damage_type) - -/obj/effect/overlay/holograph/wetsign - name = "wet floor sign" - desc = "The words flicker as if they mean nothing." - icon_state = "holosign" - -/obj/effect/overlay/holograph/barrier - name = "holo barrier" - desc = "A short holographic barrier which can only be passed by walking." - icon_state = "holosign_sec" - pass_flags = LETPASSTHROW - density = 1 - holo_integrity = 4 - -/obj/effect/overlay/holograph/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(!density) - return 1 - if(air_group || (height==0)) - return 1 - if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE)) - return 1 - if(iscarbon(mover)) - var/mob/living/carbon/C = mover - if(C.m_intent == "walk") - return 1 - -/obj/effect/overlay/holograph/barrier/engineering - icon_state = "holosign_engi" - -/obj/effect/overlay/holograph/barrier/cyborg - name = "Energy Field" - desc = "A fragile energy field that blocks movement" - density = 1 - holo_integrity = 1 - -/obj/effect/overlay/holograph/barrier/cyborg/CanPass() - return 0 - -/obj/effect/overlay/holograph/barrier/cyborg/hacked - name = "Charged Energy Field" - desc = "A powerful energy field that blocks movement. Energy arcs off it" - holo_integrity = 3 - var/shockcd = 0 - -/obj/effect/overlay/holograph/barrier/cyborg/hacked/proc/cooldown() - shockcd = FALSE - -/obj/effect/overlay/holograph/barrier/cyborg/hacked/attack_hand(mob/living/user) - if(!shockcd) - if(ismob(user)) - var/mob/living/M = user - M.electrocute_act(15,"Energy Barrier", safety=1) - shockcd = TRUE - addtimer(src, "cooldown", 10) - -/obj/effect/overlay/holograph/barrier/cyborg/hacked/Bumped(atom/user) - if(!shockcd) - if(ismob(user)) - var/mob/living/M = user - M.electrocute_act(15,"Energy Barrier", safety=1) - shockcd = TRUE - addtimer(src, "cooldown", 10) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 6c99031e8da..f3584d1d094 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -47,7 +47,7 @@ for(var/X in actions) var/datum/action/A = X A.Grant(source) - if(istype(source, /mob/living/carbon/human)) + if(ishuman(source)) var/mob/living/carbon/human/H = source H.sec_hud_set_implants() @@ -63,7 +63,7 @@ for(var/X in actions) var/datum/action/A = X A.Grant(source) - if(istype(source, /mob/living/carbon/human)) + if(ishuman(source)) var/mob/living/carbon/human/H = source H.sec_hud_set_implants() diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm index 5b11165fe2d..b00c1b29d52 100644 --- a/code/game/objects/items/weapons/implants/implantpad.dm +++ b/code/game/objects/items/weapons/implants/implantpad.dm @@ -62,7 +62,7 @@ ..() if(usr.stat) return - if((usr.contents.Find(src)) || ((in_range(src, usr) && istype(loc, /turf)))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc))) usr.set_machine(src) if(istype(loc, /mob)) diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index ee4a454f671..4b9189cbe1d 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -25,6 +25,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) var/datum/reagent/forkload //used to eat omelette /obj/item/weapon/kitchen/fork/attack(mob/living/carbon/M, mob/living/carbon/user) @@ -63,6 +64,7 @@ materials = list(MAT_METAL=12000) attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") sharpness = IS_SHARP_ACCURATE + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/weapon/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user) if(user.zone_selected == "eyes") @@ -140,6 +142,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) /obj/item/weapon/kitchen/rollingpin name = "rolling pin" diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index b9d3a17e023..4e4bc94f7e7 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -7,6 +7,10 @@ w_class = 2 var/w_class_on = 4 heat = 3500 + obj_integrity = 200 + 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/weapon/melee/energy/suicide_act(mob/user) user.visible_message(pick("[user] is slitting \his stomach open with [src]! It looks like \he's trying to commit seppuku.", \ diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 596ed7b35b6..316d34adde8 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -82,7 +82,7 @@ else user.take_bodypart_damage(2*force) return - if(isrobot(target)) + if(iscyborg(target)) ..() return if(!isliving(target)) @@ -90,7 +90,7 @@ if (user.a_intent == "harm") if(!..()) return - if(!isrobot(target)) + if(!iscyborg(target)) return else if(cooldown <= world.time) @@ -190,7 +190,7 @@ consume_everything(target) else var/turf/T = get_turf(src) - if(!istype(T,/turf/open/space)) + if(!isspaceturf(T)) consume_turf(T) /obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag) diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 7a8b36c66db..a3f2621f37a 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 = 3 attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") - resistance_flags = 0 + resistance_flags = FLAMMABLE var/mopping = 0 var/mopcount = 0 var/mopcap = 5 @@ -26,7 +26,7 @@ obj/item/weapon/mop/proc/clean(turf/A) for(var/obj/effect/O in A) if(is_cleanable(O)) qdel(O) - if(istype(A, /turf/closed)) + if(isclosedturf(A)) var/turf/closed/C = A C.thermite = 0 reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting. diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index b15225639fe..ac24af721ce 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -10,8 +10,9 @@ item_color = "FFFFFF" item_state = "paintcan" w_class = 3 - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 var/paintleft = 10 /obj/item/weapon/paint/red @@ -83,7 +84,7 @@ if(paintleft <= 0) icon_state = "paint_empty" return - if(!istype(target) || istype(target, /turf/open/space)) + if(!istype(target) || isspaceturf(target)) return target.color = "#" + item_color diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index 6ba69175bf4..3dba89c7f87 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/weapon/tank/internals/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 4748b109a2b..37efb4ad832 100644 --- a/code/game/objects/items/weapons/powerfist.dm +++ b/code/game/objects/items/weapons/powerfist.dm @@ -10,6 +10,8 @@ throw_range = 7 w_class = 3 origin_tech = "combat=5;powerstorage=3;syndicate=3" + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 40) + resistance_flags = FIRE_PROOF var/click_delay = 1.5 var/fisto_setting = 1 var/gasperfist = 3 diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 45d3b2e6d60..a286d6cb08f 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -9,7 +9,7 @@ throw_speed = 3 throw_range = 7 origin_tech = "bluespace=6" - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/teleportation_scroll/apprentice name = "lesser scroll of teleportation" @@ -37,7 +37,7 @@ if (!ishuman(usr)) return 1 var/mob/living/carbon/human/H = usr - if ((H == src.loc || (in_range(src, H) && istype(src.loc, /turf)))) + if(H == src.loc || (in_range(src, H) && isturf(loc))) H.set_machine(src) if (href_list["spell_teleport"]) if (src.uses >= 1) @@ -57,7 +57,7 @@ if (!user || user.stat || user.restrained() || uses <= 0) return - if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf))))) + if(!(user == loc || (in_range(src, user) && isturf(loc)))) return var/datum/effect_system/smoke_spread/smoke = new diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 1f510031439..0161515d54e 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -1,6 +1,7 @@ /obj/item/weapon/shield name = "shield" block_chance = 50 + armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70) /obj/item/weapon/shield/riot name = "riot shield" @@ -48,7 +49,7 @@ item_state = "buckler" materials = list() origin_tech = "materials=1;combat=3;biotech=2" - resistance_flags = 0 + resistance_flags = FLAMMABLE block_chance = 30 /obj/item/weapon/shield/energy diff --git a/code/game/objects/items/weapons/signs.dm b/code/game/objects/items/weapons/signs.dm index 9950d25a61d..24824f7cd4f 100644 --- a/code/game/objects/items/weapons/signs.dm +++ b/code/game/objects/items/weapons/signs.dm @@ -5,7 +5,7 @@ force = 5 w_class = 4 attack_verb = list("bashed","smacked") - resistance_flags = 0 + resistance_flags = FLAMMABLE var/label = "" var/last_wave = 0 diff --git a/code/game/objects/items/weapons/singularityhammer.dm b/code/game/objects/items/weapons/singularityhammer.dm index e8ef7dc9402..6b51397ff53 100644 --- a/code/game/objects/items/weapons/singularityhammer.dm +++ b/code/game/objects/items/weapons/singularityhammer.dm @@ -12,6 +12,8 @@ w_class = 5 var/charged = 5 origin_tech = "combat=4;bluespace=4;plasmatech=7" + 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 /obj/item/weapon/twohanded/singularityhammer/New() ..() @@ -33,12 +35,14 @@ /obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder) for(var/atom/X in orange(5,pull)) if(istype(X, /atom/movable)) - if(X == wielder) continue - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_towards(X,pull) - step_towards(X,pull) - step_towards(X,pull) - else if(istype(X,/mob/living/carbon/human)) + var/atom/movable/A = X + if(A == wielder) + continue + if(A && !A.anchored && !ishuman(X)) + step_towards(A,pull) + step_towards(A,pull) + step_towards(A,pull) + else if(ishuman(X)) var/mob/living/carbon/human/H = X if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) var/obj/item/clothing/shoes/magboots/M = H.shoes @@ -99,7 +103,7 @@ /obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target) . = ..() - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/L = target L.Stun(3) shock(L) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 8a8c6987103..3c46834224e 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -19,8 +19,9 @@ max_w_class = 3 max_combined_w_class = 21 storage_slots = 21 - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 /obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W, mob/user, params) playsound(src.loc, "rustle", 50, 1, -5) @@ -37,9 +38,11 @@ icon_state = "holdingpack" max_w_class = 6 max_combined_w_class = 35 - resistance_flags = FIRE_PROOF + resistance_flags = 0 var/pshoom = 'sound/items/PSHOOM.ogg' var/alt_sound = 'sound/items/PSHOOM_2.ogg' + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 60, acid = 50) + /obj/item/weapon/storage/backpack/holding/suicide_act(mob/user) user.visible_message("[user] is jumping into [src]! It looks like \he's trying to commit suicide.") @@ -141,14 +144,14 @@ desc = "It's a special backpack made exclusively for Nanotrasen officers." icon_state = "captainpack" item_state = "captainpack" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/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" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/botany name = "botany backpack" @@ -173,7 +176,7 @@ desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma." icon_state = "toxpack" item_state = "toxpack" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/virology name = "virology backpack" @@ -196,7 +199,7 @@ name = "leather satchel" desc = "It's a very fancy satchel made with fine leather." icon_state = "satchel" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/satchel/leather/withwallet/New() ..() @@ -207,7 +210,7 @@ desc = "A tough satchel with extra pockets." icon_state = "satchel-eng" item_state = "engiepack" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/satchel/med name = "medical satchel" @@ -238,7 +241,7 @@ desc = "Useful for holding research materials." icon_state = "satchel-tox" item_state = "satchel-tox" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/satchel/hyd name = "botanist satchel" @@ -263,7 +266,7 @@ desc = "An exclusive satchel for Nanotrasen officers." icon_state = "satchel-cap" item_state = "captainpack" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/satchel/flat name = "smuggler's satchel" @@ -302,7 +305,7 @@ /obj/item/weapon/storage/backpack/satchel/flat/secret/New() ..() - if(istype(loc,/turf/open/floor) && !istype(loc,/turf/open/floor/plating/)) + if(isfloorturf(loc) && !istype(loc,/turf/open/floor/plating/)) hide(1) /obj/item/weapon/storage/backpack/satchel/flat/secret/hide(intact) @@ -328,7 +331,7 @@ desc = "A large dufflebag for holding extra captainly goods." icon_state = "duffle-captain" item_state = "duffle-captain" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/dufflebag/med name = "medical dufflebag" @@ -347,7 +350,7 @@ desc = "A large dufflebag for holding extra tools and supplies." icon_state = "duffle-eng" item_state = "duffle-eng" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/storage/backpack/dufflebag/drone name = "drone dufflebag" diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 084b4801c7c..92da0c435aa 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -114,6 +114,8 @@ w_class = 1 can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/food/snacks/ash_flora) resistance_flags = 0 + can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown) + resistance_flags = FLAMMABLE //////// @@ -294,7 +296,7 @@ max_w_class = 3 w_class = 4 //Bigger than a book because physics can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/book, /obj/item/weapon/spellbook) - resistance_flags = 0 + resistance_flags = FLAMMABLE /* * Trays - Agouri @@ -364,7 +366,7 @@ w_class = 1 preposition = "in" can_hold = list(/obj/item/weapon/reagent_containers/pill, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle) - resistance_flags = 0 + resistance_flags = FLAMMABLE /* * Biowaste bag (mostly for xenobiologists) @@ -380,4 +382,4 @@ w_class = 1 preposition = "in" can_hold = list(/obj/item/slime_extract, /obj/item/weapon/reagent_containers/syringe, /obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle, /obj/item/weapon/reagent_containers/blood, /obj/item/weapon/reagent_containers/hypospray/medipen, /obj/item/trash/deadmouse) - resistance_flags = 0 + resistance_flags = FLAMMABLE diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 36a826090e1..9d40d46a9e0 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -455,7 +455,7 @@ if(contents.len) icon_state += "-sabre" item_state += "-sabre" - if(loc && istype(loc, /mob/living)) + if(loc && isliving(loc)) var/mob/living/L = loc L.regenerate_icons() ..() diff --git a/code/game/objects/items/weapons/storage/book.dm b/code/game/objects/items/weapons/storage/book.dm index 7e308b91523..fb83d85e1a1 100644 --- a/code/game/objects/items/weapons/storage/book.dm +++ b/code/game/objects/items/weapons/storage/book.dm @@ -6,7 +6,7 @@ throw_speed = 2 throw_range = 5 w_class = 3 - resistance_flags = 0 + resistance_flags = FLAMMABLE var/title = "book" /obj/item/weapon/storage/book/attack_self(mob/user) user << "The pages of [title] have been cut out!" @@ -187,7 +187,7 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", " /obj/item/weapon/storage/book/bible/afterattack(atom/A, mob/user, proximity) if(!proximity) return - if (istype(A, /turf/open/floor)) + if(isfloorturf(A)) user << "You hit the floor with the bible." if(user.mind && (user.mind.assigned_role == "Chaplain")) for(var/obj/effect/rune/R in orange(2,user)) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 99c11c88f3b..d8e8a8cfd0c 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -25,7 +25,7 @@ desc = "It's just an ordinary box." icon_state = "box" item_state = "syringe_kit" - resistance_flags = 0 + resistance_flags = FLAMMABLE var/foldable = /obj/item/stack/sheet/cardboard @@ -634,7 +634,7 @@ desc = "A sack neatly crafted out of paper." icon_state = "paperbag_None" item_state = "paperbag_None" - resistance_flags = 0 + 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 a540ed7080c..8a94a7a6a53 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -11,8 +11,9 @@ max_w_class = 3 max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 150 + max_integrity = 150 var/folder_path = /obj/item/weapon/folder //this is the path of the folder that gets spawned in New() /obj/item/weapon/storage/briefcase/New() @@ -42,8 +43,9 @@ max_w_class = 3 max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 150 + max_integrity = 150 /obj/item/weapon/storage/briefcase/sniperbundle/New() ..() diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 6111e75fe85..72acca6b996 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" - resistance_flags = 0 + resistance_flags = FLAMMABLE var/icon_type = "donut" var/spawn_type = null var/fancy_open = FALSE diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index c7c2889afb2..0fc24a85698 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -342,7 +342,7 @@ //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/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location, burn = 0) +/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location) if(!istype(W)) return 0 @@ -369,14 +369,13 @@ W.on_exit_storage(src) update_icon() W.mouse_opacity = initial(W.mouse_opacity) - if(burn) - W.fire_act() return 1 -/obj/item/weapon/storage/empty_object_contents(burn, src.loc) +/obj/item/weapon/storage/deconstruct(disassembled = TRUE) for(var/obj/item/Item in contents) - remove_from_storage(Item, src.loc, burn) + remove_from_storage(Item, src.loc) + qdel(src) //This proc is called when you want to place an item into the storage item. /obj/item/weapon/storage/attackby(obj/item/W, mob/user, params) @@ -386,7 +385,7 @@ if(labeler.mode) return 0 . = 1 //no afterattack - if(isrobot(user)) + if(iscyborg(user)) return //Robots can't interact with storage items. if(!can_be_inserted(W, 0 , user)) @@ -500,7 +499,7 @@ /obj/item/weapon/storage/emp_act(severity) - if(!istype(loc, /mob/living)) + if(!isliving(loc)) for(var/obj/O in contents) O.emp_act(severity) ..() diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 3dd8d772de1..9ac9ec9e81b 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -4,7 +4,7 @@ storage_slots = 4 icon_state = "wallet" w_class = 2 - resistance_flags = 0 + resistance_flags = FLAMMABLE can_hold = list( /obj/item/stack/spacecash, /obj/item/weapon/card, diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 1b71da0cdf6..c4118cce190 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -9,6 +9,8 @@ w_class = 3 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/weapon/stock_parts/cell/high/bcell = null @@ -111,7 +113,7 @@ deductcharge(hitcost) return - if(isrobot(M)) + if(iscyborg(M)) ..() return @@ -140,7 +142,7 @@ if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that playsound(L, 'sound/weapons/Genhit.ogg', 50, 1) return 0 - if(isrobot(loc)) + if(iscyborg(loc)) var/mob/living/silicon/robot/R = loc if(!R || !R.cell || !R.cell.use(hitcost)) return 0 diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index ba3361b4c4e..18b428f311d 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -10,6 +10,7 @@ throw_speed = 1 throw_range = 4 actions_types = list(/datum/action/item_action/set_internals) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 80, acid = 30) var/datum/gas_mixture/air_contents = null var/distribute_pressure = ONE_ATMOSPHERE var/integrity = 3 @@ -102,6 +103,15 @@ qdel(src) +/obj/item/weapon/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, 1, -3) + qdel(src) + /obj/item/weapon/tank/suicide_act(mob/user) var/mob/living/carbon/human/H = user user.visible_message("[user] is putting the [src]'s valve to their lips! I don't think they're gonna stop!") diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 86404905456..f199ba021ad 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -9,6 +9,10 @@ slot_flags = SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/toggle_mister) + obj_integrity = 200 + 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/weapon/noz var/on = 0 @@ -291,7 +295,7 @@ nanofrost_cooldown = 0 return if(nozzle_mode == METAL_FOAM) - if(!Adj|| !istype(target, /turf)) + if(!Adj|| !isturf(target)) return if(metal_synthesis_cooldown < 5) var/obj/effect/particle_effect/foam/metal/F = PoolOrNew(/obj/effect/particle_effect/foam/metal, get_turf(target)) @@ -415,7 +419,7 @@ loc << "[src] turns off." /obj/item/weapon/reagent_containers/chemtank/process() - if(!istype(loc,/mob/living/carbon/human)) + if(!ishuman(loc)) turn_off() return if(!reagents.total_volume) diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index b0b0e8ac781..6adf153cef0 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -51,7 +51,7 @@ Frequency: if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2. usr << "The [src] is malfunctioning." return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc))) usr.set_machine(src) if (href_list["refresh"]) src.temp = "Persistent Signal Locator
" @@ -134,12 +134,14 @@ 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, fire = 100, acid = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF var/active_portals = 0 /obj/item/weapon/hand_tele/attack_self(mob/user) var/turf/current_location = get_turf(user)//What turf is the user on? var/area/current_area = current_location.loc - if(!current_location||current_area.noteleport||current_location.z>=7 || !istype(user.loc, /turf))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf + if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf user << "\The [src] is malfunctioning." return var/list/L = list( ) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 8b3816cc3dd..7e0f3b1c966 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/weapon/wrench/suicide_act(mob/user) user.visible_message("[user] is beating \himself to death with the [src.name]! It looks like \he's trying to commit suicide.") @@ -103,6 +104,7 @@ attack_verb = list("stabbed") hitsound = 'sound/weapons/bladeslice.ogg' toolspeed = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) /obj/item/weapon/screwdriver/suicide_act(mob/user) user.visible_message(pick("[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.", \ @@ -161,6 +163,7 @@ attack_verb = list("pinched", "nipped") hitsound = 'sound/items/Wirecutter.ogg' toolspeed = 1 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) /obj/item/weapon/wirecutters/New(loc, var/param_color = null) ..() @@ -216,7 +219,8 @@ throw_speed = 3 throw_range = 5 w_class = 2 - + 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" @@ -552,6 +556,7 @@ obj/item/weapon/weldingtool/proc/switched_off(mob/user) 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/weapon/crowbar/suicide_act(mob/user) user.visible_message("[user] is beating \himself to death with the [src.name]! It looks like \he's trying to commit suicide.") diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index e597a00abca..ec802e17b6e 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -41,7 +41,7 @@ else //something wrong name = "[initial(name)]" update_icon() - if(isrobot(user)) + if(iscyborg(user)) user << "You free up your module." else if(istype(src, /obj/item/weapon/twohanded/required)) user << "You drop \the [name]." @@ -57,7 +57,7 @@ /obj/item/weapon/twohanded/proc/wield(mob/living/carbon/user) if(wielded) return - if(istype(user,/mob/living/carbon/monkey) ) + if(ismonkey(user)) user << "It's too heavy for you to wield fully." return if(user.get_inactive_held_item()) @@ -71,7 +71,7 @@ force = force_wielded name = "[name] (Wielded)" update_icon() - if(isrobot(user)) + if(iscyborg(user)) user << "You dedicate your module to [name]." else user << "You grab the [name] with both hands." @@ -118,6 +118,7 @@ icon_state = "offhand" w_class = 5 flags = ABSTRACT + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/item/weapon/twohanded/offhand/unwield() qdel(src) @@ -173,6 +174,10 @@ attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") hitsound = 'sound/weapons/bladeslice.ogg' sharpness = IS_SHARP + obj_integrity = 200 + 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/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" @@ -187,10 +192,10 @@ if(wielded) //destroys windows and grilles in one hit if(istype(A,/obj/structure/window)) var/obj/structure/window/W = A - W.shatter() + W.take_damage(400, BRUTE, "melee", 0) else if(istype(A,/obj/structure/grille)) var/obj/structure/grille/G = A - G.take_damage(16) + G.take_damage(40, BRUTE, "melee", 0) /* @@ -216,6 +221,10 @@ item_color = "green" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 75 + obj_integrity = 200 + 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 var/hacked = 0 /obj/item/weapon/twohanded/dualsaber/New() @@ -265,7 +274,7 @@ return ..() return 0 -/obj/item/weapon/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up +/obj/item/weapon/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up if(wielded) user << "You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!" return 1 @@ -350,6 +359,9 @@ hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") sharpness = IS_SHARP + obj_integrity = 200 + max_integrity = 200 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) var/obj/item/weapon/grenade/explosive = null var/war_cry = "AAAAARGH!!!" @@ -362,7 +374,7 @@ /obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity) if(!proximity) return - if(istype(AM, /turf/open)) //So you can actually melee with it + if(isopenturf(AM)) //So you can actually melee with it return if(explosive && wielded) user.say("[war_cry]") @@ -472,7 +484,7 @@ if(!proximity) return user.faction |= "greytide(\ref[user])" - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM if(istype (L, /mob/living/simple_animal/hostile/illusion)) return @@ -494,6 +506,10 @@ attack_verb = list("attacked", "impaled", "pierced") hitsound = 'sound/weapons/bladeslice.ogg' sharpness = IS_SHARP + obj_integrity = 200 + 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/weapon/twohanded/pitchfork/demonic name = "demonic pitchfork" @@ -523,7 +539,7 @@ return (BRUTELOSS) /obj/item/weapon/twohanded/pitchfork/demonic/pickup(mob/user) - if(istype(user, /mob/living)) + if(isliving(user)) var/mob/living/U = user if(U.mind && !U.mind.devilinfo && (U.mind.soulOwner == U.mind)) //Burn hands unless they are a devil or have sold their soul U.visible_message("As [U] picks [src] up, [U]'s arms briefly catch fire.", \ diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm index 29b76b0a746..eaf89e512e8 100644 --- a/code/game/objects/items/weapons/vending_items.dm +++ b/code/game/objects/items/weapons/vending_items.dm @@ -11,7 +11,7 @@ throw_speed = 1 throw_range = 7 w_class = 4 - + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30) var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products var/init_charges = list(0, 0, 0) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index f5b4175f753..f4b710244a9 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -34,6 +34,10 @@ throw_speed = 3 throw_range = 7 attack_verb = list("banned") + obj_integrity = 200 + 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/weapon/banhammer/suicide_act(mob/user) user.visible_message("[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.") @@ -74,6 +78,10 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 sharpness = IS_SHARP + obj_integrity = 200 + 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/weapon/claymore/suicide_act(mob/user) user.visible_message("[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.") @@ -88,7 +96,6 @@ var/highlander_claymores = 0 attack_verb = list("brutalized", "eviscerated", "disemboweled", "hacked", "carved", "cleaved") //ONLY THE MOST VISCERAL ATTACK VERBS var/notches = 0 //HOW MANY PEOPLE HAVE BEEN SLAIN WITH THIS BLADE var/announced = FALSE //IF WE ARE THE ONLY ONE LEFT STANDING - var/bloodthirst_level = 0 //HOW THIRSTY WE ARE FOR BLOOD var/obj/item/weapon/disk/nuclear/nuke_disk //OUR STORED NUKE DISK /obj/item/weapon/claymore/highlander/New() @@ -109,8 +116,6 @@ var/highlander_claymores = 0 if(isliving(loc)) var/mob/living/L = loc if(L.stat != DEAD) - if(!announced) - handle_bloodthirst(L) if(announced || admin_spawned || highlander_claymores > 1) return announced = TRUE @@ -126,8 +131,7 @@ var/highlander_claymores = 0 user.add_stun_absorption("highlander", INFINITY, 1, "is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!") /obj/item/weapon/claymore/highlander/dropped(mob/living/user) - user << "The power of Scotland fades away! You are no longer shielded from stuns." - user.add_stun_absorption("highlander", 0.1, 1, "is protected by the power of Scotland!", "The power of Scotland absorbs the stun!", " is protected by the power of Scotland!") + qdel(src) //If this ever happens, it's because you lost an arm /obj/item/weapon/claymore/highlander/examine(mob/user) ..() @@ -136,14 +140,9 @@ var/highlander_claymores = 0 user << "It's holding the nuke disk!" /obj/item/weapon/claymore/highlander/attack(mob/living/target, mob/living/user) - var/old_target_stat = target.stat . = ..() - bloodthirst_level = max(bloodthirst_level - (target.mind && target.mind.special_role == "highlander" ? 15 : 5), 0) - if(target && target.stat == DEAD && old_target_stat != DEAD && target.mind && target.mind.special_role == "highlander") + if(target && target.stat == DEAD && target.mind && target.mind.special_role == "highlander") user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES - if(bloodthirst_level >= 30) - user << "[src] shakes greedily as it devours [target]'s soul. Its bloodthirst is quenched for the moment..." - bloodthirst_level = 0 add_notch(user) target.visible_message("[target] crumbles to dust beneath [user]'s blows!", "As you fall, your body crumbles to dust!") target.dust() @@ -215,22 +214,6 @@ var/highlander_claymores = 0 name = new_name playsound(user, 'sound/items/Screwdriver2.ogg', 50, 1) -/obj/item/weapon/claymore/highlander/proc/handle_bloodthirst(mob/living/S) //THE BLADE THIRSTS FOR BLOOD AND WILL PUNISH THE WEAK OR PACIFISTIC - bloodthirst_level += (1 + min(notches, 10)) - if(bloodthirst_level == 30) - S << "[src] shudders in your hand. It hungers for battle..." - if(bloodthirst_level == 60) - S << "[src] trembles violently. Kill someone already!" - if(bloodthirst_level == 90) - S << "[src] starts shaking viciously! Shed blood or it'll give you away!" - if(bloodthirst_level >= 120) - var/turf/T = get_turf(S) - for(var/mob/M in player_list - S) - if(M.z == T.z) - M << "THERE IS A COWARD WHO DOES NOT FIGHT TO THE [uppertext(dir2text(get_dir(M, T)))]. THEIR NAME IS [uppertext(S.real_name)] - SLAUGHTER THEM." - S << "you fucked up" - bloodthirst_level = 100 - /obj/item/weapon/katana name = "katana" desc = "Woefully underpowered in D20" @@ -245,6 +228,10 @@ var/highlander_claymores = 0 attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 sharpness = IS_SHARP + obj_integrity = 200 + 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/weapon/katana/cursed slot_flags = null @@ -307,6 +294,7 @@ var/highlander_claymores = 0 embedded_fall_chance = 0 //Hahaha! sharpness = IS_SHARP materials = list(MAT_METAL=500, MAT_GLASS=500) + resistance_flags = FIRE_PROOF /obj/item/weapon/switchblade @@ -323,6 +311,7 @@ var/highlander_claymores = 0 origin_tech = "engineering=3;combat=2" hitsound = 'sound/weapons/Genhit.ogg' attack_verb = list("stubbed", "poked") + resistance_flags = FIRE_PROOF var/extended = 0 /obj/item/weapon/switchblade/attack_self(mob/user) @@ -393,14 +382,14 @@ var/highlander_claymores = 0 w_class = 2 armour_penetration = 100 attack_verb = list("bludgeoned", "whacked", "disciplined") - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/staff/broom name = "broom" desc = "Used for sweeping, and flying into the night while cackling. Black cat not included." icon = 'icons/obj/wizard.dmi' icon_state = "broom" - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/staff/stick name = "stick" diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm new file mode 100644 index 00000000000..b60057a63c6 --- /dev/null +++ b/code/game/objects/obj_defense.dm @@ -0,0 +1,236 @@ + +//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) + 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) + if(damage_amount >= 1) + . = damage_amount + obj_integrity = max(obj_integrity - damage_amount, 0) + if(obj_integrity <= 0) + obj_destruction(damage_flag) + else if(integrity_failure) + if(obj_integrity <= integrity_failure) + obj_break(damage_flag) + +//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) + switch(damage_type) + if(BRUTE) + if(BURN) + else + return 0 + var/armor_protection = 0 + if(damage_flag) + armor_protection = armor[damage_flag] + return round(damage_amount * (100 - armor_protection)*0.01, 0.1) + +//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) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) + +/obj/hitby(atom/movable/AM) + ..() + var/tforce = 0 + if(ismob(AM)) + tforce = 10 + else if(isobj(AM)) + var/obj/O = AM + tforce = O.throwforce + take_damage(tforce, BRUTE, "melee", 1, get_dir(src, AM)) + +/obj/ex_act(severity, target) + ..() //contents explosion + if(target == src) + qdel(src) + return + switch(severity) + if(1) + qdel(src) + if(2) + take_damage(rand(100, 250), BRUTE, "bomb", 0) + if(3) + take_damage(rand(10, 90), BRUTE, "bomb", 0) + +/obj/bullet_act(obj/item/projectile/P) + . = ..() + visible_message("[src] is hit by \a [P]!") + playsound(src, P.hitsound, 50, 1) + take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180)) + + +/obj/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + if(user.a_intent == "harm") + ..(user, 1) + visible_message("[user] smashes [src]!") + if(density) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) + else + playsound(src, 'sound/effects/bang.ogg', 50, 1) + take_damage(150, BRUTE, "melee", 0, get_dir(src, user)) + return 1 + return 0 + +/obj/blob_act(obj/structure/blob/B) + take_damage(400, BRUTE, "melee", 0, get_dir(src, B)) + +/obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime + user.do_attack_animation(src) + user.changeNext_move(CLICK_CD_MELEE) + user.visible_message("[user] smashes into [src]!") + take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user)) + +/obj/attack_alien(mob/living/carbon/alien/humanoid/user) + playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) + attack_generic(user, 60, BRUTE, "melee", 0) + +/obj/attack_animal(mob/living/simple_animal/M) + if(!M.melee_damage_upper && !M.obj_damage) + M.emote("[M.friendly] [src]") + return 0 + else + var/play_soundeffect = 1 + if(M.environment_smash) + play_soundeffect = 0 + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + if(M.obj_damage) + attack_generic(M, M.obj_damage, M.melee_damage_type, "melee", play_soundeffect) + else + attack_generic(M, rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", play_soundeffect) + return 1 + +/obj/attack_slime(mob/living/simple_animal/slime/user) + if(!user.is_adult) + return + attack_generic(user, rand(10, 15), "melee", 1) + +/obj/mech_melee_attack(obj/mecha/M) + M.do_attack_animation(src) + switch(damtype) + if(BRUTE) + playsound(src, 'sound/weapons/punch4.ogg', 50, 1) + if(BURN) + playsound(src, 'sound/items/Welder.ogg', 50, 1) + else + return 0 + visible_message("[M.name] has hit [src].") + return take_damage(M.force*3, M.damtype, "melee", 0, 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) + if(src && !qdeleted(src)) + qdel(src) + return 2 + + +///// ACID + +var/global/image/acid_overlay = image("icon" = 'icons/effects/effects.dmi', "icon_state" = "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(acid_overlay, 1) + 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() + . = 1 + if(!(resistance_flags & ACID_PROOF)) + for(var/armour_value in armor) + if(armour_value != "acid" && armour_value != "fire") + armor[armour_value] = max(armor[armour_value] - round(sqrt(acid_level)*0.1), 0) + if(prob(33)) + playsound(loc, 'sound/items/Welder.ogg', 150, 1) + 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 0 + +//called when the obj is destroyed by acid. +/obj/proc/acid_melt() + var/location = loc + SSacid.processing -= src + var/remaining_acid = acid_level + var/list/contained = contents + deconstruct(FALSE) + if(isturf(location)) + var/turf/T = location + for(var/obj/item/I in contained) + if(I.loc == T) //we acid the items that used to be inside src and ended up on the turf + I.acid_act(10, 0.1 * remaining_acid/T.contents.len) + + +//// FIRE + +/obj/fire_act(exposed_temperature, exposed_volume) + 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 |= ON_FIRE + SSfire_burning.processing[src] = src + add_overlay(fire_overlay) + return 1 + +//called when the obj is destroyed by fire +/obj/proc/burn() + var/location = loc + var/list/contained = contents + if(resistance_flags & ON_FIRE) + SSfire_burning.processing -= src + deconstruct(FALSE) + if(isturf(location)) + var/turf/T = location + for(var/obj/item/I in contained) + if(I.loc == T) //we burn the items that used to be inside src and ended up on the turf + I.fire_act() + +/obj/proc/extinguish() + if(resistance_flags & ON_FIRE) + resistance_flags &= ~ON_FIRE + overlays -= fire_overlay + SSfire_burning.processing -= src + + + +/obj/proc/tesla_act(var/power) + being_shocked = 1 + var/power_bounced = power / 2 + tesla_zap(src, 3, power_bounced) + addtimer(src, "reset_shocked", 10) + +/obj/proc/reset_shocked() + being_shocked = 0 + +//the obj is deconstructed into pieces, whether through careful disassembly or when destroyed. +/obj/proc/deconstruct(disassembled = TRUE) + 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. +/obj/proc/obj_destruction(damage_flag) + if(damage_flag == "acid") + acid_melt() + else if(damage_flag == "fire") + burn() + else + deconstruct(FALSE) \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index a8730411187..86164354dda 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -9,11 +9,15 @@ var/damtype = "brute" var/force = 0 - var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - var/resistance_flags = FIRE_PROOF // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF + var/list/armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + var/obj_integrity = 500 + var/max_integrity = 500 + var/integrity_failure = 0 //0 if we have no special broken behavior + + var/resistance_flags = 0 // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF + + var/acid_level = 0 //how much acid is on that obj - 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/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart? @@ -21,6 +25,8 @@ var/persistence_replacement = null //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset. var/is_frozen = FALSE + + /obj/New() ..() @@ -82,7 +88,7 @@ if ((M.client && M.machine == src)) is_in_use = 1 src.attack_hand(M) - if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot) || IsAdminGhost(usr)) + if(isAI(usr) || iscyborg(usr) || IsAdminGhost(usr)) if (!(usr in nearby)) if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. is_in_use = 1 @@ -146,22 +152,9 @@ if(istype(M) && M.client && M.machine == src) src.attack_self(M) - -/obj/proc/alter_health() - return 1 - /obj/proc/hide(h) return -/obj/ex_act(severity, target) - if(severity == 1 || target == src) - qdel(src) - else if(severity == 2) - if(prob(50)) - qdel(src) - if(!qdeleted(src)) - ..() - //If a mob logouts/logins in side of an object you can use this proc /obj/proc/on_log() ..() @@ -169,19 +162,11 @@ var/obj/Loc=loc Loc.on_log() -/obj/singularity_act() - ex_act(1) - if(src && !qdeleted(src)) - qdel(src) - return 2 /obj/singularity_pull(S, current_size) if(!anchored || current_size >= STAGE_FIVE) step_towards(src,S) -/obj/proc/Deconstruct() - qdel(src) - /obj/get_spans() return ..() | SPAN_ROBOT @@ -189,43 +174,6 @@ var/turf/T = get_turf(src) return T.storage_contents_dump_act(src_object, user) -/obj/fire_act(global_overlay=1) - if(!(resistance_flags & (FIRE_PROOF|ON_FIRE))) - resistance_flags |= ON_FIRE - SSobj.burning += src - burn_world_time = world.time + burntime*rand(10,20) - if(global_overlay) - add_overlay(fire_overlay) - return 1 - -/obj/proc/burn() - empty_object_contents(1, src.loc) - var/obj/effect/decal/cleanable/ash/A = new(src.loc) - A.desc = "Looks like this used to be a [name] some time ago." - SSobj.burning -= src - qdel(src) - -/obj/proc/extinguish() - if(resistance_flags & ON_FIRE) - resistance_flags &= ~ON_FIRE - overlays -= fire_overlay - SSobj.burning -= src - -/obj/proc/empty_object_contents(burn = 0, new_loc = src.loc) - for(var/obj/item/Item in contents) //Empty out the contents - Item.loc = new_loc - if(burn) - Item.fire_act() //Set them on fire, too - -/obj/proc/tesla_act(power, explosive = FALSE) - being_shocked = 1 - var/power_bounced = power / 2 - tesla_zap(src, 3, power_bounced, explosive) - addtimer(src, "reset_shocked", 10) - -/obj/proc/reset_shocked() - being_shocked = 0 - /obj/proc/CanAStarPass() . = !density diff --git a/code/game/objects/radiation.dm b/code/game/objects/radiation.dm index 0dfa2b1b907..3d7739c4e21 100644 --- a/code/game/objects/radiation.dm +++ b/code/game/objects/radiation.dm @@ -1,7 +1,7 @@ /proc/radiation_pulse(turf/epicenter, heavy_range, light_range, severity, log=0) if(!epicenter || !severity) return - if(!istype(epicenter, /turf)) + if(!isturf(epicenter)) epicenter = get_turf(epicenter.loc) if(heavy_range > light_range) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 9d446d885a5..2cf309254a0 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,10 +1,14 @@ /obj/structure icon = 'icons/obj/structures.dmi' pressure_resistance = 8 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) + obj_integrity = 300 + max_integrity = 300 var/climb_time = 20 var/climb_stun = 2 var/climbable = FALSE var/mob/structureclimber + var/broken = 0 //similar to machinery's stat BROKEN /obj/structure/New() ..() @@ -15,10 +19,6 @@ if(ticker) cameranet.updateVisibility(src) -/obj/structure/blob_act(obj/structure/blob/B) - if(density && prob(50)) - qdel(src) - /obj/structure/Destroy() if(ticker) cameranet.updateVisibility(src) @@ -28,13 +28,6 @@ queue_smooth_neighbors(src) return ..() -/obj/structure/mech_melee_attack(obj/mecha/M) - M.do_attack_animation(src) - if(M.damtype == BRUTE || M.damtype == BURN) - visible_message("[M.name] has hit [src].") - return 1 - return 0 - /obj/structure/attack_hand(mob/user) . = ..() add_fingerprint(user) @@ -52,10 +45,6 @@ ..() add_fingerprint(usr) -/obj/structure/proc/deconstruct(forced = FALSE) - qdel(src) - - /obj/structure/MouseDrop_T(atom/movable/O, mob/user) . = ..() if(!climbable) @@ -66,7 +55,7 @@ return if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O)) return - if(isrobot(user)) + if(iscyborg(user)) return if(!user.drop_item()) return @@ -81,7 +70,7 @@ var/adjusted_climb_time = climb_time if(user.restrained()) //climbing takes twice as long when restrained. adjusted_climb_time *= 2 - if(istype(user, /mob/living/carbon/alien)) + if(isalien(user)) adjusted_climb_time *= 0.25 //aliens are terrifyingly fast structureclimber = user if(do_mob(user, user, adjusted_climb_time)) @@ -97,3 +86,21 @@ user << "You fail to climb onto [src]." density = 1 structureclimber = null + +/obj/structure/examine(mob/user) + ..() + if(!(resistance_flags & INDESTRUCTIBLE)) + if(resistance_flags & ON_FIRE) + user << "It's on fire!" + var/healthpercent = (obj_integrity/max_integrity) * 100 + if(broken) + user << "It looks broken." + switch(healthpercent) + if(100 to INFINITY) + user << "It seems pristine and undamaged." + if(50 to 100) + user << "It looks slightly damaged." + if(25 to 50) + user << "It appears heavily damaged." + if(0 to 25) + user << "It's falling apart!" \ No newline at end of file diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm index e1bcccebac1..79be989d0d6 100644 --- a/code/game/objects/structures/ai_core.dm +++ b/code/game/objects/structures/ai_core.dm @@ -4,6 +4,8 @@ name = "\improper AI core" icon = 'icons/mob/AI.dmi' icon_state = "0" + obj_integrity = 500 + max_integrity = 500 var/state = 0 var/datum/ai_laws/laws = new() var/obj/item/weapon/circuitboard/circuit = null @@ -13,6 +15,15 @@ ..() laws.set_laws_config() +/obj/structure/AIcore/Destroy() + if(circuit) + qdel(circuit) + circuit = null + if(brain) + brain.forceMove(loc) + brain = null + return ..() + /obj/structure/AIcore/attackby(obj/item/P, mob/user, params) switch(state) if(0) @@ -99,8 +110,7 @@ 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 + new /obj/item/stack/cable_coil(loc, 5) return if(istype(P, /obj/item/stack/sheet/rglass)) @@ -166,7 +176,7 @@ if(istype(P, /obj/item/weapon/crowbar) && brain) playsound(loc, 'sound/items/Crowbar.ogg', 50, 1) user << "You remove the brain." - brain.loc = loc + brain.forceMove(loc) brain = null icon_state = "3" return @@ -192,6 +202,18 @@ return return ..() + +/obj/structure/AIcore/deconstruct(disassembled = TRUE) + if(state == 4) + new /obj/item/stack/sheet/rglass(loc, 2) + if(state >= 3) + 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' diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 7d6e95810be..27167d31012 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -9,40 +9,28 @@ /obj/structure/alien icon = 'icons/mob/alien.dmi' - var/health = 100 + obj_integrity = 100 + max_integrity = 100 -/obj/structure/alien/attacked_by(obj/item/I, mob/user) - ..() - var/damage = I.force - switch(I.damtype) - if(BRUTE) - damage *= 0.25 - if(BURN) - damage *= 2 - else - damage = 0 //stamina damage does no damage - take_damage(damage, I.damtype) +/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee") + switch(damage_type) + if(BRUTE) + damage_amount *= 0.25 + if(BURN) + damage_amount *= 2 + . = ..() -/obj/structure/alien/proc/take_damage(amount, damage_type = BRUTE, sound_effect = 1) +/obj/structure/alien/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) + if(damage_amount) playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) if(BURN) - if(sound_effect) + if(damage_amount) playsound(loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health = max(health - amount, 0) - if(!health) - Break() - -/obj/structure/alien/proc/Break() - qdel(src) - -/obj/structure/alien/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type) /* * Generic alien stuff, not related to the purple lizards but still alien-like @@ -54,8 +42,9 @@ icon = 'icons/obj/fluff.dmi' icon_state = "gelmound" -/obj/structure/alien/gelpod/Break() - new/obj/effect/mob_spawn/human/corpse/damaged(get_turf(src)) +/obj/structure/alien/gelpod/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new/obj/effect/mob_spawn/human/corpse/damaged(get_turf(src)) qdel(src) /* @@ -70,7 +59,8 @@ opacity = 1 anchored = 1 canSmoothWith = list(/obj/structure/alien/resin) - health = 200 + obj_integrity = 200 + max_integrity = 200 smooth = SMOOTH_TRUE var/resintype = null @@ -106,37 +96,11 @@ icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi' icon_state = "membrane0" opacity = 0 - health = 160 + obj_integrity = 160 + max_integrity = 160 resintype = "membrane" canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane) -/obj/structure/alien/resin/ex_act(severity, target) - switch(severity) - if(1) - take_damage(150, BRUTE, 0) - if(2) - take_damage(100, BRUTE, 0) - if(3) - take_damage(50, BRUTE, 0) - -/obj/structure/alien/blob_act(obj/structure/blob/B) - take_damage(50, BRUTE, 0) - -/obj/structure/alien/resin/hitby(atom/movable/AM) - ..() - var/tforce = 0 - if(!isobj(AM)) - tforce = 10 - else - var/obj/O = AM - tforce = O.throwforce - take_damage(tforce) - -/obj/structure/alien/resin/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - user.visible_message("[user] destroys [src]!") - take_damage(200) - /obj/structure/alien/resin/attack_paw(mob/user) return attack_hand(user) @@ -147,17 +111,6 @@ user.visible_message("[user] claws at the resin!") take_damage(50) -/obj/structure/alien/resin/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - if(!M.melee_damage_upper && !M.obj_damage) - return - visible_message("[M] [M.attacktext] [src]!") - if(M.obj_damage) - take_damage(M.obj_damage, M.melee_damage_type) - else - take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type) - /obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0) return !density @@ -176,7 +129,8 @@ density = 0 layer = TURF_LAYER icon_state = "weeds" - health = 15 + obj_integrity = 15 + max_integrity = 15 var/obj/structure/alien/weeds/node/linked_node = null canSmoothWith = list(/obj/structure/alien/weeds, /turf/closed/wall) smooth = SMOOTH_MORE @@ -195,7 +149,7 @@ if(3) icon = 'icons/obj/smooth_structures/alien/weeds3.dmi' linked_node = node - if(istype(loc, /turf/open/space)) + if(isspaceturf(loc)) qdel(src) return addtimer(src, "Life", rand(150, 200)) @@ -208,7 +162,7 @@ set background = BACKGROUND_ENABLED var/turf/U = get_turf(src) - if(istype(U, /turf/open/space)) + if(isspaceturf(U)) qdel(src) return @@ -217,7 +171,7 @@ for(var/turf/T in U.GetAtmosAdjacentTurfs()) - if (locate(/obj/structure/alien/weeds) in T || istype(T, /turf/open/space)) + if (locate(/obj/structure/alien/weeds) in T || isspaceturf(T)) continue new /obj/structure/alien/weeds(T, linked_node) @@ -229,7 +183,7 @@ /obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > 300) - take_damage(5, BURN, 0) + take_damage(5, BURN, 0, 0) //Weed nodes @@ -266,7 +220,8 @@ icon_state = "egg_growing" density = 0 anchored = 1 - health = 100 + obj_integrity = 100 + max_integrity = 100 var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive layer = MOB_LAYER @@ -334,16 +289,18 @@ remove_from_proximity_list(src, 1) ..() -/obj/structure/alien/egg/Break() - if(status != BURST && status != BURSTING) - Burst() - else if(status == BURST) - qdel(src) //Remove the egg after it has been hit after bursting. - +/obj/structure/alien/egg/deconstruct() + if(!(flags & NODECONSTRUCT)) + if(status != BURST && status != BURSTING) + Burst() + else if(status == BURST) + qdel(src) //Remove the egg after it has been hit after bursting. + else + qdel(src) /obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > 500) - take_damage(5, BURN, 0) + take_damage(5, BURN, 0, 0) /obj/structure/alien/egg/HasProximity(atom/movable/AM) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 53351dab39e..07e16b77988 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -9,8 +9,9 @@ icon = 'icons/obj/artstuff.dmi' icon_state = "easel" density = 1 - resistance_flags = 0 - burntime = 15 + resistance_flags = FLAMMABLE + obj_integrity = 60 + max_integrity = 60 var/obj/item/weapon/canvas/painting = null @@ -51,7 +52,7 @@ var/global/list/globalBlankCanvases[AMT_OF_CANVASES] desc = "draw out your soul on this canvas!" icon = 'icons/obj/artstuff.dmi' icon_state = "11x11" - resistance_flags = 0 + resistance_flags = FLAMMABLE var/whichGlobalBackup = 1 //List index /obj/item/weapon/canvas/nineteenXnineteen diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 0a0e00016bc..1a80c9b782a 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -4,9 +4,12 @@ icon = 'icons/obj/barsigns.dmi' icon_state = "empty" req_access = list(access_bar) + obj_integrity = 500 + 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/broken = 0 var/emagged = 0 var/state = 0 var/prev_sign = "" @@ -43,6 +46,22 @@ +/obj/structure/sign/barsign/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + broken = 1 + +/obj/structure/sign/barsign/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 2) + new /obj/item/stack/cable_coil (loc, 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, 1) + if(BURN) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) + /obj/structure/sign/barsign/attack_ai(mob/user) return src.attack_hand(user) diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm index 645551d494d..351ab2e2539 100644 --- a/code/game/objects/structures/beds_chairs/alien_nest.dm +++ b/code/game/objects/structures/beds_chairs/alien_nest.dm @@ -5,7 +5,8 @@ desc = "It's a gruesome pile of thick, sticky resin shaped like a nest." icon = 'icons/obj/smooth_structures/alien/nest.dmi' icon_state = "nest" - var/health = 100 + obj_integrity = 120 + max_integrity = 120 smooth = SMOOTH_TRUE can_be_unanchored = 0 canSmoothWith = null @@ -81,22 +82,10 @@ M.layer = initial(M.layer) overlays -= nest_overlay -/obj/structure/bed/nest/attacked_by(obj/item/I, mob/user) - ..() - take_damage(I.force, I.damtype) - -/obj/structure/bed/nest/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health -= damage - if(health <=0) - density = 0 - qdel(src) + playsound(loc, 'sound/items/Welder.ogg', 100, 1) diff --git a/code/game/objects/structures/beds_chairs/bed.dm b/code/game/objects/structures/beds_chairs/bed.dm index e77f9a7845e..b5110331b10 100644 --- a/code/game/objects/structures/beds_chairs/bed.dm +++ b/code/game/objects/structures/beds_chairs/bed.dm @@ -15,41 +15,26 @@ anchored = 1 can_buckle = 1 buckle_lying = 1 - resistance_flags = 0 - burntime = 30 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 + integrity_failure = 30 var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 2 -/obj/structure/bed/deconstruct() - if(buildstacktype) - new buildstacktype(loc,buildstackamount) +/obj/structure/bed/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(buildstacktype) + new buildstacktype(loc,buildstackamount) ..() /obj/structure/bed/attack_paw(mob/user) return attack_hand(user) -/obj/structure/bed/attack_animal(mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever - if(M.environment_smash) - deconstruct() - -/obj/structure/bed/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - return - if(2) - if(prob(70)) - deconstruct() - return - if(3) - if(prob(50)) - deconstruct() - return - /obj/structure/bed/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - deconstruct() + deconstruct(TRUE) else return ..() @@ -61,7 +46,7 @@ icon = 'icons/obj/rollerbed.dmi' icon_state = "down" anchored = 0 - resistance_flags = FIRE_PROOF + resistance_flags = 0 var/foldabletype = /obj/item/roller /obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location) diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index 65e2d09eac2..6494225fedc 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -6,7 +6,10 @@ anchored = 1 can_buckle = 1 buckle_lying = 0 //you sit in a chair, not lay - resistance_flags = FIRE_PROOF + resistance_flags = 0 + obj_integrity = 250 + max_integrity = 250 + integrity_failure = 25 var/buildstacktype = /obj/item/stack/sheet/metal var/buildstackamount = 1 var/item_chair = /obj/item/chair // if null it can't be picked up @@ -24,21 +27,6 @@ /obj/structure/chair/attack_paw(mob/user) return attack_hand(user) -/obj/structure/chair/attack_animal(mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever - if(M.environment_smash) - deconstruct() - -/obj/structure/chair/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(70)) - deconstruct() - if(3) - if(prob(50)) - deconstruct() - /obj/structure/chair/narsie_act() if(prob(20)) var/obj/structure/chair/wood/W = new/obj/structure/chair/wood(get_turf(src)) @@ -118,8 +106,9 @@ icon_state = "wooden_chair" name = "wooden chair" desc = "Old is never too old to not be in fashion." - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 buildstacktype = /obj/item/stack/sheet/mineral/wood buildstackamount = 3 item_chair = /obj/item/chair/wood @@ -139,8 +128,9 @@ desc = "It looks comfy.\nAlt-click to rotate it clockwise." icon_state = "comfychair" color = rgb(255,255,255) - resistance_flags = 0 - burntime = 30 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 buildstackamount = 2 var/image/armrest = null item_chair = null @@ -308,8 +298,9 @@ name = "wooden chair" icon_state = "wooden_chair_toppled" item_state = "woodenchair" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 hitsound = 'sound/weapons/genhit1.ogg' origin_type = /obj/structure/chair/wood break_chance = 50 diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 9bbe254094f..74687887a76 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -17,7 +17,7 @@ LINEN BINS throw_range = 2 w_class = 1 item_color = "white" - resistance_flags = 0 + resistance_flags = FLAMMABLE dog_fashion = /datum/dog_fashion/head/ghost @@ -205,8 +205,9 @@ LINEN BINS icon = 'icons/obj/structures.dmi' icon_state = "linenbin-full" anchored = 1 - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 var/amount = 10 var/list/sheets = list() var/obj/item/hidden = null @@ -231,17 +232,12 @@ LINEN BINS else icon_state = "linenbin-full" -/obj/structure/bedsheetbin/fire_act() - if(!amount) - return +/obj/structure/bedsheetbin/fire_act(exposed_temperature, exposed_volume) + if(amount) + amount = 0 + update_icon() ..() -/obj/structure/bedsheetbin/burn() - amount = 0 - extinguish() - update_icon() - return - /obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/bedsheet)) if(!user.drop_item()) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 72889a0a672..4218415f381 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -10,10 +10,12 @@ var/opened = FALSE var/welded = FALSE var/locked = FALSE - var/broken = FALSE var/large = TRUE var/wall_mounted = 0 //never solid (You can always pass over it) - var/health = 100 + obj_integrity = 200 + 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/breakout_time = 2 var/lastbang var/can_weld_shut = TRUE @@ -74,9 +76,6 @@ else if(secure && !opened) user << "Alt-click to [locked ? "unlock" : "lock"]." -/obj/structure/closet/alter_health() - return get_turf(src) - /obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0) if(height == 0 || wall_mounted) return 1 @@ -188,25 +187,14 @@ else return open(user) -/obj/structure/closet/ex_act(severity, target) - contents_explosion(severity, target) - if(loc && ispath(material_drop) && !(flags & NODECONSTRUCT)) +/obj/structure/closet/deconstruct(disassembled = TRUE) + if(ispath(material_drop) && !(flags & NODECONSTRUCT)) new material_drop(loc) qdel(src) - ..() -/obj/structure/closet/bullet_act(obj/item/projectile/P) - ..() - if(P.damage_type == BRUTE || P.damage_type == BURN) - health -= P.damage - if(health <= 0) - 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].") - qdel(src) +/obj/structure/closet/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + bust_open() /obj/structure/closet/attackby(obj/item/weapon/W, mob/user, params) if(user in src) @@ -226,9 +214,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) - qdel(src) + deconstruct(TRUE) return 0 else if(user.drop_item()) W.forceMove(loc) @@ -367,16 +353,19 @@ if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) ) return //we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting - welded = 0 //applies to all lockers lockers - locked = 0 //applies to critter crates and secure lockers only - broken = 1 //applies to secure lockers only user.visible_message("[user] successfully broke out of [src]!", "You successfully break out of [src]!") - open() + bust_open() else if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded. user << "You fail to break out of [src]!" +/obj/structure/closet/proc/bust_open() + welded = 0 //applies to all lockers lockers + locked = 0 //applies to critter crates and secure lockers only + broken = 1 //applies to secure lockers only + open() + /obj/structure/closet/AltClick(mob/user) ..() if(!user.canUseTopic(src, be_close=TRUE)) diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 80f9282f457..f0f690d843c 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -2,10 +2,10 @@ name = "large cardboard box" desc = "Just a box..." icon_state = "cardboard" - health = 10 mob_storage_capacity = 1 - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 can_weld_shut = 0 cutting_tool = /obj/item/weapon/wirecutters open_sound = 'sound/effects/rustle2.ogg' @@ -59,9 +59,9 @@ name = "large metal box" desc = "THE COWARDS! THE FOOLS!" icon_state = "metalbox" - health = 500 + obj_integrity = 500 mob_storage_capacity = 5 - resistance_flags = FIRE_PROOF + resistance_flags = 0 move_speed_multiplier = 2 cutting_tool = /obj/item/weapon/weldingtool open_sound = 'sound/machines/click.ogg' diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm index 3d9a7a36790..72a4c988a4c 100644 --- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm +++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm @@ -2,8 +2,9 @@ name = "cabinet" desc = "Old will forever be in fashion." icon_state = "cabinet" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 /obj/structure/closet/acloset name = "strange closet" diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index 2968ff7414e..47c168cd1ec 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -93,6 +93,8 @@ new /obj/item/clothing/suit/toggle/lawyer/black(src) new /obj/item/clothing/shoes/laceup(src) new /obj/item/clothing/shoes/laceup(src) + new /obj/item/clothing/tie/lawyers_badge(src) + new /obj/item/clothing/tie/lawyers_badge(src) /obj/structure/closet/wardrobe/chaplain_black name = "chapel wardrobe" @@ -119,8 +121,9 @@ name = "coffin" desc = "It's a burial receptacle for the dearly departed." icon_state = "coffin" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 /obj/structure/closet/wardrobe/red name = "security wardrobe" 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 59a88859d99..ec8952b8524 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm @@ -2,8 +2,9 @@ name = "booze storage" req_access = list(access_bar) icon_state = "cabinet" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 /obj/structure/closet/secure_closet/bar/New() ..() 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 22773137de4..6625bc6a2ee 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -25,8 +25,9 @@ /obj/structure/closet/secure_closet/personal/cabinet icon_state = "cabinet" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 /obj/structure/closet/secure_closet/personal/cabinet/New() ..() 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 6b16c70b7ba..b1c1e889a50 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 @@ -3,5 +3,12 @@ desc = "It's a card-locked storage unit." locked = 1 icon_state = "secure" - health = 200 + obj_integrity = 250 + max_integrity = 250 + armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80) secure = 1 + +/obj/structure/closet/secure_closet/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 20) + return 0 + . = ..() \ No newline at end of file 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 785aeaacdc3..8b1219c0f44 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -157,8 +157,9 @@ name = "\proper detective's cabinet" req_access = list(access_forensics_lockers) icon_state = "cabinet" - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + 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 a28c8b3ebfd..850e07b9e93 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -5,7 +5,8 @@ icon_state = "human_male" density = 1 anchored = 1 - health = 0 //destroying the statue kills the mob within + obj_integrity = 200 + max_integrity = 200 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 @@ -23,7 +24,8 @@ L.faction += "mimic" //Stops mimics from instaqdeling people in statues L.visible_message("[L]'s skin rapidly turns to marble!", "Your body freezes up! Can't... move... can't... think...") - health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues + obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues + max_integrity = obj_integrity intialTox = L.getToxLoss() intialFire = L.getFireLoss() intialBrute = L.getBruteLoss() @@ -42,7 +44,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(obj_integrity == 0) //meaning if the statue didn't find a valid target qdel(src) return @@ -84,9 +86,9 @@ O.loc = src.loc for(var/mob/living/M in src) - M.loc = src.loc + 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)) //any new damage the statue incurred is transfered to the mob M.faction -= "mimic" M.reset_perspective(null) @@ -111,25 +113,6 @@ /obj/structure/closet/statue/toggle() return -/obj/structure/closet/statue/bullet_act(obj/item/projectile/Proj) - health -= Proj.damage - if(health <= 0) - shatter() - -/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user) - if(user.environment_smash) - shatter() - -/obj/structure/closet/statue/blob_act(obj/structure/blob/B) - shatter() - -/obj/structure/closet/statue/attacked_by(obj/item/I, mob/living/user) - if(I.damtype != STAMINA) - health -= I.force - visible_message("[user] strikes [src] with [I].") - if(health <= 0) - shatter() - /obj/structure/closet/statue/MouseDrop_T() return @@ -145,9 +128,10 @@ /obj/structure/closet/statue/update_icon() return -/obj/structure/closet/statue/proc/shatter() - for(var/mob/living/M in src) - M.dust() +/obj/structure/closet/statue/deconstruct(disassembled = TRUE) + if(!disassembled) + for(var/mob/living/M in src) + M.dust() dump_contents() visible_message("[src] shatters!.") qdel(src) diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index 3b809f74f9f..bac428d5d1f 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -4,7 +4,14 @@ icon_state = "securecrate" secure = 1 locked = 1 - health = 1000 + obj_integrity = 500 + max_integrity = 500 + armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80) + +/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 25) + return 0 + . = ..() /obj/structure/closet/crate/secure/update_icon() ..() diff --git a/code/game/objects/structures/destructible_structures.dm b/code/game/objects/structures/destructible_structures.dm index 688715f5202..d002991c576 100644 --- a/code/game/objects/structures/destructible_structures.dm +++ b/code/game/objects/structures/destructible_structures.dm @@ -1,89 +1,17 @@ /obj/structure/destructible //a base for destructible structures - var/max_health = 100 - var/health = 100 - var/takes_damage = TRUE //If the structure can be damaged + max_integrity = 100 + obj_integrity = 100 var/break_message = "The strange, admin-y structure breaks!" //The message shown when a structure breaks var/break_sound = 'sound/magic/clockwork/invoke_general.ogg' //The sound played when a structure breaks var/list/debris = null //Parts left behind when a structure breaks, takes the form of list(path = amount_to_spawn) -/obj/structure/destructible/proc/take_damage(amount, damage_type) - var/static/list/physical_damage_types = list(BRUTE = TRUE, BURN = TRUE) - if(!takes_damage || !amount || !damage_type || !physical_damage_types[damage_type]) - return 0 - health = max(0, health - amount) - if(!health) - destroyed() - return amount - -/obj/structure/destructible/proc/destroyed() - if(!takes_damage) - return 0 - if(islist(debris)) - for(var/I in debris) - for(var/i in 1 to debris[I]) - new I (get_turf(src)) +/obj/structure/destructible/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(islist(debris)) + for(var/I in debris) + for(var/i in 1 to debris[I]) + new I (get_turf(src)) visible_message(break_message) playsound(src, break_sound, 50, 1) qdel(src) return 1 - -/obj/structure/destructible/burn() - SSobj.burning -= src - if(takes_damage) - playsound(src, 'sound/items/Welder.ogg', 100, 1) - visible_message("[src] is warped by the heat!") - take_damage(rand(50, 100), BURN) - -/obj/structure/destructible/ex_act(severity) - var/damage = 0 - switch(severity) - if(1) - damage = max_health //100% max health lost - if(2) - damage = max_health * (0.01 * rand(50, 70)) //50-70% max health lost - if(3) - damage = max_health * (0.01 * rand(10, 30)) //10-30% max health lost - if(damage) - take_damage(damage, BRUTE) - -/obj/structure/destructible/bullet_act(obj/item/projectile/P) - . = ..() - visible_message("[src] is hit by \a [P]!") - playsound(src, P.hitsound, 50, 1) - take_damage(P.damage, P.damage_type) - -/obj/structure/destructible/proc/attack_generic(mob/user, damage = 0, damage_type = BRUTE) //used by attack_alien, attack_animal, and attack_slime - user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user] smashes into [src]!") - take_damage(damage, damage_type) - -/obj/structure/destructible/attack_alien(mob/living/user) - playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1) - attack_generic(user, 15) - -/obj/structure/destructible/attack_animal(mob/living/simple_animal/M) - if(!M.melee_damage_upper && !M.obj_damage) - return - playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) - if(M.obj_damage) - attack_generic(M, M.obj_damage, M.melee_damage_type) - else - attack_generic(M, M.melee_damage_upper, M.melee_damage_type) - -/obj/structure/destructible/attack_slime(mob/living/simple_animal/slime/user) - if(!user.is_adult) - return - playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) - attack_generic(user, rand(10, 15)) - -/obj/structure/destructible/attacked_by(obj/item/I, mob/living/user) - . = ..() - var/turf/T = get_turf(src) - if(take_damage(I.force, I.damtype)) - playsound(T, I.hitsound, 50, 1) - -/obj/structure/destructible/mech_melee_attack(obj/mecha/M) - if(..()) - playsound(src, 'sound/weapons/punch4.ogg', 50, 1) - take_damage(M.force, M.damtype) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 0194e0d9f40..6d974be8c2e 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -5,9 +5,11 @@ desc = "A display case for prized possessions." density = 1 anchored = 1 - resistance_flags = FIRE_PROOF | ACID_PROOF - var/health = 30 - var/destroyed = 0 + resistance_flags = ACID_PROOF + armor = list(melee = 30, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 100) + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 50 var/obj/item/showpiece = null var/alert = 0 var/open = 0 @@ -20,17 +22,6 @@ showpiece = new start_showpiece_type (src) update_icon() -/obj/structure/displaycase/ex_act(severity, target) - switch(severity) - if (1) - new /obj/item/weapon/shard( src.loc ) - dump() - qdel(src) - if (2) - take_damage(rand(10,20), BRUTE, 0) - if (3) - take_damage(5, BRUTE, 0) - /obj/structure/displaycase/examine(mob/user) ..() if(showpiece) @@ -39,48 +30,45 @@ user << "Hooked up with an anti-theft system." -/obj/structure/displaycase/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - /obj/structure/displaycase/proc/dump() if (showpiece) showpiece.loc = src.loc showpiece = null -/obj/structure/displaycase/blob_act(obj/structure/blob/B) - take_damage(30) - -/obj/structure/displaycase/hitby(atom/movable/AM) - ..() - if(isobj(AM)) - var/obj/item/I = AM - take_damage(I.throwforce * 0.2) - -/obj/structure/displaycase/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) + playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health = max( health - damage, 0) - if(!health && !destroyed) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) + +/obj/structure/displaycase/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + dump() + if(!disassembled) + new /obj/item/weapon/shard( src.loc ) + trigger_alarm() + qdel(src) + +/obj/structure/displaycase/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) density = 0 - destroyed = 1 + broken = 1 new /obj/item/weapon/shard( src.loc ) playsound(src, "shatter", 70, 1) update_icon() + trigger_alarm() - //Activate Anti-theft - if(alert) - var/area/alarmed = get_area(src) - alarmed.burglaralert(src) - playsound(src, "sound/effects/alert.ogg", 50, 1) +/obj/structure/displaycase/proc/trigger_alarm() + //Activate Anti-theft + if(alert) + var/area/alarmed = get_area(src) + alarmed.burglaralert(src) + playsound(src, "sound/effects/alert.ogg", 50, 1) +/* + +*/ /obj/structure/displaycase/proc/is_directional(atom/A) try @@ -88,6 +76,7 @@ catch return 0 return 1 + /obj/structure/displaycase/proc/get_flat_icon_directional(atom/A) //Get flatIcon even if dir is mismatched for directionless icons //SLOW @@ -107,7 +96,7 @@ I = icon('icons/obj/stationobjs.dmi',"glassbox_open") else I = icon('icons/obj/stationobjs.dmi',"glassbox0") - if(destroyed) + if(broken) I = icon('icons/obj/stationobjs.dmi',"glassboxb0") if(showpiece) var/icon/S = get_flat_icon_directional(showpiece) @@ -117,7 +106,7 @@ return /obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params) - if(W.GetID() && electronics && !destroyed) + if(W.GetID() && electronics && !broken) if(allowed(user)) user << "You [open ? "close":"open"] the [src]" open = !open @@ -125,7 +114,7 @@ else user << "Access denied." else if(!alert && istype(W,/obj/item/weapon/crowbar)) - if(destroyed) + if(broken) if(showpiece) user << "Remove the displayed object first." else @@ -143,49 +132,26 @@ showpiece = W user << "You put [W] on display" update_icon() - else if(istype(W, /obj/item/stack/sheet/glass) && destroyed) + else if(istype(W, /obj/item/stack/sheet/glass) && broken) var/obj/item/stack/sheet/glass/G = W if(G.get_amount() < 2) user << "You need two glass sheets to fix the case!" return - user << "You start fixing the [src]..." + user << "You start fixing [src]..." if(do_after(user, 20, target = src)) G.use(2) - destroyed = 0 - health = initial(health) + broken = 0 + obj_integrity = max_integrity update_icon() else return ..() -/obj/structure/displaycase/attacked_by(obj/item/weapon/W, mob/living/user) - ..() - take_damage(W.force, W.damtype) - /obj/structure/displaycase/attack_paw(mob/user) return src.attack_hand(user) -/obj/structure/displaycase/attack_alien(mob/living/carbon/alien/humanoid/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - visible_message("\The [user] slashes at [src]!") - playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1) - take_damage(20, BRUTE, 0) - -/obj/structure/displaycase/attack_animal(mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) - M.do_attack_animation(src) - if(M.melee_damage_upper || M.obj_damage) - M.visible_message("[M.name] smashes against \the [src.name].",\ - "You smash against the [src.name].") - if(M.obj_damage) - take_damage(M.obj_damage, M.melee_damage_type, 1) - else - take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, 1) - - /obj/structure/displaycase/attack_hand(mob/user) user.changeNext_move(CLICK_CD_MELEE) - if (showpiece && (destroyed || open)) + if (showpiece && (broken || open)) dump() user << "You deactivate the hover field built into the case." src.add_fingerprint(user) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 2941bf9c3c5..bf2a6435626 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -5,6 +5,8 @@ var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi' anchored = 0 density = 1 + obj_integrity = 200 + max_integrity = 200 var/state = 0 var/mineral = null var/typetext = "" @@ -495,18 +497,7 @@ if( !WT.isOn() ) return user << "You disassemble the airlock assembly." - new /obj/item/stack/sheet/metal(get_turf(src), 4) - if (mineral) - if (mineral == "glass") - if (heat_proof_finished) - new /obj/item/stack/sheet/rglass(get_turf(src)) - else - new /obj/item/stack/sheet/glass(get_turf(src)) - else - var/M = text2path("/obj/item/stack/sheet/mineral/[mineral]") - new M(get_turf(src)) - new M(get_turf(src)) - qdel(src) + deconstruct(TRUE) else if(istype(W, /obj/item/weapon/wrench)) if(!anchored ) @@ -684,4 +675,26 @@ add_overlay(get_airlock_overlay("fill_construction", icon)) else add_overlay(get_airlock_overlay("[material]_construction", overlays_file)) - add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file)) \ No newline at end of file + add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file)) + + +/obj/structure/door_assembly/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + var/turf/T = get_turf(src) + var/metal_amt = 4 + if(!disassembled) + metal_amt = rand(2,4) + new /obj/item/stack/sheet/metal(T, metal_amt) + if(mineral) + if (mineral == "glass") + if(disassembled) + if (heat_proof_finished) + new /obj/item/stack/sheet/rglass(T) + else + new /obj/item/stack/sheet/glass(T) + else + new /obj/item/weapon/shard(T) + else + var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]") + new mineral_path(T, 2) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index b6aca5e3736..4ec8001ebd7 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -5,7 +5,10 @@ icon_state = "extinguisher_closed" anchored = 1 density = 0 - var/obj/item/weapon/extinguisher/has_extinguisher + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 50 + var/obj/item/weapon/extinguisher/stored_extinguisher var/opened = 0 /obj/structure/extinguisher_cabinet/New(loc, ndir, building) @@ -17,25 +20,16 @@ opened = 1 icon_state = "extinguisher_empty" else - has_extinguisher = new /obj/item/weapon/extinguisher(src) - -/obj/structure/extinguisher_cabinet/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - return - if(2) - if(prob(50)) - if(has_extinguisher) - has_extinguisher.loc = src.loc - qdel(src) - return - if(3) - return + stored_extinguisher = new /obj/item/weapon/extinguisher(src) +/obj/structure/extinguisher_cabinet/Destroy() + if(stored_extinguisher) + qdel(stored_extinguisher) + stored_extinguisher = null + return ..() /obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/weapon/wrench) && !has_extinguisher) + if(istype(I, /obj/item/weapon/wrench) && !stored_extinguisher) user << "You start unsecuring [name]..." playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 60/I.toolspeed, target = src)) @@ -45,66 +39,95 @@ qdel(src) return - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(istype(I, /obj/item/weapon/extinguisher)) - if(!has_extinguisher && opened) + if(!stored_extinguisher && opened) if(!user.drop_item()) return contents += I - has_extinguisher = I + stored_extinguisher = I user << "You place [I] in [src]." else - opened = !opened + toggle_cabinet(user) + else if(user.a_intent != "harm") + toggle_cabinet(user) else - opened = !opened - update_icon() + return ..() /obj/structure/extinguisher_cabinet/attack_hand(mob/user) - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return - if(has_extinguisher) - user.put_in_hands(has_extinguisher) - user << "You take [has_extinguisher] from [src]." - has_extinguisher = null + if(stored_extinguisher) + user.put_in_hands(stored_extinguisher) + user << "You take [stored_extinguisher] from [src]." + stored_extinguisher = null opened = 1 + playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) + update_icon() else - opened = !opened - update_icon() + toggle_cabinet(user) + /obj/structure/extinguisher_cabinet/attack_tk(mob/user) - if(has_extinguisher) - has_extinguisher.loc = loc - user << "You telekinetically remove [has_extinguisher] from [src]." - has_extinguisher = null + if(stored_extinguisher) + stored_extinguisher.forceMove(loc) + user << "You telekinetically remove [stored_extinguisher] from [src]." + stored_extinguisher = null opened = 1 + playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) + update_icon() else - opened = !opened - update_icon() + toggle_cabinet(user) + /obj/structure/extinguisher_cabinet/attack_paw(mob/user) attack_hand(user) - return /obj/structure/extinguisher_cabinet/AltClick(mob/living/user) if(user.incapacitated() || !Adjacent(user) || !istype(user)) return - opened = !opened - update_icon() + toggle_cabinet(user) + +/obj/structure/extinguisher_cabinet/proc/toggle_cabinet(mob/user) + if(opened && broken) + user << "[src] is broken open." + else + playsound(loc, 'sound/machines/click.ogg', 15, 1, -3) + opened = !opened + update_icon() /obj/structure/extinguisher_cabinet/update_icon() if(!opened) icon_state = "extinguisher_closed" return - if(has_extinguisher) - if(istype(has_extinguisher, /obj/item/weapon/extinguisher/mini)) + if(stored_extinguisher) + if(istype(stored_extinguisher, /obj/item/weapon/extinguisher/mini)) icon_state = "extinguisher_mini" else icon_state = "extinguisher_full" else icon_state = "extinguisher_empty" +/obj/structure/extinguisher_cabinet/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + broken = 1 + opened = 0 + update_icon() + if(stored_extinguisher) + stored_extinguisher.forceMove(loc) + stored_extinguisher = null + + +/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal (loc, 2) + if(stored_extinguisher) + stored_extinguisher.forceMove(loc) + stored_extinguisher = null + qdel(src) + /obj/item/wallframe/extinguisher_cabinet name = "extinguisher cabinet frame" desc = "Used for building wall-mounted extinguisher cabinets." diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index cd63c5713a8..9d7dfc42686 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -14,6 +14,8 @@ var/opening = 0 density = 1 opacity = 1 + obj_integrity = 100 + max_integrity = 100 canSmoothWith = list( /turf/closed/wall, @@ -65,14 +67,6 @@ air_update_turf(1) opening = 0 -/obj/structure/falsewall/attack_animal(mob/living/simple_animal/user) - if(user.environment_smash) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - visible_message("[user] smashes [src] apart!") - deconstruct() - /obj/structure/falsewall/proc/do_the_flick() if(density) smooth = SMOOTH_FALSE @@ -107,7 +101,7 @@ if(T.density) user << "[src] is blocked!" return - if(!istype(T, /turf/open/floor)) + if(!isfloorturf(T)) user << "[src] bolts must be tightened on the floor!" return user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.") @@ -128,18 +122,19 @@ else return ..() -/obj/structure/falsewall/proc/dismantle(mob/user, drop_girder) +/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE) user.visible_message("[user] dismantles the false wall.", "You dismantle the false wall.") playsound(src, 'sound/items/Welder.ogg', 100, 1) - deconstruct(drop_girder) + deconstruct(disassembled) -/obj/structure/falsewall/deconstruct(drop_girder) - if(drop_girder) - new girder_type(loc) - if(mineral_amount) - for(var/i in 1 to mineral_amount) - new mineral(loc) - ..() +/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) + qdel(src) /obj/structure/falsewall/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user) return 0 @@ -220,6 +215,8 @@ mineral = /obj/item/stack/sheet/mineral/diamond walltype = /turf/closed/wall/mineral/diamond canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/closed/wall/mineral/diamond) + obj_integrity = 800 + max_integrity = 800 /obj/structure/falsewall/plasma name = "plasma wall" diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 840613533ad..aa127a88443 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -6,20 +6,37 @@ icon_state = "fireaxe" anchored = 1 density = 0 - armor = list(melee = 50, bullet = 20, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 0, acid = 0) + armor = list(melee = 50, bullet = 20, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 90, acid = 50) var/locked = 1 var/open = 0 - var/health = 60 + obj_integrity = 150 + max_integrity = 150 + integrity_failure = 50 /obj/structure/fireaxecabinet/New() ..() update_icon() +/obj/structure/fireaxecabinet/Destroy() + if(fireaxe) + qdel(fireaxe) + fireaxe = null + return ..() + /obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params) - if(isrobot(user) || istype(I,/obj/item/device/multitool)) + if(iscyborg(user) || istype(I,/obj/item/device/multitool)) toggle_lock(user) - return - if(open || health <= 0) + else if(istype(I, /obj/item/stack/sheet/glass) && broken) + var/obj/item/stack/sheet/glass/G = I + if(G.get_amount() < 2) + user << "You need two glass sheets to fix [src]!" + return + user << "You start fixing [src]..." + if(do_after(user, 20, target = src) && G.use(2)) + broken = 0 + obj_integrity = max_integrity + update_icon() + else if(open || broken) if(istype(I, /obj/item/weapon/twohanded/fireaxe) && !fireaxe) var/obj/item/weapon/twohanded/fireaxe/F = I if(F.wielded) @@ -28,68 +45,56 @@ if(!user.drop_item()) return fireaxe = F - src.contents += F + F.forceMove(loc) user << "You place the [F.name] back in the [name]." update_icon() return - else if(health > 0) + else if(!broken) toggle_open() else return ..() -/obj/structure/fireaxecabinet/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - -/obj/structure/fireaxecabinet/proc/take_damage(damage, damage_type, sound_effect = 1) - if(open) - return +/obj/structure/fireaxecabinet/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - if(health <= 0) - playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1) - else - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - if(damage < 10) - return - if(health > 0) - health -= damage - update_icon() - if(health <= 0) - playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1) - - -/obj/structure/fireaxecabinet/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50) && fireaxe) - fireaxe.loc = src.loc - qdel(src) + if(broken) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1) else - take_damage(rand(30,70), BRUTE, 0) - if(3) - take_damage(rand(10,30), BRUTE, 0) + playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + if(BURN) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) -/obj/structure/fireaxecabinet/bullet_act(obj/item/projectile/P) +/obj/structure/fireaxecabinet/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + if(open) + return . = ..() - take_damage(P.damage, P.damage_type, 0) + if(.) + update_icon() +/obj/structure/fireaxecabinet/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + update_icon() + broken = TRUE + playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1) + new /obj/item/weapon/shard(loc) + new /obj/item/weapon/shard(loc) + +/obj/structure/fireaxecabinet/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(fireaxe && loc) + fireaxe.forceMove(loc) + fireaxe = null + new /obj/item/stack/sheet/metal(loc, 2) + qdel(src) /obj/structure/fireaxecabinet/blob_act(obj/structure/blob/B) if(fireaxe) fireaxe.forceMove(loc) + fireaxe = null qdel(src) /obj/structure/fireaxecabinet/attack_hand(mob/user) - if(open || health <= 0) + if(open || broken) if(fireaxe) user.put_in_hands(fireaxe) fireaxe = null @@ -108,20 +113,6 @@ /obj/structure/fireaxecabinet/attack_paw(mob/living/user) attack_hand(user) -/obj/structure/fireaxecabinet/attack_alien(mob/living/user) - user.visible_message("[user] slashes [src].") - take_damage(20) - -/obj/structure/fireaxecabinet/attack_animal(mob/living/simple_animal/M) - if(!M.melee_damage_upper && !M.obj_damage) - return - M.visible_message("[M] smashes against [src].", \ - "You smash against [src].") - if(M.obj_damage) - take_damage(M.obj_damage, M.melee_damage_type) - else - take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type) - /obj/structure/fireaxecabinet/attack_ai(mob/user) toggle_lock(user) return @@ -131,17 +122,19 @@ if(fireaxe) add_overlay("axe") if(!open) - switch(health) - if(-INFINITY to 0) - add_overlay("glass4") - if(1 to 20) - add_overlay("glass3") - if(21 to 40) - add_overlay("glass2") - if(41 to 59) - add_overlay("glass1") - if(60) - add_overlay("glass") + var/hp_percent = obj_integrity/max_integrity * 100 + if(broken) + add_overlay("glass4") + else + switch(hp_percent) + if(-INFINITY to 40) + add_overlay("glass3") + if(40 to 60) + add_overlay("glass2") + if(60 to 80) + add_overlay("glass1") + if(80 to INFINITY) + add_overlay("glass") if(locked) add_overlay("locked") else diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index f9f4b0d0d95..d3b78110830 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -1,6 +1,7 @@ /obj/structure/flora - resistance_flags = 0 - burntime = 30 + resistance_flags = FLAMMABLE + obj_integrity = 150 + max_integrity = 150 anchored = 1 //trees diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 236f88c7f3f..7209637f484 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -13,6 +13,8 @@ var/state = GIRDER_NORMAL var/girderpasschance = 20 // percentage chance that a projectile passes through the girder. var/can_displace = TRUE //If the girder can be moved around by wrenching it + obj_integrity = 200 + max_integrity = 200 /obj/structure/girder/attackby(obj/item/W, mob/user, params) add_fingerprint(user) @@ -40,7 +42,7 @@ else if(istype(W, /obj/item/weapon/wrench)) if(state == GIRDER_DISPLACED) - if(!istype(loc, /turf/open/floor)) + if(!isfloorturf(loc)) user << "A floor must be present to secure the girder!" return playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) @@ -86,10 +88,10 @@ qdel(src) else if(istype(W, /obj/item/stack)) - if (istype(src.loc, /turf/closed/wall)) + if(iswallturf(loc)) user << "There is already a wall present!" return - if (!istype(src.loc, /turf/open/floor)) + if(!isfloorturf(src.loc)) user << "A floor must be present to build a false wall!" return if (locate(/obj/structure/falsewall) in src.loc.contents) @@ -264,32 +266,11 @@ var/atom/movable/mover = caller . = . || mover.checkpass(PASSGRILLE) -/obj/structure/girder/attack_animal(mob/living/simple_animal/M) - if(M.environment_smash) - if(state != GIRDER_DISPLACED) - var/obj/structure/girder/displaced/D = new (loc) - transfer_fingerprints_to(D) - qdel(src) - - -/obj/structure/girder/blob_act(obj/structure/blob/B) - if(prob(40)) - qdel(src) - -/obj/structure/girder/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if (prob(70)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - qdel(src) - if(3) - if (prob(40)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - qdel(src) +/obj/structure/girder/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) + new remains(loc) + qdel(src) /obj/structure/girder/narsie_act() if(prob(25)) @@ -302,27 +283,17 @@ anchored = 0 state = GIRDER_DISPLACED girderpasschance = 25 + obj_integrity = 120 + max_integrity = 120 /obj/structure/girder/reinforced name = "reinforced girder" icon_state = "reinforced" state = GIRDER_REINF girderpasschance = 0 + obj_integrity = 350 + max_integrity = 350 -/obj/structure/girder/reinforced/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if (prob(50)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - qdel(src) - if(3) - if (prob(20)) - var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal) - new remains(loc) - qdel(src) //////////////////////////////////////////// cult girder ////////////////////////////////////////////// @@ -396,15 +367,7 @@ /obj/structure/girder/cult/narsie_act() return -/obj/structure/girder/cult/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(30)) - new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1) - qdel(src) - if(3) - if(prob(5)) - new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1) - qdel(src) +/obj/structure/girder/cult/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1) + qdel(src) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index f3cbde713e8..a3b1b12d7a9 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -8,9 +8,10 @@ flags = CONDUCT pressure_resistance = 5*ONE_ATMOSPHERE layer = BELOW_OBJ_LAYER - var/health = 10 armor = list(melee = 50, bullet = 70, laser = 70, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 0, acid = 0) - var/destroyed = 0 + obj_integrity = 50 + max_integrity = 50 + integrity_failure = 20 var/obj/item/stack/rods/stored /obj/structure/grille/New() @@ -18,24 +19,13 @@ stored = new/obj/item/stack/rods(src) stored.amount = 2 -/obj/structure/grille/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - else - take_damage(rand(5,10), BRUTE, 0) - /obj/structure/grille/ratvar_act() - if(destroyed) + if(broken) new /obj/structure/grille/ratvar/broken(src.loc) else new /obj/structure/grille/ratvar(src.loc) qdel(src) -/obj/structure/grille/blob_act(obj/structure/blob/B) - if(!destroyed) - Break() - /obj/structure/grille/Bumped(atom/user) if(ismob(user)) shock(user, 70) @@ -44,10 +34,11 @@ /obj/structure/grille/attack_paw(mob/user) attack_hand(user) -/obj/structure/grille/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - shock(user, 70) - take_damage(5) +/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + if(user.a_intent == "harm") + if(!shock(user, 70)) + ..(user, 1) + return 1 /obj/structure/grille/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) @@ -56,7 +47,7 @@ "You hit [src].", \ "You hear twisting metal.") if(!shock(user, 70)) - take_damage(rand(1,2)) + take_damage(rand(5,10), BRUTE, "melee", 1) /obj/structure/grille/attack_alien(mob/living/user) user.do_attack_animation(src) @@ -65,36 +56,8 @@ "You mangle [src].", \ "You hear twisting metal.") if(!shock(user, 70)) - take_damage(5) + take_damage(20, BRUTE, "melee", 1) -/obj/structure/grille/attack_slime(mob/living/simple_animal/slime/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(!user.is_adult) - return - - user.visible_message("[user] smashes against [src].", \ - "You smash against [src].", \ - "You hear twisting metal.") - take_damage(rand(1,2)) - -/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M) - M.changeNext_move(CLICK_CD_MELEE) - if(!M.melee_damage_upper && !M.obj_damage || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN)) - return - M.do_attack_animation(src) - M.visible_message("[M] smashes against [src].", \ - "You smash against [src].", \ - "You hear twisting metal.") - if(M.obj_damage) - take_damage(M.obj_damage, M.melee_damage_type) - else - take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type) - - -/obj/structure/grille/mech_melee_attack(obj/mecha/M) - if(..()) - take_damage(M.force * 0.5, M.damtype) /obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) return 1 @@ -112,57 +75,35 @@ var/atom/movable/mover = caller . = . || mover.checkpass(PASSGRILLE) -/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj) - . = ..() - take_damage(Proj.damage*0.3, Proj.damage_type) - -/obj/structure/grille/Deconstruct() - if(!loc) //if already qdel'd somehow, we do nothing - return - if(!(flags&NODECONSTRUCT)) - transfer_fingerprints_to(stored) - var/turf/T = loc - stored.loc = T - ..() - -/obj/structure/grille/proc/Break() - icon_state = "broken[initial(icon_state)]" - density = 0 - destroyed = 1 - stored.amount = 1 - if(!(flags&NODECONSTRUCT)) - var/obj/item/stack/rods/newrods = new(loc) - transfer_fingerprints_to(newrods) - /obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params) user.changeNext_move(CLICK_CD_MELEE) add_fingerprint(user) if(istype(W, /obj/item/weapon/wirecutters)) if(!shock(user, 100)) playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1) - Deconstruct() - else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf) || anchored)) + deconstruct() + else if((istype(W, /obj/item/weapon/screwdriver)) && (isturf(loc) || anchored)) if(!shock(user, 90)) playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1) anchored = !anchored user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \ "You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.") return - else if(istype(W, /obj/item/stack/rods) && destroyed) + else if(istype(W, /obj/item/stack/rods) && broken) var/obj/item/stack/rods/R = W if(!shock(user, 90)) user.visible_message("[user] rebuilds the broken grille.", \ "You rebuild the broken grille.") - health = 10 + obj_integrity = max_integrity density = 1 - destroyed = 0 + broken = 0 icon_state = initial(icon_state) R.use(1) return //window placing begin else if(istype(W, /obj/item/stack/sheet/rglass) || istype(W, /obj/item/stack/sheet/glass)) - if (!destroyed) + if (!broken) var/obj/item/stack/ST = W if (ST.get_amount() < 2) user << "You need at least two sheets of glass for that!" @@ -176,7 +117,7 @@ return user << "You start placing the window..." if(do_after(user,20, target = src)) - if(!src.loc || !anchored) //Grille destroyed or unanchored while waiting + if(!src.loc || !anchored) //Grille broken or unanchored while waiting return for(var/obj/structure/window/WINDOW in loc) //Another window already installed on grille return @@ -197,38 +138,41 @@ else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70)) return ..() - -/obj/structure/grille/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force * 0.3, I.damtype) - -/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) - if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/welder.ogg', 80, 1) if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - else - return - health -= damage - if(health <= 0) - if(!destroyed) - Break() - else - if(health <= -6) - Deconstruct() + if(damage_amount) + playsound(loc, 'sound/effects/grillehit.ogg', 80, 1) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 80, 1) + + +/obj/structure/grille/deconstruct(disassembled = TRUE) + if(!loc) //if already qdel'd somehow, we do nothing + return + if(!(flags&NODECONSTRUCT)) + transfer_fingerprints_to(stored) + var/turf/T = loc + stored.forceMove(T) + ..() + +/obj/structure/grille/obj_break() + if(!broken && !(flags & NODECONSTRUCT)) + icon_state = "broken[initial(icon_state)]" + density = 0 + broken = 1 + stored.amount = 1 + var/obj/item/stack/rods/newrods = new(loc) + transfer_fingerprints_to(newrods) // shock user with probability prb (if all connections & power are working) // returns 1 if shocked, 0 otherwise /obj/structure/grille/proc/shock(mob/user, prb) - if(!anchored || destroyed) // anchored/destroyed grilles are never connected + if(!anchored || broken) // anchored/broken grilles are never connected return 0 if(!prob(prb)) return 0 @@ -247,27 +191,20 @@ return 0 /obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(!destroyed) + if(!broken) if(exposed_temperature > T0C + 1500) - take_damage(1) + take_damage(1, BURN, 0, 0) ..() /obj/structure/grille/hitby(AM as mob|obj) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 5 - else if(isobj(AM)) - if(prob(50)) - var/obj/item/I = AM - tforce = max(0, I.throwforce * 0.5) - else if(anchored && !destroyed) + 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(src.loc, 'sound/magic/LightningShock.ogg', 100, 1, extrarange = 5) tesla_zap(src, 3, C.powernet.avail * 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. - take_damage(tforce) + return ..() /obj/structure/grille/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user) return 0 @@ -275,8 +212,8 @@ /obj/structure/grille/broken // Pre-broken grilles for map placement icon_state = "brokengrille" density = 0 - health = 0 - destroyed = 1 + obj_integrity = 20 + broken = 1 /obj/structure/grille/broken/New() ..() @@ -290,7 +227,7 @@ /obj/structure/grille/ratvar/New() ..() change_construction_value(1) - if(destroyed) + if(broken) PoolOrNew(/obj/effect/overlay/temp/ratvar/grille/broken, get_turf(src)) else PoolOrNew(/obj/effect/overlay/temp/ratvar/grille, get_turf(src)) @@ -312,8 +249,8 @@ /obj/structure/grille/ratvar/broken density = 0 - health = 0 - destroyed = 1 + obj_integrity = 20 + broken = 1 /obj/structure/grille/ratvar/broken/New() ..() diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index 9477946c356..8219c7f7a33 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -35,7 +35,7 @@ add_overlay("[icon_state]_door") /obj/structure/guncase/attackby(obj/item/I, mob/user, params) - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(istype(I, gun_category)) if(contents.len < capacity && open) @@ -53,7 +53,7 @@ return ..() /obj/structure/guncase/attack_hand(mob/user) - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(contents.len && open) ShowWindow(user) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm new file mode 100644 index 00000000000..ac8ad9d02e0 --- /dev/null +++ b/code/game/objects/structures/holosign.dm @@ -0,0 +1,101 @@ + +//holographic signs and barriers + +/obj/structure/holosign + name = "holo sign" + icon = 'icons/effects/effects.dmi' + anchored = 1 + obj_integrity = 1 + max_integrity = 1 + armor = list(melee = 0, bullet = 50, laser = 50, energy = 50, bomb = 0, bio = 0, rad = 0, fire = 20, acid = 20) + var/obj/item/weapon/holosign_creator/projector + +/obj/structure/holosign/New(loc, source_projector) + if(source_projector) + projector = source_projector + projector.signs += src + ..() + +/obj/structure/holosign/Destroy() + if(projector) + projector.signs -= src + projector = null + return ..() + +/obj/structure/holosign/attack_hand(mob/living/user) + user.do_attack_animation(src) + user.changeNext_move(CLICK_CD_MELEE) + take_damage(5 , BRUTE, "melee", 1) + +/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) + if(BURN) + playsound(loc, 'sound/weapons/Egloves.ogg', 80, 1) + + +/obj/structure/holosign/wetsign + name = "wet floor sign" + desc = "The words flicker as if they mean nothing." + icon = 'icons/effects/effects.dmi' + icon_state = "holosign" + +/obj/structure/holosign/barrier + name = "holo barrier" + desc = "A short holographic barrier which can only be passed by walking." + icon_state = "holosign_sec" + pass_flags = LETPASSTHROW + density = 1 + obj_integrity = 20 + max_integrity = 20 + var/allow_walk = 1 //can we pass through it on walk intent + +/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(!density) + return 1 + if(air_group || (height==0)) + return 1 + if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE)) + return 1 + if(iscarbon(mover)) + var/mob/living/carbon/C = mover + if(allow_walk && C.m_intent == "walk") + return 1 + +/obj/structure/holosign/barrier/engineering + icon_state = "holosign_engi" + +/obj/structure/holosign/barrier/cyborg + name = "Energy Field" + desc = "A fragile energy field that blocks movement" + density = 1 + obj_integrity = 1 + max_integrity = 1 + allow_walk = 0 + +/obj/structure/holosign/barrier/cyborg/hacked + name = "Charged Energy Field" + desc = "A powerful energy field that blocks movement. Energy arcs off it" + obj_integrity = 10 + max_integrity = 10 + var/shockcd = 0 + +/obj/structure/holosign/barrier/cyborg/hacked/proc/cooldown() + shockcd = FALSE + +/obj/structure/holosign/barrier/cyborg/hacked/attack_hand(mob/living/user) + if(!shockcd) + if(ismob(user)) + var/mob/living/M = user + M.electrocute_act(15,"Energy Barrier", safety=1) + shockcd = TRUE + addtimer(src, "cooldown", 10) + +/obj/structure/holosign/barrier/cyborg/hacked/Bumped(atom/user) + if(!shockcd) + if(ismob(user)) + var/mob/living/M = user + M.electrocute_act(15,"Energy Barrier", safety=1) + shockcd = TRUE + addtimer(src, "cooldown", 10) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 56e81172352..99593f51ebe 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -7,6 +7,8 @@ desc = "The frame of a meat spike." density = 1 anchored = 0 + obj_integrity = 200 + max_integrity = 200 /obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params) add_fingerprint(user) @@ -48,6 +50,8 @@ anchored = 1 buckle_lying = 0 can_buckle = 1 + obj_integrity = 250 + max_integrity = 250 /obj/structure/kitchenspike/attack_paw(mob/user) @@ -60,10 +64,7 @@ playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) if(do_after(user, 20/I.toolspeed, target = src)) user << "You pry the spikes out of the frame." - new /obj/item/stack/rods(loc, 4) - var/obj/F = new /obj/structure/kitchenspike_frame(src.loc,) - transfer_fingerprints_to(F) - qdel(src) + deconstruct(TRUE) else user << "You can't do that while something's on the spike!" else @@ -136,3 +137,12 @@ unbuckle_mob(M,force=1) M.emote("scream") M.AdjustWeakened(10) + +/obj/structure/kitchenspike/deconstruct(disassembled = TRUE) + if(disassembled) + var/obj/F = new /obj/structure/kitchenspike_frame(src.loc,) + transfer_fingerprints_to(F) + else + new /obj/item/stack/sheet/metal(src.loc, 4) + new /obj/item/stack/rods(loc, 4) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index bf40a96002b..418243dd85b 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -5,7 +5,9 @@ icon_state = "lattice" density = 0 anchored = 1 - armor = list(melee = 100, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 50) + obj_integrity = 50 + max_integrity = 50 layer = LATTICE_LAYER //under pipes var/obj/item/stack/rods/stored canSmoothWith = list(/obj/structure/lattice, @@ -30,37 +32,25 @@ /obj/structure/lattice/blob_act(obj/structure/blob/B) return -/obj/structure/lattice/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - return - if(2) - qdel(src) - return - if(3) - return - else - return - /obj/structure/lattice/attackby(obj/item/C, mob/user, params) if(istype(C, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = C if(WT.remove_fuel(0, user)) user << "Slicing [name] joints ..." - Deconstruct() + deconstruct() else var/turf/T = get_turf(src) return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc) -/obj/structure/lattice/Deconstruct() - stored.loc = get_turf(src) - stored = null - ..() +/obj/structure/lattice/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + stored.forceMove(get_turf(src)) + stored = null + qdel(src) /obj/structure/lattice/singularity_pull(S, current_size) if(current_size >= STAGE_FOUR) - Deconstruct() + deconstruct() /obj/structure/lattice/catwalk name = "catwalk" @@ -73,12 +63,12 @@ /obj/structure/lattice/catwalk/Move() var/turf/T = loc for(var/obj/structure/cable/C in T) - C.Deconstruct() + C.deconstruct() ..() -/obj/structure/lattice/catwalk/Deconstruct() +/obj/structure/lattice/catwalk/deconstruct() var/turf/T = loc for(var/obj/structure/cable/C in T) - C.Deconstruct() + C.deconstruct() ..() diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index b10348b7435..d32b5e3b687 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -14,7 +14,9 @@ var/state = 0 //closed, 1 == open var/isSwitchingStates = 0 var/close_delay = -1 //-1 if does not auto close. - var/hardness = 1 + obj_integrity = 200 + max_integrity = 200 + armor = list(melee = 10, bullet = 0, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 50, acid = 50) var/sheetType = /obj/item/stack/sheet/metal var/sheetAmount = 7 var/openSound = 'sound/effects/stonedoor_openclose.ogg' @@ -43,7 +45,7 @@ /obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral if(isAI(user)) //so the AI can't open it return - else if(isrobot(user)) //but cyborgs can + else if(iscyborg(user)) //but cyborgs can if(get_dist(user,src) <= 1) //not remotely though return TryToSwitchState(user) @@ -126,63 +128,33 @@ if(istype(W,/obj/item/weapon/pickaxe)) var/obj/item/weapon/pickaxe/digTool = W user << "You start digging the [name]..." - if(do_after(user,digTool.digspeed*hardness, target = src) && src) + if(do_after(user,digTool.digspeed*(1+round(max_integrity*0.01)), target = src) && src) user << "You finish digging." - Dismantle() + deconstruct(TRUE) else if(user.a_intent != "harm") attack_hand(user) else return ..() -/obj/structure/mineral_door/attacked_by(obj/item/I, mob/user) - ..() - if(I.damtype != STAMINA) - hardness -= I.force/100 - CheckHardness() - -/obj/structure/mineral_door/bullet_act(obj/item/projectile/Proj) - hardness -= Proj.damage - ..() - CheckHardness() - -/obj/structure/mineral_door/proc/CheckHardness() - if(hardness <= 0) - Dismantle(1) - -/obj/structure/mineral_door/proc/Dismantle(devastated = 0) +/obj/structure/mineral_door/deconstruct(disassembled = TRUE) var/turf/T = get_turf(src) - if(!devastated) - for(var/i in 1 to sheetAmount) - new sheetType(T) + if(disassembled) + new sheetType(T, sheetAmount) else - for(var/i in 3 to sheetAmount) - new sheetType(T) + new sheetType(T, max(sheetAmount - 2, 1)) qdel(src) -/obj/structure/mineral_door/ex_act(severity = 1) - switch(severity) - if(1) - Dismantle(1) - if(2) - if(prob(20)) - Dismantle(1) - else - hardness-- - CheckHardness() - if(3) - hardness -= 0.1 - CheckHardness() - - /obj/structure/mineral_door/iron name = "iron door" - hardness = 3 + obj_integrity = 300 + max_integrity = 300 /obj/structure/mineral_door/silver name = "silver door" icon_state = "silver" sheetType = /obj/item/stack/sheet/mineral/silver - hardness = 3 + obj_integrity = 300 + max_integrity = 300 /obj/structure/mineral_door/gold name = "gold door" @@ -193,14 +165,16 @@ name = "uranium door" icon_state = "uranium" sheetType = /obj/item/stack/sheet/mineral/uranium - hardness = 3 + obj_integrity = 300 + max_integrity = 300 luminosity = 2 /obj/structure/mineral_door/sandstone name = "sandstone door" icon_state = "sandstone" sheetType = /obj/item/stack/sheet/mineral/sandstone - hardness = 0.5 + obj_integrity = 100 + max_integrity = 100 /obj/structure/mineral_door/transparent opacity = 0 @@ -228,20 +202,21 @@ /obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct() atmos_spawn_air("plasma=500;TEMP=1000") - Dismantle(1) + deconstruct(FALSE) /obj/structure/mineral_door/transparent/diamond name = "diamond door" icon_state = "diamond" sheetType = /obj/item/stack/sheet/mineral/diamond - hardness = 10 + obj_integrity = 1000 + max_integrity = 1000 /obj/structure/mineral_door/wood name = "wood door" icon_state = "wood" - hardness = 1 openSound = 'sound/effects/doorcreaky.ogg' closeSound = 'sound/effects/doorcreaky.ogg' sheetType = /obj/item/stack/sheet/mineral/wood - resistance_flags = 0 - burntime = 30 + resistance_flags = FLAMMABLE + obj_integrity = 200 + max_integrity = 200 diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index f6c5c6691d4..4df0630d7b9 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -6,11 +6,13 @@ icon_state = "mirror" density = 0 anchored = 1 - var/shattered = 0 + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 100 /obj/structure/mirror/attack_hand(mob/user) - if(shattered || !Adjacent(user)) + if(broken || !Adjacent(user)) return if(ishuman(user)) @@ -41,22 +43,23 @@ H.update_hair() -/obj/structure/mirror/proc/shatter() - icon_state = "mirror_broke" - playsound(src, "shatter", 70, 1) - desc = "Oh no, seven years of bad luck!" - shattered = 1 - - -/obj/structure/mirror/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) +/obj/structure/mirror/obj_break(damage_flag) + if(!broken && !(flags & NODECONSTRUCT)) + icon_state = "mirror_broke" + playsound(src, "shatter", 70, 1) + desc = "Oh no, seven years of bad luck!" + broken = 1 +/obj/structure/mirror/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!disassembled) + new /obj/item/weapon/shard( src.loc ) + qdel(src) /obj/structure/mirror/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm") var/obj/item/weapon/weldingtool/WT = I - if(shattered) + if(broken) user.changeNext_move(CLICK_CD_MELEE) if(WT.remove_fuel(0, user)) user << "You begin repairing [src]..." @@ -65,57 +68,19 @@ if(!user || !WT || !WT.isOn()) return user << "You repair [src]." - shattered = 0 + broken = 0 icon_state = initial(icon_state) desc = initial(desc) else return ..() -/obj/structure/mirror/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - -/obj/structure/mirror/ex_act(severity) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - else - take_damage(5) - if(3) - if(prob(75)) - take_damage(5) - -/obj/structure/mirror/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) if(BURN) - else - return - if(!shattered) - if(damage) - shatter() - else if(sound_effect) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) -/obj/structure/mirror/proc/attack_generic(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - user.visible_message("[user] smashes [src]!") - take_damage(5) - -/obj/structure/mirror/attack_alien(mob/living/user) - attack_generic(user) - -/obj/structure/mirror/attack_animal(mob/living/simple_animal/M) - if(!M.melee_damage_upper && !M.obj_damage) - return - attack_generic(M) - -/obj/structure/mirror/attack_slime(mob/living/user) - attack_generic(user) /obj/structure/mirror/magic name = "magic mirror" diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index c16ae3f1401..cc76039228d 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -17,6 +17,8 @@ icon_state = "morgue1" density = 1 anchored = 1 + obj_integrity = 400 + max_integrity = 400 var/obj/structure/tray/connected = null var/locked = 0 @@ -38,9 +40,6 @@ /obj/structure/bodycontainer/update_icon() return -/obj/structure/bodycontainer/alter_health() - return src.loc - /obj/structure/bodycontainer/relaymove(mob/user) if(user.stat || !isturf(loc)) return @@ -77,6 +76,10 @@ else return ..() +/obj/structure/bodycontainer/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 5) + qdel(src) + /obj/structure/bodycontainer/container_resist() open() @@ -202,9 +205,10 @@ var/global/list/crematoriums = new/list() new /obj/effect/decal/cleanable/ash(src) sleep(30) - locked = 0 - update_icon() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people + if(!qdeleted(src)) + locked = 0 + update_icon() + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people /* @@ -219,6 +223,8 @@ var/global/list/crematoriums = new/list() var/obj/structure/bodycontainer/connected = null anchored = 1 pass_flags = LETPASSTHROW + obj_integrity = 350 + max_integrity = 350 /obj/structure/tray/Destroy() if(connected) @@ -227,6 +233,10 @@ var/global/list/crematoriums = new/list() connected = null return ..() +/obj/structure/tray/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 2) + qdel(src) + /obj/structure/tray/attack_paw(mob/user) return src.attack_hand(user) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 411ea3ec003..c58b11f2186 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -5,6 +5,8 @@ icon_state = "nboard00" density = 0 anchored = 1 + obj_integrity = 150 + max_integrity = 150 var/notices = 0 /obj/structure/noticeboard/initialize() @@ -70,10 +72,14 @@ if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if((P && P.loc == src)) - if(!( istype(usr, /mob/living/carbon/human) )) + if(!ishuman(usr)) usr << browse("[P.name][stars(P.info)]", "window=[P.name]") onclose(usr, "[P.name]") else usr << browse("[P.name][P.info]", "window=[P.name]") onclose(usr, "[P.name]") - return + +/obj/structure/noticeboard/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal (loc, 1) + qdel(src) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 8341812fcfc..8aaf18cf5ed 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -8,8 +8,8 @@ layer = ABOVE_MOB_LAYER /obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller) - if(istype(caller, /mob/living)) - if(istype(caller,/mob/living/simple_animal/bot)) + if(isliving(caller)) + if(isbot(caller)) return 1 var/mob/living/M = caller @@ -35,9 +35,9 @@ return 0 - else if(istype(A, /mob/living)) // You Shall Not Pass! + else if(isliving(A)) // You Shall Not Pass! var/mob/living/M = A - if(istype(A,/mob/living/simple_animal/bot)) //Bots understand the secrets + if(isbot(A)) //Bots understand the secrets return 1 if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass. return 1 @@ -64,7 +64,7 @@ /obj/structure/plasticflaps/mining/New() air_update_turf(1) . = ..() - + /obj/structure/plasticflaps/mining/CanAtmosPass() return FALSE diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index bf634f55443..5ee7786c3a9 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -4,17 +4,24 @@ opacity = 0 density = 0 layer = SIGN_LAYER + obj_integrity = 100 + 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/basic name = "blank sign" desc = "How can signs be real if our eyes aren't real?" icon_state = "backing" -/obj/structure/sign/ex_act(severity, target) - qdel(src) - -/obj/structure/sign/blob_act(obj/structure/blob/B) - qdel(src) +/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, 1) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 80, 1) /obj/structure/sign/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/wrench)) @@ -87,7 +94,7 @@ icon = 'icons/obj/decals.dmi' icon_state = "backing" w_class = 3 - resistance_flags = 0 + resistance_flags = FLAMMABLE var/sign_path = /obj/structure/sign/basic //the type of sign that will be created when placed on a turf /obj/item/sign_backing/afterattack(atom/target, mob/user, proximity) @@ -105,6 +112,8 @@ /obj/structure/sign/map name = "station map" desc = "A framed picture of the station." + obj_integrity = 500 + max_integrity = 500 /obj/structure/sign/map/left icon_state = "map-left" diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 4ea17faf8f6..fdf0ca8a919 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -8,7 +8,7 @@ icon_state = "" density = 1 anchored = 0 - var/health = 100 + obj_integrity = 100 var/oreAmount = 7 var/mineralType = "metal" @@ -31,7 +31,7 @@ "You loosen the [name]'s bolts!") anchored = 0 else - if (!istype(src.loc, /turf/open/floor)) + if(!isfloorturf(src.loc)) user.visible_message("A floor must be present to secure the [name]!") return playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) @@ -53,7 +53,7 @@ return user.visible_message("[user] slices apart the [name].", \ "You slice apart the [name].") - Dismantle(1) + deconstruct(FALSE) else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W @@ -74,14 +74,10 @@ playsound(loc, 'sound/items/Welder2.ogg', 50, 1) user.visible_message("[user] slices apart the [name].", \ "You slice apart the [name]!") - Dismantle(1) + deconstruct(FALSE) else return ..() -/obj/structure/statue/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - /obj/structure/statue/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) add_fingerprint(user) @@ -91,62 +87,33 @@ /obj/structure/statue/CanAtmosPass() return !density -/obj/structure/statue/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - -/obj/structure/statue/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 40, 1) +/obj/structure/statue/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + if (mineralType == "metal") + var/ore = /obj/item/stack/sheet/metal + for(var/i = 1, i <= oreAmount, i++) + new ore(get_turf(src)) + else + var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]") + for(var/i = 1, i <= oreAmount, i++) + new ore(get_turf(src)) else - return - health -= damage - if(health <= 0) - Dismantle(1) - -/obj/structure/statue/proc/Dismantle(devastated = 0) - if(!devastated) - if (mineralType == "metal") - var/ore = /obj/item/stack/sheet/metal - for(var/i = 1, i <= oreAmount, i++) - new ore(get_turf(src)) - else - var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]") - for(var/i = 1, i <= oreAmount, i++) - new ore(get_turf(src)) - else - if (mineralType == "metal") - var/ore = /obj/item/stack/sheet/metal - for(var/i = 3, i <= oreAmount, i++) - new ore(get_turf(src)) - else - var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]") - for(var/i = 3, i <= oreAmount, i++) - new ore(get_turf(src)) + if (mineralType == "metal") + var/ore = /obj/item/stack/sheet/metal + for(var/i = 3, i <= oreAmount, i++) + new ore(get_turf(src)) + else + var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]") + for(var/i = 3, i <= oreAmount, i++) + new ore(get_turf(src)) qdel(src) -/obj/structure/statue/ex_act(severity = 1) - switch(severity) - if(1) - Dismantle(1) - if(2) - take_damage(rand(60,110), BRUTE, 0) - if(3) - take_damage(10, BRUTE, 0) - //////////////////////////////////////STATUES///////////////////////////////////////////////////////////// ////////////////////////uranium/////////////////////////////////// /obj/structure/statue/uranium - health = 300 + obj_integrity = 300 luminosity = 2 mineralType = "uranium" var/last_event = 0 @@ -191,7 +158,7 @@ ////////////////////////////plasma/////////////////////////////////////////////////////////////////////// /obj/structure/statue/plasma - health = 200 + obj_integrity = 200 mineralType = "plasma" desc = "This statue is suitably made from plasma." @@ -231,7 +198,7 @@ /obj/structure/statue/plasma/proc/PlasmaBurn() atmos_spawn_air("plasma=400;TEMP=1000") - Dismantle(1) + deconstruct(FALSE) /obj/structure/statue/plasma/proc/ignite(exposed_temperature) if(exposed_temperature > 300) @@ -240,7 +207,7 @@ //////////////////////gold/////////////////////////////////////// /obj/structure/statue/gold - health = 300 + obj_integrity = 300 mineralType = "gold" desc = "This is a highly valuable statue made from gold." @@ -267,7 +234,7 @@ //////////////////////////silver/////////////////////////////////////// /obj/structure/statue/silver - health = 300 + obj_integrity = 300 mineralType = "silver" desc = "This is a valuable statue made from silver." @@ -294,7 +261,7 @@ /////////////////////////diamond///////////////////////////////////////// /obj/structure/statue/diamond - health = 1000 + obj_integrity = 1000 mineralType = "diamond" desc = "This is a very expensive diamond statue" @@ -313,7 +280,7 @@ ////////////////////////bananium/////////////////////////////////////// /obj/structure/statue/bananium - health = 300 + obj_integrity = 300 mineralType = "bananium" desc = "A bananium statue with a small engraving:'HOOOOOOONK'." var/spam_flag = 0 @@ -348,7 +315,7 @@ /////////////////////sandstone///////////////////////////////////////// /obj/structure/statue/sandstone - health = 50 + obj_integrity = 50 mineralType = "sandstone" /obj/structure/statue/sandstone/assistant @@ -366,7 +333,7 @@ /////////////////////snow///////////////////////////////////////// /obj/structure/statue/snow - health = 50 + obj_integrity = 50 mineralType = "snow" /obj/structure/statue/snow/snowman diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 5a86a818633..e6affabaab5 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -17,6 +17,8 @@ density = 0 anchored = 0 layer = PROJECTILE_HIT_THRESHHOLD_LAYER + obj_integrity = 100 + max_integrity = 100 var/framestack = /obj/item/stack/rods var/framestackamount = 2 @@ -26,9 +28,7 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) if(do_after(user, 30/I.toolspeed, target = src)) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - for(var/i = 1, i <= framestackamount, i++) - new framestack(get_turf(src)) - qdel(src) + deconstruct(TRUE) else if(istype(I, /obj/item/stack/sheet/plasteel)) var/obj/item/stack/sheet/plasteel/P = I if(P.get_amount() < 1) @@ -77,6 +77,10 @@ else return ..() +/obj/structure/table_frame/deconstruct(disassembled = TRUE) + new framestack(get_turf(src), framestackamount) + qdel(src) + /obj/structure/table_frame/narsie_act() if(prob(20)) new /obj/structure/table_frame/wood(src.loc) @@ -96,7 +100,7 @@ icon_state = "wood_frame" framestack = /obj/item/stack/sheet/mineral/wood framestackamount = 2 - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/stack/sheet/mineral/wood)) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 067ea45c404..14c70be238a 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -29,7 +29,9 @@ var/buildstackamount = 1 var/framestackamount = 2 var/deconstruction_ready = 1 - var/health = 100 + obj_integrity = 100 + max_integrity = 100 + integrity_failure = 30 smooth = SMOOTH_TRUE canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced) @@ -44,18 +46,6 @@ queue_smooth(src) queue_smooth_neighbors(src) -/obj/structure/table/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - take_damage(rand(80,120), BRUTE, 0) - if(3) - take_damage(rand(40,80), BRUTE, 0) - -/obj/structure/table/blob_act(obj/structure/blob/B) - take_damage(rand(75,150), BRUTE, 0) - /obj/structure/table/narsie_act() if(prob(20)) new /obj/structure/table/wood(src.loc) @@ -63,44 +53,10 @@ /obj/structure/table/ratvar_act() new /obj/structure/table/reinforced/brass(src.loc) -/obj/structure/table/mech_melee_attack(obj/mecha/M) - playsound(src.loc, 'sound/weapons/punch4.ogg', 50, 1) - visible_message("[M.name] smashes [src]!") - take_damage(200, M.damtype, 0) - -/obj/structure/table/attack_alien(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1) - visible_message("[user] slices [src]!") - take_damage(100, BRUTE, 0) - - -/obj/structure/table/attack_animal(mob/living/simple_animal/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(user.melee_damage_upper || user.obj_damage) - var/dmg_dealt = user.melee_damage_upper - if(user.obj_damage) - dmg_dealt = user.obj_damage - if(user.environment_smash) - dmg_dealt = 100 - visible_message("[user] smashes [src]!") - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - take_damage(dmg_dealt, user.melee_damage_type, 0) - /obj/structure/table/attack_paw(mob/user) attack_hand(user) -/obj/structure/table/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - visible_message("[user] smashes [src]!") - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - take_damage(rand(180,280), BRUTE, 0) - return 1 - /obj/structure/table/attack_hand(mob/living/user) if(user.a_intent == "grab" && user.pulling && isliving(user.pulling)) var/mob/living/pushed_mob = user.pulling @@ -118,10 +74,6 @@ /obj/structure/table/attack_tk() // no telehulk sorry return -/obj/structure/table/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - /obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) return 1 @@ -151,11 +103,18 @@ /obj/structure/table/attackby(obj/item/I, mob/user, params) if(!(flags & NODECONSTRUCT)) if(istype(I, /obj/item/weapon/screwdriver) && deconstruction_ready) - table_deconstruct(user, 1) + user << "You start disassembling [src]..." + playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + if(do_after(user, 20, target = src)) + deconstruct(TRUE) return if(istype(I, /obj/item/weapon/wrench) && deconstruction_ready) - table_deconstruct(user, 0) + user << "You start deconstructing [src]..." + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + if(do_after(user, 40, target = src)) + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + deconstruct(TRUE, 1) return if(istype(I, /obj/item/weapon/storage/bag/tray)) @@ -185,62 +144,18 @@ else return ..() -/obj/structure/table/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) -/obj/structure/table/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 40, 1) - else - return - health -= damage - if(health <= 0) - table_destroy() - -/* - * TABLE DESTRUCTION/DECONSTRUCTION - */ - - - -/obj/structure/table/proc/table_destroy() +/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0) if(!(flags & NODECONSTRUCT)) var/turf/T = get_turf(src) - for(var/i = 1, i <= framestackamount, i++) - new framestack(T) - for(var/i = 1, i <= buildstackamount, i++) - new buildstack(T) + new buildstack(T, buildstackamount) + if(!wrench_disassembly) + new frame(T) + else + new framestack(T, framestackamount) qdel(src) -/obj/structure/table/proc/table_deconstruct(mob/user, disassembling = 0) - if(flags & NODECONSTRUCT) - return - if(disassembling) - user << "You start disassembling [src]..." - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20, target = src)) - new frame(src.loc) - for(var/i = 1, i <= buildstackamount, i++) - new buildstack(get_turf(src)) - qdel(src) - else - user << "You start deconstructing [src]..." - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - if(do_after(user, 40, target = src)) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - table_destroy() - - /* * Glass tables */ @@ -251,7 +166,10 @@ icon_state = "glass_table" buildstack = /obj/item/stack/sheet/glass canSmoothWith = null - health = 50 + obj_integrity = 70 + 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() @@ -298,6 +216,20 @@ M.Weaken(5) qdel(src) +/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + ..() + return + else + var/turf/T = get_turf(src) + playsound(T, "shatter", 50, 1) + for(var/X in debris) + var/atom/movable/AM = X + AM.forceMove(T) + debris -= AM + qdel(src) + /obj/structure/table/glass/narsie_act() color = NARSIE_WINDOW_COLOUR for(var/obj/item/weapon/shard/S in debris) @@ -315,8 +247,9 @@ frame = /obj/structure/table_frame/wood framestack = /obj/item/stack/sheet/mineral/wood buildstack = /obj/item/stack/sheet/mineral/wood - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 70 + max_integrity = 70 canSmoothWith = list(/obj/structure/table/wood, /obj/structure/table/wood/poker, /obj/structure/table/wood/bar) @@ -348,10 +281,6 @@ icon = 'icons/obj/smooth_structures/fancy_table.dmi' //so that the tables place correctly in the map editor ..() -/obj/structure/table/wood/fancy/burn() //basically made out of metal - new frame(loc) - qdel(src) - /* * Reinforced tables */ @@ -363,8 +292,10 @@ deconstruction_ready = 0 buildstack = /obj/item/stack/sheet/plasteel canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table) - health = 200 - armor = list(melee = 10, bullet = 10, laser = 10, energy = 100, bomb = 20, bio = 0, rad = 0, fire = 0, acid = 70) + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 50 + armor = list(melee = 10, bullet = 30, laser = 30, energy = 100, bomb = 20, bio = 0, rad = 0, fire = 80, acid = 70) /obj/structure/table/reinforced/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/weldingtool)) @@ -406,7 +337,7 @@ animate(src, color = previouscolor, time = 8) /obj/structure/table/reinforced/brass/ratvar_act() - health = initial(health) + obj_integrity = max_integrity /* * Surgery Tables @@ -463,27 +394,8 @@ density = 1 anchored = 1 pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density. - var/health = 20 - -/obj/structure/rack/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - rack_destroy() - else - qdel(src) - if(3) - take_damage(rand(5,25), BRUTE, 0) - -/obj/structure/rack/blob_act(obj/structure/blob/B) - rack_destroy() - - -/obj/structure/rack/mech_melee_attack(obj/mecha/M) - if(..()) - take_damage(M.force*2) + obj_integrity = 20 + max_integrity = 20 /obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0) if(height==0) return 1 @@ -512,7 +424,7 @@ /obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params) if (istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - rack_destroy() + deconstruct(TRUE) return if(user.a_intent == "harm") return ..() @@ -520,78 +432,35 @@ W.Move(loc) return 1 -/obj/structure/rack/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - /obj/structure/rack/attack_paw(mob/living/user) attack_hand(user) -/obj/structure/rack/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - rack_destroy() - return 1 - /obj/structure/rack/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) user.visible_message("[user] kicks [src].", \ "You kick [src].") - take_damage(rand(4,8), BRUTE) - -/obj/structure/rack/attack_alien(mob/living/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1) - visible_message("[user] slices [src] apart.") - rack_destroy() - - -/obj/structure/rack/attack_animal(mob/living/simple_animal/user) - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - if(user.melee_damage_upper || user.obj_damage) - var/dmg_dealt = user.melee_damage_upper - if(user.obj_damage) - dmg_dealt = user.obj_damage - if(user.environment_smash) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - visible_message("[user] smashes [src] apart.") - rack_destroy() - else - take_damage(dmg_dealt, user.melee_damage_type) + take_damage(rand(4,8), BRUTE, "melee", 1) /obj/structure/rack/attack_tk() // no telehulk sorry return -/obj/structure/rack/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - -/obj/structure/rack/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/items/dodgeball.ogg', 80, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + if(damage_amount) + playsound(loc, 'sound/items/dodgeball.ogg', 80, 1) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, 1) if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 40, 1) - else - return - health -= damage - if(health <= 0) - rack_destroy() - + playsound(loc, 'sound/items/Welder.ogg', 40, 1) /* * Rack destruction */ -/obj/structure/rack/proc/rack_destroy() +/obj/structure/rack/deconstruct(disassembled = TRUE) if(!(flags&NODECONSTRUCT)) density = 0 var/obj/item/weapon/rack_parts/newparts = new(loc) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 17c4d9861ac..1a95786b56a 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -7,6 +7,8 @@ icon_state = "dispenser" density = 1 anchored = 1 + obj_integrity = 300 + max_integrity = 300 var/oxygentanks = TANK_DISPENSER_CAPACITY var/plasmatanks = TANK_DISPENSER_CAPACITY @@ -48,6 +50,9 @@ oxygentanks++ else full = TRUE + else if(istype(I, /obj/item/weapon/wrench)) + default_unfasten_wrench(user, I, time = 20) + return else if(user.a_intent != "harm") user << "[I] does not fit into [src]." return @@ -95,4 +100,13 @@ . = TRUE update_icon() + +/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) + #undef TANK_DISPENSER_CAPACITY \ No newline at end of file diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index da766af9a9f..520e18ab1ab 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -182,7 +182,7 @@ mob.client.Move(get_step(loc, direction), direction) mob.reset_perspective(null) - //if(moving && istype(loc, /turf/open/space)) + //if(moving && isspaceturf(loc)) // Todo: If you get out of a moving pod in space, you should move as well. // Same direction as pod? Direcion you moved? Halfway between? diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 1328572f43b..35f7a4c56f1 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -208,7 +208,7 @@ else wash_obj(G) else - if(istype(loc, /turf/open)) + if(isopenturf(loc)) var/turf/open/tile = loc tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1) @@ -274,6 +274,7 @@ if(istype(O,/obj/item)) var/obj/item/I = O + I.acid_level = 0 I.extinguish() @@ -371,6 +372,9 @@ else wash_obj(G) +/obj/machinery/shower/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 3) + qdel(src) /obj/machinery/shower/proc/check_heat(mob/living/carbon/C) if(watertemp == "freezing") @@ -494,12 +498,18 @@ return 1 busy = 0 O.clean_blood() + O.acid_level = 0 user.visible_message("[user] washes [O] using [src].", \ "You wash [O] using [src].") return 1 else return ..() +/obj/structure/sink/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 3) + qdel(src) + + /obj/structure/sink/kitchen name = "kitchen sink" @@ -538,7 +548,6 @@ density = 0 var/open = TRUE - /obj/structure/curtain/proc/toggle() open = !open update_icon() @@ -561,3 +570,16 @@ toggle() ..() +/obj/structure/curtain/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/cloth (loc, 3) + qdel(src) + +/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, 1) + else + playsound(loc, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(loc, 'sound/items/welder.ogg', 80, 1) \ No newline at end of file diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index f6a9cd7b922..008ae109c1d 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -7,8 +7,8 @@ pressure_resistance = 4*ONE_ATMOSPHERE anchored = 1 //initially is 0 for tile smoothing flags = ON_BORDER - var/maxhealth = 25 - var/health = 0 + max_integrity = 25 + obj_integrity = 25 var/ini_dir = null var/state = 0 var/reinf = 0 @@ -19,6 +19,8 @@ var/image/crack_overlay var/list/debris = list() can_be_unanchored = 1 + resistance_flags = ACID_PROOF + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100) /obj/structure/window/examine(mob/user) ..() @@ -26,7 +28,7 @@ /obj/structure/window/New(Loc,re=0) ..() - health = maxhealth + obj_integrity = max_integrity if(re) reinf = re if(reinf) @@ -52,22 +54,6 @@ debris += new /obj/item/stack/rods(src, rods) -/obj/structure/window/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - -/obj/structure/window/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - shatter() - if(3) - take_damage(rand(25,75), BRUTE, 0) - -/obj/structure/window/blob_act(obj/structure/blob/B) - take_damage(rand(75,150), BRUTE, 0) - /obj/structure/window/narsie_act() color = NARSIE_WINDOW_COLOUR for(var/obj/item/weapon/shard/shard in debris) @@ -82,7 +68,7 @@ /obj/structure/window/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) - shatter() + deconstruct(FALSE) /obj/structure/window/setDir(direct) if(!fulltile) @@ -106,35 +92,16 @@ return 0 return 1 - -/obj/structure/window/hitby(AM as mob|obj) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 40 - - else if(isobj(AM)) - var/obj/item/I = AM - tforce = I.throwforce - if(reinf) - tforce *= 0.25 - take_damage(tforce) - /obj/structure/window/attack_tk(mob/user) user.changeNext_move(CLICK_CD_MELEE) user.visible_message("Something knocks on [src].") add_fingerprint(user) playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1) -/obj/structure/window/attack_hulk(mob/living/carbon/human/user) +/obj/structure/window/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(!can_be_reached(user)) - return - ..(user, 1) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) - user.visible_message("[user] smashes through [src]!") - add_fingerprint(user) - take_damage(50) - return 1 + return 1 + ..() /obj/structure/window/attack_hand(mob/user) if(!can_be_reached(user)) @@ -148,31 +115,10 @@ return attack_hand(user) -/obj/structure/window/proc/attack_generic(mob/user, damage = 0, damage_type = BRUTE) //used by attack_alien, attack_animal, and attack_slime +/obj/structure/window/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime if(!can_be_reached(user)) return - user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user] smashes into [src]!") - take_damage(damage, damage_type) - -/obj/structure/window/attack_alien(mob/living/user) - attack_generic(user, 15) - -/obj/structure/window/attack_animal(mob/living/simple_animal/M) - if(!M.melee_damage_upper && !M.obj_damage) - return - if(M.obj_damage) - attack_generic(M, M.obj_damage, M.melee_damage_type) - else - attack_generic(M, M.melee_damage_upper, M.melee_damage_type) - - -/obj/structure/window/attack_slime(mob/living/simple_animal/slime/user) - if(!user.is_adult) - return - attack_generic(user, rand(10, 15)) - + ..() /obj/structure/window/attackby(obj/item/I, mob/living/user, params) if(!can_be_reached(user)) @@ -181,12 +127,12 @@ add_fingerprint(user) if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help") var/obj/item/weapon/weldingtool/WT = I - if(health < maxhealth) + if(obj_integrity < max_integrity) if(WT.remove_fuel(0,user)) user << "You begin repairing [src]..." playsound(loc, 'sound/items/Welder.ogg', 40, 1) if(do_after(user, 40/I.toolspeed, target = src)) - health = maxhealth + obj_integrity = max_integrity playsound(loc, 'sound/items/Welder2.ogg', 50, 1) update_nearby_icons() user << "You repair [src]." @@ -256,14 +202,10 @@ return return ..() - -/obj/structure/window/attacked_by(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - /obj/structure/window/mech_melee_attack(obj/mecha/M) - if(..()) - take_damage(M.force, M.damtype) + if(!can_be_reached()) + return + ..() /obj/structure/window/proc/can_be_reached(mob/user) @@ -274,35 +216,35 @@ return 0 return 1 -/obj/structure/window/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - if(reinf) - damage *= 0.5 +/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + if(.) //received damage + update_nearby_icons() + +/obj/structure/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + if(damage_amount) + playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health -= damage - update_nearby_icons() - if(health <= 0) - shatter() + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) -/obj/structure/window/proc/shatter() + +/obj/structure/window/deconstruct(disassembled = TRUE) if(qdeleted(src)) return - playsound(src, "shatter", 70, 1) - var/turf/T = loc + if(!disassembled) + playsound(src, "shatter", 70, 1) + var/turf/T = loc - if(!(flags & NODECONSTRUCT)) - for(var/i in debris) - var/obj/item/I = i + if(!(flags & NODECONSTRUCT)) + for(var/i in debris) + var/obj/item/I = i - I.loc = T - transfer_fingerprints_to(I) + I.loc = T + transfer_fingerprints_to(I) qdel(src) update_nearby_icons() @@ -402,7 +344,7 @@ if(!fulltile) return - var/ratio = health / maxhealth + var/ratio = obj_integrity / max_integrity ratio = Ceiling(ratio*4) * 25 if(smooth) @@ -416,7 +358,7 @@ /obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > T0C + (reinf ? 1600 : 800)) - take_damage(round(exposed_volume / 100), BURN, 0) + take_damage(round(exposed_volume / 100), BURN, 0, 0) ..() /obj/structure/window/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user) @@ -434,8 +376,8 @@ name = "reinforced window" icon_state = "rwindow" reinf = 1 - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 0, acid = 0) - maxhealth = 50 + armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100) + max_integrity = 50 explosion_block = 1 /obj/structure/window/reinforced/tinted @@ -448,13 +390,13 @@ icon_state = "fwindow" -/* Full Tile Windows (more health) */ +/* Full Tile Windows (more obj_integrity) */ /obj/structure/window/fulltile icon = 'icons/obj/smooth_structures/window.dmi' icon_state = "window" dir = NORTHEAST - maxhealth = 50 + max_integrity = 50 fulltile = 1 smooth = SMOOTH_TRUE canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile) @@ -463,7 +405,7 @@ icon = 'icons/obj/smooth_structures/reinforced_window.dmi' icon_state = "r_window" dir = NORTHEAST - maxhealth = 100 + max_integrity = 100 fulltile = 1 smooth = SMOOTH_TRUE canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile) @@ -481,7 +423,7 @@ /obj/structure/window/reinforced/fulltile/ice icon = 'icons/obj/smooth_structures/rice_window.dmi' icon_state = "ice_window" - maxhealth = 150 + max_integrity = 150 canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/ice) level = 3 @@ -491,11 +433,11 @@ icon = 'icons/obj/smooth_structures/shuttle_window.dmi' icon_state = "shuttle_window" dir = NORTHEAST - maxhealth = 100 + max_integrity = 100 wtype = "shuttle" fulltile = 1 reinf = 1 - armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 0, acid = 0) + armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 25, bio = 100, rad = 100, fire = 80, acid = 100) smooth = SMOOTH_TRUE canSmoothWith = null explosion_block = 1 @@ -512,7 +454,7 @@ desc = "A paper-thin pane of translucent yet reinforced brass." icon = 'icons/obj/smooth_structures/clockwork_window.dmi' icon_state = "clockwork_window_single" - maxhealth = 100 + max_integrity = 100 explosion_block = 2 //fancy AND hard to destroy. the most useful combination. var/made_glow = FALSE @@ -546,7 +488,7 @@ return ..() /obj/structure/window/reinforced/clockwork/ratvar_act() - health = maxhealth + obj_integrity = max_integrity update_icon() return 0 @@ -563,4 +505,4 @@ canSmoothWith = null fulltile = 1 dir = NORTHEAST - maxhealth = 150 + max_integrity = 150 diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index 086ab95e10c..6fae87f145f 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -2,6 +2,7 @@ /obj/structure/shuttle name = "shuttle" icon = 'icons/turf/shuttle.dmi' + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/structure/shuttle/engine name = "engine" diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index 23b37751181..e22fb4fa86e 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -10,6 +10,9 @@ icon = 'icons/turf/walls.dmi' explosion_block = 50 +/turf/closed/indestructible/acid_act(acidpwr, acid_volume, acid_id) + return 0 + /turf/closed/indestructible/oldshuttle name = "strange shuttle wall" icon = 'icons/turf/shuttleold.dmi' diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 5fc29b24f79..10851dcd9dd 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -92,7 +92,7 @@ qdel(O) var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in src) - if(hotspot && !istype(src, /turf/open/space)) + if(hotspot && !isspaceturf(src)) air.temperature = max(min(air.temperature-2000,air.temperature/2),0) qdel(hotspot) return 1 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 2ac025cc98a..2e8cc58622e 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -112,10 +112,10 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," /turf/open/floor/proc/make_plating() return ChangeTurf(/turf/open/floor/plating) -/turf/open/floor/ChangeTurf(turf/open/floor/T) - if(!istype(src,/turf/open/floor)) +/turf/open/floor/ChangeTurf(new_path) + if(!isfloorturf(src)) return ..() //fucking turfs switch the fucking src of the fucking running procs - if(!ispath(T,/turf/open/floor)) + if(!ispath(new_path, /turf/open/floor)) return ..() var/old_icon = icon_regular_floor var/old_dir = dir @@ -182,3 +182,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," /turf/open/floor/initialize() ..() MakeDirty() + +/turf/open/floor/acid_melt() + ChangeTurf(baseturf) + diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 91c259c7061..a5d13a2f3d5 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -272,16 +272,15 @@ for(var/thing in thing_to_check) if(isobj(thing)) var/obj/O = thing - if(O.resistance_flags & LAVA_PROOF || O.throwing) - continue - if(istype(O, /obj/effect/decal/cleanable/ash)) //So we don't get stuck burning the same ash pile forever - qdel(O) + if((O.resistance_flags & (LAVA_PROOF|ON_FIRE|INDESTRUCTIBLE)) || O.throwing) continue . = 1 - if(O.resistance_flags & FIRE_PROOF) - O.resistance_flags &= ~FIRE_PROOF //Even fireproof things burn up in lava - - O.fire_act() + if(!(O.resistance_flags & FLAMMABLE)) + O.resistance_flags |= FLAMMABLE //Even fireproof things burn up in lava + 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/river.dm b/code/game/turfs/simulated/river.dm index d4b3da85cb3..d5659ccb1fc 100644 --- a/code/game/turfs/simulated/river.dm +++ b/code/game/turfs/simulated/river.dm @@ -71,10 +71,10 @@ for(var/F in RANGE_TURFS(1, src) - src) var/turf/T = F var/area/new_area = get_area(T) - if(!T || (T.density && !istype(T, /turf/closed/mineral)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area))) + if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area))) continue - if(!logged_turf_type && istype(T, /turf/closed/mineral)) + if(!logged_turf_type && ismineralturf(T)) var/turf/closed/mineral/M = T logged_turf_type = M.turf_type @@ -92,7 +92,7 @@ var/turf/T = F if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type)) T.Spread(probability - prob_loss, prob_loss, whitelisted_area) - else if(istype(T, /turf/closed/mineral)) + else if(ismineralturf(T)) var/turf/closed/mineral/M = T M.ChangeTurf(M.turf_type) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 95ba9cc818d..e3760fcd446 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -108,14 +108,13 @@ dismantle_wall(1) return -/turf/closed/wall/attack_hulk(mob/user) +/turf/closed/wall/attack_hulk(mob/user, does_attack_animation = 0) ..(user, 1) if(prob(hardness)) playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) user << text("You smash through the wall.") user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) dismantle_wall(1) - else playsound(src, 'sound/effects/bang.ogg', 50, 1) user << text("You punch the wall.") @@ -137,7 +136,7 @@ return //get the user's location - if( !istype(user.loc, /turf) ) + if(!isturf(user.loc)) return //can't do this stuff whilst inside objects and such add_fingerprint(user) @@ -179,7 +178,7 @@ user << "You begin slicing through the outer plating..." playsound(src, 'sound/items/Welder.ogg', 100, 1) if(do_after(user, slicing_duration/W.toolspeed, target = src)) - if( !istype(src, /turf/closed/wall) || !user || !WT || !WT.isOn() || !T ) + if(!iswallturf(src) || !user || !WT || !WT.isOn() || !T) return 1 if( user.loc == T && user.get_active_held_item() == WT ) user << "You remove the outer plating." @@ -189,7 +188,7 @@ user << "You begin slicing through the outer plating..." playsound(src, 'sound/items/Welder.ogg', 100, 1) if(do_after(user, slicing_duration*0.6, target = src)) // plasma cutter is faster than welding tool - if( !istype(src, /turf/closed/wall) || !user || !W || !T ) + if(!iswallturf(src) || !user || !W || !T) return 1 if( user.loc == T && user.get_active_held_item() == W ) user << "You remove the outer plating." @@ -202,7 +201,7 @@ /turf/closed/wall/proc/try_destroy(obj/item/weapon/W, mob/user, turf/T) if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W - if( !istype(src, /turf/closed/wall) || !user || !W || !T ) + if(!iswallturf(src) || !user || !W || !T) return 1 if( user.loc == T && user.get_active_held_item() == W ) D.playDigSound() @@ -266,3 +265,7 @@ /turf/closed/wall/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user) return 0 + +/turf/closed/wall/acid_melt() + dismantle_wall(1) + diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index d13b8f9d2cd..950236f982c 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -51,7 +51,7 @@ /turf/open/space/proc/update_starlight() if(config.starlight) for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm - if(istype(t, /turf/open/space)) + if(isspaceturf(t)) //let's NOT update this that much pls continue SetLuminosity(4,1) @@ -173,4 +173,8 @@ /turf/open/space/is_transition_turf() if(destination_x || destination_y || destination_z) - return 1 \ No newline at end of file + return 1 + + +/turf/open/space/acid_act(acidpwr, acid_volume) + return 0 \ No newline at end of file diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 2c4c0577749..3a522e10267 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -155,7 +155,7 @@ if(!can_have_cabling()) for(var/obj/structure/cable/C in contents) - C.Deconstruct() + C.deconstruct() queue_smooth_neighbors(src) @@ -212,7 +212,7 @@ M.adjustBruteLoss(damage) M.Paralyse(damage/5) for(var/obj/mecha/M in src) - M.take_damage(damage*2, "brute") + M.take_damage(damage*2, BRUTE, "melee", 1) /turf/proc/Bless() flags |= NOJAUNT @@ -328,3 +328,24 @@ /turf/proc/is_transition_turf() return + + +/turf/acid_act(acidpwr, acid_volume) + . = 1 + var/has_acid_effect = 0 + for(var/obj/O in src) + if(intact && O.level == 1) //hidden under the floor + continue + if(istype(O, /obj/effect/acid)) + 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 /obj/effect/acid(src, acidpwr, acid_volume) + + +/turf/proc/acid_melt() + return + diff --git a/code/hub.dm b/code/hub.dm deleted file mode 100644 index f0005818f18..00000000000 --- a/code/hub.dm +++ /dev/null @@ -1,20 +0,0 @@ -/world - - hub = "Exadv1.spacestation13" -#ifdef PUTONHUB - hub_password = "kMZy3U5jJHSiBQjr" -#else - hub_password = "SORRYNOPASSWORD" -#endif - name = "/tg/ Station 13" - -/* -This is for any host that would like their server to appear on the main SS13 hub. -To use it, simply replace the password above with the password found below, and recompile, and it should work. -If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13: we can help you there. - - hub = "Exadv1.spacestation13" - hub_password = "kMZy3U5jJHSiBQjr" - name = "Space Station 13" - -*/ diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 22b243bc1ef..8711288b545 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -34,7 +34,7 @@ var/global/BSACooldown = 0 body += " played by [M.client] " body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]" - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) body += " Hasn't Entered Game " else body += " \[Heal\] " @@ -91,7 +91,7 @@ var/global/BSACooldown = 0 body += "Subtle message" if (M.client) - if(!istype(M, /mob/new_player)) + if(!isnewplayer(M)) body += "

" body += "Transformation:" body += "
" @@ -688,7 +688,7 @@ var/global/BSACooldown = 0 ai_number++ if(isAI(S)) usr << "AI [key_name(S, usr)]'s laws:" - else if(isrobot(S)) + else if(iscyborg(S)) var/mob/living/silicon/robot/R = S usr << "CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:" else if (ispAI(S)) @@ -773,8 +773,8 @@ var/global/BSACooldown = 0 /proc/kick_clients_in_lobby(message, kick_only_afk = 0) var/list/kicked_client_names = list() for(var/client/C in clients) - if(istype(C.mob, /mob/new_player)) - if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk + if(isnewplayer(C.mob)) + if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk continue if(message) C << message diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 43cd0a61fdc..d76b98037b8 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -122,7 +122,8 @@ var/list/admin_verbs_server = list( /client/proc/forcerandomrotate, /client/proc/adminchangemap, #endif - /client/proc/panicbunker + /client/proc/panicbunker, + /client/proc/toggle_hub ) var/list/admin_verbs_debug = list( @@ -358,7 +359,7 @@ var/list/admin_verbs_hideable = list( set name = "Aghost" if(!holder) return - if(istype(mob,/mob/dead/observer)) + if(isobserver(mob)) //re-enter var/mob/dead/observer/ghost = mob if(!ghost.mind || !ghost.mind.current) //won't do anything if there is no body @@ -369,7 +370,7 @@ var/list/admin_verbs_hideable = list( ghost.can_reenter_corpse = 1 //force re-entering even when otherwise not possible ghost.reenter_corpse() feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - else if(istype(mob,/mob/new_player)) + else if(isnewplayer(mob)) src << "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first." else //ghostize diff --git a/code/modules/admin/ipintel.dm b/code/modules/admin/ipintel.dm index d176de32bb5..af7296311f7 100644 --- a/code/modules/admin/ipintel.dm +++ b/code/modules/admin/ipintel.dm @@ -53,9 +53,9 @@ if (query.NextRow()) res.cache = TRUE res.cachedate = query.item[1] - res.intel = query.item[2] - res.cacheminutesago = query.item[3] - res.cacherealtime = world.realtime - (query.item[3]*10*60) + res.intel = text2num(query.item[2]) + res.cacheminutesago = text2num(query.item[3]) + res.cacherealtime = world.realtime - (text2num(query.item[3])*10*60) SSipintel.cache[ip] = res return res.intel = ip_intel_query(ip) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 199e00dfd23..168c0ac1bba 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -244,7 +244,7 @@ M_job = "AI" else if(ispAI(M)) M_job = "pAI" - else if(isrobot(M)) + else if(iscyborg(M)) M_job = "Cyborg" else M_job = "Silicon-based" @@ -260,7 +260,7 @@ else M_job = "Living" - else if(istype(M,/mob/new_player)) + else if(isnewplayer(M)) M_job = "New player" else if(isobserver(M)) @@ -356,11 +356,11 @@ for(var/obj/item/weapon/disk/nuclear/N in poi_list) dat += "[N.name], " var/atom/disk_loc = N.loc - while(!istype(disk_loc, /turf)) - if(istype(disk_loc, /mob)) + while(!isturf(disk_loc)) + if(ismob(disk_loc)) var/mob/M = disk_loc dat += "carried by [M.real_name] " - if(istype(disk_loc, /obj)) + if(isobj(disk_loc)) var/obj/O = disk_loc dat += "in \a [O.name] " disk_loc = disk_loc.loc diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index cce111cdbfb..1065b1fa29c 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -389,7 +389,7 @@ feedback_add_details("admin_secrets_fun_used","BO") message_admins("[key_name_admin(usr)] broke all lights") for(var/obj/machinery/light/L in machines) - L.broken() + L.break_light_tube() if("anime") if(!check_rights(R_FUN)) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d47aaa90f2d..a5157a25298 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1339,7 +1339,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1387,7 +1387,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1417,7 +1417,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1447,7 +1447,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1470,7 +1470,7 @@ if(!ismob(M)) usr << "This can only be used on instances of type /mob." return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) usr << "This cannot be used on instances of type /mob/living/silicon/ai." return @@ -1481,7 +1481,7 @@ I.layer = initial(I.layer) I.dropped(M) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/observer = M observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), slot_w_uniform) observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes) @@ -1569,7 +1569,7 @@ return var/mob/M = locate(href_list["makeanimal"]) - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) usr << "This cannot be used on instances of type /mob/new_player." return @@ -1929,7 +1929,7 @@ switch(where) if("inhand") - if (!iscarbon(usr) && !isrobot(usr)) + if (!iscarbon(usr) && !iscyborg(usr)) usr << "Can only spawn in hand when you're a carbon mob or cyborg." where = "onfloor" target = usr @@ -1972,7 +1972,7 @@ var/mob/living/L = usr var/obj/item/I = O L.put_in_hands(I) - if(isrobot(L)) + if(iscyborg(L)) var/mob/living/silicon/robot/R = L if(R.module) R.module.add_module(I) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index e36a81bf833..4dc8490eceb 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -134,7 +134,7 @@ vals += v vals[v] = SDQL_expression(d, set_list[v]) - if(istype(d, /turf)) + if(isturf(d)) for(var/v in vals) if(v == "x" || v == "y" || v == "z") continue diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 0b55145c846..718bc116192 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -23,9 +23,9 @@ var/list/client/targets[0] for(var/client/T) if(T.mob) - if(istype(T.mob, /mob/new_player)) + if(isnewplayer(T.mob)) targets["(New Player) - [T]"] = T - else if(istype(T.mob, /mob/dead/observer)) + else if(isobserver(T.mob)) targets["[T.mob.name](Ghost) - [T]"] = T else targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 16bd59b1684..c68066cac0a 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -242,34 +242,34 @@ . = 1 switch(mode) if(BASIC_BUILDMODE) - if(istype(object,/turf) && left_click && !alt_click && !ctrl_click) + if(isturf(object) && left_click && !alt_click && !ctrl_click) var/turf/T = object - if(istype(object,/turf/open/space)) + if(isspaceturf(object)) T.ChangeTurf(/turf/open/floor/plasteel) - else if(istype(object,/turf/open/floor)) + else if(isfloorturf(object)) T.ChangeTurf(/turf/closed/wall) - else if(istype(object,/turf/closed/wall)) + else if(iswallturf(object)) T.ChangeTurf(/turf/closed/wall/r_wall) log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])") return else if(right_click) log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])") - if(istype(object,/turf/closed/wall)) + if(iswallturf(object)) var/turf/T = object T.ChangeTurf(/turf/open/floor/plasteel) - else if(istype(object,/turf/open/floor)) + else if(isfloorturf(object)) var/turf/T = object T.ChangeTurf(/turf/open/space) else if(istype(object,/turf/closed/wall/r_wall)) var/turf/T = object T.ChangeTurf(/turf/closed/wall) - else if(istype(object,/obj)) + else if(isobj(object)) qdel(object) return - else if(istype(object,/turf) && alt_click && left_click) + else if(isturf(object) && alt_click && left_click) log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])") new/obj/machinery/door/airlock(get_turf(object)) - else if(istype(object,/turf) && ctrl_click && left_click) + else if(isturf(object) && ctrl_click && left_click) switch(build_dir) if(NORTH) var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object)) diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index e152c347d06..f562ec3bdb7 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -24,7 +24,7 @@ var/rendered = "DEAD: ADMIN([src.holder.fakekey ? pick(nicknames) : src.key]) says, \"[msg]\"" for (var/mob/M in player_list) - if (istype(M, /mob/new_player)) + if(isnewplayer(M)) continue if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above M.show_message(rendered, 2) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index b7dc53adae1..4ed208924f8 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -220,7 +220,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that return var/turf/T = mob.loc - if (!( istype(T, /turf) )) + if(!isturf(T)) return var/datum/gas_mixture/env = T.return_air() @@ -241,7 +241,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(!ticker || !ticker.mode) alert("Wait until the game starts") return - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) log_admin("[key_name(src)] has robotized [M.key].") var/mob/living/carbon/human/H = M spawn(0) @@ -257,7 +257,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(!ticker || !ticker.mode) alert("Wait until the game starts") return - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) log_admin("[key_name(src)] has blobized [M.key].") var/mob/living/carbon/human/H = M spawn(0) @@ -280,7 +280,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that alert("That mob doesn't seem to exist, close the panel and try again.") return - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) alert("The mob must not be a new_player.") return @@ -301,7 +301,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available if(!choice) return 0 - if(!istype(choice, /mob/dead/observer)) + if(!isobserver(choice)) var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No") if(confirm != "Yes") return 0 @@ -427,7 +427,7 @@ var/global/list/g_fancy_list_of_types = null if(!ticker || !ticker.mode) alert("Wait until the game starts") return - if (istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/worn = H.wear_id var/obj/item/weapon/card/id/id = null diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index a69cc1df9dc..7d75d17956a 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -8,7 +8,7 @@ var/datum/gas_mixture/GM = target.return_air() var/list/GM_gases var/burning = 0 - if(istype(target, /turf/open)) + if(isopenturf(target)) var/turf/open/T = target if(T.active_hotspot) burning = 1 diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index 364a5af4750..b4a6821c09b 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -141,38 +141,38 @@ if("restore to default") O.vars[variable] = initial(O.vars[variable]) if(method) - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if ( istype(M , O.type) ) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -212,7 +212,7 @@ //Convert the string vars for anything that's not O if(method) - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if ( istype(M , O.type) ) new_value = pre_processing //reset new_value, ready to convert it uniquely for the next iteration @@ -227,7 +227,7 @@ M.vars[variable] = new_value CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) new_value = pre_processing @@ -242,7 +242,7 @@ A.vars[variable] = new_value CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) new_value = pre_processing @@ -257,7 +257,7 @@ A.vars[variable] = new_value CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) new_value = pre_processing @@ -272,7 +272,7 @@ M.vars[variable] = new_value CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) new_value = pre_processing @@ -287,7 +287,7 @@ A.vars[variable] = new_value CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) new_value = pre_processing @@ -313,7 +313,7 @@ O.vars[variable] = new_value if(method) - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if ( istype(M , O.type) ) if(variable=="luminosity") @@ -322,7 +322,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) if(variable=="luminosity") @@ -331,7 +331,7 @@ A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) if(variable=="luminosity") @@ -341,7 +341,7 @@ CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) if(variable=="luminosity") @@ -350,7 +350,7 @@ M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) if(variable=="luminosity") @@ -359,7 +359,7 @@ A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) if(variable=="luminosity") @@ -374,38 +374,38 @@ if(new_value == null) return O.vars[variable] = new_value if(method) - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if ( istype(M , O.type) ) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -417,37 +417,37 @@ O.vars[variable] = new_value if(method) - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if ( istype(M , O.type) ) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O.type, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O.type, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] @@ -458,76 +458,76 @@ if(new_value == null) return O.vars[variable] = new_value if(method) - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if ( istype(M , O.type) ) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if ( istype(A , O.type) ) A.vars[variable] = O.vars[variable] CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if (M.type == O.type) M.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if (A.type == O.type) A.vars[variable] = O.vars[variable] CHECK_TICK if(method) - if(istype(O,/mob)) + if(ismob(O)) for(var/mob/M in mob_list) if(istype(M,O.type)) M.on_varedit(variable) CHECK_TICK - else if(istype(O,/obj)) + else if(isobj(O)) for(var/obj/A in world) if(istype(A,O.type)) A.on_varedit(variable) CHECK_TICK - else if(istype(O,/turf)) + else if(isturf(O)) for(var/turf/A in block(locate(1,1,1),locate(world.maxx,world.maxy,world.maxz))) if(istype(A,O.type)) A.on_varedit(variable) CHECK_TICK else - if(istype(O, /mob)) + if(ismob(O)) for(var/mob/M in mob_list) if(M.type == O.type) M.on_varedit(variable) CHECK_TICK - else if(istype(O, /obj)) + else if(isobj(O)) for(var/obj/A in world) if(A.type == O.type) A.on_varedit(variable) CHECK_TICK - else if(istype(O, /turf)) + else if(isturf(O)) for(var/turf/A in world) if(A.type == O.type) A.on_varedit(variable) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 843edc9bdc2..c48931b2332 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -594,7 +594,7 @@ Traitors and the like can also be revived with the previous role mostly intact. log_admin("[key_name(usr)] has gibbed [key_name(M)]") message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]") - if(istype(M, /mob/dead/observer)) + if(isobserver(M)) new /obj/effect/gibspawner/generic(M.loc, M.viruses) return if(confirm == "Yes") @@ -1153,3 +1153,17 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits dat += "[S.name] - Announce | Remove
" dat += "
Add New Goal" usr << browse(dat, "window=goals;size=400x400") + + +/client/proc/toggle_hub() + set category = "Server" + set name = "Toggle Hub" + + world.visibility = (!world.visibility) + + log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.") + message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.") + if (world.visibility && !world.reachable) + message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.") + + feedback_add_details("admin_verb","HUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! \ No newline at end of file diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 31ecea937bd..833068afdab 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -59,7 +59,7 @@ affecting = H.get_bodypart(type) H.Stun(3) if(affecting) - if(affecting.take_damage(1, 0)) + if(affecting.receive_damage(1, 0)) H.update_damage_overlays() else if(ismouse(target)) var/mob/living/simple_animal/mouse/M = target diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index 7ce4eba77b1..fff0ba66314 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -69,6 +69,8 @@ if(!istype(location) || !(location.air)) return 0 + location.active_hotspot = src + if(volume > CELL_VOLUME*0.95) bypassing = 1 else @@ -87,9 +89,9 @@ location.assume_air(affected) for(var/A in loc) - var/atom/item = A - if(item && item != src) // It's possible that the item is deleted in temperature_expose - item.fire_act(null, temperature, volume) + var/atom/AT = A + if(AT && AT != src) // It's possible that the item is deleted in temperature_expose + AT.fire_act(temperature, volume) return 0 @@ -148,7 +150,7 @@ SetLuminosity(0) SSair.hotspots -= src DestroyTurf() - if(istype(loc, /turf)) + if(isturf(loc)) var/turf/open/T = loc if(T.active_hotspot == src) T.active_hotspot = null @@ -157,8 +159,7 @@ return QDEL_HINT_PUTINPOOL /obj/effect/hotspot/proc/DestroyTurf() - - if(istype(loc, /turf)) + if(isturf(loc)) var/turf/T = loc if(T.to_be_destroyed) var/chance_of_deletion @@ -175,4 +176,4 @@ /obj/effect/hotspot/Crossed(mob/living/L) ..() if(isliving(L)) - L.fire_act() + L.fire_act(temperature, volume) diff --git a/code/modules/atmospherics/environmental/LINDA_system.dm b/code/modules/atmospherics/environmental/LINDA_system.dm index 30d359d4f40..73c2c7bc4b8 100644 --- a/code/modules/atmospherics/environmental/LINDA_system.dm +++ b/code/modules/atmospherics/environmental/LINDA_system.dm @@ -92,7 +92,7 @@ return adjacent_turfs /atom/proc/air_update_turf(command = 0) - if(!istype(loc,/turf) && command) + if(!isturf(loc) && command) return var/turf/T = get_turf(loc) T.air_update_turf(command) @@ -103,7 +103,7 @@ SSair.add_to_active(src,command) /atom/movable/proc/move_update_air(turf/T) - if(istype(T,/turf)) + if(isturf(T)) T.air_update_turf(1) air_update_turf(1) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 9d2c5627bc2..f73dc6b4cc9 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -55,6 +55,11 @@ active_power_usage = 8 power_channel = ENVIRON req_access = list(access_atmospherics) + obj_integrity = 250 + 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 = 0 var/danger_level = 0 var/mode = AALARM_MODE_SCRUBBING @@ -628,8 +633,7 @@ if(istype(W, /obj/item/weapon/wirecutters) && panel_open && wires.is_all_cut()) playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1) user << "You cut the final wires." - var/obj/item/stack/cable_coil/cable = new /obj/item/stack/cable_coil(loc) - cable.amount = 5 + new /obj/item/stack/cable_coil(loc, 5) buildstage = 1 update_icon() return @@ -713,4 +717,17 @@ return emagged = TRUE visible_message("Sparks fly out of the [src]!", "You emag the [src], disabling its safeties.") - playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) \ No newline at end of file + playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) + +/obj/machinery/airalarm/obj_break(damage_flag) + ..() + update_icon() + +/obj/machinery/airalarm/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 2) + var/obj/item/I = new /obj/item/weapon/electronics/airalarm(loc) + if(!disassembled) + I.obj_integrity = I.max_integrity * 0.5 + new /obj/item/stack/cable_coil(loc, 3) + qdel(src) \ No newline at end of file diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index 0101bd9d415..a3bb43227bc 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -16,6 +16,10 @@ Pipelines + Other Objects -> Pipe network power_channel = ENVIRON on_blueprints = TRUE layer = GAS_PIPE_LAYER //under wires + armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 100, acid = 70) + resistance_flags = FIRE_PROOF + obj_integrity = 200 + max_integrity = 200 var/nodealert = 0 var/can_unwrench = 0 var/initialize_directions = 0 @@ -152,11 +156,10 @@ Pipelines + Other Objects -> Pipe network //You unwrenched a pipe full of pressure? Let's splat you into the wall, silly. if(unsafe_wrenching) unsafe_pressure_release(user, internal_pressure) - Deconstruct() + deconstruct(TRUE) else return ..() - /obj/machinery/atmospherics/proc/can_unwrench(mob/user) return can_unwrench @@ -179,13 +182,16 @@ Pipelines + Other Objects -> Pipe network user.visible_message("[user] is sent flying by pressure!","The pressure sends you flying!") user.throw_at(target, range, speed) -/obj/machinery/atmospherics/Deconstruct() - if(can_unwrench) - stored.loc = src.loc - transfer_fingerprints_to(stored) - stored = null - - qdel(src) +/obj/machinery/atmospherics/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(can_unwrench) + if(stored) + stored.forceMove(loc) + if(!disassembled) + stored.obj_integrity = stored.max_integrity * 0.5 + transfer_fingerprints_to(stored) + stored = null + ..() /obj/machinery/atmospherics/proc/getpipeimage(iconset, iconstate, direction, col=rgb(255,255,255)) @@ -226,7 +232,7 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) - Deconstruct() + deconstruct(FALSE) //Find a connecting /obj/machinery/atmospherics in specified direction @@ -288,3 +294,9 @@ Pipelines + Other Objects -> Pipe network //Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it. /obj/machinery/atmospherics/proc/can_see_pipes() return 1 + +/obj/machinery/atmospherics/fire_act(exposed_temperature, exposed_volume) + var/turf/T = src.loc + if(T && T.intact && level == 1) //protected from fire when hidden behind a floor. + return + ..() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 9ec331734ac..e5c82a06462 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -4,6 +4,9 @@ icon_state = "cell-off" density = 1 anchored = 1 + obj_integrity = 350 + 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 = FALSE state_open = FALSE @@ -50,9 +53,16 @@ conduction_coefficient = initial(conduction_coefficient) * C /obj/machinery/atmospherics/components/unary/cryo_cell/Destroy() - beaker = null + if(beaker) + qdel(beaker) + beaker = null return ..() +/obj/machinery/atmospherics/components/unary/cryo_cell/on_deconstruction() + if(beaker) + beaker.forceMove(loc) + beaker = null + /obj/machinery/atmospherics/components/unary/cryo_cell/update_icon() if(panel_open) icon_state = "cell-o" @@ -137,7 +147,7 @@ on = FALSE ..() if(beaker) - beaker.loc = src + beaker.forceMove(src) /obj/machinery/atmospherics/components/unary/cryo_cell/close_machine(mob/living/carbon/user) if((isnull(user) || istype(user)) && state_open && !panel_open) @@ -253,7 +263,7 @@ . = TRUE if("ejectbeaker") if(beaker) - beaker.loc = loc + beaker.forceMove(loc) beaker = null . = TRUE update_icon() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm index cee595c5466..af070c4091b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm @@ -4,6 +4,8 @@ icon_state = "generic" name = "pressure tank" desc = "A large vessel containing pressurized gas." + obj_integrity = 800 + max_integrity = 800 var/volume = 10000 //in liters, 1 meters by 1 meters by 2 meters density = 1 var/gas_type = 0 @@ -46,4 +48,4 @@ var/datum/gas_mixture/air_contents = AIR1 air_contents.assert_gases("o2", "n2") air_contents.gases["o2"][MOLES] = AIR_CONTENTS * 0.2 - air_contents.gases["n2"][MOLES] = AIR_CONTENTS * 0.8 \ No newline at end of file + air_contents.gases["n2"][MOLES] = AIR_CONTENTS * 0.8 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 74a0a279188..2a62684c873 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -6,6 +6,9 @@ var/icon_state_open = "cold_off" density = TRUE anchored = TRUE + obj_integrity = 300 + max_integrity = 300 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 80, acid = 30) var/on = FALSE var/min_temperature = 0 diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index a4e0d60541b..b0116712833 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -144,7 +144,7 @@ var/pipenetwarnings = 10 var/target_temperature var/target_heat_capacity - if(istype(target, /turf/open)) + if(isopenturf(target)) var/turf/open/modeled_location = target target_temperature = modeled_location.GetTemperature() diff --git a/code/modules/atmospherics/machinery/other/meter.dm b/code/modules/atmospherics/machinery/other/meter.dm index 4f94c2a2b4e..4bde239d26c 100644 --- a/code/modules/atmospherics/machinery/other/meter.dm +++ b/code/modules/atmospherics/machinery/other/meter.dm @@ -11,6 +11,10 @@ use_power = 1 idle_power_usage = 2 active_power_usage = 4 + obj_integrity = 150 + max_integrity = 150 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 40, acid = 0) + /obj/machinery/meter/New() ..() diff --git a/code/modules/atmospherics/machinery/other/zvent.dm b/code/modules/atmospherics/machinery/other/zvent.dm index fa191981832..0df9d17410e 100644 --- a/code/modules/atmospherics/machinery/other/zvent.dm +++ b/code/modules/atmospherics/machinery/other/zvent.dm @@ -20,7 +20,7 @@ /obj/machinery/zvent/process_atmos() //all this object does, is make its turf share air with the ones above and below it, if they have a vent too. - if (istype(loc,/turf)) //if we're not on a valid turf, forget it + if(isturf(loc)) //if we're not on a valid turf, forget it for (var/new_z in list(-1,1)) //change this list if a fancier system of z-levels gets implemented var/turf/open/zturf_conn = locate(x,y,z+new_z) if (istype(zturf_conn)) diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm index 9585fb6b8fb..8f6467cd09a 100644 --- a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm @@ -1,4 +1,4 @@ -/obj/machinery/atmospherics/pipe/heat_exchanging/ +/obj/machinery/atmospherics/pipe/heat_exchanging icon = 'icons/obj/atmospherics/pipes/heat.dmi' level = 2 var/initialize_directions_he diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index fc412840ebe..32803711f95 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -38,7 +38,7 @@ ..() /obj/machinery/atmospherics/pipe/hide(i) - if(level == 1 && istype(loc, /turf)) + if(level == 1 && isturf(loc)) invisibility = i ? INVISIBILITY_MAXIMUM : 0 update_icon() @@ -97,4 +97,9 @@ N.update_icon() /obj/machinery/atmospherics/pipe/returnPipenets() - . = list(parent) \ No newline at end of file + . = list(parent) + +/obj/machinery/atmospherics/pipe/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 12) + return 0 + . = ..() diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index df48ca85a8d..0e722acfba4 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -17,8 +17,10 @@ var/gas_type = "" var/release_pressure = ONE_ATMOSPHERE - armor = list(melee = 50, bullet = 50, laser = 50, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 10, acid = 0) - var/health = 100 + armor = list(melee = 50, bullet = 50, laser = 50, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 80, acid = 50) + obj_integrity = 250 + max_integrity = 250 + integrity_failure = 100 pressure_resistance = 7 * ONE_ATMOSPHERE var/temperature_resistance = 1000 + T0C var/starter_temp @@ -182,40 +184,56 @@ /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > temperature_resistance) - take_damage(5, BRUTE, 0) + take_damage(5, BURN, 0) -/obj/machinery/portable_atmospherics/canister/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - switch(damage_type) - if(BRUTE) - if(sound_effect) - if(damage) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - else - playsound(loc, 'sound/weapons/tap.ogg', 50, 1) - if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 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 - return - if(stat & BROKEN) + new /obj/item/stack/sheet/metal (loc, 5) + qdel(src) + +/obj/machinery/portable_atmospherics/canister/attackby(obj/item/weapon/W, mob/user, params) + if(user.a_intent != "harm" && istype(W, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/WT = W + if(stat & BROKEN) + if(!WT.remove_fuel(0, user)) + return + playsound(loc, 'sound/items/Welder.ogg', 40, 1) + user << "You begin cutting [src] apart..." + if(do_after(user, 30, target = src)) + deconstruct(TRUE) + else + user << "You cannot slice [src] apart when it isn't broken." + return 1 + else + return ..() + +/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag) + if((stat & BROKEN) || (flags & NODECONSTRUCT)) return - health = max( health - damage, 0) - if(!health) - 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() + canister_break() - stat |= BROKEN - density = 0 - playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3) - update_icon() - investigate_log("was destroyed.", "atmos") +/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() - if(holding) - holding.loc = T - holding = null + stat |= BROKEN + density = 0 + playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3) + update_icon() + investigate_log("was destroyed.", "atmos") + + if(holding) + holding.forceMove(T) + holding = null /obj/machinery/portable_atmospherics/canister/process_atmos() ..() @@ -236,39 +254,6 @@ air_update_turf() // Update the environment if needed. update_icon() -/obj/machinery/portable_atmospherics/canister/blob_act(obj/structure/blob/B) - take_damage(100, BRUTE, 0) - -/obj/machinery/portable_atmospherics/canister/burn() - take_damage(health, BURN, 1) - ..() - -/obj/machinery/portable_atmospherics/canister/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage / 2, P.damage_type, 0) - -/obj/machinery/portable_atmospherics/canister/ex_act(severity, target) - switch(severity) - if(1) - if((stat & BROKEN) || prob(30)) - qdel(src) - else - take_damage(100, BRUTE, 0) - if(2) - if(stat & BROKEN) - qdel(src) - else - take_damage(rand(40, 110), BRUTE, 0) - if(3) - take_damage(rand(15, 40), BRUTE, 0) - -/obj/machinery/portable_atmospherics/canister/attacked_by(obj/item/I, mob/user) - if(I.force) - user.visible_message("[user] has hit [src] with [I]!", "You hit [src] with [I]!") - investigate_log("was smacked with \a [I] by [key_name(user)].", "atmos") - add_fingerprint(user) - take_damage(I.force, I.damtype, 1) - /obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \ datum/tgui/master_ui = null, datum/ui_state/state = physical_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 11e65a78165..49baa0e1bf4 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -2,6 +2,10 @@ name = "portable_atmospherics" icon = 'icons/obj/atmos.dmi' use_power = 0 + obj_integrity = 250 + 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 var/obj/machinery/atmospherics/components/unary/portables_connector/connected_port @@ -106,4 +110,12 @@ else if(istype(W, /obj/item/device/analyzer) && Adjacent(user)) atmosanalyzer_scan(air_contents, user) else - return ..() \ No newline at end of file + return ..() + +/obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user) + if(I.force < 10 && !(stat & BROKEN)) + take_damage(0) + else + investigate_log("was smacked with \a [I] by [key_name(user)].", "atmos") + add_fingerprint(user) + ..() \ No newline at end of file diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm index 7a489bfe815..4da89a01bc2 100644 --- a/code/modules/awaymissions/bluespaceartillery.dm +++ b/code/modules/awaymissions/bluespaceartillery.dm @@ -12,8 +12,8 @@ anchored = 1 /obj/machinery/artillerycontrol/process() - if(src.reload[src] breaks down!
") icon_state = "forge_off" STOP_PROCESSING(SSobj, src) - broken = 1 - -/obj/structure/academy_wizard_spawner/attackby(obj/item/weapon/W, mob/living/user, params) - add_fingerprint(user) - user.changeNext_move(CLICK_CD_MELEE) - if(!broken) - health -= W.force - update_status() - ..() - -/obj/structure/academy_wizard_spawner/bullet_act(obj/item/projectile/Proj) - if(!broken) - if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) - health -= Proj.damage - update_status() - ..() - return /datum/outfit/wizard/academy name = "Academy Wizard" diff --git a/code/modules/awaymissions/mission_code/Cabin.dm b/code/modules/awaymissions/mission_code/Cabin.dm index 2f386c471e2..7fbb1dc0f47 100644 --- a/code/modules/awaymissions/mission_code/Cabin.dm +++ b/code/modules/awaymissions/mission_code/Cabin.dm @@ -62,7 +62,7 @@ active = FALSE toggleFirepit() -/obj/structure/firepit/fire_act() +/obj/structure/firepit/fire_act(exposed_temperature, exposed_volume) if(!active) active = TRUE toggleFirepit() diff --git a/code/modules/awaymissions/mission_code/challenge.dm b/code/modules/awaymissions/mission_code/challenge.dm index 75d240ec777..329978827af 100644 --- a/code/modules/awaymissions/mission_code/challenge.dm +++ b/code/modules/awaymissions/mission_code/challenge.dm @@ -22,6 +22,7 @@ icon_state = "emitter" anchored = 1 density = 1 + resistance_flags = INDESTRUCTIBLE | FIRE_PROOF | ACID_PROOF use_power = 0 idle_power_usage = 0 diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index e213e8e3e3c..cfcca70e208 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -175,7 +175,7 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/singularity/narsie/sc_Narsie/consume(atom/A) if(is_type_in_list(A, uneatable)) return 0 - if (istype(A,/mob/living)) + if(isliving(A)) var/mob/living/L = A L.gib() else if(istype(A,/obj/)) diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index a5d07bdc5bb..d6cb20e57e3 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -58,7 +58,7 @@ user << "The Wish Granter lies silent." return - else if(!istype(user, /mob/living/carbon/human)) + else if(!ishuman(user)) user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's." return @@ -121,15 +121,15 @@ icon_state = "blobpod" var/triggered = 0 -/obj/effect/meatgrinder/Crossed(AM as mob|obj) +/obj/effect/meatgrinder/Crossed(AM) Bumped(AM) -/obj/effect/meatgrinder/Bumped(mob/M as mob|obj) +/obj/effect/meatgrinder/Bumped(mob/M) if(triggered) return - if(istype(M, /mob/living/carbon/human) && M.stat != DEAD && M.ckey) + if(ishuman(M) && M.stat != DEAD && M.ckey) for(var/mob/O in viewers(world.view, src.loc)) visible_message("[M] triggered the [src]!") triggered = 1 diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 3b61fb2dedb..bae87ba87b2 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -147,11 +147,11 @@ prefs.save_preferences() if(prefs.toggles & SOUND_LOBBY) src << "You will now hear music in the game lobby." - if(istype(mob, /mob/new_player)) + if(isnewplayer(mob)) playtitlemusic() else src << "You will no longer hear music in the game lobby." - if(istype(mob, /mob/new_player)) + if(isnewplayer(mob)) mob.stopLobbySound() feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -244,7 +244,7 @@ var/global/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost", if(new_form) prefs.ghost_form = new_form prefs.save_preferences() - if(istype(mob,/mob/dead/observer)) + if(isobserver(mob)) var/mob/dead/observer/O = mob O.update_icon(new_form) @@ -258,7 +258,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS if(new_orbit) prefs.ghost_orbit = new_orbit prefs.save_preferences() - if(istype(mob, /mob/dead/observer)) + if(isobserver(mob)) var/mob/dead/observer/O = mob O.ghost_orbit = new_orbit @@ -273,7 +273,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS if("default sprites") prefs.ghost_accs = GHOST_ACCS_NONE prefs.save_preferences() - if(istype(mob, /mob/dead/observer)) + if(isobserver(mob)) var/mob/dead/observer/O = mob O.update_icon() @@ -306,7 +306,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS if("White Ghost") prefs.ghost_others = GHOST_OTHERS_SIMPLE prefs.save_preferences() - if(istype(mob, /mob/dead/observer)) + if(isobserver(mob)) var/mob/dead/observer/O = mob O.updateghostsight() @@ -334,7 +334,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS prefs.ghost_hud = !prefs.ghost_hud src << "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"]." prefs.save_preferences() - if(istype(mob,/mob/dead/observer)) + if(isobserver(mob)) mob.hud_used.show_hud() /client/verb/toggle_inquisition() // warning: unexpected inquisition diff --git a/code/modules/client/verbs/who.dm b/code/modules/client/verbs/who.dm index a6e5411a8bc..48d7d6f1872 100644 --- a/code/modules/client/verbs/who.dm +++ b/code/modules/client/verbs/who.dm @@ -68,7 +68,7 @@ if(isobserver(C.mob)) msg += " - Observing" - else if(istype(C.mob,/mob/new_player)) + else if(isnewplayer(C.mob)) msg += " - Lobby" else msg += " - Playing" diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index b57b4ad5927..8068b0ea9aa 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -159,8 +159,8 @@ origin_tech = "syndicate=2" sensor_mode = 0 //Hey who's this guy on the Syndicate Shuttle?? random_sensor = 0 - resistance_flags = FIRE_PROOF - armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + resistance_flags = 0 + armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/clothing/under/chameleon/New() ..() @@ -176,8 +176,8 @@ item_state = "armor" blood_overlay_type = "armor" origin_tech = "syndicate=2" - resistance_flags = FIRE_PROOF - armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + resistance_flags = 0 + armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/clothing/suit/chameleon/New() ..() @@ -192,8 +192,8 @@ icon_state = "meson" item_state = "meson" origin_tech = "syndicate=2" - resistance_flags = FIRE_PROOF - armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + resistance_flags = 0 + armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/clothing/glasses/chameleon/New() ..() @@ -208,8 +208,8 @@ icon_state = "yellow" item_state = "ygloves" - resistance_flags = FIRE_PROOF - armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + resistance_flags = 0 + armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/clothing/gloves/chameleon/New() ..() @@ -224,8 +224,8 @@ icon_state = "greysoft" item_color = "grey" - resistance_flags = FIRE_PROOF - armor = list(melee = 5, bullet = 5, laser = 5, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + resistance_flags = 0 + armor = list(melee = 5, bullet = 5, laser = 5, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) var/datum/action/item_action/chameleon/change/chameleon_action = null @@ -256,8 +256,8 @@ desc = "A face-covering mask that can be connected to an air supply. While good for concealing your identity, it isn't good for blocking gas flow." //More accurate icon_state = "gas_alt" item_state = "gas_alt" - resistance_flags = FIRE_PROOF - armor = list(melee = 5, bullet = 5, laser = 5, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + resistance_flags = 0 + armor = list(melee = 5, bullet = 5, laser = 5, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR @@ -307,9 +307,9 @@ permeability_coefficient = 0.05 flags = NOSLIP origin_tech = "syndicate=2" - resistance_flags = FIRE_PROOF + resistance_flags = 0 pockets = /obj/item/weapon/storage/internal/pocket/shoes - armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) + armor = list(melee = 10, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/clothing/shoes/chameleon/New() ..() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index b3301d68acc..b10df45b782 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -1,6 +1,10 @@ /obj/item/clothing name = "clothing" - resistance_flags = 0 + resistance_flags = FLAMMABLE + obj_integrity = 150 + max_integrity = 150 + integrity_failure = 80 + var/damaged_clothes = 0 //similar to machine's BROKEN stat and structure's broken var var/flash_protect = 0 //Malk: What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS var/tint = 0 //Malk: Sets the item's level of visual impairment tint, normally set to the same as flash_protect var/up = 0 // but seperated to allow items to protect but not impair vision, like space helmets @@ -59,6 +63,13 @@ return ..() /obj/item/clothing/attackby(obj/item/W, mob/user, params) + if(damaged_clothes && istype(W, /obj/item/stack/sheet/cloth)) + var/obj/item/stack/sheet/cloth/C = W + C.use(1) + update_clothes_damaged_state(FALSE) + obj_integrity = max_integrity + user << "You fix the damages on [src] with [C]." + return 1 if(pockets) return pockets.attackby(W, user, params) else @@ -110,6 +121,34 @@ user.vars[variable] = user_vars_to_edit[variable] +/obj/item/clothing/examine(mob/user) + ..() + if(damaged_clothes) + user << "It looks damaged!" + +/obj/item/clothing/obj_break(damage_flag) + if(!damaged_clothes) + update_clothes_damaged_state(TRUE) + +var/list/damaged_clothes_icons = list() + +/obj/item/clothing/proc/update_clothes_damaged_state(damaging = TRUE) + var/index = "\ref[initial(icon)]-[initial(icon_state)]" + if(damaging) + damaged_clothes = 1 + var/icon/damaged_clothes_icon = damaged_clothes_icons[index] + if(!damaged_clothes_icon) + damaged_clothes_icon = icon(initial(icon), initial(icon_state), , 1) //we only want to apply damaged effect to the initial icon_state for each object + damaged_clothes_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent) + damaged_clothes_icon.Blend(icon('icons/effects/item_damage.dmi', "itemdamaged"), ICON_MULTIPLY) //adds damage effect and the remaining white areas become transparant + damaged_clothes_icon = fcopy_rsc(damaged_clothes_icon) + damaged_clothes_icons[index] = damaged_clothes_icon + add_overlay(damaged_clothes_icon, 1) + else + damaged_clothes = 0 + overlays -= damaged_clothes_icons[index] + priority_overlays -= damaged_clothes_icons[index] + //Ears: currently only used for headsets and earmuffs /obj/item/clothing/ears @@ -117,7 +156,7 @@ w_class = 1 throwforce = 0 slot_flags = SLOT_EARS - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/ears/earmuffs name = "earmuffs" @@ -127,7 +166,7 @@ flags = EARBANGPROTECT strip_delay = 15 put_on_delay = 25 - resistance_flags = 0 + resistance_flags = FLAMMABLE //Glasses /obj/item/clothing/glasses @@ -145,7 +184,7 @@ var/vision_correction = 0 //does wearing these glasses correct some of our vision defects? strip_delay = 20 put_on_delay = 25 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /* SEE_SELF // can see self, no matter what SEE_MOBS // can see all mobs, no matter what @@ -175,9 +214,17 @@ BLIND // can't see anything /obj/item/clothing/gloves/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) + if(damaged_clothes) + . += image("icon"='icons/effects/item_damage.dmi', "icon_state"="damagedgloves") if(blood_DNA) . += image("icon"='icons/effects/blood.dmi', "icon_state"="bloodyhands") +/obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_gloves() + // Called just before an attack_hand(), in mob/UnarmedAttack() /obj/item/clothing/gloves/proc/Touch(atom/A, proximity) return 0 // return 1 to cancel attack_hand() @@ -195,9 +242,18 @@ BLIND // can't see anything /obj/item/clothing/head/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) + if(damaged_clothes) + . += image("icon"='icons/effects/item_damage.dmi', "icon_state"="damagedhelmet") if(blood_DNA) . += image("icon"='icons/effects/blood.dmi', "icon_state"="helmetblood") +/obj/item/clothing/head/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_head() + + //Mask /obj/item/clothing/mask name = "mask" @@ -213,8 +269,18 @@ BLIND // can't see anything /obj/item/clothing/mask/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) - if(blood_DNA && (body_parts_covered & HEAD)) - . += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood") + if(body_parts_covered & HEAD) + if(damaged_clothes) + . += image("icon"='icons/effects/item_damage.dmi', "icon_state"="damagedmask") + if(blood_DNA) + . += image("icon"='icons/effects/blood.dmi', "icon_state"="maskblood") + +/obj/item/clothing/mask/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_wear_mask() + //Override this to modify speech like luchador masks. /obj/item/clothing/mask/proc/speechModification(message) @@ -276,9 +342,16 @@ BLIND // can't see anything else bloody = bloody_shoes[BLOOD_STATE_HUMAN] + if(damaged_clothes) + . += image("icon"='icons/effects/item_damage.dmi', "icon_state"="damagedshoe") if(bloody) . += image("icon"='icons/effects/blood.dmi', "icon_state"="shoeblood") +/obj/item/clothing/shoes/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_shoes() /obj/item/clothing/shoes/clean_blood() ..() @@ -306,9 +379,17 @@ BLIND // can't see anything /obj/item/clothing/suit/worn_overlays(isinhands = FALSE) . = list() if(!isinhands) + if(damaged_clothes) + . += image("icon"='icons/effects/item_damage.dmi', "icon_state"="damaged[blood_overlay_type]") if(blood_DNA) . += image("icon"='icons/effects/blood.dmi', "icon_state"="[blood_overlay_type]blood") +/obj/item/clothing/suit/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_wear_suit() + //Spacesuit //Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together. // Meaning the the suit is defined directly after the corrisponding helmet. Just like below! @@ -319,7 +400,7 @@ BLIND // can't see anything flags = STOPSPRESSUREDMAGE | THICKMATERIAL item_state = "spaceold" permeability_coefficient = 0.01 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50, fire = 0, acid = 70) + 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|HIDEHAIR|HIDEFACIALHAIR cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT @@ -329,7 +410,7 @@ BLIND // can't see anything strip_delay = 50 put_on_delay = 50 flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/suit/space name = "space suit" @@ -343,7 +424,7 @@ BLIND // can't see anything body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals) slowdown = 1 - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50, fire = 0, acid = 70) + 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 cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT @@ -351,7 +432,7 @@ BLIND // can't see anything max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT strip_delay = 80 put_on_delay = 80 - resistance_flags = FIRE_PROOF + resistance_flags = 0 //Under clothing @@ -376,6 +457,9 @@ BLIND // can't see anything . = list() if(!isinhands) + + if(damaged_clothes) + . += image("icon"='icons/effects/item_damage.dmi', "icon_state"="damageduniform") if(blood_DNA) . += image("icon"='icons/effects/blood.dmi', "icon_state"="uniformblood") if(hastie) @@ -387,6 +471,11 @@ BLIND // can't see anything tI.color = hastie.color . += tI +/obj/item/clothing/under/update_clothes_damaged_state(damaging = TRUE) + ..() + if(ismob(loc)) + var/mob/M = loc + M.update_inv_w_uniform() /obj/item/clothing/under/New() if(random_sensor) @@ -409,6 +498,13 @@ BLIND // can't see anything adjusted = DIGITIGRADE_STYLE H.update_inv_w_uniform() + if(hastie) + hastie.on_uniform_equip(src, user) + +/obj/item/clothing/under/dropped(mob/user) + if(hastie) + hastie.on_uniform_dropped(src, user) + ..() /obj/item/clothing/under/attackby(obj/item/I, mob/user, params) if(!attachTie(I, user)) @@ -430,7 +526,7 @@ BLIND // can't see anything if(user && notifyAttach) user << "You attach [I] to [src]." - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_w_uniform() @@ -450,14 +546,18 @@ BLIND // can't see anything else user << "You detach [T] from [src] and it falls on the floor." - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_w_uniform() /obj/item/clothing/under/examine(mob/user) ..() - switch(src.sensor_mode) + if(adjusted == ALT_STYLE) + user << "Alt-click on [src] to wear it normally." + else + user << "Alt-click on [src] to wear it casually." + switch(sensor_mode) if(0) user << "Its sensors appear to be disabled." if(1) @@ -510,7 +610,7 @@ BLIND // can't see anything if(3) usr << "Your suit will now report your exact vital lifesigns as well as your coordinate position." - if(istype(loc,/mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.w_uniform == src) H.update_suit_sensors() @@ -566,13 +666,6 @@ BLIND // can't see anything body_parts_covered |= CHEST return adjusted -/obj/item/clothing/under/examine(mob/user) - ..() - if(src.adjusted == ALT_STYLE) - user << "Alt-click on [src] to wear it normally." - else - user << "Alt-click on [src] to wear it casually." - /obj/item/clothing/proc/weldingvisortoggle() //Malk: proc to toggle welding visors on helmets, masks, goggles, etc. if(!can_use(usr)) return @@ -598,3 +691,14 @@ BLIND // can't see anything if(!user.incapacitated()) return 1 return 0 + + +/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/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 5f9df788728..a44178fc92f 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -42,7 +42,7 @@ if(!mode) return - if(!istype(loc,/mob/living/carbon/human)) + if(!ishuman(loc)) invis_update() return @@ -78,7 +78,7 @@ O.invisibility = INVISIBILITY_MAXIMUM /obj/item/clothing/glasses/meson/engine/proc/t_ray_on() - if(!istype(loc,/mob/living/carbon/human)) + if(!ishuman(loc)) return 0 var/mob/living/carbon/human/user = loc diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 05206e37108..2f94584d2e3 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -56,7 +56,8 @@ scan_reagents = 1 //You can see reagents while wearing science goggles actions_types = list(/datum/action/item_action/toggle_research_scanner) glass_colour_type = /datum/client_colour/glass_colour/purple - resistance_flags = FIRE_PROOF | ACID_PROOF + resistance_flags = ACID_PROOF + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 100) /obj/item/clothing/glasses/science/item_action_slot_check(slot) if(slot == slot_glasses) @@ -127,11 +128,7 @@ icon_state = "hipster_glasses" item_state = "hipster_glasses" -/obj/item/clothing/glasses/gglasses - name = "Green Glasses" - desc = "Forest green glasses, like the kind you'd wear when hatching a nasty scheme." - icon_state = "gglasses" - item_state = "gglasses" +//Here lies green glasses, so ugly they died. RIP /obj/item/clothing/glasses/sunglasses desc = "Strangely ancient technology used to help provide rudimentary eye cover. Enhanced shielding blocks many flashes." diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 8dc34e005c4..ec0cec172db 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" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/gloves/color/fyellow //Cheap Chinese Crap desc = "These gloves are cheap knockoffs of the coveted ones - no way this can end badly." @@ -16,7 +16,7 @@ siemens_coefficient = 1 //Set to a default of 1, gets overridden in New() permeability_coefficient = 0.05 item_color="yellow" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/gloves/color/fyellow/New() ..() @@ -32,7 +32,7 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - resistance_flags = FIRE_PROOF + resistance_flags = 0 var/can_be_cut = 1 /obj/item/clothing/gloves/color/black/hos @@ -70,7 +70,7 @@ desc = "These gloves will protect the wearer from electric shock." siemens_coefficient = 0 permeability_coefficient = 0.05 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/gloves/color/rainbow name = "rainbow gloves" @@ -146,6 +146,7 @@ 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) /obj/item/clothing/gloves/color/latex name = "latex gloves" @@ -156,7 +157,7 @@ permeability_coefficient = 0.01 item_color="white" transfer_prints = TRUE - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/gloves/color/latex/nitrile name = "nitrile gloves" diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 47e4f799474..e3b688e9cb4 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -21,8 +21,8 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - resistance_flags = FIRE_PROOF - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 30) + resistance_flags = 0 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 30) /obj/item/clothing/gloves/combat name = "combat gloves" @@ -36,8 +36,8 @@ min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT heat_protection = HANDS max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - resistance_flags = FIRE_PROOF - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 50) + resistance_flags = 0 + 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 @@ -53,5 +53,5 @@ cold_protection = ARMS min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - resistance_flags = FIRE_PROOF + resistance_flags = 0 armor = list(melee = 15, bullet = 35, laser = 35, energy = 20, bomb = 35, bio = 35, rad = 35, fire = 0, acid = 0) diff --git a/code/modules/clothing/head/collectable.dm b/code/modules/clothing/head/collectable.dm index 5e61b69a2eb..70dfabdcfcb 100644 --- a/code/modules/clothing/head/collectable.dm +++ b/code/modules/clothing/head/collectable.dm @@ -68,7 +68,7 @@ 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" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/head/collectable/slime name = "collectable slime hat" @@ -137,11 +137,11 @@ desc = "Go Red! I mean Green! I mean Red! No Green!" icon_state = "thunderdome" item_state = "thunderdome" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/head/collectable/swat name = "collectable SWAT helmet" desc = "That's not real blood. That's red paint." //Reference to the actual description icon_state = "swat" item_state = "swat" - resistance_flags = FIRE_PROOF + resistance_flags = 0 diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 7ea5150f4d1..1d9d2da01a1 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -6,7 +6,7 @@ var/brightness_on = 4 //luminosity when on var/on = 0 item_color = "yellow" //Determines used sprites: hardhat[on]_[item_color] and hardhat[on]_[item_color]2 (lying down sprite) - armor = list(melee = 15, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20, fire = 0, acid = 50) + 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) resistance_flags = FIRE_PROOF diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index a69289080ce..65c6ab20bc6 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -4,14 +4,14 @@ icon_state = "helmet" flags = HEADBANGPROTECT item_state = "helmet" - armor = list(melee = 40, bullet = 30, laser = 30,energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) + armor = list(melee = 40, bullet = 30, laser = 30,energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50) flags_inv = HIDEEARS 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 - resistance_flags = FIRE_PROOF + resistance_flags = 0 flags_cover = HEADCOVERSEYES dog_fashion = /datum/dog_fashion/head/helmet @@ -20,9 +20,6 @@ /obj/item/clothing/head/helmet/New() ..() -/obj/item/clothing/head/helmet/emp_act(severity) - ..() - /obj/item/clothing/head/helmet/sec can_flashlight = 1 @@ -31,7 +28,7 @@ desc = "A bulletproof combat helmet that excels in protecting the wearer against traditional projectile weaponry and explosives to a minor extent." icon_state = "helmetalt" item_state = "helmetalt" - armor = list(melee = 15, bullet = 40, laser = 10, energy = 10, bomb = 40, bio = 0, rad = 0, fire = 0, acid = 50) + armor = list(melee = 15, bullet = 40, laser = 10, energy = 10, bomb = 40, bio = 0, rad = 0, fire = 50, acid = 50) can_flashlight = 1 dog_fashion = null @@ -48,7 +45,7 @@ alt_toggle_message = "You push the visor up on" can_toggle = 1 flags = HEADBANGPROTECT - armor = list(melee = 41, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0, fire = 0, acid = 50) + armor = list(melee = 41, bullet = 15, laser = 5,energy = 5, bomb = 5, bio = 2, rad = 0, fire = 50, acid = 50) flags_inv = HIDEEARS|HIDEFACE strip_delay = 80 actions_types = list(/datum/action/item_action/toggle) @@ -102,7 +99,7 @@ desc = "An extremely robust, space-worthy helmet in a nefarious red and black stripe pattern." icon_state = "swatsyndie" item_state = "swatsyndie" - armor = list(melee = 40, bullet = 30, laser = 30,energy = 30, bomb = 50, bio = 90, rad = 20, fire = 20, acid = 50) + armor = list(melee = 40, bullet = 30, laser = 30,energy = 30, bomb = 50, bio = 90, rad = 20, fire = 50, acid = 50) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD @@ -123,7 +120,7 @@ flags_inv = HIDEEARS|HIDEHAIR icon_state = "thunderdome" item_state = "thunderdome" - armor = list(melee = 40, bullet = 30, laser = 25,energy = 10, bomb = 25, bio = 10, rad = 0, fire = 0, acid = 50) + armor = list(melee = 40, bullet = 30, laser = 25,energy = 10, bomb = 25, bio = 10, rad = 0, fire = 50, acid = 50) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT heat_protection = HEAD @@ -136,7 +133,8 @@ desc = "An ancient helmet made of bronze and leather." flags_inv = HIDEEARS|HIDEHAIR flags_cover = HEADCOVERSEYES - armor = list(melee = 25, bullet = 0, laser = 25, energy = 10, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 50) + 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 @@ -212,7 +210,7 @@ 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, fire = 20, acid = 20) + armor = list(melee = 25, bullet = 25, laser = 25, energy = 10, bomb = 10, bio = 5, rad = 20, fire = 40, acid = 20) icon_state = "skull" item_state = "skull" strip_delay = 100 @@ -230,7 +228,7 @@ icon_state = state - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_head() diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index f013c37db74..ebde71d8005 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -26,7 +26,7 @@ icon_state = "captain" item_state = "that" flags_inv = 0 - armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) + 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 @@ -44,7 +44,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, fire = 0, acid = 50) + 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 //Chaplain @@ -59,7 +59,7 @@ name = "detective's fedora" desc = "There's only one man who can sniff out the dirty stench of crime, and he's likely wearing this hat." icon_state = "detective" - armor = list(melee = 25, bullet = 5, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 50) + armor = list(melee = 25, bullet = 5, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0, fire = 30, acid = 50) var/candy_cooldown = 0 pockets = /obj/item/weapon/storage/internal/pocket/small/detective dog_fashion = /datum/dog_fashion/head/detective @@ -96,7 +96,7 @@ 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, fire = 0, acid = 60) + 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 @@ -108,7 +108,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 = 40, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 60) + 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 @@ -116,7 +116,7 @@ name = "security beret" desc = "A robust beret with the security insignia emblazoned on it. Uses reinforced fabric to offer sufficent protection." icon_state = "beret_badge" - armor = list(melee = 40, bullet = 30, laser = 30,energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) + 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 @@ -129,7 +129,7 @@ name = "warden's beret" desc = "A special beret with the Warden's insignia emblazoned on it. For wardens with class." icon_state = "wardenberet" - armor = list(melee = 40, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) + armor = list(melee = 40, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 30, acid = 50) strip_delay = 60 /obj/item/clothing/head/beret/sec/navyofficer diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 4ebcd8a4a27..b61d1c18f5a 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -6,7 +6,7 @@ desc = "It's good to be emperor." item_state = "that" flags_inv = 0 - armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) + 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/powdered_wig @@ -222,7 +222,7 @@ throw_range = 5 w_class = 2 attack_verb = list("warned", "cautioned", "smashed") - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/head/santa name = "santa hat" @@ -264,7 +264,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, fire = 0, acid = 50) + 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 6d623c22c39..509120945f4 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -21,7 +21,7 @@ // var/up = 0 flash_protect = 2 tint = 2 - armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 60) + 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 @@ -63,7 +63,7 @@ if(M.is_holding(src) || M.head == src) location = M.loc - if (istype(location, /turf)) + if(isturf(location)) location.hotspot_expose(700, 1) /obj/item/clothing/head/hardhat/cakehat/turn_on() diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index eb52e83640f..4aac0629f34 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -120,7 +120,7 @@ desc = "It's a robust 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, fire = 0, acid = 50) + 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 7c79e261c96..115ab7bd6ed 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -12,7 +12,7 @@ actions_types = list(/datum/action/item_action/adjust) flags_cover = MASKCOVERSMOUTH visor_flags_cover = MASKCOVERSMOUTH - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/mask/breath/attack_self(mob/user) adjustmask(user) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 7ba9af72bf7..48cc4e4c238 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -9,7 +9,7 @@ gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH - resistance_flags = FIRE_PROOF + resistance_flags = 0 // **** Welding gas mask **** @@ -20,13 +20,14 @@ 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, fire = 0, acid = 55) + 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 visor_flags_cover = MASKCOVERSEYES + resistance_flags = FIRE_PROOF /obj/item/clothing/mask/gas/welding/attack_self() toggle() @@ -61,7 +62,7 @@ icon_state = "clown" item_state = "clown_hat" flags_cover = MASKCOVERSEYES - resistance_flags = 0 + resistance_flags = FLAMMABLE actions_types = list(/datum/action/item_action/adjust) dog_fashion = /datum/dog_fashion/head/clown @@ -93,7 +94,7 @@ icon_state = "sexyclown" item_state = "sexyclown" flags_cover = MASKCOVERSEYES - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/mime name = "mime mask" @@ -102,7 +103,7 @@ icon_state = "mime" item_state = "mime" flags_cover = MASKCOVERSEYES - resistance_flags = 0 + resistance_flags = FLAMMABLE actions_types = list(/datum/action/item_action/adjust) /obj/item/clothing/mask/gas/mime/attack_self(mob/user) @@ -132,7 +133,7 @@ icon_state = "monkeymask" item_state = "monkeymask" flags_cover = MASKCOVERSEYES - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/sexymime name = "sexy mime mask" @@ -141,7 +142,7 @@ icon_state = "sexymime" item_state = "sexymime" flags_cover = MASKCOVERSEYES - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/death_commando name = "Death Commando Mask" @@ -152,7 +153,7 @@ name = "cyborg visor" desc = "Beep boop." icon_state = "death" - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/owl_mask name = "owl mask" @@ -160,7 +161,7 @@ icon_state = "owl" flags = MASKINTERNALS flags_cover = MASKCOVERSEYES - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/mask/gas/carp name = "carp mask" diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 74113da31e8..bfe675748d6 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -69,7 +69,7 @@ set category = "Object" set name = "HALT" set src in usr - if(!istype(usr, /mob/living)) + if(!isliving(usr)) return if(!can_use(usr)) return diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 03e8fd31c83..15abf2b8940 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -28,7 +28,7 @@ visor_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) /obj/item/clothing/mask/surgical/attack_self(mob/user) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 4fc5182db7c..c5f6436a484 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -17,9 +17,9 @@ desc = "High speed, low drag combat boots." icon_state = "jackboots" item_state = "jackboots" - armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0, fire = 0, acid = 50) + armor = list(melee = 25, bullet = 25, laser = 25, energy = 25, bomb = 50, bio = 10, rad = 0, fire = 70, acid = 50) strip_delay = 70 - resistance_flags = FIRE_PROOF + resistance_flags = 0 pockets = /obj/item/weapon/storage/internal/pocket/shoes /obj/item/clothing/shoes/combat/swat //overpowered boots for death squads @@ -27,7 +27,7 @@ desc = "High speed, no drag combat boots." permeability_coefficient = 0.01 flags = NOSLIP - armor = list(melee = 40, bullet = 30, laser = 25, energy = 25, bomb = 50, bio = 30, rad = 30, fire = 0, acid = 50) + armor = list(melee = 40, bullet = 30, laser = 25, energy = 25, bomb = 50, bio = 30, rad = 30, fire = 90, acid = 50) /obj/item/clothing/shoes/sandal desc = "A pair of rather plain, wooden sandals." @@ -51,8 +51,8 @@ slowdown = SHOES_SLOWDOWN+1 strip_delay = 50 put_on_delay = 50 - resistance_flags = FIRE_PROOF - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 75) + resistance_flags = 0 + 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" @@ -90,7 +90,7 @@ item_color = "hosred" strip_delay = 50 put_on_delay = 50 - resistance_flags = FIRE_PROOF + resistance_flags = 0 pockets = /obj/item/weapon/storage/internal/pocket/shoes /obj/item/clothing/shoes/jackboots/fast diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index be717658e23..17142d8bb46 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/*bullet through the visor*/, laser = 60, energy = 60, bomb = 30, bio = 90, rad = 90, fire = 95, acid = 95) + armor = list(melee = 60, bullet = 30/*bullet through the visor*/, 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, fire = 95, acid = 95) + 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/list/chronosafe_items = list(/obj/item/weapon/chrono_eraser, /obj/item/weapon/gun/energy/chrono_gun) var/list/hands_nodrop = list() var/obj/item/clothing/head/helmet/space/chronos/helmet = null diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 37a2973c461..c09fdb06c03 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -4,6 +4,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" + obj_integrity = 200 + max_integrity = 200 armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75, fire = 50, acid = 75) var/basestate = "hardsuit" var/brightness_on = 4 //luminosity when on @@ -80,6 +82,7 @@ var/helmettype = /obj/item/clothing/head/helmet/space/hardsuit var/obj/item/weapon/tank/jetpack/suit/jetpack = null + /obj/item/clothing/suit/space/hardsuit/New() if(jetpack && ispath(jetpack)) jetpack = new jetpack(src) @@ -142,16 +145,18 @@ 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, fire = 50, acid = 75) + armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75, fire = 100, acid = 75) item_color = "engineering" + resistance_flags = FIRE_PROOF /obj/item/clothing/suit/space/hardsuit/engine name = "engineering hardsuit" 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, fire = 50, acid = 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 + resistance_flags = FIRE_PROOF //Atmospherics /obj/item/clothing/head/helmet/space/hardsuit/engine/atmos @@ -319,7 +324,7 @@ alt_desc = "An elite version of the syndicate helmet, with improved armour and fire shielding. It is in combat 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, fire = 95, acid = 100) + 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_SUIT_MAX_TEMP_PROTECT visor_flags_inv = 0 @@ -335,7 +340,7 @@ 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, fire = 95, acid = 100) + armor = list(melee = 60, bullet = 60, laser = 50, energy = 25, bomb = 55, bio = 100, rad = 70, fire = 100, acid = 100) heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF @@ -414,7 +419,7 @@ desc = "A prototype helmet designed for research in a hazardous, low pressure environment. Scientific data flashes across the visor." icon_state = "hardsuit0-rd" item_color = "rd" - resistance_flags = FIRE_PROOF | ACID_PROOF + resistance_flags = ACID_PROOF var/onboard_hud_enabled = 0 //stops conflicts with another diag HUD max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT armor = list(melee = 30, bullet = 5, laser = 10, energy = 5, bomb = 100, bio = 100, rad = 60, fire = 60, acid = 80) @@ -495,7 +500,8 @@ icon_state = "capspace" item_state = "capspacehelmet" desc = "A special hardsuit helmet designed for only the most fashionable of military figureheads." - armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 95) + armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF actions_types = list() /obj/item/clothing/head/helmet/space/hardsuit/captain/attack_self() @@ -507,7 +513,8 @@ icon_state = "caparmor" item_state = "capspacesuit" allowed = list(/obj/item/weapon/tank/internals, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs) - armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 95) + armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 100) + resistance_flags = FIRE_PROOF | ACID_PROOF helmettype = /obj/item/clothing/head/helmet/space/hardsuit/captain //Clown @@ -545,7 +552,7 @@ icon_state = "hardsuit-hos" helmettype = /obj/item/clothing/head/helmet/space/hardsuit/security/hos allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals, /obj/item/weapon/gun,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs) - armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50, fire = 95, acid = 100) + 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 @@ -585,7 +592,7 @@ playsound(loc, 'sound/machines/ding.ogg', 50, 1) STOP_PROCESSING(SSobj, src) shield_state = "[shield_on]" - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/C = loc C.update_inv_wear_suit() @@ -662,7 +669,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, fire = 95, acid = 100) + armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50, fire = 100, acid = 100) allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals) helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi slowdown = 0 @@ -678,7 +685,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, fire = 95, acid = 100) + armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50, fire = 100, acid = 100) ///SWAT version /obj/item/clothing/suit/space/hardsuit/shielded/swat @@ -690,10 +697,9 @@ max_charges = 4 current_charges = 4 recharge_delay = 15 - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 95, acid = 95) + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) strip_delay = 130 max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT - resistance_flags = FIRE_PROOF | ACID_PROOF helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/swat dog_fashion = /datum/dog_fashion/back/deathsquad @@ -703,8 +709,7 @@ icon_state = "deathsquad" item_state = "deathsquad" item_color = "syndi" - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 95, acid = 95) + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) strip_delay = 130 max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT - resistance_flags = ACID_PROOF actions_types = list() \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 895b1ef9dc1..afea89290f2 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -49,7 +49,7 @@ Contains: icon_state = "heavy" item_state = "swat_suit" allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals,/obj/item/weapon/kitchen/knife/combat) - armor = list(melee = 40, bullet = 30, laser = 30,energy = 30, bomb = 50, bio = 90, rad = 20, fire = 60, acid = 75) + 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 @@ -59,7 +59,7 @@ Contains: icon_state = "beret_badge" flags = STOPSPRESSUREDMAGE flags_inv = 0 - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 80, acid = 80) + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) strip_delay = 130 max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF @@ -74,7 +74,7 @@ Contains: flags_inv = 0 w_class = 3 allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals) - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 80, acid = 80) + armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100) strip_delay = 130 max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index fedbd537c0b..fc09409ff9e 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -5,7 +5,8 @@ name = "plasmaman suit" desc = "A special containment suit designed to protect a plasmaman's volatile body from outside exposure and quickly extinguish it in emergencies." allowed = list(/obj/item/weapon/gun,/obj/item/ammo_casing,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) - armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0, fire = 95, acid = 75) + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0, fire = 100, acid = 75) + resistance_flags = FIRE_PROOF icon_state = "plasmaman_suit" item_state = "plasmaman_suit" var/next_extinguish = 0 @@ -41,5 +42,7 @@ item_color = "plasma" //needed for the helmet lighting item_state = "plasmaman-helm" strip_delay = 80 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 0, fire = 100, acid = 75) + resistance_flags = FIRE_PROOF diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 18bc250016c..1fbde88b1ce 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -7,8 +7,10 @@ max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT strip_delay = 60 put_on_delay = 40 - resistance_flags = FIRE_PROOF - armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 50) + obj_integrity = 200 + max_integrity = 200 + resistance_flags = 0 + armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50) /obj/item/clothing/suit/armor/vest name = "armor" @@ -16,7 +18,7 @@ icon_state = "armoralt" item_state = "armoralt" blood_overlay_type = "armor" - armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 75) + armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 75) dog_fashion = /datum/dog_fashion/back /obj/item/clothing/suit/armor/vest/alt @@ -34,7 +36,7 @@ icon_state = "hos" item_state = "greatcoat" body_parts_covered = CHEST|GROIN|ARMS|LEGS - armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 0, acid = 90) + armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 70, acid = 90) cold_protection = CHEST|GROIN|LEGS|ARMS heat_protection = CHEST|GROIN|LEGS|ARMS strip_delay = 80 @@ -56,7 +58,7 @@ cold_protection = CHEST|GROIN|ARMS|HANDS heat_protection = CHEST|GROIN|ARMS|HANDS strip_delay = 70 - resistance_flags = 0 + resistance_flags = FLAMMABLE dog_fashion = null /obj/item/clothing/suit/armor/vest/warden/alt @@ -80,8 +82,9 @@ icon_state = "capcarapace" item_state = "armor" body_parts_covered = CHEST|GROIN - armor = list(melee = 50, bullet = 40, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 90, acid = 90) + 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" @@ -127,7 +130,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, fire = 80, acid = 50) + armor = list(melee = 10, bullet = 10, laser = 60, energy = 50, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50) + resistance_flags = FIRE_PROOF var/hit_reflect_chance = 40 /obj/item/clothing/suit/armor/laserproof/IsReflect(def_zone) @@ -141,7 +145,7 @@ desc = "An armored vest with a detective's badge on it." icon_state = "detective-armor" allowed = list(/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder,/obj/item/weapon/melee/classic_baton/telescopic) - resistance_flags = 0 + resistance_flags = FLAMMABLE dog_fashion = null @@ -155,7 +159,7 @@ 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, fire = 80, acid = 80) + 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) resistance_flags = FIRE_PROOF | ACID_PROOF hit_reaction_chance = 50 @@ -341,7 +345,7 @@ min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100, fire = 95, acid = 95) + 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" diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 9a7c584f968..28ebe2f9f39 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -7,7 +7,7 @@ flags = THICKMATERIAL armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20, fire = 30, acid = 100) flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE - resistance_flags = FIRE_PROOF | ACID_PROOF + resistance_flags = ACID_PROOF flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH /obj/item/clothing/suit/bio_suit @@ -26,7 +26,7 @@ flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT strip_delay = 70 put_on_delay = 70 - resistance_flags = FIRE_PROOF | ACID_PROOF + resistance_flags = ACID_PROOF //Standard biosuit, orange stripe /obj/item/clothing/head/bio_hood/general diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index a25d4044482..77fd5976d4a 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -66,7 +66,7 @@ icon_state = "dragon" desc = "A suit of armour fashioned from the remains of an ash drake. " allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals, /obj/item/weapon/resonator, /obj/item/device/mining_scanner, /obj/item/device/t_scanner/adv_mining_scanner, /obj/item/weapon/gun/energy/kinetic_accelerator, /obj/item/weapon/pickaxe, /obj/item/weapon/twohanded/spear) - armor = list(melee = 70, bullet = 30, laser = 50, energy = 40, bomb = 70, bio = 60, rad = 50, fire = 50, acid = 100) + armor = list(melee = 70, bullet = 30, laser = 50, energy = 40, bomb = 70, bio = 60, rad = 50, fire = 100, acid = 100) hooded = 1 hoodtype = /obj/item/clothing/head/cloakhood/drake heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS @@ -78,7 +78,7 @@ name = "drake helm" icon_state = "dragon" desc = "The skull of a dragon." - armor = list(melee = 70, bullet = 30, laser = 50, energy = 40, bomb = 70, bio = 60, rad = 50, fire = 50, acid = 100) + 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_HELM_MAX_TEMP_PROTECT resistance_flags = FIRE_PROOF | ACID_PROOF diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index ad821773ac7..ec4b145f18b 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -100,7 +100,7 @@ item_state = "hazard" blood_overlay_type = "armor" allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner,/obj/item/device/radio) - resistance_flags = FIRE_PROOF + resistance_flags = 0 //Lawyer /obj/item/clothing/suit/toggle/lawyer name = "blue suit jacket" diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index f19764bed15..61d1f7d4ebe 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -16,7 +16,7 @@ blood_overlay_type = "armor" body_parts_covered = CHEST allowed = list (/obj/item/weapon/gun/energy/laser/bluetag) - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/suit/redtag name = "red laser tag armor" @@ -26,7 +26,7 @@ blood_overlay_type = "armor" body_parts_covered = CHEST allowed = list (/obj/item/weapon/gun/energy/laser/redtag) - resistance_flags = FIRE_PROOF + resistance_flags = 0 /* * Costume @@ -89,7 +89,7 @@ w_class = 3 allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/suit/hastur name = "\improper Hastur's robe" @@ -342,7 +342,7 @@ desc = "Pompadour not included." icon_state = "leatherjacket" item_state = "hostrench" - resistance_flags = FIRE_PROOF + resistance_flags = 0 max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/weapon/gun/projectile/automatic/pistol,/obj/item/weapon/gun/projectile/revolver,/obj/item/weapon/gun/projectile/revolver/detective,/obj/item/device/radio) diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index bbca34cbf4f..f9cde71de41 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -57,7 +57,7 @@ desc = "Use in case of bomb." icon_state = "bombsuit" flags = THICKMATERIAL - armor = list(melee = 20, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0, fire = 25, acid = 50) + armor = list(melee = 20, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0, fire = 80, acid = 50) flags_inv = HIDEFACE|HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR cold_protection = HEAD min_cold_protection_temperature = HELMET_MIN_TEMP_PROTECT @@ -66,7 +66,7 @@ strip_delay = 70 put_on_delay = 70 flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/suit/bomb_suit @@ -80,7 +80,7 @@ flags = THICKMATERIAL body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS slowdown = 2 - armor = list(melee = 20, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0, fire = 25, acid = 50) + armor = list(melee = 20, bullet = 0, laser = 20,energy = 10, bomb = 100, bio = 0, rad = 0, fire = 80, acid = 50) flags_inv = HIDEJUMPSUIT heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT @@ -88,7 +88,7 @@ min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT strip_delay = 70 put_on_delay = 70 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/head/bomb_hood/security @@ -114,7 +114,7 @@ strip_delay = 60 put_on_delay = 60 flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/suit/radiation name = "radiation suit" @@ -132,4 +132,4 @@ strip_delay = 60 put_on_delay = 60 flags_inv = HIDEJUMPSUIT - resistance_flags = FIRE_PROOF + resistance_flags = 0 diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index d2cd1a16b96..702e367634c 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -35,7 +35,7 @@ gas_transfer_coefficient = 1 permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - resistance_flags = 0 + resistance_flags = FLAMMABLE dog_fashion = /datum/dog_fashion/head/blue_wizard /obj/item/clothing/head/wizard/marisa @@ -124,7 +124,7 @@ gas_transfer_coefficient = 1 permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/head/wizard/marisa/fake name = "witch hat" @@ -133,7 +133,7 @@ gas_transfer_coefficient = 1 permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/suit/wizrobe/marisa/fake name = "witch robe" @@ -143,7 +143,7 @@ gas_transfer_coefficient = 1 permeability_coefficient = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/clothing/suit/wizrobe/paper name = "papier-mch robe" @@ -162,7 +162,7 @@ set category = "Object" set name = "Summon Stick Minions" set src in usr - if(!istype(usr, /mob/living)) + if(!isliving(usr)) return if(!robe_charge) usr << "\The robe's internal magic supply is still recharging!" diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 7ac3b606184..68b1fc784f2 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -14,7 +14,7 @@ icon_state = "black" item_state = "bl_suit" item_color = "black" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/under/color/grey name = "grey jumpsuit" diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm index 3ac2b59656d..8a2e1a2ed2f 100644 --- a/code/modules/clothing/under/jobs/engineering.dm +++ b/code/modules/clothing/under/jobs/engineering.dm @@ -5,8 +5,8 @@ icon_state = "chiefengineer" item_state = "gy_suit" item_color = "chief" - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10, fire = 40, acid = 40) - resistance_flags = FIRE_PROOF + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10, fire = 80, acid = 40) + resistance_flags = 0 /obj/item/clothing/under/rank/atmospheric_technician desc = "It's a jumpsuit worn by atmospheric technicians." @@ -14,7 +14,7 @@ icon_state = "atmos" item_state = "atmos_suit" item_color = "atmos" - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/under/rank/engineer desc = "It's an orange high visibility jumpsuit worn by engineers. It has minor radiation shielding." @@ -22,11 +22,13 @@ 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, fire = 30, acid = 20) + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 10, fire = 60, acid = 20) + resistance_flags = 0 /obj/item/clothing/under/rank/roboticist desc = "It's a slimming black with reinforced seams; great for industrial work." name = "roboticist's jumpsuit" icon_state = "robotics" item_state = "robotics" - item_color = "robotics" \ No newline at end of file + item_color = "robotics" + resistance_flags = 0 \ No newline at end of file diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index f88d34d1ba7..736e3ce3da8 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -37,7 +37,7 @@ item_state = "armor" can_adjust = 0 strip_delay = 100 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/under/waiter name = "waiter's outfit" @@ -125,7 +125,7 @@ heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT can_adjust = 0 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/under/acj name = "administrative cybernetic jumpsuit" @@ -378,7 +378,7 @@ body_parts_covered = CHEST|GROIN|ARMS fitted = NO_FEMALE_UNIFORM can_adjust = 0 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/clothing/under/sundress name = "sundress" diff --git a/code/modules/clothing/under/syndicate.dm b/code/modules/clothing/under/syndicate.dm index 4ae10c98d94..ec506accf51 100644 --- a/code/modules/clothing/under/syndicate.dm +++ b/code/modules/clothing/under/syndicate.dm @@ -37,4 +37,4 @@ item_color = "trackpants" can_adjust = 0 armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0) - resistance_flags = FIRE_PROOF \ No newline at end of file + resistance_flags = 0 \ No newline at end of file diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 503e6c657b0..4ea6592329f 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -48,7 +48,11 @@ U.cut_overlays() U.hastie = null +/obj/item/clothing/tie/proc/on_uniform_equip(obj/item/clothing/under/U) + return +/obj/item/clothing/tie/proc/on_uniform_dropped(obj/item/clothing/under/U) + return /obj/item/clothing/tie/blue name = "blue tie" @@ -367,3 +371,36 @@ icon_state = "talisman" item_color = "talisman" armor = list(melee = 5, bullet = 5, laser = 5, energy = 5, bomb = 20, bio = 20, rad = 5, fire = 0, acid = 25) + +////////////// +//OBJECTION!// +////////////// + +/obj/item/clothing/tie/lawyers_badge + name = "attorney's badge" + desc = "Fills you with the conviction of JUSTICE. Lawyers tend to want to show it to everyone they meet." + icon_state = "lawyerbadge" + item_color = "lawyerbadge" + +/obj/item/clothing/tie/lawyers_badge/attach(obj/item/clothing/under/U, user) + if(!..()) + return 0 + if(isliving(U.loc)) + on_uniform_equip(U) + +/obj/item/clothing/tie/lawyers_badge/detach(obj/item/clothing/under/U, user) + ..() + if(isliving(U.loc)) + on_uniform_dropped(U) + +/obj/item/clothing/tie/lawyers_badge/on_uniform_equip(obj/item/clothing/under/U) + if(!isliving(U.loc)) + return + var/mob/living/L = U.loc + L.bubble_icon = "lawyer" + +/obj/item/clothing/tie/lawyers_badge/on_uniform_dropped(obj/item/clothing/under/U) + if(!isliving(U.loc)) + return + var/mob/living/L = U.loc + L.bubble_icon = initial(L.bubble_icon) diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm index 9b108de8e31..6f7a73355fa 100644 --- a/code/modules/countdown/countdown.dm +++ b/code/modules/countdown/countdown.dm @@ -115,7 +115,7 @@ var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = attached_to if(!istype(G)) return - else if(G.health && !G.purpose_fulfilled) + else if(G.obj_integrity && !G.purpose_fulfilled) return "
[G.get_arrival_text(FALSE)]
" /obj/effect/countdown/transformer diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 1e1ed209bf0..7def4aa1922 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -62,7 +62,7 @@ . = list() for(var/obj/item/I in user.held_items) . += I - if(!istype(user.loc, /turf)) + if(!isturf(user.loc)) return var/list/L = block(get_step(user, SOUTHWEST), get_step(user, NORTHEAST)) for(var/A in L) diff --git a/code/modules/events/holiday/vday.dm b/code/modules/events/holiday/vday.dm index 276e88d82a9..7f0f711da25 100644 --- a/code/modules/events/holiday/vday.dm +++ b/code/modules/events/holiday/vday.dm @@ -28,7 +28,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "sc_Ace of Hearts_syndicate" // shut up var/message = "A generic message of love or whatever." - resistance_flags = 0 + resistance_flags = FLAMMABLE w_class = 1 /obj/item/weapon/valentine/New() diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm index c6f6ed5c910..5821f00588c 100644 --- a/code/modules/events/holiday/xmas.dm +++ b/code/modules/events/holiday/xmas.dm @@ -47,7 +47,7 @@ var/cracked = 0 /obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user) - if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_held_item() ) + if( !cracked && ishuman(target) && (target.stat == CONSCIOUS) && !target.get_active_held_item() ) target.visible_message("[user] and [target] pop \an [src]! *pop*", "You pull \an [src] with [target]! *pop*", "You hear a pop.") var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc) Joke.name = "[pick("awful","terrible","unfunny")] joke" diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 5495c652189..b49ed5a4c6f 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -76,12 +76,12 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 x = clong.x y = clong.y - if (istype(clong, /turf) || istype(clong, /obj)) + if(isturf(clong) || isobj(clong)) if(clong.density) clong.ex_act(2) - else if (istype(clong, /mob)) - if(istype(clong, /mob/living/carbon/human)) + else if(ismob(clong)) + if(ishuman(clong)) var/mob/living/carbon/human/H = clong H.visible_message("[H.name] is penetrated by an immovable rod!" , "The rod penetrates you!" , "You hear a CLANG!") H.adjustBruteLoss(160) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index de3632195d5..8a151a116e6 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -19,7 +19,7 @@ if(turfs.len) //Pick a turf to spawn at if we can var/turf/T = pick(turfs) - new/obj/structure/spacevine_controller(T) //spawn a controller at turf + new/obj/effect/spacevine_controller(T) //spawn a controller at turf /datum/spacevine_mutation @@ -328,8 +328,8 @@ /datum/spacevine_mutation/woodening/on_grow(obj/structure/spacevine/holder) if(holder.energy) holder.density = 1 - holder.maxhealth = 100 - holder.health = holder.maxhealth + holder.max_integrity = 100 + holder.obj_integrity = holder.max_integrity /datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage) if(I.is_sharp()) @@ -362,10 +362,10 @@ layer = SPACEVINE_LAYER mouse_opacity = 2 //Clicking anywhere on the turf is good enough pass_flags = PASSTABLE | PASSGRILLE - var/health = 50 - var/maxhealth = 50 + obj_integrity = 50 + max_integrity = 50 var/energy = 0 - var/obj/structure/spacevine_controller/master = null + var/obj/effect/spacevine_controller/master = null var/list/mutations = list() /obj/structure/spacevine/examine(mob/user) @@ -415,39 +415,36 @@ qdel(src) /obj/structure/spacevine/attackby(obj/item/weapon/W, mob/user, params) - if (!W || !user || !W.type) - return - user.changeNext_move(CLICK_CD_MELEE) - var/force = W.force if(istype(W, /obj/item/weapon/scythe)) - force = force * 4 + user.changeNext_move(CLICK_CD_MELEE) for(var/obj/structure/spacevine/B in orange(1,src)) - B.health = health - force - if(B.health < 1) - qdel(B) - - health = health - force - - if(health < 1) - qdel(src) - + B.take_damage(W.force * 4, BRUTE, "melee", 1) return + else + return ..() - if(W.is_sharp()) - force = force * 4 - if(W && W.damtype == "fire") - force = force * 4 +/obj/structure/spacevine/attacked_by(obj/item/I, mob/living/user) + var/damage_dealt = I.force + if(I.is_sharp()) + damage_dealt *= 4 + if(I.damtype == BURN) + damage_dealt *= 4 for(var/datum/spacevine_mutation/SM in mutations) - force = SM.on_hit(src, user, W, force) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further + damage_dealt = SM.on_hit(src, user, I, force) //on_hit now takes override damage as arg and returns new value for other mutations to permutate further + take_damage(damage_dealt, I.damtype, "melee", 1) - health = health - force - if(health < 1) - qdel(src) - - ..() +/obj/structure/spacevine/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) + switch(damage_type) + if(BRUTE) + if(damage_amount) + playsound(src, 'sound/weapons/slash.ogg', 50, 1) + else + playsound(src, 'sound/weapons/tap.ogg', 50, 1) + if(BURN) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) /obj/structure/spacevine/Crossed(mob/crosser) if(isliving(crosser)) @@ -469,7 +466,7 @@ /obj/structure/spacevine/attack_alien(mob/living/user) eat(user) -/obj/structure/spacevine_controller +/obj/effect/spacevine_controller invisibility = INVISIBILITY_ABSTRACT var/list/obj/structure/spacevine/vines = list() var/list/growth_queue = list() @@ -478,7 +475,7 @@ var/list/mutations_list = list() var/mutativness = 1 -/obj/structure/spacevine_controller/New(loc, list/muts, mttv, spreading) +/obj/effect/spacevine_controller/New(loc, list/muts, mttv, spreading) spawn_spacevine_piece(loc, , muts) START_PROCESSING(SSobj, src) init_subtypes(/datum/spacevine_mutation/, mutations_list) @@ -488,20 +485,20 @@ spread_cap *= spreading / 50 spread_multiplier /= spreading / 50 -/obj/structure/spacevine_controller/ex_act() //only killing all vines will end this suffering +/obj/effect/spacevine_controller/ex_act() //only killing all vines will end this suffering return -/obj/structure/spacevine_controller/singularity_act() +/obj/effect/spacevine_controller/singularity_act() return -/obj/structure/spacevine_controller/singularity_pull() +/obj/effect/spacevine_controller/singularity_pull() return -/obj/structure/spacevine_controller/Destroy() +/obj/effect/spacevine_controller/Destroy() STOP_PROCESSING(SSobj, src) return ..() -/obj/structure/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts) +/obj/effect/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts) var/obj/structure/spacevine/SV = new(location) growth_queue += SV vines += SV @@ -520,7 +517,7 @@ for(var/datum/spacevine_mutation/SM in SV.mutations) SM.on_birth(SV) -/obj/structure/spacevine_controller/process() +/obj/effect/spacevine_controller/process() if(!vines) qdel(src) //space vines exterminated. Remove the controller return diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index f323f55cb50..dcbdba4db9c 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -10,7 +10,7 @@ var/interval = 2 var/list/vents = list() var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","mushroomhallucinogen","lube", - "plantbgone","banana","charcoal","space_drugs","morphine","holywater","ethanol","hot_coco","facid") + "plantbgone","banana","charcoal","space_drugs","morphine","holywater","ethanol","hot_coco","sacid") /datum/round_event/vent_clog/announce() priority_announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert") diff --git a/code/modules/events/wizard/curseditems.dm b/code/modules/events/wizard/curseditems.dm index 5d0bc33b168..cb0add4374d 100644 --- a/code/modules/events/wizard/curseditems.dm +++ b/code/modules/events/wizard/curseditems.dm @@ -38,7 +38,7 @@ ruins_wizard_loadout = 1 for(var/mob/living/carbon/human/H in living_mob_list) - if(ruins_spaceworthiness && (H.z != 1 || istype(H.loc, /turf/open/space) || isplasmaman(H))) + if(ruins_spaceworthiness && (H.z != 1 || isspaceturf(H.loc) || isplasmaman(H))) continue //#savetheminers if(ruins_wizard_loadout && H.mind && ((H.mind in ticker.mode.wizards) || (H.mind in ticker.mode.apprentices))) continue diff --git a/code/modules/events/wizard/petsplosion.dm b/code/modules/events/wizard/petsplosion.dm index d99793778d3..b5a2be80b02 100644 --- a/code/modules/events/wizard/petsplosion.dm +++ b/code/modules/events/wizard/petsplosion.dm @@ -13,5 +13,5 @@ if(activeFor >= 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals countdown += 1 for(var/mob/living/simple_animal/F in living_mob_list) //If you cull the heard before the next replication, things will be easier for you - if(!istype(F, /mob/living/simple_animal/hostile)) + if(!ishostile(F)) new F.type(F.loc) \ No newline at end of file diff --git a/code/modules/events/wizard/rpgloot.dm b/code/modules/events/wizard/rpgloot.dm index 961671763ec..cacf2ba4fce 100644 --- a/code/modules/events/wizard/rpgloot.dm +++ b/code/modules/events/wizard/rpgloot.dm @@ -51,6 +51,7 @@ user << "[target] catches fire!" if(target.resistance_flags & (LAVA_PROOF|FIRE_PROOF)) target.resistance_flags &= ~(LAVA_PROOF|FIRE_PROOF) + target.resistance_flags |= FLAMMABLE target.fire_act() qdel(src) return diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 7e34d6a1b3a..c1cd8ab0e6b 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -363,7 +363,7 @@ Gunshots/explosions/opening doors/less rare audio (done) var/collapse var/image/down - var/health = 100 + obj_integrity = 100 /obj/effect/fake_attacker/attackby(obj/item/weapon/P, mob/living/user, params) step_away(src,my_target,2) @@ -373,7 +373,7 @@ Gunshots/explosions/opening doors/less rare audio (done) my_target.visible_message("[my_target] flails around wildly.", \ "[my_target] has attacked [src]!") - src.health -= P.force + obj_integrity -= P.force /obj/effect/fake_attacker/Crossed(mob/M, somenumber) if(M == my_target) @@ -410,7 +410,7 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/fake_attacker/proc/attack_loop() while(1) sleep(rand(5,10)) - if(src.health < 0) + if(obj_integrity < 0) collapse() continue if(get_dist(src,my_target) > 1) @@ -622,7 +622,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite var/list/slots_free = list(l,r) if(l_hand) slots_free -= l if(r_hand) slots_free -= r - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src if(!H.belt) slots_free += ui_belt if(!H.l_store) slots_free += ui_storage1 diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 8e5024cbf82..a24b9974277 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -10,7 +10,7 @@ var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it. possible_transfer_amounts = list(5,10,15,20,25,30,50) volume = 50 - resistance_flags = FIRE_PROOF + resistance_flags = 0 /obj/item/weapon/reagent_containers/food/drinks/New() ..() @@ -74,7 +74,7 @@ var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "You transfer [trans] units of the solution to [target]." - if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell + if(iscyborg(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell var/mob/living/silicon/robot/bro = user bro.cell.use(30) addtimer(reagents, "add_reagent", 600, FALSE, refill, trans) @@ -105,6 +105,7 @@ volume = 5 flags = CONDUCT | OPENCONTAINER spillable = 1 + resistance_flags = FIRE_PROOF /obj/item/weapon/reagent_containers/food/drinks/trophy/gold_cup name = "gold cup" diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index 41473bcfc9f..3bf95470b8b 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -7,21 +7,10 @@ amount_per_transfer_from_this = 10 volume = 50 materials = list(MAT_GLASS=500) - resistance_flags = 0 - burntime = 5 + obj_integrity = 20 + max_integrity = 20 spillable = 1 - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fire_act() - if(!reagents.total_volume) - return - ..() - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/burn() - reagents.total_volume = 0 //Burns away all the alcohol :( - reagents.reagent_list.Cut() - on_reagent_change() - extinguish() - return + resistance_flags = ACID_PROOF /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/on_reagent_change() cut_overlays() diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index 9905d061150..4a05510ff07 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -4,7 +4,7 @@ /obj/item/weapon/reagent_containers/food possible_transfer_amounts = list() volume = 50 //Sets the default container amount for all food items. - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/reagent_containers/food/New() ..() diff --git a/code/modules/food_and_drinks/food/snacks/meat.dm b/code/modules/food_and_drinks/food/snacks/meat.dm index f16532a9bf9..406b998d7ed 100644 --- a/code/modules/food_and_drinks/food/snacks/meat.dm +++ b/code/modules/food_and_drinks/food/snacks/meat.dm @@ -176,12 +176,6 @@ list_reagents = list("nutriment" = 3, "toxin" = 5) icon_state = "goliathmeat" -/obj/item/weapon/reagent_containers/food/snacks/meat/slab/goliath/burn() - visible_message("\The [src] finishes cooking!") - new/obj/item/weapon/reagent_containers/food/snacks/meat/steak/goliath/(src.loc) - SSobj.burning -= src - qdel(src) - /obj/item/weapon/reagent_containers/food/snacks/meat/slab/meatwheat name = "meatwheat clump" desc = "This doesn't look like meat, but your standards aren't that high to begin with." diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm index 6ce7a8b1790..54acb1aa49f 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm @@ -25,6 +25,12 @@ mixer = new /obj/item/weapon/reagent_containers(src, MIXER_CAPACITY) mixer.name = "Mixer" +/obj/machinery/food_cart/Destroy() + if(mixer) + qdel(mixer) + mixer = null + return ..() + /obj/machinery/food_cart/attack_hand(mob/user) user.set_machine(src) interact(user) @@ -150,6 +156,11 @@ usr << browse(null,"window=foodcart") return +/obj/machinery/food_cart/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 4) + qdel(src) + #undef STORAGE_CAPACITY #undef LIQUID_CAPACIY #undef MIXER_CAPACITY 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 ea2fa786b16..56b4ec3f757 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -18,6 +18,8 @@ var/dispense_flavour = ICECREAM_VANILLA var/flavour_name = "vanilla" flags = OPENCONTAINER + obj_integrity = 300 + max_integrity = 300 /obj/machinery/icecream_vat/proc/get_ingredient_list(type) switch(type) @@ -206,6 +208,12 @@ reagents.add_reagent("singulo", 2) ice_creamed = 1 +/obj/machinery/icecream_vat/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, 4) + qdel(src) + + #undef ICECREAM_VANILLA #undef ICECREAM_CHOCOLATE #undef ICECREAM_STRAWBERRY diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 33e5d058f9c..f61e370eff0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -49,14 +49,6 @@ else return ..() -/obj/machinery/smartfridge/on_construction() - for(var/datum/A in contents) - qdel(A) - -/obj/machinery/smartfridge/on_deconstruction() - for(var/atom/movable/A in contents) - A.loc = loc - /obj/machinery/smartfridge/RefreshParts() for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts) max_n_of_items = 1500 * B.rating @@ -95,44 +87,44 @@ updateUsrDialog() return - if(stat) - return 0 + if(!stat) - if(contents.len >= max_n_of_items) - user << "\The [src] is full!" - return 0 - - if(accept_check(O)) - load(O) - user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") - updateUsrDialog() - return 1 - - if(istype(O, /obj/item/weapon/storage/bag)) - var/obj/item/weapon/storage/P = O - var/loaded = 0 - for(var/obj/G in P.contents) - if(contents.len >= max_n_of_items) - break - if(accept_check(G)) - load(G) - loaded++ - updateUsrDialog() - - if(loaded) - if(contents.len >= max_n_of_items) - user.visible_message("[user] loads \the [src] with \the [O].", \ - "You fill \the [src] with \the [O].") - else - user.visible_message("[user] loads \the [src] with \the [O].", \ - "You load \the [src] with \the [O].") - if(O.contents.len > 0) - user << "Some items are refused." - else - user << "There is nothing in [O] to put in [src]!" + if(contents.len >= max_n_of_items) + user << "\The [src] is full!" return 0 - else if(user.a_intent != "harm") + if(accept_check(O)) + load(O) + user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") + updateUsrDialog() + return 1 + + if(istype(O, /obj/item/weapon/storage/bag)) + var/obj/item/weapon/storage/P = O + var/loaded = 0 + for(var/obj/G in P.contents) + if(contents.len >= max_n_of_items) + break + if(accept_check(G)) + load(G) + loaded++ + updateUsrDialog() + + if(loaded) + if(contents.len >= max_n_of_items) + user.visible_message("[user] loads \the [src] with \the [O].", \ + "You fill \the [src] with \the [O].") + else + user.visible_message("[user] loads \the [src] with \the [O].", \ + "You load \the [src] with \the [O].") + if(O.contents.len > 0) + user << "Some items are refused." + return 1 + else + user << "There is nothing in [O] to put in [src]!" + return 0 + + if(user.a_intent != "harm") user << "\The [src] smartly refuses [O]." updateUsrDialog() return 0 @@ -294,6 +286,10 @@ return 1 return 0 +/obj/machinery/smartfridge/drying_rack/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/mineral/wood (loc, 10) + qdel(src) + /obj/machinery/smartfridge/drying_rack/proc/toggle_drying(forceoff = 0) if(drying || forceoff) drying = 0 diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index cf7e6ae024d..bb8d4e144eb 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -81,7 +81,7 @@ if(flag) return //It's adjacent, is the user, or is on the user's person - if (istype(A, /mob/living)) + if(isliving(A)) src.dealTo(A, user) else return ..() @@ -125,7 +125,7 @@ var/blank = 0 var/list/cards = list() var/datum/html_interface/hi - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/hand/New(loc) . = ..() diff --git a/code/modules/holiday/easter.dm b/code/modules/holiday/easter.dm index a75446b667e..fbe73113f1a 100644 --- a/code/modules/holiday/easter.dm +++ b/code/modules/holiday/easter.dm @@ -29,7 +29,7 @@ for(var/obj/effect/landmark/R in landmarks_list) if(R.name != "blobspawn") if(prob(35)) - if(istype(R.loc,/turf/open/space)) + if(isspaceturf(R.loc)) new /mob/living/simple_animal/chicken/rabbit/space(R.loc) else new /mob/living/simple_animal/chicken/rabbit(R.loc) diff --git a/code/modules/holodeck/area_copy.dm b/code/modules/holodeck/area_copy.dm index 3f31cddf91d..d2e4a1d05b2 100644 --- a/code/modules/holodeck/area_copy.dm +++ b/code/modules/holodeck/area_copy.dm @@ -21,7 +21,7 @@ O.vars[V] = original.vars[V] if(istype(O)) - O.resistance_flags |= LAVA_PROOF | FIRE_PROOF | UNACIDABLE // holoitems do not burn + O.resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF // holoitems do not burn if(nerf && istype(O,/obj/item)) var/obj/item/I = O I.damtype = STAMINA // thou shalt not @@ -76,7 +76,7 @@ continue if(platingRequired) - if(istype(B, /turf/open/space)) + if(isspaceturf(B)) continue var/old_dir1 = T.dir diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index c29ebfb5ea7..10349f42d3f 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -143,14 +143,14 @@ /obj/machinery/computer/holodeck/proc/floorcheck() for(var/turf/T in linked) - if(!T.intact || istype(T,/turf/open/space)) + if(!T.intact || isspaceturf(T)) return 0 return 1 /obj/machinery/computer/holodeck/Topic(href, list/href_list) if(..()) return - if(!Adjacent(usr) && !istype(usr, /mob/living/silicon)) + if(!Adjacent(usr) && !issilicon(usr)) return usr.set_machine(src) add_fingerprint(usr) diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index 18e378d9e5a..7d7b5564c54 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -62,7 +62,7 @@ /obj/item/toy/beach_ball/holoball name = "basketball" - icon = 'icons/obj/basketball.dmi' + icon = 'icons/obj/items.dmi' icon_state = "basketball" item_state = "basketball" desc = "Here's your chance, do your dance at the Space Jam." diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 4787f2829b0..d9945de3f94 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -66,7 +66,7 @@ return if(default_deconstruction_crowbar(I)) return - if(isrobot(user)) + if(iscyborg(user)) return if(istype(I, /obj/item/seeds)) @@ -104,7 +104,7 @@ return var/datum/browser/popup = new(user, "plantdna", "Plant DNA Manipulator", 450, 600) - if(!( in_range(src, user) || istype(user, /mob/living/silicon) )) + if(!(in_range(src, user) || issilicon(user))) popup.close() return diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 77f04b08ccc..d486dec83ab 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -14,7 +14,7 @@ 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. - resistance_flags = 0 + resistance_flags = FLAMMABLE origin_tech = "biotech=1" /obj/item/weapon/reagent_containers/food/snacks/grown/New(newloc, var/obj/item/seeds/new_seed = null) diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 824ceadd50b..784b9ee44ff 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -181,7 +181,7 @@ /obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M, mob/user) if(!..()) return - if(istype(M, /mob/living)) + if(isliving(M)) M << "You are lit on fire from the intense heat of the [name]!" M.adjust_fire_stacks(seed.potency / 20) if(M.IgniteMob()) diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 04b48caa83a..2e05b8bb35b 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -27,12 +27,12 @@ return (BRUTELOSS) /obj/item/seeds/kudzu/proc/plant(mob/user) - if(istype(user.loc,/turf/open/space)) + if(isspaceturf(user.loc)) return var/turf/T = get_turf(src) message_admins("Kudzu planted by [key_name_admin(user)](?) (FLW) at ([T.x],[T.y],[T.z] - (JMP))",0,1) investigate_log("was planted by [key_name(user)] at ([T.x],[T.y],[T.z])","kudzu") - new /obj/structure/spacevine_controller(user.loc, mutations, potency, production) + new /obj/effect/spacevine_controller(user.loc, mutations, potency, production) qdel(src) /obj/item/seeds/kudzu/attack_self(mob/user) diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm index 4504d1740ba..508880f5c6e 100644 --- a/code/modules/hydroponics/grown/misc.dm +++ b/code/modules/hydroponics/grown/misc.dm @@ -115,6 +115,8 @@ seed = /obj/item/seeds/cherry/bomb bitesize_mod = 2 volume = 125 //Gives enough room for the black powder at max potency + obj_integrity = 40 + max_integrity = 40 /obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/attack_self(mob/living/user) var/area/A = get_area(user) @@ -123,12 +125,14 @@ 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/weapon/reagent_containers/food/snacks/grown/cherry_bomb/burn() - prime() - ..() +/obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/deconstruct(disassembled = TRUE) + if(!disassembled) + prime() + if(!qdeleted(src)) + qdel(src) /obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/ex_act(severity) - qdel(src) //Ensuring that it's deleted by its own explosion + qdel(src) //Ensuring that it's deleted by its own explosion. Also prevents mass chain reaction with piles of cherry bombs /obj/item/weapon/reagent_containers/food/snacks/grown/cherry_bomb/proc/prime() icon_state = "cherry_bomb_lit" diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 9dc0ab8f97c..0125c35fcbd 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -168,7 +168,7 @@ origin_tech = "biotech=4;programming=5" /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user) - if(istype(user.loc,/turf/open/space)) + if(isspaceturf(user.loc)) return var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc) M.maxHealth += round(seed.endurance / 4) @@ -241,11 +241,12 @@ origin_tech = "biotech=4;plasmatech=6" /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user) - if(istype(user.loc,/turf/open/space)) + if(isspaceturf(user.loc)) return var/obj/structure/glowshroom/planted = new effect_path(user.loc) planted.delay = planted.delay - seed.production * 100 //So the delay goes DOWN with better stats instead of up. :I - planted.endurance = seed.endurance + planted.obj_integrity = seed.endurance + planted.max_integrity = seed.endurance planted.yield = seed.yield planted.potency = seed.potency user << "You plant [src]." diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index be78c4ef8b2..fa8f9fc1de7 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -56,7 +56,7 @@ var/hit_zone = (C.held_index_to_dir(C.active_hand_index) == "l" ? "l_":"r_") + "arm" var/obj/item/bodypart/affecting = C.get_bodypart(hit_zone) if(affecting) - if(affecting.take_damage(0, force)) + if(affecting.receive_damage(0, force)) C.update_damage_overlays() C << "The nettle burns your bare hand!" return 1 @@ -98,7 +98,7 @@ /obj/item/weapon/grown/nettle/death/attack(mob/living/carbon/M, mob/user) if(!..()) return - if(istype(M, /mob/living)) + if(isliving(M)) M << "You are stunned by the powerful acid of the Deathnettle!" add_logs(user, M, "attacked", src) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 2fc857d23c4..ed1ee69456e 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -58,7 +58,7 @@ if(config.revival_pod_plants) if(ckey) for(var/mob/M in player_list) - if(istype(M, /mob/dead/observer)) + if(isobserver(M)) var/mob/dead/observer/O = M if(O.ckey == ckey && O.can_reenter_corpse) make_podman = 1 @@ -66,19 +66,19 @@ else if(M.ckey == ckey && M.stat == DEAD && !M.suiciding) make_podman = 1 - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M make_podman = !L.hellbound break else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key for(var/mob/M in player_list) if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding) - if(istype(M, /mob/dead/observer)) + if(isobserver(M)) var/mob/dead/observer/O = M if(!O.can_reenter_corpse) break make_podman = 1 - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M make_podman = !L.hellbound ckey_holder = M.ckey diff --git a/code/modules/hydroponics/grown/tomato.dm b/code/modules/hydroponics/grown/tomato.dm index f93cc1c6ad9..30a20975fd5 100644 --- a/code/modules/hydroponics/grown/tomato.dm +++ b/code/modules/hydroponics/grown/tomato.dm @@ -124,7 +124,7 @@ ..() /obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user) - if(awakening || istype(user.loc,/turf/open/space)) + if(awakening || isspaceturf(user.loc)) return user << "You begin to awaken the Killer Tomato..." awakening = 1 diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 96b40353db3..8fa0c463c3b 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -134,7 +134,7 @@ /obj/structure/bonfire/proc/CheckOxygen() - if(istype(loc,/turf/open)) + if(isopenturf(loc)) var/turf/open/O = loc if(O.air) var/G = O.air.gases @@ -150,7 +150,7 @@ Burn() START_PROCESSING(SSobj, src) -/obj/structure/bonfire/fire_act() +/obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume) StartBurning() /obj/structure/bonfire/Crossed(atom/movable/AM) @@ -165,9 +165,7 @@ continue if(isobj(A)) var/obj/O = A - if(O.resistance_flags & FIRE_PROOF) - continue - O.fire_act() + O.fire_act(1000, 500) else if(isliving(A)) var/mob/living/L = A L.adjust_fire_stacks(fire_stack_strength) diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 4fe9efe83c6..2c23081c95d 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -5,7 +5,7 @@ /obj/item/weapon/grown // Grown weapons name = "grown_weapon" icon = 'icons/obj/hydroponics/harvest.dmi' - resistance_flags = 0 + 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/weapon/grown/New(newloc, var/obj/item/seeds/new_seed = null) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 744b4126cb3..82134306813 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -16,7 +16,7 @@ var/toxic = 0 //Toxicity in the tray? var/age = 0 //Current age var/dead = 0 //Is it dead? - var/health = 0 //Its health. + var/plant_health //Its health var/lastproduce = 0 //Last time it was harvested var/lastcycle = 0 //Used for timing of cycles. var/cycledelay = 200 //About 10 seconds / cycle @@ -197,8 +197,8 @@ //Health & Age/////////////////////////////////////////////////////////// - // Plant dies if health <= 0 - if(health <= 0) + // Plant dies if plant_health <= 0 + if(plant_health <= 0) plantdies() adjustWeeds(1 / rating) // Weeds flourish @@ -305,7 +305,7 @@ add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lowwater3")) if(nutrilevel <= 2) add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lownutri3")) - if(health <= (myseed.endurance / 2)) + if(plant_health <= (myseed.endurance / 2)) add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_lowhealth3")) if(weedlevel >= 5 || pestlevel >= 5 || toxic >= 40) add_overlay(image('icons/obj/hydroponics/equipment.dmi', icon_state = "over_alert3")) @@ -321,7 +321,7 @@ user << "It's dead!" else if (harvest) user << "It's ready to harvest." - else if (health <= (myseed.endurance / 2)) + else if (plant_health <= (myseed.endurance / 2)) user << "It looks unhealthy." else user << "[src] is empty." @@ -366,7 +366,7 @@ else myseed = new /obj/item/seeds/weeds(src) age = 0 - health = myseed.endurance + plant_health = myseed.endurance lastcycle = world.time harvest = 0 weedlevel = 0 // Reset @@ -399,7 +399,7 @@ hardmutate() age = 0 - health = myseed.endurance + plant_health = myseed.endurance lastcycle = world.time harvest = 0 weedlevel = 0 // Reset @@ -419,7 +419,7 @@ dead = 0 hardmutate() age = 0 - health = myseed.endurance + plant_health = myseed.endurance lastcycle = world.time harvest = 0 weedlevel = 0 // Reset @@ -432,7 +432,7 @@ /obj/machinery/hydroponics/proc/plantdies() // OH NOES!!!!! I put this all in one function to make things easier - health = 0 + plant_health = 0 harvest = 0 pestlevel = 0 // Pests die if(!dead) @@ -773,9 +773,9 @@ dead = 0 myseed = O age = 1 - health = myseed.endurance + plant_health = myseed.endurance lastcycle = world.time - O.loc = src + O.forceMove(src) update_icon() else user << "[src] already has seeds in it!" @@ -858,7 +858,7 @@ playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) if(myseed) //Could be that they're just using it as a de-weeder age = 0 - health = 0 + plant_health = 0 if(harvest) harvest = FALSE //To make sure they can't just put in another seed and insta-harvest it qdel(myseed) @@ -870,7 +870,7 @@ return ..() /obj/machinery/hydroponics/attack_hand(mob/user) - if(istype(user, /mob/living/silicon)) //How does AI know what plant is? + if(issilicon(user)) //How does AI know what plant is? return if(harvest) myseed.harvest(user) @@ -910,7 +910,7 @@ /obj/machinery/hydroponics/proc/adjustHealth(adjustamt) if(myseed && !dead) - health = Clamp(health + adjustamt, 0, myseed.endurance) + plant_health = Clamp(plant_health + adjustamt, 0, myseed.endurance) /obj/machinery/hydroponics/proc/adjustToxic(adjustamt) toxic = Clamp(toxic + adjustamt, 0, 100) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 3812bc18124..7431980ac1f 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -276,7 +276,7 @@ if(isliving(target)) var/teleport_radius = max(round(G.seed.potency / 10), 1) var/turf/T = get_turf(target) - new /obj/effect/decal/cleanable/molten_item(T) //Leave a pile of goo behind for dramatic effect... + new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... do_teleport(target, T, teleport_radius) /datum/plant_gene/trait/teleport/on_slip(obj/item/weapon/reagent_containers/food/snacks/grown/G, mob/living/carbon/C) @@ -287,7 +287,7 @@ if(prob(50)) do_teleport(G, T, teleport_radius) else - new /obj/effect/decal/cleanable/molten_item(T) //Leave a pile of goo behind for dramatic effect... + new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... qdel(G) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 51bdb5b7fb8..b395b8e277d 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 = 1 - resistance_flags = 0 + 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/jobs/access.dm b/code/modules/jobs/access.dm index 0b15123b142..0dfc814eae1 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -106,18 +106,18 @@ //check if it doesn't require any access at all if(src.check_access(null)) return 1 - if(istype(M, /mob/living/silicon)) - //AI can do whatever he wants + if(issilicon(M)) + //AI can do whatever it wants return 1 if(IsAdminGhost(M)) //Access can't stop the abuse return 1 - else if(istype(M, /mob/living/carbon/human)) + else if(ishuman(M)) var/mob/living/carbon/human/H = M //if they are holding or wearing a card that has access, that works if(check_access(H.get_active_held_item()) || src.check_access(H.wear_id)) return 1 - else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid)) + else if(ismonkey(M) || isalienadult(M)) var/mob/living/carbon/george = M //they can only hold things :( if(check_access(george.get_active_held_item())) diff --git a/code/modules/jobs/job_types/civilian.dm b/code/modules/jobs/job_types/civilian.dm index 6264c73d6ed..ef2eebf4d14 100644 --- a/code/modules/jobs/job_types/civilian.dm +++ b/code/modules/jobs/job_types/civilian.dm @@ -165,6 +165,8 @@ Lawyer shoes = /obj/item/clothing/shoes/laceup l_hand = /obj/item/weapon/storage/briefcase/lawyer l_pocket = /obj/item/device/laser_pointer + r_pocket = /obj/item/clothing/tie/lawyers_badge + /datum/outfit/job/lawyer/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) ..() @@ -177,5 +179,3 @@ Lawyer if(J.lawyers>1) uniform = /obj/item/clothing/under/lawyer/purpsuit suit = /obj/item/clothing/suit/toggle/lawyer/purple - - H.bubble_icon = "lawyer" diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index abdd72df540..c707fb544bb 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -17,8 +17,10 @@ anchored = 0 density = 1 opacity = 0 - resistance_flags = 0 - burntime = 30 + resistance_flags = FLAMMABLE + obj_integrity = 200 + max_integrity = 200 + armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0) var/state = 0 var/list/allowed_books = list(/obj/item/weapon/book, /obj/item/weapon/spellbook, /obj/item/weapon/storage/book) //Things allowed in the bookcase @@ -46,8 +48,7 @@ playsound(loc, 'sound/items/Crowbar.ogg', 100, 1) if(do_after(user, 20/I.toolspeed, target = src)) user << "You pry the frame apart." - new /obj/item/stack/sheet/mineral/wood(loc, 4) - qdel(src) + deconstruct(TRUE) if(1) if(istype(I, /obj/item/stack/sheet/mineral/wood)) @@ -109,13 +110,12 @@ update_icon() -/obj/structure/bookcase/ex_act(severity, target) - ..() - if(!qdeleted(src)) - for(var/obj/item/weapon/book/b in contents) - b.loc = (get_turf(src)) - if(prob(50)) - qdel(src) +/obj/structure/bookcase/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/mineral/wood(loc, 4) + for(var/obj/item/weapon/book/B in contents) + B.forceMove(get_turf(src)) + qdel(src) + /obj/structure/bookcase/update_icon() if(contents.len < 5) @@ -167,7 +167,7 @@ throw_range = 5 w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) attack_verb = list("bashed", "whacked", "educated") - resistance_flags = 0 + resistance_flags = FLAMMABLE var/dat //Actual page content var/due_date = 0 //Game time in 1/10th seconds var/author //Who wrote the thing, can be changed by pen or PC. It is not automatically assigned diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 9109ddefc76..c31226730ea 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -179,9 +179,6 @@ else return ..() -/obj/structure/closet/crate/secure/loot/attack_animal(mob/user) - boom(user) - /obj/structure/closet/crate/secure/loot/AltClick(mob/living/user) if(!user.canUseTopic(src)) return @@ -224,8 +221,7 @@ else ..() -/obj/structure/closet/crate/secure/loot/burn() - SSobj.burning -= src +/obj/structure/closet/crate/secure/loot/deconstruct(disassembled = TRUE) boom() /obj/structure/closet/crate/secure/loot/proc/boom(mob/user) diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm index 7e139965aa2..c60ebd6c536 100644 --- a/code/modules/mining/equipment.dm +++ b/code/modules/mining/equipment.dm @@ -242,7 +242,7 @@ /obj/effect/resonance/proc/burst(turf/T) playsound(src,'sound/weapons/resonator_blast.ogg',50,1) - if(istype(T, /turf/closed/mineral)) + if(ismineralturf(T)) var/turf/closed/mineral/M = T M.gets_drilled(creator) for(var/mob/living/L in T) @@ -285,7 +285,7 @@ /obj/item/weapon/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag) if(!loaded) return - if(istype(target, /mob/living) && proximity_flag) + if(isliving(target) && proximity_flag) if(istype(target, /mob/living/simple_animal)) var/mob/living/simple_animal/M = target if(M.sentience_type != revive_type) @@ -294,7 +294,7 @@ if(M.stat == DEAD) M.faction = list("neutral") M.revive(full_heal = 1, admin_revive = 1) - if(istype(target, /mob/living/simple_animal/hostile)) + if(ishostile(target)) var/mob/living/simple_animal/hostile/H = M if(malfunctioning) H.faction |= list("lazarus", "\ref[user]") @@ -522,7 +522,7 @@ L.underlays += I hammer_synced.marked_image = I var/target_turf = get_turf(target) - if(istype(target_turf, /turf/closed/mineral)) + if(ismineralturf(target_turf)) var/turf/closed/mineral/M = target_turf PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, M) M.gets_drilled(firer) @@ -531,7 +531,7 @@ /obj/item/weapon/twohanded/required/mining_hammer/afterattack(atom/target, mob/user, proximity_flag) if(!proximity_flag && charged)//Mark a target, or mine a tile. var/turf/proj_turf = get_turf(src) - if(!istype(proj_turf, /turf)) + if(!isturf(proj_turf)) return var/datum/gas_mixture/environment = proj_turf.return_air() var/pressure = environment.return_pressure() diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index fe7cf2e6818..81a1c070d5a 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -71,7 +71,7 @@ var/list/total_extraction_beacons = list() var/image/balloon var/image/balloon2 var/image/balloon3 - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A M.Weaken(16) // Keep them from moving during the duration of the extraction M.buckled = 0 // Unbuckle them to prevent anchoring problems @@ -104,7 +104,7 @@ var/list/total_extraction_beacons = list() sleep(10) playsound(holder_obj.loc, 'sound/items/fultext_launch.wav', 50, 1, -3) animate(holder_obj, pixel_z = 1000, time = 30) - if(istype(A, /mob/living/carbon/human)) + if(ishuman(A)) var/mob/living/carbon/human/L = A L.SetParalysis(0) L.drowsyness = 0 @@ -173,12 +173,12 @@ var/list/total_extraction_beacons = list() var/atom/movable/stored_obj /obj/item/weapon/extraction_pack/proc/check_for_living_mobs(atom/A) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A if(L.stat != DEAD) return 1 for(var/thing in A.GetAllContents()) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A if(L.stat != DEAD) return 1 diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 0c27cc1b878..d078f6f5c6b 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -154,8 +154,9 @@ icon_state = "mushroom_shavings" list_reagents = list("sugar" = 3, "ethanol" = 2, "stabilizing_agent" = 3, "minttoxin" = 2) w_class = 1 - resistance_flags = 0 - burntime = 30 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 var/prepared = FALSE var/prepared_type = /obj/item/weapon/reagent_containers/food/snacks/ash_flora/shavings var/standard_prep = TRUE @@ -245,6 +246,17 @@ icon_state = "cactus_fruit_p" //prepared = TRUE + +/obj/item/mushroom_bowl + name = "mushroom bowl" + desc = "A bowl made out of mushrooms. Not food, though it might have contained some at some point." + icon = 'icons/obj/lavaland/ash_flora.dmi' + icon_state = "mushroom_bowl" + w_class = 2 + resistance_flags = FLAMMABLE + obj_integrity = 200 + max_integrity = 200 + //what you can craft with these things /datum/crafting_recipe/mushroom_bowl name = "Mushroom Bowl" diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index e97a66b7070..62ba898d767 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -83,24 +83,21 @@ user << "The wisp has gone missing!" return if(wisp.loc == src) - user << "You release the wisp. It begins to \ - bob around your head." + user << "You release the wisp. It begins to bob around your head." user.sight |= SEE_MOBS icon_state = "lantern" wisp.orbit(user, 20) feedback_add_details("wisp_lantern","F") // freed else - user << "You return the wisp to the lantern.\ - " + user << "You return the wisp to the lantern." if(wisp.orbiting) var/atom/A = wisp.orbiting.orbiting - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A M.sight &= ~SEE_MOBS - M << "Your vision returns to \ - normal." + M << "Your vision returns to normal." wisp.stop_orbit() wisp.loc = src @@ -116,8 +113,7 @@ if(wisp.loc == src) qdel(wisp) else - wisp.visible_message("[wisp] has a sad \ - feeling for a moment, then it passes.") + wisp.visible_message("[wisp] has a sad feeling for a moment, then it passes.") ..() //Wisp Lantern @@ -233,7 +229,7 @@ if(cooldown < world.time) feedback_add_details("immortality_talisman","U") // usage cooldown = world.time + 600 - user.visible_message("[user] vanishes from reality, leaving a a hole in their place!") + user.visible_message("[user] vanishes from reality, leaving a a hole in [user.p_their()] place!") var/obj/effect/immortality_talisman/Z = new(get_turf(src.loc)) Z.name = "hole in reality" Z.desc = "It's shaped an awful lot like [user.name]." @@ -252,7 +248,6 @@ /obj/effect/immortality_talisman icon_state = "blank" icon = 'icons/effects/effects.dmi' - resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF var/can_destroy = FALSE /obj/effect/immortality_talisman/attackby() @@ -514,7 +509,7 @@ return user << "You call out for aid, attempting to summon spirits to your side." - notify_ghosts("[user] is raising their [src], calling for your help!", + notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!", enter_link="(Click to help)", source = user, action=NOTIFY_ORBIT) @@ -756,7 +751,7 @@ for(var/mob/living/carbon/human/H in player_list) if(H == L) continue - H << "You have an overwhelming desire to kill [L]. They have been marked red! Go kill them!" + H << "You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!" H.put_in_hands_or_del(new /obj/item/weapon/kitchen/knife/butcher(H)) qdel(src) @@ -794,7 +789,7 @@ addtimer(src, "aoe_burst", 0, FALSE, T, user) add_logs(user, target, "fired 3x3 blast at", src) else - if(istype(target, /turf/closed/mineral) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it) + if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it) addtimer(src, "cardinal_blasts", 0, FALSE, T, user) timer = world.time + cooldown_time else if(target in view(5, get_turf(user))) //if the target is in view, hit it @@ -814,9 +809,12 @@ friendly_fire_check = !friendly_fire_check user << "You toggle friendly fire [friendly_fire_check ? "off":"on"]!" return + if(!user.is_holding(src)) //you need to hold the staff to teleport + user << "You need to hold the staff in your hands to [rune ? "teleport with it":"create a rune"]!" + return if(!rune) if(isturf(user.loc)) - user.visible_message("[user] holds [src] carefully in front of them, moving it in a strange pattern...", \ + user.visible_message("[user] holds [src] carefully in front of [user.p_them()], moving it in a strange pattern...", \ "You start creating a hierophant rune to teleport to...") timer = world.time + 51 if(do_after(user, 50, target = user)) @@ -826,7 +824,7 @@ var/obj/effect/hierophant/H = new/obj/effect/hierophant(T) rune = H user.update_action_buttons_icon() - user.visible_message("[user] creates a strange rune beneath them!", \ + user.visible_message("[user] creates a strange rune beneath [user.p_them()]!", \ "You create a hierophant rune, which you can teleport yourself and any allies to at any time!\n\ You can remove the rune to place a new one by striking it with the staff.") else @@ -834,9 +832,6 @@ else user << "You need to be on solid ground to produce a rune!" return - if(!user.is_holding(src)) //you need to hold the staff to teleport - user << "You need to hold the staff in your hands to [rune ? "teleport with it":"create a rune"]!" - return if(get_dist(user, rune) <= 2) //rune too close abort user << "You are too close to the rune to teleport to it!" return diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 25bc17f142c..fcfd1f05717 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -452,9 +452,10 @@ var/buildstackamount = 5 /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/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT)) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index a2ffd309444..07d85335fbd 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -36,6 +36,10 @@ if(istype(T, /turf/closed/mineral/random)) Spread(T) + +/turf/closed/mineral/acid_melt() + ChangeTurf(baseturf) + /turf/closed/mineral/volcanic environment_type = "basalt" turf_type = /turf/open/floor/plating/asteroid/basalt @@ -73,7 +77,7 @@ var/path = pickweight(mineralSpawnChanceList) var/turf/T = ChangeTurf(path) - if(T && istype(T, /turf/closed/mineral)) + if(T && ismineralturf(T)) var/turf/closed/mineral/M = T M.mineralAmt = rand(1, 5) M.environment_type = src.environment_type @@ -359,7 +363,7 @@ /turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T) for(var/S in RANGE_TURFS(1, src)) var/turf/NT = S - if(!NT || istype(NT, /turf/open/space) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored)) + if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored)) sanity = 0 break if(!sanity) @@ -402,7 +406,7 @@ if (istype(P, /obj/item/weapon/pickaxe)) var/turf/T = user.loc - if (!( istype(T, /turf) )) + if (!isturf(T)) return if(last_act+P.digspeed > world.time)//prevents message spam @@ -412,7 +416,7 @@ P.playDigSound() if(do_after(user,P.digspeed, target = src)) - if(istype(src, /turf/closed/mineral)) + if(ismineralturf(src)) user << "You finish cutting into the rock." gets_drilled(user) feedback_add_details("pick_used_mining","[P.type]") @@ -446,13 +450,13 @@ /turf/closed/mineral/Bumped(AM as mob|obj) ..() - if(istype(AM,/mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM var/obj/item/I = H.is_holding_item_of_type(/obj/item/weapon/pickaxe) if(I) attackby(I,H) return - else if(istype(AM,/mob/living/silicon/robot)) + else if(iscyborg(AM)) var/mob/living/silicon/robot/R = AM if(istype(R.module_active,/obj/item/weapon/pickaxe)) src.attackby(R.module_active,R) @@ -561,7 +565,7 @@ digging_speed = P.digspeed if (digging_speed) var/turf/T = user.loc - if (!( istype(T, /turf) )) + if(!isturf(T)) return if (dug) @@ -725,11 +729,20 @@ L.resting = TRUE animate(AM, transform = matrix() - matrix(), alpha = 0, color = rgb(0, 0, 0), time = 10) for(var/i in 1 to 5) + //Make sure the item is still there after our sleep + if(!AM || qdeleted(AM)) + return AM.pixel_y-- sleep(2) - if(isrobot(AM)) + + //Make sure the item is still there after our sleep + if(!AM || qdeleted(AM)) + return + + if(iscyborg(AM)) var/mob/living/silicon/robot/S = AM qdel(S.mmi) + qdel(AM) /turf/closed/mineral/volcanic/lava_land_surface diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index bb92d145e93..234f3adfcaa 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -24,6 +24,7 @@ maxHealth = 125 melee_damage_lower = 15 melee_damage_upper = 15 + obj_damage = 0 environment_smash = 0 check_friendly_fire = 1 stop_automated_movement_when_pulled = 1 diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index d98a98b714c..f68565e29ce 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -5,8 +5,9 @@ icon_state = "moneybag" force = 10 throwforce = 0 - resistance_flags = 0 - burntime = 20 + resistance_flags = FLAMMABLE + obj_integrity = 100 + max_integrity = 100 w_class = 4 max_w_class = 3 storage_slots = 80 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 3f36349ff7f..932def45a6a 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -345,7 +345,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" set name = "Teleport" set desc= "Teleport to a location" - if(!istype(usr, /mob/dead/observer)) + if(!isobserver(usr)) usr << "Not when you're not dead!" return var/A @@ -417,7 +417,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Jump to Mob" set desc = "Teleport to a mob" - if(istype(usr, /mob/dead/observer)) //Make sure they're an observer! + if(isobserver(usr)) //Make sure they're an observer! var/list/dest = list() //List of possible destinations (mobs) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index b6ea4447421..a190b47b448 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -12,7 +12,7 @@ if(radio_freq) var/atom/movable/virtualspeaker/V = speaker - if(istype(V.source, /mob/living/silicon/ai)) + if(isAI(V.source)) var/mob/living/silicon/ai/S = V.source speaker = S.eyeobj else diff --git a/code/modules/mob/interactive.dm b/code/modules/mob/interactive.dm index 7be2862b0fc..6061964f5b0 100644 --- a/code/modules/mob/interactive.dm +++ b/code/modules/mob/interactive.dm @@ -1216,27 +1216,25 @@ if(shouldTryHeal == 1) for(var/mob/living/carbon/human/C in nearby) - if(istype(C,/mob/living/carbon/human)) //I haven't the foggiest clue why this is turning up non-carbons but sure here whatever - if(C.health <= 75) - if(get_dist(src,C) <= 2) - src.say("Wait, [C], let me heal you!") - M.attack(C,src) - sleep(25) - else - tryWalk(get_turf(C)) + if(C.health <= 75) + if(get_dist(src,C) <= 2) + src.say("Wait, [C], let me heal you!") + M.attack(C,src) + sleep(25) + else + tryWalk(get_turf(C)) else if(shouldTryHeal == 2) if(HPS) if(HPS.reagents.total_volume <= 0) HPS.reagents.add_reagent("tricordrazine",30) for(var/mob/living/carbon/human/C in nearby) - if(istype(C,/mob/living/carbon/human)) - if(C.health <= 75 && C.reagents.get_reagent_amount("tricordrazine") <= 0) // make sure they wont be overdosing - if(get_dist(src,C) <= 2) - src.say("Wait, [C], let me heal you!") - HPS.attack(C,src) - sleep(25) - else - tryWalk(get_turf(C)) + if(C.health <= 75 && C.reagents.get_reagent_amount("tricordrazine") <= 0) // make sure they wont be overdosing + if(get_dist(src,C) <= 2) + src.say("Wait, [C], let me heal you!") + HPS.attack(C,src) + sleep(25) + else + tryWalk(get_turf(C)) /mob/living/carbon/human/interactive/proc/dojanitor(obj) @@ -1514,7 +1512,7 @@ if((TARGET && (doing & FIGHTING))) // this is a redundancy check var/mob/living/M = TARGET - if(istype(M,/mob/living)) + if(isliving(M)) if(M.health > 1) //THROWING OBJECTS for(var/A in allContents) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 542616a278e..89f1a5a7529 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -315,6 +315,7 @@ return items + /obj/item/proc/equip_to_best_slot(var/mob/M) if(src != M.get_active_held_item()) M << "You are not holding anything to equip!" diff --git a/code/modules/mob/living/bloodcrawl.dm b/code/modules/mob/living/bloodcrawl.dm index 9f9b9fb5e30..a1ada1800a3 100644 --- a/code/modules/mob/living/bloodcrawl.dm +++ b/code/modules/mob/living/bloodcrawl.dm @@ -6,7 +6,7 @@ density = 0 anchored = 1 invisibility = 60 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/dummy/slaughter/relaymove(mob/user, direction) forceMove(get_step(src,direction)) @@ -68,7 +68,7 @@ return // if the thing we're pulling isn't alive - if (!(istype(pullee, /mob/living))) + if (!isliving(pullee)) return var/mob/living/victim = pullee diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 4979cbd6c7d..9d8ea058792 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -90,23 +90,27 @@ user << "You toggle the MMI's radio system [radio.on==1 ? "on" : "off"]." else user << "You unlock and upend the MMI, spilling the brain onto the floor." - - brainmob.container = null //Reset brainmob mmi var. - brainmob.loc = brain //Throw mob into brain. - brainmob.stat = DEAD - brainmob.emp_damage = 0 - brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision - living_mob_list -= brainmob //Get outta here - dead_mob_list += brainmob - brain.brainmob = brainmob //Set the brain to use the brainmob - brainmob = null //Set mmi brainmob var to null - - user.put_in_hands(brain) //puts brain in the user's hand or otherwise drops it on the user's turf - brain = null //No more brain in here - + eject_brain(user) update_icon() name = "Man-Machine Interface" +/obj/item/device/mmi/proc/eject_brain(mob/user) + brainmob.container = null //Reset brainmob mmi var. + brainmob.loc = brain //Throw mob into brain. + brainmob.stat = DEAD + brainmob.emp_damage = 0 + brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision + living_mob_list -= brainmob //Get outta here + dead_mob_list += brainmob + brain.brainmob = brainmob //Set the brain to use the brainmob + brainmob = null //Set mmi brainmob var to null + if(user) + user.put_in_hands(brain) //puts brain in the user's hand or otherwise drops it on the user's turf + else + brain.forceMove(get_turf(src)) + brain = null //No more brain in here + + /obj/item/device/mmi/proc/transfer_identity(mob/living/L) //Same deal as the regular brain proc. Used for human-->robot people. if(!brainmob) brainmob = new(src) @@ -164,14 +168,27 @@ ..() /obj/item/device/mmi/Destroy() - if(isrobot(loc)) + if(iscyborg(loc)) var/mob/living/silicon/robot/borg = loc borg.mmi = null if(brainmob) qdel(brainmob) brainmob = null + if(brain) + qdel(brain) + brain = null + if(mecha) + mecha = null + if(radio) + qdel(radio) + radio = null return ..() +/obj/item/device/mmi/deconstruct(disassembled = TRUE) + if(brain) + eject_brain() + qdel(src) + /obj/item/device/mmi/examine(mob/user) ..() if(brainmob) diff --git a/code/modules/mob/living/brain/emote.dm b/code/modules/mob/living/brain/emote.dm index 8ab505f7a9e..a225c3ad819 100644 --- a/code/modules/mob/living/brain/emote.dm +++ b/code/modules/mob/living/brain/emote.dm @@ -59,7 +59,7 @@ log_emote("[name]/[key] : [message]") for(var/mob/M in dead_mob_list) - if (!M.client || istype(M, /mob/new_player)) + if (!M.client || isnewplayer(M)) continue //skip monkeys, leavers, and new_players if(M.stat == DEAD && (M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT)) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/brain/posibrain.dm b/code/modules/mob/living/brain/posibrain.dm index f7ad95798a5..e8569861882 100644 --- a/code/modules/mob/living/brain/posibrain.dm +++ b/code/modules/mob/living/brain/posibrain.dm @@ -125,7 +125,7 @@ var/global/posibrain_notif_cooldown = 0 if(!usr || !src) return - if( (usr.disabilities & BLIND || usr.stat) && !istype(usr,/mob/dead/observer) ) + if((usr.disabilities & BLIND || usr.stat) && !isobserver(usr)) usr << "Something is there but you can't see it." return diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index 0d934446366..2a84bfafb03 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -18,7 +18,7 @@ In all, this is a lot like the monkey code. /N M << "You cannot attack people before the game has started." return - if (istype(loc, /turf) && istype(loc.loc, /area/start)) + if(isturf(loc) && istype(loc.loc, /area/start)) M << "No attacking people at spawn, you jackass." return @@ -109,6 +109,7 @@ In all, this is a lot like the monkey code. /N switch (severity) if (1) gib() + return if (2) take_overall_damage(60, 60) @@ -121,4 +122,7 @@ In all, this is a lot like the monkey code. /N adjustEarDamage(15,60) /mob/living/carbon/alien/soundbang_act(intensity = 1, stun_pwr = 1, damage_pwr = 5, deafen_pwr = 15) - return 0 \ No newline at end of file + return 0 + +/mob/living/carbon/alien/acid_act(acidpwr, acid_volume) + return 0//aliens are immune to acid. 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 c9ef0237605..630c6d629c6 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -48,7 +48,7 @@ Doesn't work on other aliens/AI.*/ if(!silent) user << "Not enough plasma stored." return 0 - if(check_turf && (!isturf(user.loc) || istype(user.loc, /turf/open/space))) + if(check_turf && (!isturf(user.loc) || isspaceturf(user.loc))) if(!silent) user << "Bad place for a garden!" return 0 @@ -140,30 +140,16 @@ Doesn't work on other aliens/AI.*/ /obj/effect/proc_holder/alien/acid/on_lose(mob/living/carbon/user) user.verbs.Remove(/mob/living/carbon/proc/corrosive_acid) -/obj/effect/proc_holder/alien/acid/proc/corrode(target,mob/living/carbon/user = usr) +/obj/effect/proc_holder/alien/acid/proc/corrode(atom/target,mob/living/carbon/user = usr) if(target in oview(1,user)) - // OBJ CHECK - if(isobj(target)) - var/obj/I = target - if(I.resistance_flags & UNACIDABLE)//So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid. - user << "You cannot dissolve this object." - return 0 - // TURF CHECK - else if(istype(target, /turf)) - var/turf/T = target - // R WALL - if(istype(T, /turf/closed/wall/r_wall)) - user << "You cannot dissolve this object." - return 0 - // R FLOOR - if(istype(T, /turf/open/floor/engine)) - user << "You cannot dissolve this object." - return 0 - else// Not a type we can acid. + if(target.acid_act(200, 100)) + user.visible_message("[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!") + return 1 + else + user << "You cannot dissolve this object." + + return 0 - new /obj/effect/acid(get_turf(target), target) - user.visible_message("[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!") - return 1 else src << "Target is too far away." return 0 @@ -171,8 +157,10 @@ Doesn't work on other aliens/AI.*/ /obj/effect/proc_holder/alien/acid/fire(mob/living/carbon/alien/user) var/O = input("Select what to dissolve:","Dissolve",null) as obj|turf in oview(1,user) - if(!O) return 0 - return corrode(O,user) + if(!O || user.incapacitated()) + return 0 + else + return corrode(O,user) /mob/living/carbon/proc/corrosive_acid(O as obj|turf in oview(1)) // right click menu verb ugh set name = "Corrossive Acid" diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 3a9e938df39..5ffffbd562a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -65,7 +65,7 @@ return ..() if(A) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A var/blocked = 0 if(ishuman(A)) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm index 4f08997c40f..a9b5fae735f 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -5,7 +5,7 @@ else ..() -/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user) +/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == "harm") ..(user, 1) adjustBruteLoss(15) diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm index 77bab6cdf04..82bb19b1475 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -18,7 +18,7 @@ visible_message("[M] has attempted to kick [src]!", \ "[M] has attempted to kick [src]!") -/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user) +/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == "harm") ..(user, 1) adjustBruteLoss(5 + rand(1,9)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 94ee29b74b0..5bc761c0faa 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -30,7 +30,7 @@ if(I && I.force) var/d = rand(round(I.force / 4), I.force) var/obj/item/bodypart/BP = get_bodypart("chest") - if(BP.take_damage(d, 0)) + if(BP.receive_damage(d, 0)) update_damage_overlays() visible_message("[user] attacks [src]'s stomach wall with the [I.name]!", \ "[user] attacks your stomach wall with the [I.name]!") @@ -440,6 +440,9 @@ return ..() /mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1, var/toxic = 0) + if(dna && dna.species && NOHUNGER in dna.species.specflags) + return 1 + if(nutrition < 100 && !blood) if(message) visible_message("[src] dry heaves!", \ @@ -498,8 +501,6 @@ update_stat() if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD ) become_husk() - if(on_fire) - shred_clothing() med_hud_set_health() /mob/living/carbon/update_sight() @@ -704,6 +705,13 @@ ..() +/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 + ..() + /mob/living/carbon/fakefire(var/fire_icon = "Generic_mob_burning") overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"= fire_icon, "layer"=-FIRE_LAYER) apply_overlay(FIRE_LAYER) @@ -725,16 +733,20 @@ add_logs(src, C, "devoured") /mob/living/carbon/proc/create_bodyparts() + var/l_arm_index_next = -1 + var/r_arm_index_next = 0 for(var/X in bodyparts) var/obj/item/bodypart/O = new X() O.owner = src bodyparts.Remove(X) bodyparts.Add(O) if(O.body_part == ARM_LEFT) - O.held_index = 1 + l_arm_index_next += 2 + O.held_index = l_arm_index_next //1, 3, 5, 7... hand_bodyparts += O else if(O.body_part == ARM_RIGHT) - O.held_index = 2 + r_arm_index_next += 2 + O.held_index = r_arm_index_next //2, 4, 6, 8... hand_bodyparts += O diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index ea2195d1727..74898463ff9 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -286,3 +286,15 @@ mob/living/carbon/bullet_act(obj/item/projectile/P, def_zone) src << "Your ears start to ring!" src << sound('sound/weapons/flash_ring.ogg',0,1,0,250) return effect_amount //how soundbanged we are + + +/mob/living/carbon/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone) + var/bodypart_bit = 0 + if(def_zone) + bodypart_bit = body_zone2body_parts_covered(def_zone) + for(var/X in get_equipped_items()) + var/obj/item/I = X + if(I.body_parts_covered & bodypart_bit) + I.take_damage(0.5*damage_amount, damage_type, damage_flag, 0) + //0.5 multiplier for balance reason, we don't want clothes to be too easily destroyed + diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 6da20373f62..226a4f4666a 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -18,13 +18,13 @@ switch(damagetype) if(BRUTE) if(BP) - if(BP.take_damage(damage * hit_percent, 0)) + if(BP.receive_damage(damage * hit_percent, 0)) update_damage_overlays() else //no bodypart, we deal damage with a more general method. adjustBruteLoss(damage * hit_percent) if(BURN) if(BP) - if(BP.take_damage(0, damage * hit_percent)) + if(BP.receive_damage(0, damage * hit_percent)) update_damage_overlays() else adjustFireLoss(damage * hit_percent) @@ -120,7 +120,7 @@ if(!parts.len) return var/obj/item/bodypart/picked = pick(parts) - if(picked.take_damage(brute,burn)) + if(picked.receive_damage(brute,burn)) update_damage_overlays() @@ -162,7 +162,7 @@ var/burn_was = picked.burn_dam - update |= picked.take_damage(brute_per_part,burn_per_part, 0) + update |= picked.receive_damage(brute_per_part,burn_per_part, 0) brute -= (picked.brute_dam - brute_was) burn -= (picked.burn_dam - burn_was) diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index 1f1717517df..cf9807180d9 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -14,10 +14,6 @@ //var/m_type = 1 switch(act)//Even carbon organisms want it alphabetically ordered.. - if ("aflap") - if (!src.restrained()) - message = "[src] flaps \his wings ANGRILY!" - m_type = 2 if ("airguitar") if (!src.restrained()) @@ -32,10 +28,6 @@ message = "[src] blinks rapidly." m_type = 1 - if ("blush","blushes") - message = "[src] blushes." - m_type = 1 - if ("bow","bows") if (!src.buckled) var/M = null @@ -82,15 +74,6 @@ message = "[src] makes a strong noise." m_type = 2 - if ("deathgasp","deathgasps") - message = "[src] seizes up and falls limp, \his eyes dead and lifeless..." - m_type = 1 - - if ("flap","flaps") - if (!src.restrained()) - message = "[src] flaps \his wings." - m_type = 2 - if ("gasp","gasps") if (!muzzled) ..(act) @@ -116,10 +99,6 @@ ..() return - if ("nod","nods") - message = "[src] nods." - m_type = 1 - if ("scream","screams") if (!muzzled) ..(act) @@ -127,10 +106,6 @@ message = "[src] makes a very loud noise." m_type = 2 - if ("shake","shakes") - message = "[src] shakes \his head." - m_type = 1 - if ("sneeze","sneezes") if (!muzzled) ..(act) @@ -145,10 +120,6 @@ message = "[src] sighs." m_type = 2 - if ("sniff","sniffs") - message = "[src] sniffs." - m_type = 2 - if ("snore","snores") if (!muzzled) ..(act) @@ -188,7 +159,7 @@ // Maybe some people are okay with that. for(var/mob/M in dead_mob_list) - if(!M.client || istype(M, /mob/new_player)) + if(!M.client || isnewplayer(M)) continue //skip monkeys, leavers and new players if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 44a0a94a0d2..1e993481d38 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -1,10 +1,10 @@ /mob/living/carbon/examine(mob/user) - var/t_He = they_pronoun(TRUE) - var/t_His = their_pronoun(TRUE) - var/t_his = their_pronoun() - var/t_him = them_pronoun() - var/t_has = get_has() - var/t_is = get_is() + var/t_He = p_they(TRUE) + var/t_His = p_their(TRUE) + var/t_his = p_their() + var/t_him = p_them() + var/t_has = p_have() + var/t_is = p_are() var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" @@ -37,7 +37,7 @@ if(t=="head") msg += "[t_His] [parse_zone(t)] is missing!\n" continue - msg += "<[t_His] [parse_zone(t)] is missing!\n" + msg += "[t_His] [parse_zone(t)] is missing!\n" msg += "" var/temp = getBruteLoss() diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 91b85c8a40a..92e09344c46 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -24,12 +24,12 @@ switch(act) //Please keep this alphabetically ordered when adding or changing emotes. if ("aflap") //Any emote on human that uses miming must be left in, oh well. if (!src.restrained()) - message = "[src] flaps \his wings ANGRILY!" + message = "[src] flaps [p_their()] wings ANGRILY!" m_type = 2 if ("choke","chokes") if (miming) - message = "[src] clutches \his throat desperately!" + message = "[src] clutches [p_their()] throat desperately!" else ..(act) @@ -70,7 +70,7 @@ message = "[src] cries." m_type = 2 else - message = "[src] makes a weak noise. \He frowns." + message = "[src] makes a weak noise. [p_they(TRUE)] frown[p_s()]." m_type = 2 if ("custom") @@ -121,7 +121,7 @@ if (M) message = "[src] gives daps to [M]." else - message = "[src] sadly can't find anybody to give daps to, and daps \himself. Shameful." + message = "[src] sadly can't find anybody to give daps to, and daps [p_them()]self. Shameful." if ("eyebrow") message = "[src] raises an eyebrow." @@ -129,7 +129,7 @@ if ("flap","flaps") if (!src.restrained()) - message = "[src] flaps \his wings." + message = "[src] flaps [p_their()] wings." m_type = 2 if(((dna.features["wings"] != "None") && !("wings" in dna.species.mutant_bodyparts))) OpenWings() @@ -138,10 +138,10 @@ if ("wings") if (!src.restrained()) if(dna && dna.species &&((dna.features["wings"] != "None") && ("wings" in dna.species.mutant_bodyparts))) - message = "[src] opens \his wings." + message = "[src] opens [p_their()] wings." OpenWings() else if(dna && dna.species &&((dna.features["wings"] != "None") && ("wingsopen" in dna.species.mutant_bodyparts))) - message = "[src] closes \his wings." + message = "[src] closes [p_their()] wings." CloseWings() else src << "Unusable emote '[act]'. Say *help for a list." @@ -191,7 +191,7 @@ if (M.canmove && M.get_empty_held_indexes() && !M.restrained()) message = "[src] shakes hands with [M]." else - message = "[src] holds out \his hand to [M]." + message = "[src] holds out [p_their()] hand to [M]." if ("hug","hugs") m_type = 1 @@ -207,7 +207,7 @@ if (M) message = "[src] hugs [M]." else - message = "[src] hugs \himself." + message = "[src] hugs [p_them()]self." if ("me") if(silent) @@ -339,7 +339,7 @@ if("wag","wags") if(dna && dna.species && (("tail_lizard" in dna.species.mutant_bodyparts) || ((dna.features["tail_human"] != "None") && !("waggingtail_human" in dna.species.mutant_bodyparts)))) - message = "[src] wags \his tail." + message = "[src] wags [p_their()] tail." startTailWag() else if(dna && dna.species && (("waggingtail_lizard" in dna.species.mutant_bodyparts) || ("waggingtail_human" in dna.species.mutant_bodyparts))) endTailWag() @@ -364,7 +364,7 @@ // Maybe some people are okay with that. for(var/mob/M in dead_mob_list) - if(!M.client || istype(M, /mob/new_player)) + if(!M.client || isnewplayer(M)) continue //skip monkeys, leavers and new players if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null))) M.show_message(message) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index dc076f45497..487da019e74 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -1,11 +1,11 @@ /mob/living/carbon/human/examine(mob/user) //this is very slightly better than it was because you can use it more places. still can't do \his[src] though. - var/t_He = they_pronoun(TRUE) - var/t_His = their_pronoun(TRUE) - var/t_his = their_pronoun() - var/t_him = them_pronoun() - var/t_has = get_has() - var/t_is = get_is() + var/t_He = p_they(TRUE) + var/t_His = p_their(TRUE) + var/t_his = p_their() + var/t_him = p_them() + var/t_has = p_have() + var/t_is = p_are() var/msg = "*---------*\nThis is [src.name]!\n" @@ -142,7 +142,7 @@ appears_dead = 1 if(getorgan(/obj/item/organ/brain))//Only perform these checks if there is no brain if(suiciding) - msg += "[t_He] appears to have commited suicide... there is no hope of recovery.\n" + msg += "[t_He] appear[p_s()] to have commited suicide... there is no hope of recovery.\n" if(hellbound) msg += "[t_His] soul seems to have been ripped out of [t_his] body. Revival is impossible.\n" msg += "[t_He] [t_is] limp and unresponsive; there are no signs of life" @@ -263,7 +263,7 @@ if(61.01 to 91) msg += "[t_He] looks like a drunken mess.\n" if(91.01 to INFINITY) - msg += "[t_He] is a shitfaced, slobbering wreck.\n" + msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n" msg += "" @@ -306,10 +306,10 @@ msg += "Detected cybernetic modifications:
" msg += implant_detect if(R) - var/health = R.fields["p_stat"] - msg += "\[[health]\]" - health = R.fields["m_stat"] - msg += "\[[health]\]
" + var/health_r = R.fields["p_stat"] + msg += "\[[health_r]\]" + health_r = R.fields["m_stat"] + msg += "\[[health_r]\]
" R = find_record("name", perpname, data_core.medical) if(R) msg += "\[Medical evaluation\]
" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 833d5c1772d..d8d22fceb35 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -219,8 +219,8 @@ if(!I || !L || I.loc != src || !(I in L.embedded_objects)) return L.embedded_objects -= I - L.take_damage(I.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus. - I.loc = get_turf(src) + L.receive_damage(I.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus. + I.forceMove(get_turf(src)) usr.put_in_hands(I) usr.emote("scream") usr.visible_message("[usr] successfully rips [I] out of their [L.name]!","You successfully remove [I] from your [L.name].") @@ -272,7 +272,7 @@ ///////HUDs/////// if(href_list["hud"]) - if(istype(usr, /mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/H = usr var/perpname = get_face_name(get_id_name("")) if(istype(H.glasses, /obj/item/clothing/glasses/hud)) @@ -294,24 +294,24 @@ if(href_list["hud"] == "m") if(istype(H.glasses, /obj/item/clothing/glasses/hud/health)) if(href_list["p_stat"]) - var/health = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel") + var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel") if(R) if(!H.canUseHUD()) return else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health)) return - if(health && health != "Cancel") - R.fields["p_stat"] = health + if(health_status && health_status != "Cancel") + R.fields["p_stat"] = health_status return if(href_list["m_stat"]) - var/health = input(usr, "Specify a new mental status for this person.", "Medical HUD", R.fields["m_stat"]) in list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel") + var/health_status = input(usr, "Specify a new mental status for this person.", "Medical HUD", R.fields["m_stat"]) in list("Stable", "*Watch*", "*Unstable*", "*Insane*", "Cancel") if(R) if(!H.canUseHUD()) return else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health)) return - if(health && health != "Cancel") - R.fields["m_stat"] = health + if(health_status && health_status != "Cancel") + R.fields["m_stat"] = health_status return if(href_list["evaluation"]) if(!getBruteLoss() && !getFireLoss() && !getOxyLoss() && getToxLoss() < 20) @@ -496,7 +496,7 @@ . = 0 if(!. && error_msg && user) // Might need re-wording. - user << "There is no exposed flesh or thin material [above_neck(target_zone) ? "on [their_pronoun()] head" : "on [their_pronoun()] body"]." + user << "There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"]." /mob/living/carbon/human/proc/check_obscured_slots() var/list/obscured = list() @@ -630,7 +630,7 @@ src << "Remove your mask first!" return 0 if(C.is_mouth_covered()) - src << "Remove [their_pronoun()] mask first!" + src << "Remove [p_their()] mask first!" return 0 if(C.cpr_time < world.time + 30) @@ -884,7 +884,6 @@ override = dna.species.override_float ..() - /mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0) if(blood && (NOBLOOD in dna.species.specflags)) if(message) @@ -893,4 +892,4 @@ if(stun) Weaken(10) return 1 - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 766a37aad4a..cf7908ce2ef 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -18,8 +18,8 @@ return (armorval/max(organnum, 1)) -/mob/living/carbon/human/proc/checkarmor(obj/item/bodypart/def_zone, type) - if(!type) +/mob/living/carbon/human/proc/checkarmor(obj/item/bodypart/def_zone, d_type) + if(!d_type) return 0 var/protection = 0 var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, ears, wear_id) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor) @@ -29,7 +29,7 @@ if(bp && istype(bp ,/obj/item/clothing)) var/obj/item/clothing/C = bp if(C.body_parts_covered & def_zone.body_part) - protection += C.armor[type] + protection += C.armor[d_type] return protection ///checkeyeprot() @@ -139,7 +139,7 @@ L.embedded_objects |= I I.add_mob_blood(src)//it embedded itself in you, of course it's bloody! I.loc = src - L.take_damage(I.w_class*I.embedded_impact_pain_multiplier) + L.receive_damage(I.w_class*I.embedded_impact_pain_multiplier) visible_message("\the [I.name] embeds itself in [src]'s [L.name]!","\the [I.name] embeds itself in your [L.name]!") hitpush = 0 skipcatch = 1 //can't catch the now embedded item @@ -171,7 +171,7 @@ return dna.species.spec_attacked_by(I, user, affecting, a_intent, src) -/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user) +/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == "harm") ..(user, 1) playsound(loc, user.dna.species.attack_sound, 25, 1, -1) @@ -179,6 +179,7 @@ visible_message("[user] has [hulk_verb]ed [src]!", \ "[user] has [hulk_verb]ed [src]!") adjustBruteLoss(15) + damage_clothes(15, BRUTE, "melee") return 1 /mob/living/carbon/human/attack_hand(mob/living/carbon/human/M) @@ -190,7 +191,8 @@ /mob/living/carbon/human/attack_paw(mob/living/carbon/monkey/M) var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) - + if(!affecting) + affecting = get_bodypart("chest") if(M.a_intent == "help") ..() //shaking return 0 @@ -203,6 +205,7 @@ var/damage = rand(1, 3) if(stat != DEAD) apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee")) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) return 1 /mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M) @@ -221,6 +224,8 @@ "[M] has lunged at [src]!") return 0 var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected)) + if(!affecting) + affecting = get_bodypart("chest") var/armor_block = run_armor_check(affecting, "melee","","",10) playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) @@ -230,6 +235,7 @@ if(!dismembering_strike(M, M.zone_selected)) //Dismemberment successful return 1 apply_damage(damage, BRUTE, affecting, armor_block) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) if(M.a_intent == "disarm") //Always drop item in hand, if no item, get stunned instead. if(get_active_held_item() && drop_item()) @@ -253,8 +259,11 @@ if(stat != DEAD) L.amount_grown = min(L.amount_grown + damage, L.max_grown) var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected)) + if(!affecting) + affecting = get_bodypart("chest") var/armor_block = run_armor_check(affecting, "melee") apply_damage(damage, BRUTE, affecting, armor_block) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) /mob/living/carbon/human/attack_animal(mob/living/simple_animal/M) @@ -266,9 +275,11 @@ if(!dam_zone) //Dismemberment successful return 1 var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) + if(!affecting) + affecting = get_bodypart("chest") var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration) apply_damage(damage, M.melee_damage_type, affecting, armor) - + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) /mob/living/carbon/human/attack_slime(mob/living/simple_animal/slime/M) @@ -285,8 +296,11 @@ return 1 var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) + if(!affecting) + affecting = get_bodypart("chest") var/armor_block = run_armor_check(affecting, "melee") apply_damage(damage, BRUTE, affecting, armor_block) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) /mob/living/carbon/human/mech_melee_attack(obj/mecha/M) @@ -297,15 +311,18 @@ var/obj/item/bodypart/temp = get_bodypart(pick("chest", "chest", "chest", "head")) if(temp) var/update = 0 + var/dmg = rand(M.force/2, M.force) switch(M.damtype) if("brute") if(M.force > 20) Paralyse(1) - update |= temp.take_damage(rand(M.force/2, M.force), 0) + update |= temp.receive_damage(dmg, 0) playsound(src, 'sound/weapons/punch4.ogg', 50, 1) + damage_clothes(dmg, BRUTE, "melee", temp.body_zone) if("fire") - update |= temp.take_damage(0, rand(M.force/2, M.force)) + update |= temp.receive_damage(0, dmg) playsound(src, 'sound/items/Welder.ogg', 50, 1) + damage_clothes(dmg, BURN, "melee", temp.body_zone) if("tox") M.mech_toxin_damage(src) else @@ -323,17 +340,17 @@ /mob/living/carbon/human/ex_act(severity, ex_target) - var/b_loss = null - var/f_loss = null - var/bomb_armor = getarmor(null, "bomb") + if(istype(ex_target, /datum/spacevine_mutation) && isvineimmune(src)) return + var/b_loss = 0 + var/f_loss = 0 + var/bomb_armor = getarmor(null, "bomb") switch (severity) if (1) - b_loss += 500 - if (prob(bomb_armor)) - shred_clothing(1,150) + if(prob(bomb_armor)) + b_loss = 500 var/atom/target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src))) throw_at(target, 200, 4) else @@ -341,15 +358,11 @@ return if (2) - b_loss += 60 - - f_loss += 60 - if (prob(bomb_armor)) - b_loss = b_loss/1.5 - f_loss = f_loss/1.5 - shred_clothing(1,25) - else - shred_clothing(1,50) + b_loss = 60 + f_loss = 60 + if(bomb_armor) + b_loss = 30*(2 - round(bomb_armor*0.01, 0.05)) + f_loss = b_loss if (!istype(ears, /obj/item/clothing/ears/earmuffs)) adjustEarDamage(30, 120) @@ -357,15 +370,20 @@ Paralyse(10) if(3) - b_loss += 30 - if (prob(bomb_armor)) - b_loss = b_loss/2 + b_loss = 30 + if(bomb_armor) + b_loss = 15*(2 - round(bomb_armor*0.01, 0.05)) + if (!istype(ears, /obj/item/clothing/ears/earmuffs)) adjustEarDamage(15,60) if (prob(50)) Paralyse(8) take_overall_damage(b_loss,f_loss) + if(bomb_armor == 100) //full bomb armor set, we don't call contents_explosion + flash_act() + return + //attempt to dismember bodyparts if(severity <= 2 || !bomb_armor) var/max_limb_loss = round(4/severity) //so you don't lose four limbs at severity 3. @@ -426,131 +444,129 @@ informed = 1 switch(severity) if(1) - L.take_damage(0,10) + L.receive_damage(0,10) src.Stun(10) if(2) - L.take_damage(0,5) + L.receive_damage(0,5) src.Stun(5) ..() -/mob/living/carbon/human/acid_act(acidpwr, toxpwr, acid_volume) +/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit) var/list/damaged = list() var/list/inventory_items_to_kill = list() - var/acidity = min(acidpwr*acid_volume/200, toxpwr) - var/acid_volume_left = acid_volume - var/acid_decay = 100/acidpwr // how much volume we lose per item we try to melt. 5 for fluoro, 10 for sulphuric - + var/acidity = acidpwr * min(acid_volume*0.005, 0.1) //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_left) - acid_volume_left = max(acid_volume_left - acid_decay, 0) //We remove some of the acid volume. - update_inv_glasses() - update_inv_wear_mask() - update_inv_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 + src << "Your [head_clothes.name] protects your head and face from the acid!" else - src << "Your [head_clothes.name] protects your head and face from the acid!" - else - . = get_bodypart("head") - if(.) - damaged += . - if(ears) - inventory_items_to_kill += ears + . = get_bodypart("head") + if(.) + damaged += . + if(ears) + inventory_items_to_kill += ears //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_left) - acid_volume_left = max(acid_volume_left - acid_decay, 0) - update_inv_w_uniform() - update_inv_wear_suit() + 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 + src << "Your [chest_clothes.name] protects your body from the acid!" else - src << "Your [chest_clothes.name] protects your body from the acid!" - else - . = get_bodypart("chest") - if(.) - damaged += . - if(wear_id) - inventory_items_to_kill += wear_id - 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 + . = get_bodypart("chest") + if(.) + damaged += . + if(wear_id) + inventory_items_to_kill += wear_id + 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// - var/obj/item/clothing/arm_clothes = null - if(gloves) - arm_clothes = gloves - if(w_uniform && (w_uniform.body_parts_covered & HANDS) || w_uniform && (w_uniform.body_parts_covered & ARMS)) - arm_clothes = w_uniform - if(wear_suit && (wear_suit.body_parts_covered & HANDS) || wear_suit && (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_left) - acid_volume_left = max(acid_volume_left - acid_decay, 0) - update_inv_gloves() - update_inv_w_uniform() - update_inv_wear_suit() + 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 + src << "Your [arm_clothes.name] protects your arms and hands from the acid!" else - src << "Your [arm_clothes.name] protects your arms and hands from the acid!" - else - . = get_bodypart("r_arm") - if(.) - damaged += . - . = get_bodypart("l_arm") - if(.) - damaged += . + . = get_bodypart("r_arm") + if(.) + damaged += . + . = get_bodypart("l_arm") + if(.) + damaged += . //LEGS & FEET// - var/obj/item/clothing/leg_clothes = null - if(shoes) - leg_clothes = shoes - if(w_uniform && (w_uniform.body_parts_covered & FEET) || w_uniform && (w_uniform.body_parts_covered & LEGS)) - leg_clothes = w_uniform - if(wear_suit && (wear_suit.body_parts_covered & FEET) || wear_suit && (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_left) - acid_volume_left = max(acid_volume_left - acid_decay, 0) - update_inv_shoes() - update_inv_w_uniform() - update_inv_wear_suit() + 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 + src << "Your [leg_clothes.name] protects your legs and feet from the acid!" else - src << "Your [leg_clothes.name] protects your legs and feet from the acid!" - else - . = get_bodypart("r_leg") - if(.) - damaged += . - . = get_bodypart("l_leg") - if(.) - damaged += . + . = get_bodypart("r_leg") + if(.) + damaged += . + . = get_bodypart("l_leg") + if(.) + damaged += . //DAMAGE// for(var/obj/item/bodypart/affecting in damaged) - affecting.take_damage(acidity, 2*acidity) + affecting.receive_damage(acidity, 2*acidity) if(affecting.name == "head") if(prob(min(acidpwr*acid_volume/10, 90))) //Applies disfigurement - affecting.take_damage(acidity, 2*acidity) + affecting.receive_damage(acidity, 2*acidity) emote("scream") facial_hair_style = "Shaved" hair_style = "Bald" @@ -561,17 +577,17 @@ //MELTING INVENTORY ITEMS// //these items are all outside of armour visually, so melt regardless. - if(back) - inventory_items_to_kill += back - if(belt) - inventory_items_to_kill += belt + if(!bodyzone_hit) + if(back) + inventory_items_to_kill += back + if(belt) + inventory_items_to_kill += belt - inventory_items_to_kill += held_items + inventory_items_to_kill += held_items for(var/obj/item/I in inventory_items_to_kill) - I.acid_act(acidpwr, acid_volume_left) - acid_volume_left = max(acid_volume_left - acid_decay, 0) - + I.acid_act(acidpwr, acid_volume) + return 1 /mob/living/carbon/human/singularity_act() var/gain = 20 diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 4d82003dadf..e175fec7d3e 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -200,100 +200,6 @@ sec_hud_set_security_status() ..() - - - -//Cycles through all clothing slots and tests them for destruction -/mob/living/carbon/proc/shred_clothing(bomb,shock) - if(back) - back.shred(bomb,shock-20,src) - if(head) - head.shred(bomb,shock,src) - if(wear_mask) - wear_mask.shred(bomb,shock,src) - - -/mob/living/carbon/human/shred_clothing(bomb,shock) - var/covered_parts = 0 //The body parts that are protected by exterior clothing/armor - var/head_absorbed = 0 //How much of the shock the headgear absorbs when it is shredded. -1=it survives - var/suit_absorbed = 0 //How much of the shock the exosuit absorbs when it is shredded. -1=it survives - - //Backpacks can never be protected but are annoying as fuck to lose, so they get a lower chance to be shredded - if(back) - back.shred(bomb,shock-20,src) - - if(head) - covered_parts |= head.flags_inv - head_absorbed = head.shred(bomb,shock,src) - if(wear_mask) - var/absorbed = ((covered_parts & HIDEMASK) ? head_absorbed : 0) //Check if clothing covering this part absorbed any of the shock - if(absorbed >= 0) - //Masks can be used to shield other parts, but are simplified to simply add their absorbsion to the head armor if it covers the face - var/mask_absorbed = wear_mask.shred(bomb,shock-absorbed,src) - if(wear_mask.flags_inv & HIDEFACE) - covered_parts |= wear_mask.flags_inv - if(mask_absorbed < 0) //If the mask didn't get shredded, everything else on the head is protected - head_absorbed = -1 - else - head_absorbed += mask_absorbed - if(ears) - var/absorbed = ((covered_parts & HIDEEARS) ? head_absorbed : 0) - if(absorbed >= 0) - ears.shred(bomb,shock-absorbed,src) - if(glasses) - var/absorbed = ((covered_parts & HIDEEYES) ? head_absorbed : 0) - if(absorbed >= 0) - glasses.shred(bomb,shock-absorbed,src) - - if(wear_suit) - covered_parts |= wear_suit.flags_inv - suit_absorbed = wear_suit.shred(bomb,shock,src) - if(gloves) - var/absorbed = ((covered_parts & HIDEGLOVES) ? suit_absorbed : 0) - if(absorbed >= 0) - gloves.shred(bomb,shock-absorbed,src) - if(shoes) - var/absorbed = ((covered_parts & HIDESHOES) ? suit_absorbed : 0) - if(absorbed >= 0) - shoes.shred(bomb,shock-absorbed,src) - if(w_uniform) - var/absorbed = ((covered_parts & HIDEJUMPSUIT) ? suit_absorbed : 0) - if(absorbed >= 0) - w_uniform.shred(bomb,shock-20-absorbed,src) //Uniforms are also annoying to get shredded - -/obj/item/proc/shred(bomb,shock,mob/living/carbon/human/Human) - if(flags & ABSTRACT) - return -1 - - var/shredded - - if(!bomb) - if(!(resistance_flags & FIRE_PROOF)) - shredded = 1 //No heat protection, it burns - else - shredded = -1 //Heat protection = Fireproof - - else if(shock > 0) - if(prob(max(shock-armor["bomb"],0))) - shredded = armor["bomb"] + 10 //It gets shredded, but it also absorbs the shock the clothes underneath would recieve by this amount - else - shredded = -1 //It survives explosion - - if(shredded > 0) - if(Human) //Unequip if equipped - Human.unEquip(src) - - if(bomb) - empty_object_contents() - spawn(1) //so the shreds aren't instantly deleted by the explosion - var/obj/effect/decal/cleanable/shreds/Shreds = new(loc) - Shreds.desc = "The sad remains of what used to be [src.name]." - qdel(src) - else - burn() - - return shredded - /mob/living/carbon/human/proc/equipOutfit(outfit, visualsOnly = FALSE) var/datum/outfit/O = null diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5d7003106aa..4a67cb15236 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -103,6 +103,72 @@ if(!dna || !dna.species.handle_fire(src)) ..() if(on_fire) + + //the fire tries to damage the exposed clothes and items + var/list/burning_items = list() + //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) + burning_items += head_clothes + else if(ears) + burning_items += ears + + //CHEST// + var/obj/item/clothing/chest_clothes = null + if(w_uniform) + chest_clothes = w_uniform + if(wear_suit) + chest_clothes = wear_suit + else + if(wear_id) + burning_items += wear_id + if(r_store) + burning_items += r_store + if(l_store) + burning_items += l_store + if(s_store) + burning_items += s_store + if(chest_clothes) + burning_items += chest_clothes + + //ARMS & HANDS// + 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) + burning_items += arm_clothes + + //LEGS & FEET// + var/obj/item/clothing/leg_clothes = null + if(shoes) + leg_clothes = shoes + if(w_uniform && ((w_uniform.body_parts_covered & FEET) || (w_uniform.body_parts_covered & LEGS))) + leg_clothes = w_uniform + if(wear_suit && ((wear_suit.body_parts_covered & FEET) || (wear_suit.body_parts_covered & LEGS))) + leg_clothes = wear_suit + if(leg_clothes) + burning_items += leg_clothes + + if(back) + burning_items += back + if(belt) + burning_items += belt + + for(var/X in burning_items) + var/obj/item/I = X + if(!(I.resistance_flags & FIRE_PROOF)) + I.take_damage(fire_stacks, BURN, "fire", 0) + var/thermal_protection = get_thermal_protection() if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) @@ -293,11 +359,11 @@ var/obj/item/bodypart/BP = X for(var/obj/item/I in BP.embedded_objects) if(prob(I.embedded_pain_chance)) - BP.take_damage(I.w_class*I.embedded_pain_multiplier) + BP.receive_damage(I.w_class*I.embedded_pain_multiplier) src << "\the [I] embedded in your [BP.name] hurts!" if(prob(I.embedded_fall_chance)) - BP.take_damage(I.w_class*I.embedded_fall_pain_multiplier) + BP.receive_damage(I.w_class*I.embedded_fall_pain_multiplier) BP.embedded_objects -= I I.loc = get_turf(src) visible_message("\the [I] falls out of [name]'s [BP.name]!","\the [I] falls out of your [BP.name]!") diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index f250fa7cb85..0a26478c0c0 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -932,7 +932,117 @@ // ATTACK PROCS // ////////////////// -/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H) +////////////////// +// ATTACK PROCS // +////////////////// + +/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(target.health >= 0 && !(target.status_flags & FAKEDEATH)) + target.help_shake_act(user) + if(target != user) + add_logs(user, target, "shaked") + return 1 + else + var/we_breathe = (!(NOBREATH in user.dna.species.specflags)) + var/we_lung = user.getorganslot("lungs") + + if(we_breathe && we_lung) + user.do_cpr(target) + else if(we_breathe && !we_lung) + user << "You have no lungs to breathe with, so you cannot peform CPR." + else + user << "You do not breathe, so you cannot perform CPR." + +/datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(attacker_style && attacker_style.grab_act(user,target)) + return 1 + else + target.grabbedby(user) + return 1 + +/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(attacker_style && attacker_style.harm_act(user,target)) + return 1 + else + user.do_attack_animation(target) + + var/atk_verb = user.dna.species.attack_verb + if(target.lying) + atk_verb = "kick" + + var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh) + + var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected)) + + if(!damage || !affecting) + playsound(target.loc, user.dna.species.miss_sound, 25, 1, -1) + target.visible_message("[user] has attempted to [atk_verb] [target]!") + return 0 + + + var/armor_block = target.run_armor_check(affecting, "melee") + + playsound(target.loc, user.dna.species.attack_sound, 25, 1, -1) + + target.visible_message("[user] has [atk_verb]ed [target]!", \ + "[user] has [atk_verb]ed [target]!") + + if(user.limb_destroyer) + target.dismembering_strike(user, affecting.body_zone) + target.apply_damage(damage, BRUTE, affecting, armor_block) + add_logs(user, target, "punched") + if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold) + target.visible_message("[user] has weakened [target]!", \ + "[user] has weakened [target]!") + target.apply_effect(4, WEAKEN, armor_block) + target.forcesay(hit_appends) + else if(target.lying) + target.forcesay(hit_appends) + +/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) + if(attacker_style && attacker_style.disarm_act(user,target)) + return 1 + else + user.do_attack_animation(target) + add_logs(user, target, "disarmed") + + if(target.w_uniform) + target.w_uniform.add_fingerprint(user) + var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected)) + var/randn = rand(1, 100) + if(randn <= 25) + playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + target.visible_message("[user] has pushed [target]!", + "[user] has pushed [target]!") + target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!")) + target.forcesay(hit_appends) + return + + var/talked = 0 // BubbleWrap + + if(randn <= 60) + //BubbleWrap: Disarming breaks a pull + if(target.pulling) + target.visible_message("[user] has broken [target]'s grip on [target.pulling]!") + talked = 1 + target.stop_pulling() + //End BubbleWrap + + if(!talked) //BubbleWrap + if(target.drop_item()) + target.visible_message("[user] has disarmed [target]!", \ + "[user] has disarmed [target]!") + playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + return + + + playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1) + target.visible_message("[user] attempted to disarm [target]!", \ + "[user] attemped to disarm [target]!") + return + + +/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) if(!istype(M)) return CHECK_DNA_AND_SPECIES(M) @@ -944,113 +1054,18 @@ add_logs(M, H, "attempted to touch") H.visible_message("[M] attempted to touch [H]!") return 0 - - var/datum/martial_art/attacker_style = M.martial_art - switch(M.a_intent) if("help") - if(H.health >= 0 && !(H.status_flags & FAKEDEATH)) - H.help_shake_act(M) - if(H != M) - add_logs(M, H, "shaked") - return 1 - else - var/we_breathe = (!(NOBREATH in M.dna.species.specflags)) - var/we_lung = M.getorganslot("lungs") - - if(we_breathe && we_lung) - M.do_cpr(H) - else if(we_breathe && !we_lung) - M << "You have no lungs to breathe with, so you cannot peform CPR." - else - M << "You do not breathe, so you cannot perform CPR." + help(M, H, attacker_style) if("grab") - if(attacker_style && attacker_style.grab_act(M,H)) - return 1 - else - H.grabbedby(M) - return 1 + grab(M, H, attacker_style) if("harm") - if(attacker_style && attacker_style.harm_act(M,H)) - return 1 - else - M.do_attack_animation(H) + harm(M, H, attacker_style) - var/atk_verb = M.dna.species.attack_verb - if(H.lying) - atk_verb = "kick" - - var/damage = rand(M.dna.species.punchdamagelow, M.dna.species.punchdamagehigh) - - var/obj/item/bodypart/affecting = H.get_bodypart(ran_zone(M.zone_selected)) - - if(!damage || !affecting) - playsound(H.loc, M.dna.species.miss_sound, 25, 1, -1) - H.visible_message("[M] has attempted to [atk_verb] [H]!") - return 0 - - - var/armor_block = H.run_armor_check(affecting, "melee") - - playsound(H.loc, M.dna.species.attack_sound, 25, 1, -1) - - H.visible_message("[M] has [atk_verb]ed [H]!", \ - "[M] has [atk_verb]ed [H]!") - - if(M.limb_destroyer) - H.dismembering_strike(M, affecting.body_zone) - H.apply_damage(damage, BRUTE, affecting, armor_block) - add_logs(M, H, "punched") - if((H.stat != DEAD) && damage >= M.dna.species.punchstunthreshold) - H.visible_message("[M] has weakened [H]!", \ - "[M] has weakened [H]!") - H.apply_effect(4, WEAKEN, armor_block) - H.forcesay(hit_appends) - else if(H.lying) - H.forcesay(hit_appends) if("disarm") - if(attacker_style && attacker_style.disarm_act(M,H)) - return 1 - else - M.do_attack_animation(H) - add_logs(M, H, "disarmed") - - if(H.w_uniform) - H.w_uniform.add_fingerprint(M) - var/obj/item/bodypart/affecting = H.get_bodypart(ran_zone(M.zone_selected)) - var/randn = rand(1, 100) - if(randn <= 25) - playsound(H, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - H.visible_message("[M] has pushed [H]!", - "[M] has pushed [H]!") - H.apply_effect(2, WEAKEN, H.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!")) - H.forcesay(hit_appends) - return - - var/talked = 0 // BubbleWrap - - if(randn <= 60) - //BubbleWrap: Disarming breaks a pull - if(H.pulling) - H.visible_message("[M] has broken [H]'s grip on [H.pulling]!") - talked = 1 - H.stop_pulling() - //End BubbleWrap - - if(!talked) //BubbleWrap - if(H.drop_item()) - H.visible_message("[M] has disarmed [H]!", \ - "[M] has disarmed [H]!") - playsound(H, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - return - - - playsound(H, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - H.visible_message("[M] attempted to disarm [H]!", \ - "[M] attemped to disarm [H]!") - return + disarm(M, H, attacker_style) /datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H) // Allows you to put in item-specific reactions based on species @@ -1071,6 +1086,7 @@ var/weakness = H.check_weakness(I, user) apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H) + H.damage_clothes(I.force, BRUTE, "melee", affecting.body_zone) H.send_item_attack_message(I, user, hit_area) @@ -1157,14 +1173,14 @@ if(BRUTE) H.damageoverlaytemp = 20 if(BP) - if(BP.take_damage(damage * hit_percent * brutemod, 0)) + if(BP.receive_damage(damage * hit_percent * brutemod, 0)) H.update_damage_overlays() else//no bodypart, we deal damage with a more general method. H.adjustBruteLoss(damage * hit_percent * brutemod) if(BURN) H.damageoverlaytemp = 20 if(BP) - if(BP.take_damage(0, damage * hit_percent * burnmod)) + if(BP.receive_damage(0, damage * hit_percent * burnmod)) H.update_damage_overlays() else H.adjustFireLoss(damage * hit_percent* burnmod) diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm index faeda3530d7..e73d3d4bbf4 100644 --- a/code/modules/mob/living/carbon/human/species_types.dm +++ b/code/modules/mob/living/carbon/human/species_types.dm @@ -18,14 +18,6 @@ return 1 //Pure humans are always allowed in all roles. return ..() - -/datum/species/human/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) - if(chem.id == "mutationtoxin") - H << "Your flesh rapidly mutates!" - H.set_species(/datum/species/jelly/slime) - H.reagents.del_reagent(chem.type) - return 1 - //Curiosity killed the cat's wagging tail. /datum/species/human/spec_death(gibbed, mob/living/carbon/human/H) if(H) diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 951d93d9238..5080e0fb54a 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -59,13 +59,13 @@ watching -= eavesdropping var/rendered - whispers = critical ? "whispers something in [their_pronoun()] final breath." : "whispers something." + whispers = critical ? "whispers something in [p_their()] final breath." : "whispers something." rendered = "[src.name] [whispers]" for(var/mob/M in watching) M.show_message(rendered, 2) var/spans = list(SPAN_ITALICS) - whispers = critical ? "whispers in [their_pronoun()] final breath" : "whispers" + whispers = critical ? "whispers in [p_their()] final breath" : "whispers" rendered = "[GetVoice()][alt_name] [whispers], \"[attach_spans(message, spans)]\"" for(var/atom/movable/AM in listening) diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 3e87fa5c1ab..d879cdb128b 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -142,7 +142,27 @@ return 1 /mob/living/carbon/monkey/handle_fire() - if(..()) - return - bodytemperature += BODYTEMP_HEATING_MAX - return + . = ..() + if(on_fire) + + //the fire tries to damage the exposed clothes and items + var/list/burning_items = list() + //HEAD// + var/obj/item/clothing/head_clothes = null + if(wear_mask) + head_clothes = wear_mask + if(head) + head_clothes = head + if(head_clothes) + burning_items += head_clothes + + if(back) + burning_items += back + + for(var/X in burning_items) + var/obj/item/I = X + if(!(I.resistance_flags & FIRE_PROOF)) + I.take_damage(fire_stacks, BURN, "fire", 0) + + bodytemperature += BODYTEMP_HEATING_MAX + diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm index 112999aff67..39b2637cc1c 100644 --- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm +++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm @@ -17,10 +17,14 @@ if(..()) //successful monkey bite. var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) + if(!affecting) + affecting = get_bodypart("chest") if(M.limb_destroyer) dismembering_strike(M, affecting.body_zone) if(stat != DEAD) - apply_damage(rand(1, 5), BRUTE, affecting) + var/dmg = rand(1, 5) + apply_damage(dmg, BRUTE, affecting) + damage_clothes(dmg, BRUTE, "melee", affecting.body_zone) @@ -30,7 +34,10 @@ if(stat != DEAD) L.amount_grown = min(L.amount_grown + damage, L.max_grown) var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected)) + if(!affecting) + affecting = get_bodypart("chest") apply_damage(damage, BRUTE, affecting) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) /mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M) if(..()) //To allow surgery to return properly. @@ -56,7 +63,10 @@ visible_message("[M] has knocked out [name]!", \ "[M] has knocked out [name]!") var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected)) + if(!affecting) + affecting = get_bodypart("chest") apply_damage(damage, BRUTE, affecting) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) add_logs(M, src, "attacked") else @@ -96,9 +106,12 @@ var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected)) add_logs(M, src, "attacked") - if(!dismembering_strike(M, M.zone_selected)) //Dismemberment successful + if(!affecting) + affecting = get_bodypart("chest") + if(!dismembering_strike(M, affecting.body_zone)) //Dismemberment successful return 1 apply_damage(damage, BRUTE, affecting) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) else playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) @@ -126,7 +139,10 @@ if(!dam_zone) //Dismemberment successful return 1 var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) + if(!affecting) + affecting = get_bodypart("chest") apply_damage(damage, M.melee_damage_type, affecting) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) @@ -139,19 +155,28 @@ if(!dam_zone) //Dismemberment successful return 1 var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone)) + if(!affecting) + affecting = get_bodypart("chest") apply_damage(damage, BRUTE, affecting) + damage_clothes(damage, BRUTE, "melee", affecting.body_zone) -/mob/living/carbon/monkey/acid_act(acidpwr, toxpwr, acid_volume) - if(wear_mask) - if(!(wear_mask.resistance_flags & UNACIDABLE)) - wear_mask.acid_act(acidpwr) - update_inv_wear_mask() - else - src << "Your mask protects you from the acid." - return - - take_bodypart_damage(min(6*toxpwr, acid_volume * acidpwr/10)) +/mob/living/carbon/monkey/acid_act(acidpwr, acid_volume, bodyzone_hit) + . = 1 + if(!bodyzone_hit || bodyzone_hit == "head") + if(wear_mask) + if(!(wear_mask.resistance_flags & UNACIDABLE)) + wear_mask.acid_act(acidpwr) + else + src << "Your mask protects you from the acid." + return + if(head) + if(!(head.resistance_flags & UNACIDABLE)) + head.acid_act(acidpwr) + else + src << "Your hat protects you from the acid." + return + take_bodypart_damage(acidpwr * min(0.6, acid_volume*0.1)) /mob/living/carbon/monkey/ex_act(severity, target) @@ -160,10 +185,10 @@ switch (severity) if (1) gib() + return if (2) take_overall_damage(60, 60) - shred_clothing(1,50) adjustEarDamage(30, 120) if(prob(70)) Paralyse(10) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 8145741e009..aac93543fca 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -19,7 +19,7 @@ switch(act)//Hello, how would you like to order? Alphabetically! if ("aflap") if (!src.restrained()) - message = "[src] flaps its wings ANGRILY!" + message = "[src] flaps [p_their()] wings ANGRILY!" m_type = 2 if ("blush","blushes") @@ -51,7 +51,7 @@ m_type = 2 if ("cross","crosses") - message = "[src] crosses their arms." + message = "[src] crosses [p_their()] arms." m_type = 2 if ("chuckle","chuckles") @@ -73,7 +73,7 @@ m_type = 1 if ("deathgasp","deathgasps") - message = "[src] seizes up and falls limp, its eyes dead and lifeless..." + message = "[src] seizes up and falls limp, [p_their()] eyes dead and lifeless..." m_type = 1 if ("drool","drools") @@ -89,7 +89,7 @@ if ("flap","flaps") if (!src.restrained()) - message = "[src] flaps its wings." + message = "[src] flaps [p_their()] wings." m_type = 2 if ("flip","flips") @@ -212,7 +212,7 @@ if ("pout","pouts") message = "[src] pouts." m_type = 2 - + if ("scream","screams") message = "[src] screams!" m_type = 2 @@ -222,7 +222,7 @@ m_type = 1 if ("shake","shakes") - message = "[src] shakes its head." + message = "[src] shakes [p_their()] head." m_type = 1 if ("sigh","sighs") @@ -268,7 +268,7 @@ message = "[src] stares." if ("stretch","stretches") - message = "[src] stretches their arms." + message = "[src] stretches [p_their()] arms." m_type = 2 if ("sulk","sulks") @@ -276,20 +276,12 @@ m_type = 1 if ("surrender","surrenders") - message = "[src] puts their hands on their head and falls to the ground, they surrender!" + message = "[src] puts [p_their()] hands on [p_their()] head and falls to the ground, [p_they()] surrender[p_s()]!" if(sleeping) return //Can't surrender while asleep. Weaken(20) //So you can't resist. m_type = 1 - if ("faint","faints") - message = "[src] faints." - if(sleeping) - return //Can't faint while asleep - SetSleeping(10) //Short-short nap - m_type = 1 - - if ("sway","sways") message = "[src] sways around dizzily." m_type = 1 @@ -339,7 +331,7 @@ // Maybe some people are okay with that. for(var/mob/M in dead_mob_list) - if(!M.client || istype(M, /mob/new_player)) + if(!M.client || isnewplayer(M)) continue //skip monkeys, leavers and new players var/T = get_turf(src) if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T,null))) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 74a24079251..9c97338acf2 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -27,8 +27,6 @@ med_hud_set_status() /mob/living/Destroy() - ..() - if(buckled) buckled.unbuckle_mob(src,force=1) @@ -39,6 +37,8 @@ qdel(I) staticOverlays.len = 0 remove_from_all_data_huds() + ..() + return QDEL_HINT_HARDDEL @@ -244,8 +244,6 @@ temperature -= change if(actual < desired) temperature = desired -// if(istype(src, /mob/living/carbon/human)) -// world << "[src] ~ [src.bodytemperature] ~ [temperature]" return temperature @@ -434,7 +432,7 @@ /mob/living/movement_delay() . = ..() - if(istype(loc, /turf/open)) + if(isopenturf(loc)) var/turf/open/T = loc . += T.slowdown switch(m_intent) @@ -741,7 +739,7 @@ else if(istype(loc, /obj/structure/transit_tube_pod)) loc_temp = environment.temperature - else if(istype(get_turf(src), /turf/open/space)) + else if(isspaceturf(get_turf(src))) var/turf/heat_turf = get_turf(src) loc_temp = heat_turf.temperature diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index ee4bd6ce206..27d465da4ce 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -81,7 +81,7 @@ visible_message("[src] has been hit by [I].", \ "[src] has been hit by [I].") var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].",I.armour_penetration) - apply_damage(I.throwforce, dtype, zone, armor, I) + apply_damage(I.throwforce, dtype, zone, armor) if(I.thrownby) add_logs(I.thrownby, src, "hit", I) else @@ -208,7 +208,7 @@ M << "You cannot attack people before the game has started." return 0 - if (istype(loc, /turf) && istype(loc.loc, /area/start)) + if(isturf(loc) && istype(loc.loc, /area/start)) M << "No attacking people at spawn, you jackass." return 0 @@ -252,7 +252,7 @@ M << "You cannot attack people before the game has started." return 0 - if (istype(loc, /turf) && istype(loc.loc, /area/start)) + if(isturf(loc) && istype(loc.loc, /area/start)) M << "No attacking people at spawn, you jackass." return 0 @@ -276,8 +276,9 @@ //Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs. -/mob/living/acid_act(acidpwr, toxpwr, acid_volume) - take_bodypart_damage(min(10*toxpwr, acid_volume * toxpwr)) +/mob/living/acid_act(acidpwr, acid_volume) + take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1)) + return 1 /mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0) @@ -336,3 +337,7 @@ //called when the mob receives a loud bang /mob/living/proc/soundbang_act() return 0 + +//to damage the clothes worn by a mob +/mob/living/proc/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone) + return diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 0dafbfe1137..d33be72052d 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -71,5 +71,5 @@ var/blood_volume = 0 //how much blood the mob has var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override - + var/slipping = FALSE \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 0114c3dc9fa..8e3fc4a8fff 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -110,7 +110,7 @@ var/list/ai_list = list() radio = new /obj/item/device/radio/headset/ai(src) aicamera = new/obj/item/device/camera/siliconcam/ai_camera(src) - if (istype(loc, /turf)) + if(isturf(loc)) verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \ /mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \ /mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall,\ @@ -304,7 +304,7 @@ var/list/ai_list = list() /mob/living/silicon/ai/proc/ai_call_shuttle() if(stat == DEAD) return //won't work if dead - if(istype(usr,/mob/living/silicon/ai)) + if(isAI(usr)) var/mob/living/silicon/ai/AI = src if(AI.control_disabled) usr << "Wireless control is disabled!" @@ -343,7 +343,7 @@ var/list/ai_list = list() set category = "Malfunction" if(stat == DEAD) return //won't work if dead - if(istype(usr,/mob/living/silicon/ai)) + if(isAI(usr)) var/mob/living/silicon/ai/AI = src if(AI.control_disabled) src << "Wireless control is disabled!" diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 116fa63d716..e80591bfadb 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -42,7 +42,7 @@ return ..() /atom/proc/move_camera_by_click() - if(istype(usr, /mob/living/silicon/ai)) + if(isAI(usr)) var/mob/living/silicon/ai/AI = usr if(AI.eyeobj && AI.client.eye == AI.eyeobj) AI.cameraFollow = null diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index c4a68499d21..ccc15b42069 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -47,7 +47,7 @@ /mob/living/silicon/ai/proc/lacks_power() var/turf/T = get_turf(src) var/area/A = get_area(src) - return !T || !A || ((!A.master.power_equip || istype(T, /turf/open/space)) && !is_type_in_list(src.loc, list(/obj/item, /obj/mecha))) + return !T || !A || ((!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha))) /mob/living/silicon/ai/updatehealth() if(status_flags & GODMODE) @@ -88,7 +88,7 @@ var/turf/T = get_turf(src) var/area/AIarea = get_area(src) if(AIarea && AIarea.master.power_equip) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) ai_restore_power() return src << "Fault confirmed: missing external power. Shutting down main control system to save power." @@ -96,7 +96,7 @@ src << "Emergency control system online. Verifying connection to power network." sleep(50) T = get_turf(src) - if (istype(T, /turf/open/space)) + if(isspaceturf(T)) src << "Unable to verify! No power connection detected!" aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC return @@ -123,7 +123,7 @@ aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC return if(AIarea.master.power_equip) - if (!istype(T, /turf/open/space)) + if(!isspaceturf(T)) ai_restore_power() return switch(PRP) diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 7ccef7e871b..9b6704bfcf9 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -195,7 +195,7 @@ if(href_list["getdna"]) var/mob/living/M = card.loc var/count = 0 - while(!istype(M, /mob/living)) + while(!isliving(M)) if(!M || !M.loc) return 0 //For a runtime where M ends up in nullspace (similar to bluespace but less colourful) M = M.loc count++ @@ -497,9 +497,9 @@

Host Bioscan


"} var/mob/living/M = card.loc - if(!istype(M, /mob/living)) - while (!istype(M, /mob/living)) - if(istype(M, /turf)) + if(!isliving(M)) + while(!isliving(M)) + if(isturf(M)) src.temp = "Error: No biological host found.
" src.subscreen = 0 return dat diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5b3b3ee6e2e..f968118a12b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -608,12 +608,12 @@ //check if it doesn't require any access at all if(check_access(null)) return 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M //if they are holding or wearing a card that has access, that works if(check_access(H.get_active_held_item()) || check_access(H.wear_id)) return 1 - else if(istype(M, /mob/living/carbon/monkey)) + else if(ismonkey(M)) var/mob/living/carbon/monkey/george = M //they can only hold things :( if(istype(george.get_active_held_item(), /obj/item)) @@ -706,7 +706,7 @@ else if(istype(A, /obj/item)) var/obj/item/cleaned_item = A cleaned_item.clean_blood() - else if(istype(A, /mob/living/carbon/human)) + else if(ishuman(A)) var/mob/living/carbon/human/cleaned_human = A if(cleaned_human.lying) if(cleaned_human.head) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index a56ef87aedc..120e1fac7d6 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -46,7 +46,7 @@ /mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user) add_fingerprint(user) - if(opened && !wiresexposed && (!istype(user, /mob/living/silicon))) + if(opened && !wiresexposed && !issilicon(user)) if(cell) cell.updateicon() cell.add_fingerprint(user) @@ -166,17 +166,16 @@ gib() return if(2) - if (stat != 2) + if (stat != DEAD) adjustBruteLoss(60) adjustFireLoss(60) if(3) - if (stat != 2) + if (stat != DEAD) adjustBruteLoss(30) - return - /mob/living/silicon/robot/bullet_act(var/obj/item/projectile/Proj) ..(Proj) updatehealth() - if(prob(75) && Proj.damage > 0) spark_system.start() + if(prob(75) && Proj.damage > 0) + spark_system.start() return 2 diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 3a50f6cb7e5..67872852f92 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -5,14 +5,14 @@ /mob/living/proc/robot_talk(message) log_say("[key_name(src)] : [message]") var/desig = "Default Cyborg" //ezmode for taters - if(istype(src, /mob/living/silicon)) + if(issilicon(src)) var/mob/living/silicon/S = src desig = trim_left(S.designation + " " + S.job) var/message_a = say_quote(message, get_spans()) var/rendered = "Robotic Talk, [name] [message_a]" for(var/mob/M in player_list) if(M.binarycheck()) - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) var/renderedAI = "Robotic Talk, [name] ([desig]) [message_a]" M << renderedAI else @@ -21,7 +21,7 @@ var/following = src // If the AI talks on binary chat, we still want to follow // it's camera eye, like if it talked on the radio - if(istype(src, /mob/living/silicon/ai)) + if(isAI(src)) var/mob/living/silicon/ai/ai = src following = ai.eyeobj var/link = FOLLOW_LINK(M, following) diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index b216c04e1ab..34b0e954c8a 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -48,7 +48,7 @@ if(L.a_intent == "help") visible_message("[L.name] rubs its head against [src].") -/mob/living/silicon/attack_hulk(mob/living/carbon/human/user) +/mob/living/silicon/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == "harm") ..(user, 1) adjustBruteLoss(rand(10, 15)) diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index 0b36b950653..9478bdd60e0 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -21,6 +21,15 @@ updatehealth() return 1 +/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) + if(user.a_intent == "harm") + ..(user, 1) + playsound(loc, "punch", 25, 1, -1) + visible_message("[user] has punched [src]!", \ + "[user] has punched [src]!") + adjustBruteLoss(15) + return 1 + /mob/living/simple_animal/attack_paw(mob/living/carbon/monkey/M) if(..()) //successful monkey bite. if(stat != DEAD) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index d3cc4116ffb..5757267f06f 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -98,7 +98,7 @@ return if(emagged == 2) //Emag functions - if(istype(loc, /turf/open)) + if(isopenturf(loc)) for(var/mob/living/carbon/victim in loc) if(victim != target) @@ -170,7 +170,7 @@ /obj/effect/decal/cleanable/vomit, /obj/effect/decal/cleanable/robot_debris, /obj/effect/decal/cleanable/crayon, - /obj/effect/decal/cleanable/molten_item, + /obj/effect/decal/cleanable/molten_object, /obj/effect/decal/cleanable/tomato_smudge, /obj/effect/decal/cleanable/egg_smudge, /obj/effect/decal/cleanable/pie_smudge, diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index fa4e69cf5ee..7d38d0c7792 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -8,7 +8,7 @@ health = 100 maxHealth = 100 damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) - + obj_damage = 60 environment_smash = 2 //Walls can't stop THE LAW mob_size = MOB_SIZE_LARGE @@ -126,7 +126,7 @@ Auto Patrol[]"}, return dat /mob/living/simple_animal/bot/ed209/Topic(href, href_list) - if(lasercolor && (istype(usr,/mob/living/carbon/human))) + if(lasercolor && ishuman(usr)) var/mob/living/carbon/human/H = usr if((lasercolor == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))//Opposing team cannot operate it return @@ -418,19 +418,15 @@ Auto Patrol[]"}, return lastfired = world.time var/turf/T = loc - var/atom/U = (istype(target, /atom/movable) ? target.loc : target) - if((!( U ) || !( T ))) + var/turf/U = get_turf(target) + if(!U) return - while(!(istype(U, /turf))) - U = U.loc - if(!(istype(T, /turf))) + if(!isturf(T)) return if(!projectile) return - if(!(istype(U, /turf))) - return var/obj/item/projectile/A = new projectile (loc) playsound(loc, shoot_sound, 50, 1) A.current = U @@ -528,16 +524,12 @@ Auto Patrol[]"}, spawn(2) icon_state = "[lasercolor]ed209[on]" var/threat = 5 - if(istype(C, /mob/living/carbon/human)) - C.stuttering = 5 - C.Stun(5) - C.Weaken(5) + C.Weaken(5) + C.Stun(5) + C.stuttering = 5 + if(ishuman(C)) var/mob/living/carbon/human/H = C threat = H.assess_threat(src) - else - C.Weaken(5) - C.stuttering = 5 - C.Stun(5) add_logs(src,C,"stunned") if(declare_arrests) var/area/location = get_area(src) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 1d276b2bf3b..237e29b5145 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -187,10 +187,10 @@ if(!target && emagged < 2) if(targetdirection != null) //The bot is in line mode. var/turf/T = get_step(src, targetdirection) - if(istype(T, /turf/open/space)) //Check for space + if(isspaceturf(T)) //Check for space target = T process_type = LINE_SPACE_MODE - if(istype(T, /turf/open/floor)) //Check for floor + if(isfloorturf(T)) //Check for floor target = T if(!target) @@ -225,7 +225,7 @@ if(target) if(path.len == 0) - if(!istype(target, /turf/)) + if(!isturf(target)) var/turf/TL = get_turf(target) path = get_path_to(src, TL, /turf/proc/Distance_cardinal, 0, 30, id=access_card,simulated_only = 0) else @@ -248,9 +248,9 @@ target = null path = list() return - if(istype(target, /turf/) && emagged < 2) + if(isturf(target) && emagged < 2) repair(target) - else if(emagged == 2 && istype(target,/turf/open/floor)) + else if(emagged == 2 && isfloorturf(target)) var/turf/open/floor/F = target anchored = 1 mode = BOT_REPAIRING @@ -291,7 +291,7 @@ result = F if(REPLACE_TILE) F = scan_target - if(istype(F, /turf/open/floor) && !istype(F, /turf/open/floor/plating)) //The floor must already have a tile. + if(isfloorturf(F) && !istype(F, /turf/open/floor/plating)) //The floor must already have a tile. result = F if(FIX_TILE) //Selects only damaged floors. F = scan_target @@ -307,14 +307,14 @@ /mob/living/simple_animal/bot/floorbot/proc/repair(turf/target_turf) - if(istype(target_turf, /turf/open/space/)) + if(isspaceturf(target_turf)) //Must be a hull breach or in line mode to continue. if(!is_hull_breach(target_turf) && !targetdirection) target = null return - else if(!istype(target_turf, /turf/open/floor)) + else if(!isfloorturf(target_turf)) return - if(istype(target_turf, /turf/open/space/)) //If we are fixing an area not part of pure space, it is + if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is anchored = 1 icon_state = "floorbot-c" visible_message("[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] ") diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 2d82b9e4a53..4c11c6d04d3 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -157,10 +157,10 @@ var/global/mulebot_count = 0 wires.cut_random() /mob/living/simple_animal/bot/mulebot/interact(mob/user) - if(open && !istype(user, /mob/living/silicon/ai)) + if(open && !isAI(user)) wires.interact(user) else - if(wires.is_cut(WIRE_RX) && istype(user, /mob/living/silicon/ai)) + if(wires.is_cut(WIRE_RX) && isAI(user)) return ui_interact(user) @@ -474,7 +474,7 @@ var/global/mulebot_count = 0 if(next == loc) path -= next return - if(istype( next, /turf)) + if(isturf(next)) //world << "at ([x],[y]) moving to ([next.x],[next.y])" if(bloodiness) @@ -636,7 +636,7 @@ var/global/mulebot_count = 0 if(wires.is_cut(WIRE_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs var/mob/M = obs if(ismob(M)) - if(istype(M,/mob/living/silicon/robot)) + if(iscyborg(M)) visible_message("[src] bumps into [M]!") else if(!paicard) @@ -738,7 +738,7 @@ var/global/mulebot_count = 0 unload(get_dir(loc, A)) else ..() - + /mob/living/simple_animal/bot/mulebot/insertpai(mob/user, obj/item/device/paicard/card) if(..()) visible_message("[src] safeties are locked on.") diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 69be54689f6..9a709560132 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -189,7 +189,7 @@ Auto Patrol: []"}, /mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.throwforce < src.health && I.thrownby && (istype(I.thrownby, /mob/living/carbon/human))) + if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby)) var/mob/living/carbon/human/H = I.thrownby retaliate(H) ..() @@ -215,7 +215,7 @@ Auto Patrol: []"}, spawn(2) icon_state = "secbot[on]" var/threat = 5 - if(istype(C, /mob/living/carbon/human)) + if(ishuman(C)) C.stuttering = 5 C.Stun(5) C.Weaken(5) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 4893c83ed86..31fb79e5cc9 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -38,16 +38,16 @@ AddSpell(new spell(null)) /mob/living/simple_animal/hostile/construct/examine(mob/user) - var/t_He = they_pronoun(TRUE) - var/plurality = (gender == PLURAL) + var/t_He = p_they(TRUE) + var/t_s = p_s() var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" msg += "[desc]\n" if(health < maxHealth) msg += "" - if (src.health >= src.maxHealth/2) - msg += "[t_He] look[plurality ? "":"s"] slightly dented.\n" + if(health >= maxHealth/2) + msg += "[t_He] look[t_s] slightly dented.\n" else - msg += "[t_He] look[plurality ? "":"s"] severely dented!\n" + msg += "[t_He] look[t_s] severely dented!\n" msg += "" msg += "*---------*" @@ -62,11 +62,11 @@ M.visible_message("[M] repairs some of \the [src]'s dents.", \ "You repair some of [src]'s dents, leaving [src] at [health]/[maxHealth] health.") else - M.visible_message("[M] repairs some of [their_pronoun()] own dents.", \ + M.visible_message("[M] repairs some of [p_their()] own dents.", \ "You repair some of your own dents, leaving you at [M.health]/[M.maxHealth] health.") else if(src != M) - M << "You cannot repair [src]'s dents, as [they_pronoun()] [get_has()] none!" + M << "You cannot repair [src]'s dents, as [p_they()] [p_have()] none!" else M << "You cannot repair your own dents, as you have none!" else if(src != M) @@ -91,6 +91,7 @@ health = 250 response_harm = "harmlessly punches" harm_intent_damage = 0 + obj_damage = 90 melee_damage_lower = 30 melee_damage_upper = 30 attacktext = "smashes their armored gauntlet into" @@ -169,6 +170,7 @@ health = 50 response_harm = "viciously beats" harm_intent_damage = 5 + obj_damage = 60 melee_damage_lower = 5 melee_damage_upper = 5 retreat_distance = 10 diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 40bda94fb41..e3f251bf219 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -113,7 +113,7 @@ //Removing from inventory if(href_list["remove_inv"]) - if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr))) return var/remove_from = href_list["remove_inv"] switch(remove_from) @@ -140,7 +140,7 @@ //Adding things to inventory else if(href_list["add_inv"]) - if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr))) return var/add_to = href_list["add_inv"] @@ -282,22 +282,26 @@ var/saved_head //path /mob/living/simple_animal/pet/dog/corgi/Ian/New() + ..() + //parent call must happen first to ensure IAN + //is not in nullspace when child puppies spawn Read_Memory() if(age == 0) - var/mob/living/simple_animal/pet/dog/corgi/puppy/P = new /mob/living/simple_animal/pet/dog/corgi/puppy(loc) - P.name = "Ian" - P.real_name = "Ian" - P.gender = MALE - P.desc = "It's the HoP's beloved corgi puppy." - Write_Memory(0) - qdel(src) + var/turf/target = get_turf(loc) + if(target) + var/mob/living/simple_animal/pet/dog/corgi/puppy/P = new /mob/living/simple_animal/pet/dog/corgi/puppy(target) + P.name = "Ian" + P.real_name = "Ian" + P.gender = MALE + P.desc = "It's the HoP's beloved corgi puppy." + Write_Memory(0) + qdel(src) else if(age == record_age) icon_state = "old_corgi" icon_living = "old_corgi" icon_dead = "old_corgi_dead" desc = "At a ripe old age of [record_age] Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP turns_per_move = 20 - ..() /mob/living/simple_animal/pet/dog/corgi/Ian/Life() if(ticker.current_state == GAME_STATE_FINISHED && !memory_saved) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm index 3841616201e..077265552de 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm @@ -55,7 +55,7 @@ if(!drone) return - if(istype(loc, /mob/living)) + if(isliving(loc)) var/mob/living/L = loc L << "[drone] is trying to escape!" if(!do_after(drone, 50, target = L)) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm index c2c6563c926..49a4f2bb93e 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/interaction.dm @@ -84,7 +84,7 @@ user << "You start to tighten loose screws on [src]..." if(do_after(user,80/I.toolspeed,target=user)) adjustBruteLoss(-getBruteLoss()) - visible_message("[user] tightens [src == user ? "[user.their_pronoun()]" : "[src]'s"] loose screws!", "You tighten [src == user ? "your" : "[src]'s"] loose screws.") + visible_message("[user] tightens [src == user ? "[user.p_their()]" : "[src]'s"] loose screws!", "You tighten [src == user ? "your" : "[src]'s"] loose screws.") else user << "You need to remain still to tighten [src]'s screws!" else diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index e36c96c79f5..e2a2c7ffc89 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -50,8 +50,8 @@ src.visible_message("[src] calms down.") if(stat == CONSCIOUS) udder.generateMilk() - if(locate(/obj/structure/spacevine) in loc) - var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc + var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc + if(SV) SV.eat(src) if(!pulledby) for(var/direction in shuffle(list(1,2,4,8,5,6,9,10))) @@ -67,8 +67,8 @@ /mob/living/simple_animal/hostile/retaliate/goat/Move() ..() if(!stat) - if(locate(/obj/structure/spacevine) in loc) - var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc + var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc + if(SV) SV.eat(src) /mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O, mob/user, params) diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index 4fdcf0610a1..98cc9b3d535 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -20,6 +20,7 @@ pass_flags = PASSTABLE | PASSMOB mob_size = MOB_SIZE_SMALL gold_core_spawnable = 2 + obj_damage = 0 environment_smash = 0 var/list/edibles = list(/mob/living/simple_animal/butterfly,/mob/living/simple_animal/cockroach) //list of atoms, however turfs won't affect AI, but will affect consumption. diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 1a52e018bae..79281886fd6 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -69,10 +69,10 @@ if(C.avail()) visible_message("[src] chews through the [C]. It's toast!") playsound(src, 'sound/effects/sparks2.ogg', 100, 1) - C.Deconstruct() + C.deconstruct() death(toast=1) else - C.Deconstruct() + C.deconstruct() visible_message("[src] chews through the [C].") /* diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 407076bbd4c..d77708e0b2a 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -32,6 +32,7 @@ var/global/list/parasites = list() //all currently existing/living guardians healable = FALSE //don't brusepack the guardian damage_coeff = list(BRUTE = 0.5, BURN = 0.5, TOX = 0.5, CLONE = 0.5, STAMINA = 0, OXY = 0.5) //how much damage from each damage type we transfer to the owner environment_smash = 1 + obj_damage = 40 melee_damage_lower = 15 melee_damage_upper = 15 butcher_results = list(/obj/item/weapon/ectoplasm = 1) diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm index d54d5013690..ff2e1c5a6aa 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm @@ -51,6 +51,7 @@ melee_damage_lower = initial(melee_damage_lower) melee_damage_upper = initial(melee_damage_upper) armour_penetration = initial(armour_penetration) + obj_damage = initial(obj_damage) environment_smash = initial(environment_smash) alpha = initial(alpha) if(!forced) @@ -68,6 +69,7 @@ melee_damage_lower = 50 melee_damage_upper = 50 armour_penetration = 100 + obj_damage = 0 environment_smash = 0 PoolOrNew(/obj/effect/overlay/temp/guardian/phase/out, get_turf(src)) alpha = 15 diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm index 3d4b665fa81..842bc5e7200 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm @@ -33,6 +33,7 @@ ranged = initial(ranged) melee_damage_lower = initial(melee_damage_lower) melee_damage_upper = initial(melee_damage_upper) + obj_damage = initial(obj_damage) environment_smash = initial(environment_smash) alpha = 255 range = initial(range) @@ -43,6 +44,7 @@ ranged = 0 melee_damage_lower = 0 melee_damage_upper = 0 + obj_damage = 0 environment_smash = 0 alpha = 45 range = 255 diff --git a/code/modules/mob/living/simple_animal/guardian/types/standard.dm b/code/modules/mob/living/simple_animal/guardian/types/standard.dm index 4cff9a0604b..45624bbaaa2 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/standard.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/standard.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/hostile/guardian/punch melee_damage_lower = 20 melee_damage_upper = 20 + obj_damage = 80 next_move_modifier = 0.8 //attacks 20% faster environment_smash = 2 playstyle_string = "As a standard type you have no special abilities, but have a high damage resistance and a powerful attack capable of smashing through walls." diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index a7a204af676..041116b0a39 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -76,7 +76,7 @@ return var/turf/beacon_loc = get_turf(src.loc) - if(!istype(beacon_loc, /turf/open/floor)) + if(!isfloorturf(beacon_loc)) return if(beacon) diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 76153092641..32c330d2cd5 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -16,6 +16,7 @@ maxHealth = 125 health = 125 harm_intent_damage = 5 + obj_damage = 60 melee_damage_lower = 25 melee_damage_upper = 25 attacktext = "slashes" @@ -108,7 +109,7 @@ LayEggs() /mob/living/simple_animal/hostile/alien/proc/SpreadPlants() - if(!isturf(loc) || istype(loc, /turf/open/space)) + if(!isturf(loc) || isspaceturf(loc)) return if(locate(/obj/structure/alien/weeds/node) in get_turf(src)) return @@ -116,7 +117,7 @@ new /obj/structure/alien/weeds/node(loc) /mob/living/simple_animal/hostile/alien/proc/LayEggs() - if(!isturf(loc) || istype(loc, /turf/open/space)) + if(!isturf(loc) || isspaceturf(loc)) return if(locate(/obj/structure/alien/egg) in get_turf(src)) return @@ -156,6 +157,7 @@ melee_damage_upper = 0 a_intent = "help" friendly = "caresses" + obj_damage = 0 environment_smash = 0 gold_core_spawnable = 1 icon_state = "maid" diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index ce7c655206d..6984d60af32 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -22,6 +22,7 @@ health = 60 var/armored = FALSE + obj_damage = 60 melee_damage_lower = 20 melee_damage_upper = 30 attacktext = "claws" @@ -94,7 +95,7 @@ A.melee_damage_lower += 5 A.melee_damage_upper += 5 A.update_icons() - user << "You strap the armor plating to [A] and sharpen [A.their_pronoun()] claws with the nail filer. This was a great idea." + user << "You strap the armor plating to [A] and sharpen [A.p_their()] claws with the nail filer. This was a great idea." qdel(src) diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 0ec1db86273..0ec5aebdef5 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -30,6 +30,7 @@ health = 10 faction = list("hostile") move_to_delay = 0 + obj_damage = 0 environment_smash = 0 mouse_opacity = 2 pass_flags = PASSTABLE | PASSGRILLE | PASSMOB @@ -145,8 +146,9 @@ else if(beegent && isliving(target)) var/mob/living/L = target - beegent.reaction_mob(L, INJECT) - L.reagents.add_reagent(beegent.id, rand(1,5)) + if(L.reagents) + beegent.reaction_mob(L, INJECT) + L.reagents.add_reagent(beegent.id, rand(1,5)) target.attack_animal(src) diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm index 356d4bafbef..e6b80ad893b 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm @@ -10,6 +10,7 @@ environment_smash = 0 minimum_distance = 3 retreat_distance = 3 + obj_damage = 0 melee_damage_lower = 10 melee_damage_upper = 20 health = 1000 diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index c5d197084e6..bf99d02e8a4 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -18,6 +18,7 @@ health = 25 harm_intent_damage = 8 + obj_damage = 50 melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "bites" @@ -63,6 +64,7 @@ pixel_x = -16 mob_size = MOB_SIZE_LARGE + obj_damage = 80 melee_damage_lower = 20 melee_damage_upper = 20 diff --git a/code/modules/mob/living/simple_animal/hostile/creature.dm b/code/modules/mob/living/simple_animal/hostile/creature.dm index 32d5b7c73dc..566f1266adf 100644 --- a/code/modules/mob/living/simple_animal/hostile/creature.dm +++ b/code/modules/mob/living/simple_animal/hostile/creature.dm @@ -7,6 +7,7 @@ icon_dead = "otherthing-dead" health = 80 maxHealth = 80 + obj_damage = 100 melee_damage_lower = 25 melee_damage_upper = 50 attacktext = "chomps" diff --git a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm index 9781dcd05a4..07aeea0a523 100644 --- a/code/modules/mob/living/simple_animal/hostile/eyeballs.dm +++ b/code/modules/mob/living/simple_animal/hostile/eyeballs.dm @@ -17,6 +17,7 @@ speak_emote = list("telepathically cries") harm_intent_damage = 15 + obj_damage = 60 melee_damage_lower = 20 melee_damage_upper = 25 attacktext = "blinks at" diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index 6dba4c84856..b9f7b834f98 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -19,6 +19,7 @@ robust_searching = 1 harm_intent_damage = 10 + obj_damage = 50 melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "grips" diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 2e79f072bf6..52285f23a68 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -35,6 +35,7 @@ response_harm = "hits" maxHealth = 200 health = 200 + obj_damage = 60 melee_damage_lower = 15 melee_damage_upper = 20 faction = list("spiders") @@ -84,9 +85,8 @@ health = 40 melee_damage_lower = 5 melee_damage_upper = 10 - poison_per_bite = 10 + poison_per_bite = 3 var/atom/cocoon_target - poison_type = "morphine" var/fed = 0 //hunters have the most poison and move the fastest, so they can find prey @@ -214,7 +214,7 @@ walk(src,0) if(do_after(src, 50, target = src)) if(busy == SPINNING_COCOON) - if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1) + if(cocoon_target && isturf(cocoon_target.loc) && get_dist(src,cocoon_target) <= 1) var/obj/structure/spider/cocoon/C = new(cocoon_target.loc) var/large_cocoon = 0 C.pixel_x = cocoon_target.pixel_x diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index f1bf3e339dc..cf528306b21 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -16,6 +16,7 @@ faction = list("creature") robust_searching = 1 stat_attack = 2 + obj_damage = 0 environment_smash = 0 speak_emote = list("squeaks") ventcrawler = 2 diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index f5c9269c0d9..d4b62f616ce 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile faction = list("hostile") stop_automated_movement_when_pulled = 0 + obj_damage = 40 environment_smash = 1 //Set to 1 to break closets,tables,racks, etc; 2 for walls; 3 for rwalls var/atom/target var/ranged = 0 @@ -352,7 +353,7 @@ EscapeConfinement() for(var/dir in cardinal) var/turf/T = get_step(targets_from, dir) - if(istype(T, /turf/closed/wall) || istype(T, /turf/closed/mineral)) + if(iswallturf(T) || ismineralturf(T)) if(T.Adjacent(targets_from)) T.attack_animal(src) for(var/a in T) diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm index 7c556ff897c..fdde147b9ef 100644 --- a/code/modules/mob/living/simple_animal/hostile/illusion.dm +++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm @@ -49,7 +49,7 @@ /mob/living/simple_animal/hostile/illusion/AttackingTarget() ..() - if(istype(target, /mob/living) && prob(multiply_chance)) + if(isliving(target) && prob(multiply_chance)) var/mob/living/L = target if(L.stat == DEAD) return @@ -66,6 +66,7 @@ melee_damage_lower = 0 melee_damage_upper = 0 speed = -1 + obj_damage = 0 environment_smash = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm index 63d3bd82565..46c3a62aca8 100644 --- a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm +++ b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm @@ -122,7 +122,7 @@ return 0 if(!M.has_charge(required_mecha_charge)) return 0 - if(M.health < (initial(M.health)*0.5)) + if(M.obj_integrity < M.max_integrity*0.5) return 0 return 1 @@ -216,7 +216,7 @@ return //Too Much Damage - Eject - if(mecha.health < initial(mecha.health)*0.1) + if(mecha.obj_integrity < mecha.max_integrity*0.1) exit_mecha(mecha) return @@ -226,7 +226,7 @@ mecha.smoke_action.Activate() //Heavy damage - Defence Power or Retreat - if(mecha.health < initial(mecha.health)*0.25) + if(mecha.obj_integrity < mecha.max_integrity*0.25) if(prob(defence_mode_chance)) if(mecha.defense_action && mecha.defense_action.owner && !mecha.defence_mode) mecha.leg_overload_mode = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 83354cdfe63..24a2ef5c935 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -496,7 +496,7 @@ Difficulty: Very Hard for(var/atom/Stuff in A) if(isturf(Stuff)) var/turf/T = Stuff - if((istype(T, /turf/open/space) || istype(T, /turf/open/floor)) && NewTerrainFloors) + if((isspaceturf(T) || isfloorturf(T)) && NewTerrainFloors) var/turf/open/O = T.ChangeTurf(NewTerrainFloors) if(O.air) var/datum/gas_mixture/G = O.air @@ -505,7 +505,7 @@ Difficulty: Very Hard var/atom/Picked = pick(NewFlora) new Picked(O) continue - if(istype(T, /turf/closed/wall) && NewTerrainWalls) + if(iswallturf(T) && NewTerrainWalls) T.ChangeTurf(NewTerrainWalls) continue if(istype(Stuff, /obj/structure/chair) && NewTerrainChairs) @@ -625,6 +625,7 @@ Difficulty: Very Hard flying = 1 minbodytemp = 0 maxbodytemp = 1500 + obj_damage = 0 environment_smash = 0 AIStatus = AI_OFF stop_automated_movement = 1 @@ -699,7 +700,7 @@ Difficulty: Very Hard icon_state = null //This shouldn't even be visible, so if it DOES show up, at least nobody will notice density = 1 anchored = 1 - health = 999 + obj_integrity = 999 var/mob/living/simple_animal/holder_animal /obj/structure/closet/stasis/process() @@ -759,7 +760,7 @@ Difficulty: Very Hard sound = null /obj/effect/proc_holder/spell/targeted/exit_possession/cast(list/targets, mob/user = usr) - if(!istype(user.loc, /turf/open/floor)) + if(!isfloorturf(user.loc)) return var/datum/mind/target_mind = user.mind for(var/i in user) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index cfeb0a19e9d..2d40aae0cd2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -262,6 +262,7 @@ Difficulty: Medium maxHealth = 300 health = 300 faction = list("neutral") + obj_damage = 80 melee_damage_upper = 30 melee_damage_lower = 30 damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 37aa5575a9b..9d5c97f4831 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -492,7 +492,7 @@ Difficulty: Hard friendly_fire_check = friendly_fire if(new_caster) hit_things += new_caster - if(istype(loc, /turf/closed/mineral)) //drill mineral turfs + if(ismineralturf(loc)) //drill mineral turfs var/turf/closed/mineral/M = loc M.gets_drilled(caster) addtimer(src, "blast", 0) @@ -535,7 +535,7 @@ Difficulty: Hard continue M.occupant << "Your [M.name] is struck by a [name]!" playsound(M,'sound/weapons/sear.ogg', 50, 1, -4) - M.take_damage(damage, "fire", 0) + M.take_damage(damage, BURN, 0, 0) /obj/effect/hierophant name = "hierophant rune" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 8ef9ee4a1ee..f05445085d6 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -9,7 +9,7 @@ a_intent = "harm" sentience_type = SENTIENCE_BOSS environment_smash = 3 - obj_damage = 75 + obj_damage = 400 luminosity = 3 faction = list("mining", "boss") weather_immunities = list("lava","ash") diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 1c0e9180207..e2d3afd545a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -199,7 +199,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca /mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target) if(the_target == creator) // Don't attack our creator AI. return 0 - if(isrobot(the_target)) + if(iscyborg(the_target)) var/mob/living/silicon/robot/R = the_target if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI. return 0 @@ -216,6 +216,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca /mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0) if(..()) emote_see = list("aims menacingly") + obj_damage = 0 environment_smash = 0 //needed? seems weird for them to do so ranged = 1 retreat_distance = 1 //just enough to shoot diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index de6056ca76e..b7ab39772ed 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -3,6 +3,7 @@ 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) faction = list("mining") weather_immunities = list("lava","ash") + obj_damage = 30 environment_smash = 2 minbodytemp = 0 maxbodytemp = INFINITY @@ -69,6 +70,7 @@ maxHealth = 200 health = 200 harm_intent_damage = 5 + obj_damage = 60 melee_damage_lower = 12 melee_damage_upper = 12 attacktext = "bites into" @@ -210,6 +212,7 @@ throw_message = "falls right through the strange body of the" ranged_cooldown = 0 ranged_cooldown_time = 20 + obj_damage = 0 environment_smash = 0 retreat_distance = 3 minimum_distance = 3 @@ -291,7 +294,7 @@ user << "[src] are useless on the dead." return if(H != user) - H.visible_message("[user] forces [H] to apply [src]... they quickly regenerate all injuries!") + H.visible_message("[user] forces [H] to apply [src]... [H.p_they()] quickly regenerate all injuries!") feedback_add_details("hivelord_core","[src.type]|used|other") else user << "You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments." @@ -327,6 +330,7 @@ speak_emote = list("telepathically cries") attack_sound = 'sound/weapons/pierce.ogg' throw_message = "falls right through the strange body of the" + obj_damage = 0 environment_smash = 0 pass_flags = PASSTABLE del_on_death = 1 @@ -420,6 +424,7 @@ maxHealth = 300 health = 300 harm_intent_damage = 0 + obj_damage = 100 melee_damage_lower = 25 melee_damage_upper = 25 attacktext = "pulverizes" @@ -454,7 +459,7 @@ /mob/living/simple_animal/hostile/asteroid/goliath/OpenFire() var/tturf = get_turf(target) - if(!(istype(tturf, /turf))) + if(!isturf(tturf)) return if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen visible_message("The [src.name] digs its tentacles under [target.name]!") @@ -483,7 +488,7 @@ /obj/effect/goliath_tentacle/New() var/turftype = get_turf(src) - if(istype(turftype, /turf/closed/mineral)) + if(ismineralturf(turftype)) var/turf/closed/mineral/M = turftype M.gets_drilled() addtimer(src, "Trip", 10) @@ -537,13 +542,11 @@ return if(istype(target, /obj/mecha/working/ripley)) var/obj/mecha/working/ripley/D = target - var/list/damage_absorption = D.damage_absorption if(D.hides < 3) D.hides++ - 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 + D.armor["melee"] = max(D.armor["melee"] - 0.1, 0.3) + D.armor["bullet"] = D.armor["bullet"] - 0.05 + D.armor["laser"] = D.armor["laser"] - 0.025 user << "You strengthen [target], improving its resistance against melee attacks." D.update_icon() if(D.hides == 3) @@ -581,6 +584,7 @@ maxHealth = 50 health = 50 harm_intent_damage = 5 + obj_damage = 0 melee_damage_lower = 0 melee_damage_upper = 0 attacktext = "chomps" @@ -625,6 +629,7 @@ return wumbo = 1 icon_state = "Fugu_big" + obj_damage = 60 melee_damage_lower = 15 melee_damage_upper = 20 harm_intent_damage = 0 @@ -643,6 +648,7 @@ walk(src, 0) wumbo = 0 icon_state = "Fugu" + obj_damage = 0 melee_damage_lower = 0 melee_damage_upper = 0 harm_intent_damage = 5 @@ -743,6 +749,7 @@ icon_aggro = "legion" icon_dead = "legion" icon_gib = "syndicate_gib" + obj_damage = 60 melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "lashes out at" @@ -861,6 +868,7 @@ density = 0 speak_chance = 1 turns_per_move = 8 + obj_damage = 0 environment_smash = 0 move_to_delay = 15 response_help = "pets" @@ -987,7 +995,7 @@ /mob/living/simple_animal/hostile/spawner/lavaland/New() ..() for(var/F in RANGE_TURFS(1, src)) - if(istype(F, /turf/closed/mineral)) + if(ismineralturf(F)) var/turf/closed/mineral/M = F M.ChangeTurf(M.turf_type) gps = new /obj/item/device/gps/internal(src) diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index b0d71991d30..023774cf439 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -13,6 +13,7 @@ response_disarm = "gently pushes aside" response_harm = "whacks" harm_intent_damage = 5 + obj_damage = 0 melee_damage_lower = 1 melee_damage_upper = 1 attack_same = 2 diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm index 9f12d423d15..b87ace1afad 100644 --- a/code/modules/mob/living/simple_animal/hostile/pirate.dm +++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm @@ -14,6 +14,7 @@ health = 100 harm_intent_damage = 5 + obj_damage = 60 melee_damage_lower = 30 melee_damage_upper = 30 attacktext = "slashes" diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/bat.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/bat.dm index b4de57da65e..c28250e3fcc 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/bat.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/bat.dm @@ -21,6 +21,7 @@ pass_flags = PASSTABLE faction = list("hostile") attack_sound = 'sound/weapons/bite.ogg' + obj_damage = 0 environment_smash = 0 ventcrawler = 2 mob_size = MOB_SIZE_TINY diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index ae38b62698a..1830ff0cd61 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -22,6 +22,7 @@ melee_damage_upper = 10 attacktext = "attacks" attack_sound = 'sound/items/bikehorn.ogg' + obj_damage = 0 environment_smash = 0 del_on_death = 1 loot = list(/obj/effect/mob_spawn/human/corpse/clown) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm index e1892140a2c..a1257d71e34 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm @@ -19,6 +19,7 @@ melee_damage_upper = 10 attacktext = "hits" attack_sound = 'sound/weapons/punch1.ogg' + obj_damage = 0 environment_smash = 0 del_on_death = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm index 4664a41082c..f318f7ae15c 100644 --- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm +++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm @@ -22,7 +22,6 @@ attack_sound = 'sound/hallucinations/growl1.ogg' 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) unsuitable_atmos_damage = 10 - environment_smash = 1 robust_searching = 1 stat_attack = 1 gold_core_spawnable = 1 @@ -64,6 +63,7 @@ speak_chance = 1 speak = list("THE GODS WILL IT!","DEUS VULT!","REMOVE KABAB!") force_threshold = 10 //trying to simulate actually having armor + obj_damage = 50 melee_damage_lower = 25 melee_damage_upper = 30 deathmessage = "collapses into a pile of bones, its gear clanging as it hits the ground!" diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 739a332d653..30dbb43e153 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -18,7 +18,8 @@ health = 50000 healable = 0 - harm_intent_damage = 70 + harm_intent_damage = 10 + obj_damage = 100 melee_damage_lower = 68 melee_damage_upper = 83 attacktext = "claws" @@ -207,7 +208,7 @@ /obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets,mob/user = usr) for(var/mob/living/target in targets) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(H.dna.species.invis_sight == SEE_INVISIBLE_LIVING) H.dna.species.invis_sight = SEE_INVISIBLE_NOLIGHTING diff --git a/code/modules/mob/living/simple_animal/hostile/stickman.dm b/code/modules/mob/living/simple_animal/hostile/stickman.dm index 904f3abcdcf..2f17fa57523 100644 --- a/code/modules/mob/living/simple_animal/hostile/stickman.dm +++ b/code/modules/mob/living/simple_animal/hostile/stickman.dm @@ -18,6 +18,7 @@ maxHealth = 100 health = 100 harm_intent_damage = 5 + obj_damage = 0 melee_damage_lower = 10 melee_damage_upper = 10 attacktext = "punches" diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 9663b70e2f5..b6f99faf0cb 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -136,6 +136,7 @@ /mob/living/simple_animal/hostile/syndicate/civilian minimum_distance = 10 retreat_distance = 10 + obj_damage = 0 environment_smash = 0 /mob/living/simple_animal/hostile/syndicate/civilian/Aggro() @@ -154,6 +155,8 @@ maxHealth = 25 melee_damage_lower = 15 melee_damage_upper = 15 + obj_damage = 0 + environment_smash = 0 attacktext = "cuts" attack_sound = 'sound/weapons/bladeslice.ogg' faction = list("syndicate") diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index e7a4dbb6f82..fb9e9fc3c6f 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -41,7 +41,7 @@ /mob/living/simple_animal/hostile/tree/Life() ..() - if(istype(src.loc, /turf/open)) + if(isopenturf(loc)) var/turf/open/T = src.loc if(T.air && T.air.gases["co2"]) var/co2 = T.air.gases["co2"][MOLES] diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm index 14aeb265158..6bc9aa07972 100644 --- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm +++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm @@ -55,6 +55,7 @@ maxHealth = 50 ranged = 1 harm_intent_damage = 5 + obj_damage = 60 melee_damage_lower = 25 melee_damage_upper = 25 a_intent = "harm" diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index ebe6e335255..e1528dea4ef 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -199,7 +199,7 @@ return //Is the usr's mob type able to do this? (lolaliens) - if(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)) + if(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr)) //Removing from inventory if(href_list["remove_inv"]) diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index b66571bdb74..bd06a445cc9 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -31,7 +31,7 @@ del_on_death = 1 /mob/living/simple_animal/shade/death() - deathmessage = "lets out a contented sigh as [their_pronoun()] form unwinds." + deathmessage = "lets out a contented sigh as [p_their()] form unwinds." ..() /mob/living/simple_animal/shade/canSuicide() @@ -50,7 +50,7 @@ M.visible_message("[M] heals \the [src].", \ "You heal [src], leaving [src] at [health]/[maxHealth] health.") else - M << "You cannot heal [src], as [they_pronoun()] [get_is()] unharmed!" + M << "You cannot heal [src], as [p_they()] [p_are()] unharmed!" else if(src != M) ..() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 8de22d32685..5d571abf654 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -199,7 +199,7 @@ //world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]" bodytemperature += diff - if(istype(T,/turf/open)) + if(isopenturf(T)) var/turf/open/ST = T if(ST.air) var/ST_gases = ST.air.gases @@ -372,7 +372,7 @@ else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_; partner = M - else if(istype(M, /mob/living) && !faction_check(M)) //shyness check. we're not shy in front of things that share a faction with us. + else if(isliving(M) && !faction_check(M)) //shyness check. we're not shy in front of things that share a faction with us. alone = 0 continue if(alone && partner && children < 3) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index a4cf1c4a7bb..1aef1490baf 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -63,7 +63,7 @@ break if(Target in view(1,src)) - if(istype(Target, /mob/living/silicon)) + if(issilicon(Target)) if(!Atkcool) Atkcool = 1 spawn(45) @@ -343,7 +343,7 @@ if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence targets += L // Possible target found! - if(istype(L, /mob/living/carbon/human)) //Ignore slime(wo)men + if(ishuman(L)) //Ignore slime(wo)men var/mob/living/carbon/human/H = L if(src.type in H.dna.species.ignored_by) continue diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 975438b0a70..ace41147727 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -259,10 +259,11 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange", if(..()) //successful larva bite. attacked += 10 -/mob/living/simple_animal/slime/attack_hulk(mob/living/carbon/human/user) +/mob/living/simple_animal/slime/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) if(user.a_intent == "harm") - adjustBruteLoss(15) discipline_slime(user) + return ..() + /mob/living/simple_animal/slime/attack_hand(mob/living/carbon/human/M) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 1b1808518f8..e6a735b39a9 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -418,7 +418,7 @@ var/next_mob_id = 0 if(mind) mind.show_memory(src) else - src << "The game appears to have misplaced your mind datum, so we can't show you your notes." + src << "You don't have a mind datum for some reason, so you can't look at your notes, if you had any." /mob/verb/add_memory(msg as message) set name = "Add Note" @@ -430,21 +430,7 @@ var/next_mob_id = 0 if(mind) mind.store_memory(msg) else - src << "The game appears to have misplaced your mind datum, so we can't show you your notes." - -/mob/proc/store_memory(msg as message, popup, sane = 1) - msg = copytext(msg, 1, MAX_MESSAGE_LEN) - - if (sane) - msg = sanitize(msg) - - if (length(memory) == 0) - memory += msg - else - memory += "
[msg]" - - if (popup) - memory() + src << "You don't have a mind datum for some reason, so you can't add a note to it." /mob/verb/abandon_mob() set name = "Respawn" @@ -483,7 +469,7 @@ var/next_mob_id = 0 set name = "Observe" set category = "OOC" - if(stat != DEAD || istype(src, /mob/new_player)) + if(stat != DEAD || isnewplayer(src)) usr << "You must be observing to use this!" return @@ -565,7 +551,7 @@ var/next_mob_id = 0 return if(!Adjacent(usr)) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) return show_inv(usr) @@ -628,7 +614,7 @@ var/next_mob_id = 0 var/list/overrides = list() for(var/image/I in client.images) if(I.loc && I.loc.loc == listed_turf && I.override) - overrides = I.loc + overrides += I.loc for(var/atom/A in listed_turf) if(!A.mouse_opacity) continue @@ -714,7 +700,7 @@ var/next_mob_id = 0 layer = initial(layer) update_transform() update_action_buttons_icon() - if(istype(src, /mob/living)) + if(isliving(src)) var/mob/living/L = src if(L.has_status_effect(/datum/status_effect/freon)) canmove = 0 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index ee73870dfd0..de84e2491a8 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -29,7 +29,6 @@ var/attack_log = list( ) var/obj/machinery/machine = null var/other_mobs = null - var/memory = "" var/disabilities = 0 //Carbon var/atom/movable/pulling = null diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index e59f4708e90..766cc83f1b7 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -318,7 +318,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(hud_used && hud_used.action_intent) hud_used.action_intent.icon_state = "[a_intent]" - else if(isrobot(src) || ismonkey(src) || islarva(src)) + else if(iscyborg(src) || ismonkey(src) || islarva(src)) switch(input) if("help") a_intent = "help" @@ -342,7 +342,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(!istype(M)) return 0 if(issilicon(M)) - if(isrobot(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor. + if(iscyborg(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor. var/mob/living/silicon/robot/R = M if(R.mind && R.mind.special_role) if(R.laws && R.laws.zeroth && R.syndicate) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 25df31320da..d52bdf07aa0 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -85,7 +85,7 @@ /client/verb/drop_item() set hidden = 1 - if(!isrobot(mob)) + if(!iscyborg(mob)) mob.drop_item_v() return @@ -283,7 +283,7 @@ continue else if(isturf(A)) var/turf/turf = A - if(istype(turf,/turf/open/space)) + if(isspaceturf(turf)) continue if(!turf.density && !mob_negates_gravity()) continue diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index f6b918d2f3a..88dbc1e492b 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -4,8 +4,8 @@ //Note that this proc does NOT do MMI related stuff! /mob/proc/change_mob_type(new_type = null, turf/location = null, new_name = null as text, delete_old_mob = 0 as num) - if(istype(src,/mob/new_player)) - usr << "cannot convert players who have not entered yet." + if(isnewplayer(src)) + usr << "Cannot convert players who have not entered yet." return if(!new_type) @@ -18,8 +18,8 @@ usr << "Invalid type path (new_type = [new_type]) in change_mob_type(). Contact a coder." return - if( new_type == /mob/new_player ) - usr << "cannot convert into a new_player mob type." + if(ispath(new_type, /mob/new_player)) + usr << "Cannot convert into a new_player mob type." return var/mob/M @@ -50,7 +50,7 @@ client.prefs.copy_to(H) H.dna.update_dna_identity() - if(mind && istype(M, /mob/living)) + if(mind && isliving(M)) mind.transfer_to(M, 1) // second argument to force key move to new mob else M.key = key diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index e947d24c1a7..570ceb1e4a6 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -304,7 +304,7 @@ var/mob/living/character = create_character() //creates the human and transfers vars and mind var/equip = SSjob.EquipRank(character, rank, 1) - if(isrobot(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. + if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. character = equip diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index e8e09b4943a..69ed544ded5 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -30,12 +30,10 @@ var/max_hardware_size = 0 // Maximal hardware w_class. Tablets/PDAs have 1, laptops 2, consoles 4. var/steel_sheet_cost = 5 // Amount of steel sheets refunded when disassembling an empty frame of this computer. - // Damage of the chassis. If the chassis takes too much damage it will break apart. - var/damage = 0 // Current damage level - var/broken_damage = 50 // Damage level at which the computer ceases to operate - var/max_damage = 100 // Damage level at which the computer breaks apart. - + obj_integrity = 100 + max_integrity = 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) // Optional hardware (improves functionality, but is not critical for computer to work) @@ -164,9 +162,9 @@ /obj/item/device/modular_computer/examine(mob/user) ..() - if(damage > broken_damage) + if(obj_integrity <= integrity_failure) user << "It is heavily damaged!" - else if(damage) + else if(obj_integrity < max_integrity) user << "It is damaged." /obj/item/device/modular_computer/update_icon() @@ -180,7 +178,7 @@ else add_overlay(icon_state_menu) - if(damage > broken_damage) + if(obj_integrity <= integrity_failure) add_overlay("bsod") add_overlay("broken") @@ -194,7 +192,7 @@ /obj/item/device/modular_computer/proc/turn_on(mob/user) var/issynth = issilicon(user) // Robots and AIs get different activation messages. - if(damage > broken_damage) + if(obj_integrity <= integrity_failure) if(issynth) user << "You send an activation signal to \the [src], but it responds with an error code. It must be damaged." else @@ -226,7 +224,7 @@ last_power_usage = 0 return 0 - if(damage > broken_damage) + if(obj_integrity <= integrity_failure) shutdown_computer() return 0 @@ -377,13 +375,14 @@ user << "\The [W] is off." return - if(!damage) + if(obj_integrity == max_integrity) user << "\The [src] does not require repairs." return user << "You begin repairing damage to \the [src]..." - if(WT.remove_fuel(round(damage/75)) && do_after(usr, damage/10)) - damage = 0 + var/dmg = round(max_integrity - obj_integrity) + if(WT.remove_fuel(round(dmg/75)) && do_after(usr, dmg/10)) + obj_integrity = max_integrity user << "You repair \the [src]." return diff --git a/code/modules/modular_computers/computers/item/computer_damage.dm b/code/modules/modular_computers/computers/item/computer_damage.dm index d27ec0a750f..5e521a04e17 100644 --- a/code/modules/modular_computers/computers/item/computer_damage.dm +++ b/code/modules/modular_computers/computers/item/computer_damage.dm @@ -1,49 +1,31 @@ -/obj/item/device/modular_computer/proc/take_damage(amount, component_probability, damage_casing = 1, randomize = 1) - if(randomize) - // 75%-125%, rand() works with integers, apparently. - amount *= (rand(75, 125) / 100.0) - amount = round(amount) - if(damage_casing) - damage += amount - damage = max(0,min(max_damage,damage)) - +/obj/item/device/modular_computer/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) + . = ..() + var/component_probability = min(50, max(damage_amount*0.1, 1 - obj_integrity/max_integrity)) + switch(damage_flag) + if("bullet") + component_probability = damage_amount * 0.5 + if("laser") + component_probability = damage_amount * 0.66 if(component_probability) for(var/I in all_components) var/obj/item/weapon/computer_hardware/H = all_components[I] if(prob(component_probability)) - H.take_damage(round(amount / 2)) + H.take_damage(round(damage_amount*0.5), damage_type, damage_flag, 0) - if(damage >= max_damage) - break_apart() -// Stronger explosions cause serious damage to internal components -// Minor explosions are mostly mitigitated by casing. -/obj/item/device/modular_computer/ex_act(severity) - take_damage(rand(100,200)/severity, component_probability = 30/severity) - -// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components -/obj/item/device/modular_computer/emp_act(severity) - take_damage(rand(100,200)/severity, component_probability = 50/severity, damage_casing = 0) - -// "Stun" weapons can cause minor damage to components (short-circuits?) -// "Burn" damage is equally strong against internal components and exterior casing -// "Brute" damage mostly damages the casing. -/obj/item/device/modular_computer/bullet_act(obj/item/projectile/Proj) - switch(Proj.damage_type) - if(BRUTE) - take_damage(Proj.damage, component_probability = Proj.damage/2) - if(BURN) - take_damage(Proj.damage, component_probability = Proj.damage/1.5) +/obj/item/device/modular_computer/deconstruct(disassembled = TRUE) + break_apart() /obj/item/device/modular_computer/proc/break_apart() - 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)) - for(var/C in all_components) - var/obj/item/weapon/computer_hardware/H = all_components[C] - uninstall_component(H) - H.forceMove(newloc) - if(prob(25)) - H.take_damage(rand(10,30)) + 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)) + for(var/C in all_components) + var/obj/item/weapon/computer_hardware/H = all_components[C] + uninstall_component(H) + H.forceMove(newloc) + if(prob(25)) + H.take_damage(rand(10,30), BRUTE, 0, 0) relay_qdel() - qdel() + qdel(src) diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index d50b9f9fd30..e9b7f8d52ff 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -30,8 +30,8 @@ hardware_flag = machinery_computer.hardware_flag max_hardware_size = machinery_computer.max_hardware_size steel_sheet_cost = machinery_computer.steel_sheet_cost - max_damage = machinery_computer._max_damage - broken_damage = machinery_computer._break_damage + max_integrity = machinery_computer.max_integrity + integrity_failure = machinery_computer.integrity_failure base_active_power_usage = machinery_computer.base_active_power_usage base_idle_power_usage = machinery_computer.base_idle_power_usage diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index e04bc0cee73..12efea42f9b 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) - var/_max_damage = 100 - var/_break_damage = 50 - var/obj/item/device/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() @@ -69,7 +66,7 @@ var/list/global_modular_computers = list() else overlays.Add(screen_icon_state_menu) - if(cpu && cpu.damage > cpu.broken_damage) + if(cpu && cpu.obj_integrity <= cpu.integrity_failure) add_overlay("bsod") add_overlay("broken") diff --git a/code/modules/modular_computers/computers/machinery/modular_console.dm b/code/modules/modular_computers/computers/machinery/modular_console.dm index cebb1f4d715..60315198ca6 100644 --- a/code/modules/modular_computers/computers/machinery/modular_console.dm +++ b/code/modules/modular_computers/computers/machinery/modular_console.dm @@ -16,8 +16,9 @@ max_hardware_size = 4 steel_sheet_cost = 10 light_strength = 2 - _max_damage = 300 - _break_damage = 150 + obj_integrity = 300 + max_integrity = 300 + integrity_failure = 150 /obj/machinery/modular_computer/console/buildable/New() ..() diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index 89040ca7ae7..4278159d1a9 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -23,7 +23,7 @@ var/obj/item/weapon/computer_hardware/battery/battery_module = computer.all_components[MC_CELL] var/obj/item/weapon/computer_hardware/recharger/recharger = computer.all_components[MC_CHARGE] qdel(hard_drive) - computer.take_damage(25, 10, 1, 1) + computer.take_damage(25, BRUTE, 0, 0) if(battery_module && prob(25)) qdel(battery_module) computer.visible_message("\The [computer]'s battery explodes in rain of sparks.") diff --git a/code/modules/modular_computers/hardware/_hardware.dm b/code/modules/modular_computers/hardware/_hardware.dm index 81f61671555..d1d51ead8e7 100644 --- a/code/modules/modular_computers/hardware/_hardware.dm +++ b/code/modules/modular_computers/hardware/_hardware.dm @@ -42,12 +42,12 @@ // Cable coil. Works as repair method, but will probably require multiple applications and more cable. if(istype(I, /obj/item/stack/cable_coil)) var/obj/item/stack/S = I - if(!damage) + if(obj_integrity == max_integrity) user << "\The [src] doesn't seem to require repairs." return 1 if(S.use(1)) user << "You patch up \the [src] with a bit of \the [I]." - take_damage(-10) + obj_integrity = min(obj_integrity + 10, max_integrity) return 1 if(try_insert(I, user)) @@ -82,12 +82,6 @@ else if(damage) user << "It seems to be slightly damaged." -// Damages the component. Contains necessary checks. Negative damage "heals" the component. -/obj/item/weapon/computer_hardware/proc/take_damage(var/amount) - damage += round(amount) // We want nice rounded numbers here. - damage = max(0, min(damage, max_damage)) // Clamp the value. - - // Component-side compatibility check. /obj/item/weapon/computer_hardware/proc/can_install(obj/item/device/modular_computer/M, mob/living/user = null) return can_install diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm index 1df674feb32..2a82af08084 100644 --- a/code/modules/ninja/ninja_event.dm +++ b/code/modules/ninja/ninja_event.dm @@ -66,7 +66,7 @@ Contents: var/list/possible_targets = list() for(var/datum/mind/M in ticker.minds) if(M.current && M.current.stat != DEAD) - if(istype(M.current,/mob/living/carbon/human)) + if(ishuman(M.current)) if(M.special_role) possible_targets[M] = 0 //bad-guy else if(M.assigned_role in command_positions) diff --git a/code/modules/ninja/suit/gloves.dm b/code/modules/ninja/suit/gloves.dm index f4273460c7c..b37bc147cb9 100644 --- a/code/modules/ninja/suit/gloves.dm +++ b/code/modules/ninja/suit/gloves.dm @@ -41,7 +41,7 @@ /obj/item/clothing/gloves/space_ninja/Touch(atom/A,proximity) if(!candrain || draining) return 0 - if(!istype(loc, /mob/living/carbon/human)) + if(!ishuman(loc)) return 0 //Only works while worn var/mob/living/carbon/human/H = loc diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index 67f9e8e8255..a29a42f89a7 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -14,25 +14,19 @@ It is possible to destroy the net by the occupant or someone else. mouse_opacity = 1//So you can hit it with stuff. anchored = 1//Can't drag/grab the trapped mob. layer = ABOVE_ALL_MOB_LAYER - var/health = 25//How much health it has. + obj_integrity = 25//How much health it has. + max_integrity = 25 var/mob/living/affecting = null//Who it is currently affecting, if anyone. var/mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed. -/obj/structure/energy_net/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/structure/energy_net/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) + playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) - else - return - health -= damage - if(health <=0) - qdel(src) + playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) /obj/structure/energy_net/Destroy() if(affecting) @@ -67,12 +61,13 @@ It is possible to destroy the net by the occupant or someone else. density = 0//Make the net pass-through. invisibility = INVISIBILITY_ABSTRACT//Make the net invisible so all the animations can play out. - health = INFINITY//Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. + resistance_flags |= INDESTRUCTIBLE //Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. for(var/obj/item/W in M) - if(istype(M,/mob/living/carbon/human)) - if(W==M:w_uniform) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(W == H.w_uniform) continue//So all they're left with are shoes and uniform. - if(W==M:shoes) + if(W == H.shoes) continue M.unEquip(W) @@ -101,61 +96,7 @@ It is possible to destroy the net by the occupant or someone else. -/obj/structure/energy_net/bullet_act(obj/item/projectile/Proj) - . = ..() - take_damage(Proj.damage, Proj.damage_type) - - - -/obj/structure/energy_net/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - qdel(src) - if(3) - take_damage(rand(10,25), BRUTE, 0) - -/obj/structure/energy_net/blob_act(obj/structure/blob/B) - qdel(src) - -/obj/structure/energy_net/hitby(atom/movable/AM) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 10 - else if(isobj(AM)) - var/obj/O = AM - tforce = O.throwforce - take_damage(tforce) - - -/obj/structure/energy_net/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - user.visible_message("[user] rips the energy net apart!", \ - "You easily destroy the energy net.") - qdel(src) - - - /obj/structure/energy_net/attack_paw(mob/user) return attack_hand() - -/obj/structure/energy_net/attack_alien(mob/living/user) - user.do_attack_animation(src) - user.changeNext_move(CLICK_CD_MELEE) - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) - user.visible_message("[user] slices the energy net apart!", \ - "\green You slice the energy net to pieces.") - qdel(src) - - - -/obj/structure/energy_net/attacked_by(obj/item/weapon/W, mob/user) - ..() - take_damage(W.force, W.damtype) - - - diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm index 64666922379..b196e0663fa 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -24,7 +24,7 @@ spawn(0)//Parallel processing. E.process(C) else - H << "They are already trapped inside an energy net!" + H << "[C.p_they(TRUE)] are already trapped inside an energy net!" else - H << "They will bring no honor to your Clan!" + H << "[C.p_they(TRUE)] will bring no honor to your Clan!" return \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm index 50fdd52b241..12c9b82a584 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm @@ -12,7 +12,7 @@ Contents: //Handles elporting while grabbing someone /obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/H) - if(H.pulling && (istype(H.pulling, /mob/living))) + if(H.pulling && (isliving(H.pulling))) var/mob/living/victim = H.pulling if(!victim.anchored) victim.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)) diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm index 68a8645ccc5..9d53bbf1c82 100644 --- a/code/modules/ninja/suit/ninjaDrainAct.dm +++ b/code/modules/ninja/suit/ninjaDrainAct.dm @@ -281,5 +281,5 @@ They *could* go in their appropriate files, but this is supposed to be modular var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() spark_system.set_up(5, 0, loc) playsound(src, "sparks", 50, 1) - visible_message("[H] electrocutes [src] with [H.their_pronoun()] touch!", "[H] electrocutes you with [H.their_pronoun()] touch!") + visible_message("[H] electrocutes [src] with [H.p_their()] touch!", "[H] electrocutes you with [H.p_their()] touch!") electrocute_act(25, H) diff --git a/code/modules/ninja/suit/shoes.dm b/code/modules/ninja/suit/shoes.dm index fa8013941ad..ac8326b13fb 100644 --- a/code/modules/ninja/suit/shoes.dm +++ b/code/modules/ninja/suit/shoes.dm @@ -7,7 +7,7 @@ permeability_coefficient = 0.01 flags = NOSLIP resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - armor = list(melee = 60, bullet = 50, laser = 30,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) strip_delay = 120 cold_protection = FEET min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index 70c3a964374..bdf6f2b3eb4 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -18,8 +18,8 @@ Contents: item_state = "s-ninja_suit" allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals,/obj/item/weapon/stock_parts/cell) slowdown = 0 - resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + resistance_flags = LAVA_PROOF | ACID_PROOF + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 100, acid = 100) strip_delay = 12 //Important parts of the suit. diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index b1ef1644340..418ab389ab0 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -10,7 +10,7 @@ var/obj/item/weapon/pen/haspen //The stored pen. var/obj/item/weapon/paper/toppaper //The topmost piece of paper. slot_flags = SLOT_BELT - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/clipboard/New() update_icon() diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 212cd9372d1..60e324d1842 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -172,7 +172,7 @@ /obj/item/weapon/paper/contract/infernal/attack(mob/M, mob/living/user) add_fingerprint(user) if(M == user && target == M.mind && M.mind.soulOwner != owner && attempt_signature(user, 1)) - user.visible_message("[user] slices [user.their_pronoun()] wrist with [src], and scrawls [user.their_pronoun()] name in blood.", "You slice your wrist open and scrawl your name in blood.") + user.visible_message("[user] slices [user.p_their()] wrist with [src], and scrawls [user.p_their()] name in blood.", "You slice your wrist open and scrawl your name in blood.") user.blood_volume = max(user.blood_volume - 100, 0) else return ..() diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 2a35bfff8ff..6d5a27fe467 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -36,11 +36,12 @@ if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo)) I.loc = src -/obj/structure/filingcabinet/ex_act(severity, target) - for(var/obj/item/I in src) - I.loc = src.loc +/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/attackby(obj/item/P, mob/user, params) if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/documents)) @@ -53,9 +54,11 @@ icon_state = initial(icon_state) updateUsrDialog() else if(istype(P, /obj/item/weapon/wrench)) + user << "You begin to [anchored ? "wrench" : "unwrench"] [src]." playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - anchored = !anchored - user << "You [anchored ? "wrench" : "unwrench"] [src]." + if(do_after(user, 20, target = src)) + user << "You successfully [anchored ? "wrench" : "unwrench"] [src]." + anchored = !anchored else if(user.a_intent != "harm") user << "You can't put [P] in [src]!" else @@ -131,6 +134,7 @@ P.name = "paper - '[G.fields["name"]]'" virgin = 0 //tabbing here is correct- it's possible for people to try and use it //before the records have been generated, so we do this inside the loop. + /obj/structure/filingcabinet/security/attack_hand() populate() ..() @@ -212,16 +216,3 @@ var/list/employmentCabinets = list() cooldown = 0 else user << "The [src] is jammed, give it a few seconds." - - - - -/obj/structure/filingcabinet/employment/attackby(obj/item/P, mob/user, params) - if(istype(P, /obj/item/weapon/wrench)) - user << "You begin to [anchored ? "wrench" : "unwrench"] [src]." - if (do_after(user,300,user)) - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - anchored = !anchored - user << "You successfully [anchored ? "wrench" : "unwrench"] [src]." - else - return ..() diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index cec63a72253..ace6a835e78 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -5,7 +5,7 @@ icon_state = "folder" w_class = 2 pressure_resistance = 2 - resistance_flags = 0 + resistance_flags = FLAMMABLE /obj/item/weapon/folder/blue desc = "A blue folder." diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 963e094e845..ee80b828451 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -9,8 +9,7 @@ var/mode = 0 /obj/item/weapon/hand_labeler/suicide_act(mob/user) - user.visible_message("[user] is pointing \the [src] \ - at \himself. They're going to label themselves as a suicide!") + user.visible_message("[user] is pointing \the [src] at [user.p_them()]self. [user.p_theyre(TRUE)] going to label [user.p_them()]self as a suicide!") labels_left = max(labels_left - 1, 0) var/old_real_name = user.real_name @@ -96,7 +95,7 @@ /obj/item/weapon/hand_labeler/borg/afterattack(atom/A, mob/user, proximity) ..(A, user, proximity) - if(!isrobot(user)) + if(!iscyborg(user)) return var/mob/living/silicon/robot/borgy = user diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 64d0ad1ca6d..3ddb31a8343 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -17,8 +17,9 @@ pressure_resistance = 0 slot_flags = SLOT_HEAD body_parts_covered = HEAD - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 50 + max_integrity = 50 dog_fashion = /datum/dog_fashion/head var/info //What's actually written on the paper. @@ -338,8 +339,8 @@ add_fingerprint(user) -/obj/item/weapon/paper/fire_act() - ..(0) +/obj/item/weapon/paper/fire_act(exposed_temperature, exposed_volume) + ..() icon_state = "paper_onfire" info = "[stars(info)]" diff --git a/code/modules/paperwork/paper_cutter.dm b/code/modules/paperwork/paper_cutter.dm index 487a7457a4c..e66f9992800 100644 --- a/code/modules/paperwork/paper_cutter.dm +++ b/code/modules/paperwork/paper_cutter.dm @@ -106,8 +106,9 @@ desc = "A little slip of paper left over after a larger piece was cut. Whoa." icon_state = "paperslip" icon = 'icons/obj/bureaucracy.dmi' - resistance_flags = 0 - burntime = 3 + resistance_flags = FLAMMABLE + obj_integrity = 50 + max_integrity = 50 /obj/item/weapon/paperslip/New() ..() diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 4c9da27c069..e6703e9718d 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -9,11 +9,10 @@ throw_speed = 3 throw_range = 7 pressure_resistance = 8 - resistance_flags = 0 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/weapon/paper_bin/fire_act() +/obj/item/weapon/paper_bin/fire_act(exposed_temperature, exposed_volume) if(!amount) return ..() @@ -25,10 +24,11 @@ papers = null . = ..() -/obj/item/weapon/paper_bin/burn() - amount = 0 - extinguish() - update_icon() +/obj/item/weapon/paper_bin/fire_act(exposed_temperature, exposed_volume) + if(amount) + amount = 0 + update_icon() + ..() /obj/item/weapon/paper_bin/MouseDrop(atom/over_object) var/mob/living/M = usr diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index a5a72604e93..f3827856ded 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -7,8 +7,9 @@ throw_speed = 1 throwforce = 0 w_class = 1 - resistance_flags = 0 - burntime = 4 + resistance_flags = FLAMMABLE + obj_integrity = 50 + max_integrity = 50 var/obj/item/weapon/paper/internalPaper var/list/stamped = list() @@ -79,7 +80,6 @@ if(!(in_range(user, src))) //to prevent issues as a result of telepathically lighting a paper return - internalPaper.burntime = 1 //its already pretty burnt out user.unEquip(src) user.visible_message("[user] lights [src] ablaze with [P]!", "You light [src] on fire!") fire_act() diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index b5e0c64b81a..2462a5bcdc8 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -18,6 +18,9 @@ idle_power_usage = 30 active_power_usage = 200 power_channel = EQUIP + obj_integrity = 300 + max_integrity = 300 + integrity_failure = 100 var/obj/item/weapon/paper/copy = null //what's in the copier! var/obj/item/weapon/photo/photocopy = null var/obj/item/documents/doccopy = null @@ -49,7 +52,7 @@ dat += "Printing in [greytoggle]

" else if(toner) dat += "Please insert paper to copy.

" - if(istype(user,/mob/living/silicon/ai)) + if(isAI(user)) dat += "Print photo from database

" dat += "Current toner level: [toner]" if(!toner) @@ -195,7 +198,8 @@ copies++ updateUsrDialog() else if(href_list["aipic"]) - if(!istype(usr,/mob/living/silicon/ai)) return + if(!isAI(usr)) + return if(toner >= 5 && !busy) var/list/nametemp = list() var/find @@ -250,8 +254,9 @@ if(istype(O, /obj/item/weapon/paper)) if(copier_empty()) if(istype(O,/obj/item/weapon/paper/contract/infernal)) - user << "The [src] smokes, smelling of brimstone!" - resistance_flags |= ON_FIRE + user << "[src] smokes, smelling of brimstone!" + resistance_flags |= FLAMMABLE + fire_act() else if(!user.drop_item()) return @@ -303,28 +308,8 @@ else return ..() -/obj/machinery/photocopier/ex_act(severity, target) - switch(severity) - if(1) - qdel(src) - if(2) - if(prob(50)) - qdel(src) - else - if(toner > 0) - new /obj/effect/decal/cleanable/oil(get_turf(src)) - toner = 0 - else - if(prob(50)) - if(toner > 0) - new /obj/effect/decal/cleanable/oil(get_turf(src)) - toner = 0 - - -/obj/machinery/photocopier/blob_act(obj/structure/blob/B) - if(prob(50)) - qdel(src) - else +/obj/machinery/photocopier/obj_break(damage_flag) + if(!(flags & NODECONSTRUCT)) if(toner > 0) new /obj/effect/decal/cleanable/oil(get_turf(src)) toner = 0 @@ -369,7 +354,7 @@ ass = null updateUsrDialog() return 0 - else if(istype(ass,/mob/living/carbon/human)) + else if(ishuman(ass)) if(!ass.get_item_by_slot(slot_w_uniform) && !ass.get_item_by_slot(slot_wear_suit)) return 1 else diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 58fcfd4e639..bf6bfcd02a3 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -17,7 +17,7 @@ icon_state = "film" item_state = "electropack" w_class = 1 - resistance_flags = 0 + resistance_flags = FLAMMABLE /* * Photo @@ -28,8 +28,9 @@ icon_state = "photo" item_state = "paper" w_class = 1 - resistance_flags = 0 - burntime = 5 + resistance_flags = FLAMMABLE + obj_integrity = 50 + max_integrity = 50 var/icon/img //Big photo image var/scribble //Scribble on the back. var/blueprints = 0 //Does it include the blueprints? @@ -94,7 +95,7 @@ icon_state = "album" item_state = "briefcase" can_hold = list(/obj/item/weapon/photo) - resistance_flags = 0 + resistance_flags = FLAMMABLE /* * Camera @@ -188,7 +189,7 @@ for(var/atom/movable/A in T) if(A.invisibility) if(see_ghosts) - if(istype(A, /mob/dead/observer)) + if(isobserver(A)) var/mob/dead/observer/O = A if(O.orbiting) //so you dont see ghosts following people like antags, etc. continue @@ -210,8 +211,10 @@ for(var/atom/A in sorted) var/icon/img = getFlatIcon(A) - if(istype(A, /mob/living) && A:lying) - img.Turn(A:lying) + if(isliving(A)) + var/mob/living/L = A + if(L.lying) + img.Turn(L.lying) var/offX = 32 * (A.x - center.x) + A.pixel_x + 33 var/offY = 32 * (A.y - center.y) + A.pixel_y + 33 @@ -234,7 +237,7 @@ var/mob_detail for(var/mob/M in the_turf) if(M.invisibility) - if(see_ghosts && istype(M,/mob/dead/observer)) + if(see_ghosts && isobserver(M)) var/mob/dead/observer/O = M if(O.orbiting) continue @@ -247,12 +250,12 @@ var/list/holding = list() - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M for(var/obj/item/I in L.held_items) if(!holding) - holding += "They are holding \a [I]" + holding += "[L.p_they(TRUE)] [L.p_are()] holding \a [I]" else holding += " and \a [I]" holding = holding.Join() @@ -268,7 +271,7 @@ /obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag) //Proc for both regular and AI-based camera to take the image var/mobs = "" - var/isAi = istype(user, /mob/living/silicon/ai) + var/isAi = isAI(user) var/list/seen if(!isAi) //crappy check, but without it AI photos would be subject to line of sight from the AI Eye object. Made the best of it by moving the sec camera check inside if(user.client) //To make shooting through security cameras possible @@ -409,7 +412,7 @@ qdel(P) //so 10 thousand picture items are not left in memory should an AI take them and then view them all /obj/item/device/camera/siliconcam/proc/viewpictures(user) - if(isrobot(user)) // Cyborg + if(iscyborg(user)) // Cyborg var/mob/living/silicon/robot/C = src.loc var/obj/item/device/camera/siliconcam/Cinfo if(C.connected_ai) diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 89d63ba3f06..dcc443b2938 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -181,6 +181,7 @@ else return ..() + /obj/machinery/power/am_control_unit/take_damage(damage, damage_type = BRUTE, sound_effect = 1) switch(damage_type) if(BRUTE) @@ -278,7 +279,7 @@ /obj/machinery/power/am_control_unit/interact(mob/user) if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER))) - if(!istype(user, /mob/living/silicon/ai)) + if(!isAI(user)) user.unset_machine() user << browse(null, "window=AMcontrol") return diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index 7524010b166..860a80a3912 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -119,11 +119,11 @@ shutdown_core() -/obj/machinery/am_shielding/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/am_shielding/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) switch(damage_type) if(BRUTE) if(sound_effect) - if(damage) + if(damage_amount) playsound(loc, 'sound/weapons/smash.ogg', 50, 1) else playsound(loc, 'sound/weapons/tap.ogg', 50, 1) @@ -132,8 +132,8 @@ playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) else return - if(damage >= 10) - stability -= damage/2 + if(damage_amount >= 10) + stability -= damage_amount/2 check_stability() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a394940966d..d43314eb8f5 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -48,6 +48,10 @@ anchored = 1 use_power = 0 req_access = list(access_engine_equip) + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 50 + armor = list(melee = 20, bullet = 20, laser = 10, energy = 100, bomb = 30, bio = 100, rad = 100, fire = 90, acid = 50) var/area/area var/areastring = null var/obj/item/weapon/stock_parts/cell/cell @@ -93,7 +97,7 @@ var/global/list/status_overlays_equipment var/global/list/status_overlays_lighting var/global/list/status_overlays_environ - var/health = 50 + /obj/machinery/power/apc/connect_to_network() //Override because the APC does not directly connect to the network; it goes through a terminal. @@ -183,7 +187,6 @@ /obj/machinery/power/apc/examine(mob/user) ..() if(stat & BROKEN) - user << "Looks broken." return if(opened) if(has_electronics && terminal) @@ -368,7 +371,7 @@ /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/weapon/crowbar) && opened) if (has_electronics==1) @@ -411,7 +414,7 @@ return if(!user.drop_item()) return - W.loc = src + W.forceMove(src) cell = W user.visible_message(\ "[user.name] has inserted the power cell to [src.name]!",\ @@ -555,13 +558,21 @@ else return ..() -/obj/machinery/power/apc/take_damage(damage, damage_type = BRUTE, sound_effect = 1) - ..() - if((malfhack || (stat & BROKEN)) && !opened) - if(damage < 10) - return - health -= damage - if(health <= 0) +/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 15 && (!(stat & BROKEN) || malfai)) + return 0 + . = ..() + + +/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 visible_message("The APC cover is knocked down!") update_icon() @@ -602,28 +613,9 @@ ..() /obj/machinery/power/apc/attack_alien(mob/living/carbon/alien/humanoid/user) - ..() - if(malfhack || (stat & BROKEN)) + if(malfhack) return - if(opened == 0) - if(!panel_open) - panel_open = 1 - update_icon() - visible_message("The [src.name]'s cover flies open, exposing the wires!") - - else if(panel_open && !wires.is_all_cut()) - wires.cut_all() - update_icon() - visible_message("The [src.name]'s wires are shredded!") - else if(opened == 1) - if(cell) - cell.loc = user.loc - cell.updateicon() - cell = null - visible_message("The [src.name]'s power cell flies off!") - charging = 0 - update_icon() - + ..() /obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \ datum/tgui/master_ui = null, datum/ui_state/state = default_state) @@ -1084,17 +1076,6 @@ addtimer(src, "reset", 600, FALSE, APC_RESET_EMP) ..() -/obj/machinery/power/apc/ex_act(severity, target) - ..() - if(!qdeleted(src)) - switch(severity) - if(2) - if(prob(50)) - set_broken() - if(3) - if(prob(25)) - set_broken() - /obj/machinery/power/apc/blob_act(obj/structure/blob/B) set_broken() @@ -1124,7 +1105,7 @@ for(var/area/A in area.related) for(var/obj/machinery/light/L in A) L.on = 1 - L.broken() + L.break_light_tube() stoplag() /obj/machinery/power/apc/proc/shock(mob/user, prb) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 4ce5dfb3f9a..8988e119ca2 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -97,9 +97,16 @@ By design, d1 is the smallest direction and d2 is the highest if(invisibility != INVISIBILITY_MAXIMUM) qdel(src) -/obj/structure/cable/Deconstruct() - var/turf/T = loc - stored.loc = T +/obj/structure/cable/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + var/turf/T = loc + stored.forceMove(T) + qdel(src) + +/obj/structure/cable/fire_act(exposed_temperature, exposed_volume) + var/turf/T = src.loc + if(T && T.intact) //protected from fire when hidden behind a floor. + return ..() /////////////////////////////////// @@ -109,7 +116,7 @@ By design, d1 is the smallest direction and d2 is the highest //If underfloor, hide the cable /obj/structure/cable/hide(i) - if(level == 1 && istype(loc, /turf)) + if(level == 1 && isturf(loc)) invisibility = i ? INVISIBILITY_MAXIMUM : 0 updateicon() @@ -138,7 +145,7 @@ By design, d1 is the smallest direction and d2 is the highest user.visible_message("[user] cuts the cable.", "You cut the cable.") stored.add_fingerprint(user) investigate_log("was cut by [key_name(usr, usr.client)] in [user.loc.loc]","wires") - Deconstruct() + deconstruct() return else if(istype(W, /obj/item/stack/cable_coil)) @@ -169,21 +176,9 @@ By design, d1 is the smallest direction and d2 is the highest else return 0 -//explosion handling -/obj/structure/cable/ex_act(severity, target) - ..() - if(!qdeleted(src)) - switch(severity) - if(2) - if(prob(50)) - Deconstruct() - if(3) - if(prob(25)) - Deconstruct() - /obj/structure/cable/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) - Deconstruct() + deconstruct() /obj/structure/cable/proc/cableColor(colorC = "red") cable_color = colorC @@ -619,7 +614,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \ if (C.shock(user, 50)) if (prob(50)) //fail - C.Deconstruct() + C.deconstruct() // called when cable_coil is click on an installed obj/cable // or click on a turf that already contains a "node" cable @@ -684,7 +679,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \ if (NC.shock(user, 50)) if (prob(50)) //fail - NC.Deconstruct() + NC.deconstruct() return @@ -734,7 +729,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list ( \ if (C.shock(user, 50)) if (prob(50)) //fail - C.Deconstruct() + C.deconstruct() return C.denode()// this call may have disconnected some cables that terminated on the centre of the turf, if so split the powernets. diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 395eebbb65b..ccae16644f3 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -25,7 +25,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 anchored = 1 density = 1 use_power = 0 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/sprite_number = 0 /obj/machinery/gravity_generator/ex_act(severity, target) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3647c9173e8..6ad8d8eba08 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -16,34 +16,38 @@ desc = "Used for building lights." icon = 'icons/obj/lighting.dmi' icon_state = "tube-construct-item" - result_path = /obj/machinery/light_construct + result_path = /obj/structure/light_construct inverse = 1 /obj/item/wallframe/light_fixture/small name = "small light fixture frame" icon_state = "bulb-construct-item" - result_path = /obj/machinery/light_construct/small + result_path = /obj/structure/light_construct/small materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT) -/obj/machinery/light_construct +/obj/structure/light_construct name = "light fixture frame" desc = "A light fixture under construction." icon = 'icons/obj/lighting.dmi' icon_state = "tube-construct-stage1" anchored = 1 layer = WALL_OBJ_LAYER + obj_integrity = 200 + 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 var/obj/machinery/light/newlight = null -/obj/machinery/light_construct/New(loc, ndir, building) +/obj/structure/light_construct/New(loc, ndir, building) ..() if(building) setDir(ndir) -/obj/machinery/light_construct/examine(mob/user) +/obj/structure/light_construct/examine(mob/user) ..() switch(src.stage) if(1) @@ -53,7 +57,7 @@ if(3) user << "The casing is closed." -/obj/machinery/light_construct/attackby(obj/item/weapon/W, mob/user, params) +/obj/structure/light_construct/attackby(obj/item/weapon/W, mob/user, params) add_fingerprint(user) switch(stage) if(1) @@ -116,17 +120,24 @@ return return ..() -/obj/machinery/light_construct/blob_act(obj/structure/blob/B) +/obj/structure/light_construct/blob_act(obj/structure/blob/B) if(B && B.loc == loc) qdel(src) -/obj/machinery/light_construct/small +/obj/structure/light_construct/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + new /obj/item/stack/sheet/metal(loc, sheets_refunded) + qdel(src) + +/obj/structure/light_construct/small name = "small light fixture frame" icon_state = "bulb-construct-stage1" fixture_type = "bulb" sheets_refunded = 1 + + // the standard tube light fixture /obj/machinery/light name = "light fixture" @@ -136,6 +147,8 @@ desc = "A lighting fixture." anchored = 1 layer = WALL_OBJ_LAYER + obj_integrity = 100 + max_integrity = 100 use_power = 2 idle_power_usage = 2 active_power_usage = 20 @@ -152,7 +165,6 @@ // this is used to calc the probability the light burns out var/rigged = 0 // true if rigged to explode - var/health = 20 // the smaller bulb light fixture @@ -163,12 +175,12 @@ brightness = 4 desc = "A small lighting fixture." light_type = /obj/item/weapon/light/bulb - health = 15 + /obj/machinery/light/Move() if(status != LIGHT_BROKEN) - broken(1) + break_light_tube(1) return ..() /obj/machinery/light/built/New() @@ -190,11 +202,11 @@ if("tube") brightness = 8 if(prob(2)) - broken(1) + break_light_tube(1) if("bulb") brightness = 4 if(prob(5)) - broken(1) + break_light_tube(1) spawn(1) update(0) @@ -319,19 +331,7 @@ playsound(src.loc, 'sound/items/Screwdriver.ogg', 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.setDir(src.dir) - newlight.stage = 2 - transfer_fingerprints_to(newlight) - qdel(src) + deconstruct() else user << "You stick \the [W] into the light socket!" if(has_power() && (W.flags & CONDUCT)) @@ -343,6 +343,32 @@ else return ..() +/obj/machinery/light/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + var/obj/structure/light_construct/newlight = null + var/cur_stage = 2 + if(!disassembled) + cur_stage = 1 + switch(fitting) + if("tube") + newlight = new /obj/structure/light_construct(src.loc) + newlight.icon_state = "tube-construct-stage[cur_stage]" + + if("bulb") + newlight = new /obj/structure/light_construct/small(src.loc) + newlight.icon_state = "bulb-construct-stage[cur_stage]" + 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) @@ -350,25 +376,27 @@ if(prob(12)) electrocute_mob(user, get_area(src), src, 0.3) -/obj/machinery/light/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/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) - if(sound_effect) - switch(status) - if(LIGHT_EMPTY) - playsound(loc, 'sound/weapons/smash.ogg', 50, 1) - if(LIGHT_BROKEN) - playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1) - else - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + switch(status) + if(LIGHT_EMPTY) + playsound(loc, 'sound/weapons/smash.ogg', 50, 1) + if(LIGHT_BROKEN) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1) + else + playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health -= damage - if(health <= 0) - broken() + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) // returns whether this light has power @@ -397,20 +425,6 @@ src.flicker(1) return -/obj/machinery/light/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type, 0) - -/obj/machinery/light/hitby(AM as mob|obj) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 40 - else if(isobj(AM)) - var/obj/item/I = AM - tforce = I.throwforce - take_damage(tforce) - // attack with hand - remove tube/bulb // if hands aren't protected and the light is on, burn the player @@ -444,12 +458,15 @@ user << "You try to remove the light [fitting], but you burn your hand on it!" var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm") - if(affecting && affecting.take_damage( 0, 5 )) // 5 burn damage + if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage H.update_damage_overlays() return // if burned, don't remove the light else user << "You remove the light [fitting]." // create a light tube/bulb item and put it in the user's hand + drop_light_tube(user) + +/obj/machinery/light/proc/drop_light_tube(mob/user) var/obj/item/weapon/light/L = new light_type() L.status = status L.rigged = rigged @@ -460,10 +477,11 @@ switchcount = 0 L.update() - L.add_fingerprint(user) - L.loc = loc + L.forceMove(loc) - user.put_in_active_hand(L) //puts it in our active hand + if(user) //puts it in our active hand + L.add_fingerprint(user) + user.put_in_active_hand(L) status = LIGHT_EMPTY update() @@ -475,26 +493,13 @@ user << "You telekinetically remove the light [fitting]." // create a light tube/bulb item and put it in the user's hand - var/obj/item/weapon/light/L = new light_type() - L.status = status - L.rigged = rigged - L.brightness = brightness + drop_light_tube() - // light item inherits the switchcount, then zero it - L.switchcount = switchcount - switchcount = 0 - - L.update() - L.add_fingerprint(user) - L.loc = loc - - status = LIGHT_EMPTY - update() // break the light and make sparks if was on -/obj/machinery/light/proc/broken(skip_sound_and_sparks = 0) - if(status == LIGHT_EMPTY) +/obj/machinery/light/proc/break_light_tube(skip_sound_and_sparks = 0) + if(status == LIGHT_EMPTY || status == LIGHT_BROKEN) return if(!skip_sound_and_sparks) @@ -515,29 +520,6 @@ on = 1 update() -// explosion effect -// destroy the whole light fixture or just shatter it - -/obj/machinery/light/ex_act(severity, target) - ..() - if(!qdeleted(src)) - switch(severity) - if(2) - if(prob(50)) - broken() - if(3) - if(prob(25)) - broken() - -/obj/machinery/light/blob_act(obj/structure/blob/B) - if(B && B.loc == loc) - broken() - qdel(src) - else if(prob(50)) - broken() - else - flicker() - /obj/machinery/light/tesla_act(power, explosive = FALSE) if(explosive) explosion(src.loc,0,0,0,flame_range = 5, adminlog = 0) @@ -553,14 +535,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() set waitfor = 0 var/turf/T = get_turf(src.loc) - 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) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 01e28bb0f7c..0eea1f23925 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -271,7 +271,7 @@ display round(lastgen) and plasmatank amount /obj/machinery/power/port_gen/pacman/interact(mob/user) if (get_dist(src, user) > 1 ) - if (!istype(user, /mob/living/silicon/ai)) + if(!isAI(user)) user.unset_machine() user << browse(null, "window=port_gen") return diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 3d2a726adc4..46bd4b9dc0a 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -117,7 +117,7 @@ if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/coil = W var/turf/T = user.loc - if(T.intact || !istype(T, /turf/open/floor)) + if(T.intact || !isfloorturf(T)) return if(get_dist(src, user) > 1) return @@ -279,7 +279,7 @@ /proc/electrocute_mob(mob/living/carbon/M, power_source, obj/source, siemens_coeff = 1) if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.gloves) var/obj/item/clothing/gloves/G = H.gloves diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm index 058084e1cec..915f909e231 100644 --- a/code/modules/power/rtg.dm +++ b/code/modules/power/rtg.dm @@ -142,7 +142,7 @@ else overload() -/obj/machinery/power/rtg/abductor/fire_act() +/obj/machinery/power/rtg/abductor/fire_act(exposed_temperature, exposed_volume) overload() /obj/machinery/power/rtg/abductor/tesla_act() diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index ec4da0d1b2e..74fd320c11d 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -10,6 +10,9 @@ var/global/list/rad_collectors = list() density = 1 req_access = list(access_engine_equip) // use_power = 0 + obj_integrity = 350 + max_integrity = 350 + integrity_failure = 80 var/obj/item/weapon/tank/internals/plasma/loaded_tank = null var/last_power = 0 var/active = 0 @@ -105,12 +108,10 @@ var/global/list/rad_collectors = list() return ..() -/obj/machinery/power/rad_collector/ex_act(severity, target) - switch(severity) - if(2, 3) - eject() - 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 6b3f4deb296..90a8beff273 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -7,7 +7,7 @@ icon_state = "Contain_F" anchored = 1 density = 0 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF use_power = 0 luminosity = 4 layer = ABOVE_OBJ_LAYER @@ -26,11 +26,20 @@ shock(user) return 1 +/obj/machinery/field/containment/attackby(obj/item/W, mob/user, params) + shock(user) + return 1 + +/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, 1) + if(BRUTE) + playsound(loc, 'sound/effects/EMPulse.ogg', 75, 1) /obj/machinery/field/containment/blob_act(obj/structure/blob/B) return 0 - /obj/machinery/field/containment/ex_act(severity, target) return 0 @@ -69,6 +78,8 @@ /obj/machinery/field/containment/Move() qdel(src) + + // Abstract Field Class // Used for overriding certain procs @@ -106,7 +117,6 @@ user.updatehealth() bump_field(user) - return /obj/machinery/field/proc/clear_shock() hasShocked = 0 diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 366bab4bad9..69b592d5fdf 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -30,6 +30,10 @@ field_generator power level display anchored = 0 density = 1 use_power = 0 + obj_integrity = 500 + 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 @@ -157,7 +161,7 @@ field_generator power level display if(Proj.flag != "bullet") power = min(power + Proj.damage, field_generator_max_power) check_power_level() - return 0 + ..() /obj/machinery/field/generator/Destroy() diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index b8140b80a10..64538f978c1 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -26,6 +26,10 @@ icon_state = "none" anchored = 0 density = 1 + obj_integrity = 500 + 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 = PA_CONSTRUCTION_UNSECURED var/reference = null @@ -143,16 +147,17 @@ 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() ..() if(master && master.active) master.toggle_power() investigate_log("was moved whilst active; it powered down.","singulo") -/obj/structure/particle_accelerator/blob_act(obj/structure/blob/B) - if(prob(50)) - qdel(src) - /obj/structure/particle_accelerator/update_icon() switch(construction_state) @@ -165,7 +170,6 @@ icon_state="[reference]p[strength]" else icon_state="[reference]c" - return /obj/structure/particle_accelerator/proc/update_state() if(master) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index e64d304c065..ac2ef7fdf4f 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -226,7 +226,7 @@ /obj/machinery/particle_accelerator/control_box/interact(mob/user) if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER))) - if(!istype(user, /mob/living/silicon)) + if(!issilicon(user)) user.unset_machine() user << browse(null, "window=pacontrol") return diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 2dda4c96dbb..fb9af570189 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -26,7 +26,7 @@ var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing var/last_warning var/consumedSupermatter = 0 //If the singularity has eaten a supermatter shard and can go to stage six - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0) //CARN: admin-alert for chuckle-fuckery. @@ -60,6 +60,19 @@ consume(user) return 1 +/obj/singularity/attack_paw(mob/user) + consume(user) + +/obj/singularity/attack_alien(mob/user) + consume(user) + +/obj/singularity/attack_animal(mob/user) + consume(user) + +/obj/singularity/attackby(obj/item/weapon/W, mob/user, params) + consume(user) + return 1 + /obj/singularity/Process_Spacemove() //The singularity stops drifting for no man! return 0 @@ -395,7 +408,7 @@ continue if(M.stat == CONSCIOUS) - if (istype(M,/mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M if(istype(H.glasses, /obj/item/clothing/glasses/meson)) var/obj/item/clothing/glasses/meson/MS = H.glasses diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index d38b2a9c426..6b19344e683 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -12,7 +12,9 @@ idle_power_usage = 0 active_power_usage = 0 var/id = 0 - var/health = 20 + obj_integrity = 150 + max_integrity = 150 + integrity_failure = 50 var/obscured = 0 var/sunfrac = 0 var/adir = SOUTH // actual dir @@ -50,7 +52,8 @@ 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/weapon/W, mob/user, params) @@ -58,54 +61,43 @@ 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(stat & BROKEN) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 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) else return ..() -/obj/machinery/power/solar/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type) - -/obj/machinery/power/solar/hitby(AM as mob|obj) - ..() - var/tforce = 0 - if(ismob(AM)) - tforce = 20 - else if(isobj(AM)) - var/obj/item/I = AM - tforce = I.throwforce - take_damage(tforce) - -/obj/machinery/power/solar/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/power/solar/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - if(stat & BROKEN) - playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 60, 1) - else - playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) + if(stat & BROKEN) + playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 60, 1) + else + playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1) if(BURN) - if(sound_effect) - playsound(loc, 'sound/items/Welder.ogg', 100, 1) + playsound(loc, 'sound/items/Welder.ogg', 100, 1) + + +/obj/machinery/power/solar/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) + stat |= BROKEN + unset_control() + update_icon() + +/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 - return - health -= damage - if(health <= 0) - playsound(src, "shatter", 70, 1) - new /obj/item/weapon/shard(src.loc) - new /obj/item/weapon/shard(src.loc) - qdel(src) - else if(health <= 10) - if(!(stat & BROKEN)) - playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) - set_broken() + playsound(src, "shatter", 70, 1) + new /obj/item/weapon/shard(src.loc) + new /obj/item/weapon/shard(src.loc) + qdel(src) + /obj/machinery/power/solar/update_icon() ..() @@ -115,7 +107,6 @@ else add_overlay(image('icons/obj/power.dmi', icon_state = "solar_panel", layer = FLY_LAYER)) src.setDir(angle2dir(adir)) - return //calculates the fraction of the sunlight that the panel recieves /obj/machinery/power/solar/proc/update_solar_exposure() @@ -149,21 +140,6 @@ else //if we're no longer on the same powernet, remove from control computer unset_control() -/obj/machinery/power/solar/proc/set_broken() - . = (!(stat & BROKEN)) - stat |= BROKEN - unset_control() - update_icon() - - -/obj/machinery/power/solar/ex_act(severity, target) - ..() - if(!qdeleted(src)) - switch(severity) - if(2) - take_damage(rand(10,20), BRUTE, 0) - if(3) - take_damage(rand(5,15), BRUTE, 0) /obj/machinery/power/solar/fake/New(var/turf/loc, var/obj/item/solar_assembly/S) ..(loc, S, 0) @@ -289,7 +265,9 @@ density = 1 use_power = 1 idle_power_usage = 250 - var/health = 25 + obj_integrity = 200 + max_integrity = 200 + integrity_failure = 100 var/icon_screen = "solar" var/icon_keyboard = "power_key" var/id = 0 @@ -468,25 +446,18 @@ else return ..() -/obj/machinery/power/solar_control/bullet_act(obj/item/projectile/P) - . = ..() - take_damage(P.damage, P.damage_type) - -/obj/machinery/power/solar_control/take_damage(damage, damage_type = BRUTE, sound_effect = 1) +/obj/machinery/power/solar_control/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) if(BRUTE) - if(sound_effect) - if(stat & BROKEN) - playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) - else - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) + if(stat & BROKEN) + playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1) + else + playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) if(BURN) - if(sound_effect) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - else - return - health -= damage - if(health <= 0 && !(stat & BROKEN)) + playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) + +/obj/machinery/power/solar_control/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) stat |= BROKEN update_icon() @@ -523,24 +494,6 @@ update_icon() -/obj/machinery/power/solar_control/proc/set_broken() - stat |= BROKEN - update_icon() - - -/obj/machinery/power/solar_control/ex_act(severity, target) - ..() - if(!qdeleted(src)) - switch(severity) - if(2) - take_damage(rand(20,30), BRUTE, 0) - if(3) - take_damage(rand(10,20), BRUTE, 0) - -/obj/machinery/power/solar_control/blob_act(obj/structure/blob/B) - if (prob(75)) - set_broken() - src.density = 0 // diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 28b0a7ef434..8f5c739346a 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -76,7 +76,9 @@ /obj/machinery/power/supermatter_shard/Destroy() investigate_log("has been destroyed.", "supermatter") - qdel(radio) + if(radio) + qdel(radio) + radio = null poi_list -= src . = ..() @@ -94,7 +96,7 @@ if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now. return //Yeah just stop. - if(istype(T, /turf/open/space)) // Stop processing this stuff if we've been ejected. + if(isspaceturf(T)) // Stop processing this stuff if we've been ejected. return if(damage > warning_point) // while the core is still damaged and it's still worth noting its status @@ -243,13 +245,13 @@ return(gain) /obj/machinery/power/supermatter_shard/blob_act(obj/structure/blob/B) - if(B && !istype(loc, /turf/open/space)) //does nothing in space + if(B && !isspaceturf(loc)) //does nothing in space playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1) - damage += B.health * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us - if(B.health > 100) + damage += B.obj_integrity * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us + if(B.obj_integrity > 100) B.visible_message("\The [B] strikes at \the [src] and flinches away!",\ "You hear a loud crack as you are washed with a wave of heat.") - B.take_damage(100, BURN, src) + B.take_damage(100, BURN) else B.visible_message("\The [B] strikes at \the [src] and rapidly flashes to ash.",\ "You hear a loud crack as you are washed with a wave of heat.") @@ -299,7 +301,7 @@ /obj/machinery/power/supermatter_shard/Bumped(atom/AM as mob|obj) - if(istype(AM, /mob/living)) + if(isliving(AM)) AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\ "You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\ "You hear an unearthly noise as a wave of heat washes over you.") @@ -315,7 +317,7 @@ /obj/machinery/power/supermatter_shard/proc/Consume(atom/movable/AM) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/user = AM message_admins("[src] has consumed [key_name_admin(user)]? (FLW) (JMP).") investigate_log("has consumed [key_name(user)].", "supermatter") diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index f3fcb43585b..68aa7191683 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -48,7 +48,7 @@ /obj/machinery/power/terminal/proc/dismantle(mob/living/user) - if(istype(loc, /turf)) + if(isturf(loc)) var/turf/T = loc if(T.intact) user << "You must first expose the power terminal!" diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 4f6fc7641b8..5586ab59435 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -194,7 +194,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics, else if(closest_grounding_rod || is_type_in_typecache(A, blacklisted_tesla_types)) continue - else if(istype(A, /mob/living)) + else if(isliving(A)) var/dist = get_dist(source, A) var/mob/living/L = A if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD) @@ -253,7 +253,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics, else if(closest_mob) var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5) closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = 1) - if(istype(closest_mob, /mob/living/silicon)) + if(issilicon(closest_mob)) var/mob/living/silicon/S = closest_mob S.emp_act(2) tesla_zap(S, 7, power / 1.5) // metallic folks bounce it further diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 928e98563f3..0f37617704b 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -11,6 +11,9 @@ anchored = 1 density = 1 use_power = 0 + obj_integrity = 250 + max_integrity = 250 + integrity_failure = 50 var/id = 0 var/sun_angle = 0 // sun angle as set by sun datum @@ -64,16 +67,31 @@ playsound(src.loc, 'sound/machines/click.ogg', 50, 1) user.visible_message("[user] begins to take the glass off the solar tracker.", "You begin 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(stat & BROKEN) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) user.visible_message("[user] takes the glass off the tracker.", "You take the glass off the tracker.") - qdel(src) + deconstruct(TRUE) else return ..() +/obj/machinery/power/tracker/obj_break(damage_flag) + if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) + playsound(loc, 'sound/effects/Glassbr3.ogg', 100, 1) + 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, 1) + new /obj/item/weapon/shard(src.loc) + new /obj/item/weapon/shard(src.loc) + qdel(src) + // Tracker Electronic /obj/item/weapon/electronics/tracker diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index cb2d5457682..abbfc960e95 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/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/outturf @@ -155,7 +157,7 @@ // RPM function to include compression friction - be advised that too low/high of a compfriction value can make things screwy - rpm = max(0, rpm - (rpm*rpm)/(COMPFRICTION/efficiency)) + rpm = max(0, rpm - (rpm*rpm)/(COMPFRICTION*efficiency)) if(starter && !(stat & NOPOWER)) @@ -291,7 +293,7 @@ /obj/machinery/power/turbine/interact(mob/user) - if ( !Adjacent(user) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon)) ) + if(!Adjacent(user) || (stat & (NOPOWER|BROKEN)) && !issilicon(user)) user.unset_machine(src) user << browse(null, "window=turbine") return diff --git a/code/modules/procedural_mapping/mapGeneratorModule.dm b/code/modules/procedural_mapping/mapGeneratorModule.dm index 33ff0ee2235..0ad35adddba 100644 --- a/code/modules/procedural_mapping/mapGeneratorModule.dm +++ b/code/modules/procedural_mapping/mapGeneratorModule.dm @@ -114,7 +114,7 @@ if(A.density) . = 0 break - if(!allowAtomsOnSpace && (istype(T,/turf/open/space))) + if(!allowAtomsOnSpace && (isspaceturf(T))) . = 0 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index ede8268be7d..8c44806da96 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -389,7 +389,7 @@ obj/item/weapon/gun/proc/newshot() return if(user == target) - target.visible_message("[user] sticks [src] in [user.their_pronoun()] mouth, ready to pull the trigger...", \ + target.visible_message("[user] sticks [src] in [user.p_their()] mouth, ready to pull the trigger...", \ "You stick [src] in your mouth, ready to pull the trigger...") else target.visible_message("[user] points [src] at [target]'s head, ready to pull the trigger...", \ @@ -484,8 +484,3 @@ obj/item/weapon/gun/proc/newshot() azoom = new() azoom.gun = src - -/obj/item/weapon/gun/burn() - if(pin) - qdel(pin) - .=..() diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index f729b9966cf..185d5ff2654 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -47,6 +47,9 @@ fire_delay = shot.delay /obj/item/weapon/gun/energy/Destroy() + if(power_supply) + qdel(power_supply) + power_supply = null STOP_PROCESSING(SSobj, src) return ..() @@ -155,7 +158,7 @@ return (OXYLOSS) /obj/item/weapon/gun/energy/proc/robocharge() - if(isrobot(src.loc)) + if(iscyborg(src.loc)) var/mob/living/silicon/robot/R = src.loc if(R && R.cell) var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot @@ -170,7 +173,3 @@ STOP_PROCESSING(SSobj, src) ..() -/obj/item/weapon/gun/energy/burn() - if(power_supply) - qdel(power_supply) - .=..() diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index bb586419f9b..16c1d39d016 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -147,7 +147,7 @@ KA.modify_projectile(BB) var/turf/proj_turf = get_turf(BB) - if(!istype(proj_turf, /turf)) + if(!isturf(proj_turf)) return var/datum/gas_mixture/environment = proj_turf.return_air() var/pressure = environment.return_pressure() @@ -182,7 +182,7 @@ var/turf/target_turf = get_turf(target) if(!target_turf) target_turf = get_turf(src) - if(istype(target_turf, /turf/closed/mineral)) + if(ismineralturf(target_turf)) var/turf/closed/mineral/M = target_turf M.gets_drilled(firer) var/obj/effect/overlay/temp/kinetic_blast/K = PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, target_turf) @@ -191,7 +191,7 @@ PoolOrNew(type, target_turf) if(turf_aoe) for(var/T in RANGE_TURFS(1, target_turf) - target_turf) - if(istype(T, /turf/closed/mineral)) + if(ismineralturf(T)) var/turf/closed/mineral/M = T M.gets_drilled(firer) if(mob_aoe) diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 474e5373227..527f4cd8814 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -93,7 +93,7 @@ ..() /obj/item/weapon/gun/energy/gun/nuclear/proc/failcheck() - if(prob(fail_chance) && istype(loc, /mob/living)) + if(prob(fail_chance) && isliving(loc)) var/mob/living/M = loc switch(fail_tick) if(0 to 200) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 313e2814ccc..da8e2c83ec7 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -10,7 +10,7 @@ hitsound = 'sound/weapons/pierce.ogg' var/hitsound_wall = "" - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_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/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 28902c019dc..81c5bb9ddc1 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -66,7 +66,7 @@ /obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = 0) . = ..() - if(istype(target,/turf/)||istype(target,/obj/structure/)) + if(isturf(target) || istype(target,/obj/structure/)) target.ex_act(2) /obj/item/projectile/beam/pulse/shot diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index ab287338cc9..dfeeb98b2d8 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -250,7 +250,7 @@ breakthings = FALSE /obj/item/projectile/bullet/sniper/soporific/on_hit(atom/target, blocked = 0) - if((blocked != 100) && istype(target, /mob/living)) + if((blocked != 100) && isliving(target)) var/mob/living/L = target L.Sleeping(20) return ..() diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 9b94ffd17f5..fe6dd50c645 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -126,7 +126,7 @@ OpenDoor(target) else var/turf/T = get_turf(target) - if(istype(T,/turf/closed) && !istype(T, /turf/closed/indestructible)) + if(isclosedturf(T) && !istype(T, /turf/closed/indestructible)) CreateDoor(T) /obj/item/projectile/magic/door/proc/CreateDoor(turf/T) @@ -164,7 +164,7 @@ var/list/contents = M.contents.Copy() - if(istype(M, /mob/living/silicon/robot)) + if(iscyborg(M)) var/mob/living/silicon/robot/Robot = M if(Robot.mmi) qdel(Robot.mmi) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 6a991950ff0..81e7bd0476f 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -171,7 +171,7 @@ /obj/item/projectile/plasma/New() var/turf/proj_turf = get_turf(src) - if(!istype(proj_turf, /turf)) + if(!isturf(proj_turf)) return var/datum/gas_mixture/environment = proj_turf.return_air() if(environment) @@ -184,7 +184,7 @@ /obj/item/projectile/plasma/on_hit(atom/target) . = ..() - if(istype(target, /turf/closed/mineral)) + if(ismineralturf(target)) var/turf/closed/mineral/M = target M.gets_drilled(firer) Range() diff --git a/code/modules/reagents/chem_splash.dm b/code/modules/reagents/chem_splash.dm index b32e9da1753..b99a7ced9c5 100644 --- a/code/modules/reagents/chem_splash.dm +++ b/code/modules/reagents/chem_splash.dm @@ -6,7 +6,7 @@ proc/chem_splash(turf/epicenter, affected_range = 3, list/datum/reagents/reactants = list(), extra_heat = 0, threatscale = 1, adminlog = 1) - if(!istype(epicenter, /turf) || !reactants.len || threatscale <= 0) + if(!isturf(epicenter) || !reactants.len || threatscale <= 0) return var/has_reagents var/total_reagents diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index bdc42b7c03c..8e9248ea81a 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -420,7 +420,7 @@ var/const/INJECT = 5 //injection for(var/_reagent in cached_reagents) var/datum/reagent/R = _reagent if(R.id == reagent) - if(my_atom && istype(my_atom, /mob/living)) + if(my_atom && isliving(my_atom)) var/mob/living/M = my_atom R.on_mob_delete(M) qdel(R) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 7279ec41475..79072028c9a 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -8,6 +8,7 @@ use_power = 1 idle_power_usage = 40 interact_offline = 1 + resistance_flags = FIRE_PROOF | ACID_PROOF var/energy = 100 var/max_energy = 100 var/amount = 30 diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index aa4955e7ef1..a4af808cbb2 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 = 1 idle_power_usage = 40 + resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/weapon/reagent_containers/beaker = null var/target_temperature = 300 var/heater_coefficient = 0.10 diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 07042c5e1ad..52dccdedcd8 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -7,6 +7,7 @@ icon_state = "mixer0" use_power = 1 idle_power_usage = 20 + resistance_flags = FIRE_PROOF | ACID_PROOF var/obj/item/weapon/reagent_containers/beaker = null var/obj/item/weapon/storage/pill_bottle/bottle = null var/mode = 1 diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 9fd265af203..448de75f0b6 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -8,6 +8,7 @@ circuit = /obj/item/weapon/circuitboard/computer/pandemic use_power = 1 idle_power_usage = 20 + resistance_flags = ACID_PROOF var/temp_html = "" var/wait = null var/obj/item/weapon/reagent_containers/beaker = null diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 479a2ea140b..cc6a21adf5a 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -9,6 +9,7 @@ idle_power_usage = 5 active_power_usage = 100 pass_flags = PASSTABLE + resistance_flags = ACID_PROOF var/operating = 0 var/obj/item/weapon/reagent_containers/beaker = null var/limit = 10 diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index de0b529b446..c8db6407aba 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -54,7 +54,7 @@ All effects don't start immediately, but rather get worse over time; the rate is return /datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with ethanol isn't quite as good as fuel. - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(method in list(TOUCH, VAPOR, PATCH)) @@ -680,7 +680,7 @@ All effects don't start immediately, but rather get worse over time; the rate is boozepwr = 60 /datum/reagent/consumable/ethanol/bananahonk/on_mob_life(mob/living/M) - if( ( istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || istype(M, /mob/living/carbon/monkey) ) + if((ishuman(M) && M.job in list("Clown") ) || ismonkey(M)) M.heal_bodypart_damage(1,1, 0) . = 1 return ..() || . @@ -694,7 +694,7 @@ All effects don't start immediately, but rather get worse over time; the rate is boozepwr = 59 //Proof that clowns are better than mimes right here /datum/reagent/consumable/ethanol/silencer/on_mob_life(mob/living/M) - if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) + if(ishuman(M) && M.job in list("Mime")) M.heal_bodypart_damage(1,1) . = 1 return ..() || . diff --git a/code/modules/reagents/chemistry/reagents/blob_reagents.dm b/code/modules/reagents/chemistry/reagents/blob_reagents.dm index 3c0e289f6da..42621f1a7fc 100644 --- a/code/modules/reagents/chemistry/reagents/blob_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/blob_reagents.dm @@ -25,10 +25,10 @@ return 0 //the dead, and blob mobs, don't cause reactions return round(reac_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, original_health, damage, damage_type, cause) //when the blob takes damage, do this +/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/proc/death_reaction(obj/structure/blob/B, cause) //when a blob dies, do this +/datum/reagent/blob/proc/death_reaction(obj/structure/blob/B, damage_flag) //when a blob dies, do this return /datum/reagent/blob/proc/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T) //when the blob expands, do this @@ -59,15 +59,14 @@ reac_volume = ..() M.apply_damage(0.7*reac_volume, BRUTE) -/datum/reagent/blob/replicating_foam/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) +/datum/reagent/blob/replicating_foam/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) var/effectivedamage = damage if(damage_type == BRUTE) effectivedamage = damage * 2 - if(damage_type == BURN && effectivedamage > 0 && original_health - effectivedamage > 0 && prob(60)) + if(damage_type == BURN && effectivedamage > 0 && B.obj_integrity - effectivedamage > 0 && prob(60)) var/obj/structure/blob/newB = B.expand(null, null, 0) if(newB) - newB.health = original_health - effectivedamage - newB.check_health(cause) + newB.obj_integrity = B.obj_integrity - effectivedamage newB.update_icon() return effectivedamage @@ -95,8 +94,8 @@ newB.forceMove(get_turf(B)) B.forceMove(T) -/datum/reagent/blob/shifting_fragments/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(cause && damage > 0 && original_health - damage > 0 && prob(60-damage)) +/datum/reagent/blob/shifting_fragments/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && damage > 0 && B.obj_integrity - damage > 0 && prob(60-damage)) var/list/blobstopick = list() for(var/obj/structure/blob/OB in orange(1, B)) if((istype(OB, /obj/structure/blob/normal) || (istype(OB, /obj/structure/blob/shield) && prob(25))) && OB.overmind && OB.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) @@ -134,8 +133,8 @@ /datum/reagent/blob/blazing_oil/extinguish_reaction(obj/structure/blob/B) B.take_damage(rand(1, 3), BURN) -/datum/reagent/blob/blazing_oil/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(cause && damage_type == BURN) +/datum/reagent/blob/blazing_oil/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if(damage_type == BURN && (damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser")) for(var/turf/open/T in range(1, B)) var/obj/structure/blob/C = locate() in T if(!(C && C.overmind && C.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) && prob(80)) @@ -200,8 +199,8 @@ O.add_points(points) O << "Gained [points] resources from the zombification of [M]." -/datum/reagent/blob/zombifying_pods/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(!isnull(cause) && damage <= 20 && original_health - damage <= 0 && prob(30)) //if the cause isn't fire or a bomb, the damage is less than 21, we're going to die from that damage, 20% chance of a shitty spore. +/datum/reagent/blob/zombifying_pods/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && damage <= 20 && B.obj_integrity - damage <= 0 && prob(30)) //if the cause isn't fire or a bomb, the damage is less than 21, we're going to die from that damage, 20% chance of a shitty spore. B.visible_message("A spore floats free of the blob!") var/mob/living/simple_animal/hostile/blob/blobspore/weak/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(B.loc) BS.overmind = B.overmind @@ -236,8 +235,8 @@ if(M) M.apply_damage(0.6*reac_volume, OXY) -/datum/reagent/blob/energized_jelly/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(!isnull(cause) && original_health - damage <= 0 && prob(10)) +/datum/reagent/blob/energized_jelly/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && B.obj_integrity - damage <= 0 && prob(10)) spark_system.set_up(rand(2, 4), 0, B) spark_system.start() return ..() @@ -247,7 +246,7 @@ /datum/reagent/blob/energized_jelly/emp_reaction(obj/structure/blob/B, severity) var/damage = rand(30, 50) - severity * rand(10, 15) - B.take_damage(damage, BURN) + B.take_damage(damage, BURN, "energy") //does aoe brute damage when hitting targets, is immune to explosions /datum/reagent/blob/explosive_lattice @@ -278,12 +277,11 @@ else M.apply_damage(0.6*reac_volume, BRUTE) -/datum/reagent/blob/explosive_lattice/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(isnull(cause)) - if(damage_type == BRUTE) - return 0 //no-sell the explosion we do not take damage - if(damage_type == BURN) - return damage * 1.5 //take more from fire, tesla, and flashbangs +/datum/reagent/blob/explosive_lattice/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if(damage_flag == "bomb") + return 0 + else if(damage_flag != "melee" || damage_flag != "bullet" || damage_flag != "laser") + return damage * 1.5 return ..() //does brute, burn, and toxin damage, and cools targets down @@ -334,7 +332,7 @@ if(M) M.apply_damage(reac_volume, BURN) -/datum/reagent/blob/electromagnetic_web/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) +/datum/reagent/blob/electromagnetic_web/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) if(damage_type == BRUTE) //take full brute switch(B.brute_resist) if(0.5) @@ -345,8 +343,8 @@ return damage * 10 return damage * 1.25 //a laser will do 25 damage, which will kill any normal blob -/datum/reagent/blob/electromagnetic_web/death_reaction(obj/structure/blob/B, cause) - if(cause) +/datum/reagent/blob/electromagnetic_web/death_reaction(obj/structure/blob/B, damage_flag) + if(damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") empulse(B.loc, 1, 3) //less than screen range, so you can stand out of range to avoid it //does brute damage, bonus damage for each nearby blob, and spreads damage out @@ -371,15 +369,15 @@ B.blob_attack_animation(M) //show them they're getting a bad time M.apply_damage(0.3*reac_volume, BRUTE) -/datum/reagent/blob/synchronous_mesh/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(!isnull(cause)) //the cause isn't fire or bombs, so split the damage +/datum/reagent/blob/synchronous_mesh/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if(damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") //the cause isn't fire or bombs, so split the damage var/damagesplit = 1 //maximum split is 9, reducing the damage each blob takes to 11% but doing that damage to 9 blobs for(var/obj/structure/blob/C in orange(1, B)) if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && C.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) //if it doesn't have the same chemical or is a core or node, don't split damage to it damagesplit += 1 for(var/obj/structure/blob/C in orange(1, B)) if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && C.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) //only hurt blobs that have the same overmind chemical and aren't cores or nodes - C.take_damage(damage/damagesplit, CLONE, B, 0) + C.take_damage(damage/damagesplit, CLONE, 0, 0) return damage / damagesplit else return damage * 1.25 @@ -402,9 +400,9 @@ return 0 //the dead, and blob mobs, don't cause reactions M.adjustBruteLoss(0.8*reac_volume) -/datum/reagent/blob/reactive_spines/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(damage && damage_type == BRUTE && original_health - damage > 0) //is there any damage, is it brute, and will we be alive - if(isliving(cause)) +/datum/reagent/blob/reactive_spines/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if(damage && damage_type == BRUTE && B.obj_integrity - damage > 0) //is there any damage, is it brute, and will we be alive + if(damage_flag == "melee") B.visible_message("The blob retaliates, lashing out!") for(var/atom/A in range(1, B)) A.blob_act(B) @@ -437,13 +435,13 @@ if(M) M.adjustStaminaLoss(0.2*reac_volume) -/datum/reagent/blob/pressurized_slime/damage_reaction(obj/structure/blob/B, original_health, damage, damage_type, cause) - if(cause || damage_type != BURN) +/datum/reagent/blob/pressurized_slime/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) + if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") || damage_type != BURN) extinguisharea(B, damage) return ..() -/datum/reagent/blob/pressurized_slime/death_reaction(obj/structure/blob/B, cause) - if(!isnull(cause)) +/datum/reagent/blob/pressurized_slime/death_reaction(obj/structure/blob/B, damage_flag) + if(damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") B.visible_message("The blob ruptures, spraying the area with liquid!") extinguisharea(B, 50) diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 122e8840c81..12b2a5bff66 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -94,7 +94,7 @@ color = "#863333" // rgb: 175, 175, 0 /datum/reagent/consumable/banana/on_mob_life(mob/living/M) - if( ( istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || istype(M, /mob/living/carbon/monkey) ) + if((ishuman(M) && M.job in list("Clown") ) || ismonkey(M)) M.heal_bodypart_damage(1,1, 0) . = 1 ..() @@ -105,7 +105,7 @@ description = "Absolutely nothing." /datum/reagent/consumable/nothing/on_mob_life(mob/living/M) - if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) + if(ishuman(M) && M.job in list("Mime")) M.heal_bodypart_damage(1,1, 0) . = 1 ..() diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 939f77472cf..50058e1d230 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -12,7 +12,7 @@ /datum/reagent/drug/space_drugs/on_mob_life(mob/living/M) M.set_drugginess(15) - if(isturf(M.loc) && !istype(M.loc, /turf/open/space)) + if(isturf(M.loc) && !isspaceturf(M.loc)) if(M.canmove) if(prob(10)) step(M, pick(cardinal)) if(prob(7)) diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 643592ac50a..f5ec6ddb78b 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -161,7 +161,7 @@ for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(15,30)) if(reac_volume >= 1) // Make Freezy Foam and anti-fire grenades! - if(istype(T, /turf/open)) + if(isopenturf(T)) var/turf/open/OT = T OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=10, wet_time_to_add=reac_volume) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure. OT.air.temperature -= MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity() // reduces environment temperature by 5K per unit. @@ -173,7 +173,7 @@ color = "#B31008" // rgb: 179, 16, 8 /datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - if(!istype(M, /mob/living/carbon/human) && !istype(M, /mob/living/carbon/monkey)) + if(!ishuman(M) && !ismonkey(M)) return var/mob/living/carbon/victim = M @@ -193,7 +193,7 @@ safe_thing = victim.wear_mask //only humans can have helmets and glasses - if(istype(victim, /mob/living/carbon/human)) + if(ishuman(victim)) var/mob/living/carbon/human/H = victim if( H.head ) if ( H.head.flags_cover & MASKCOVERSEYES ) @@ -324,7 +324,7 @@ color = "#FF00FF" // rgb: 255, 0, 255 /datum/reagent/consumable/sprinkles/on_mob_life(mob/living/M) - if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) + if(ishuman(M) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) M.heal_bodypart_damage(1,1, 0) . = 1 ..() @@ -392,7 +392,7 @@ color = "#FFFFFF" // rgb: 0, 0, 0 /datum/reagent/consumable/flour/reaction_turf(turf/T, reac_volume) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/flour(T) reagentdecal.reagents.add_reagent("flour", reac_volume) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 7dc3b698f84..8aed11ceb15 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -119,21 +119,23 @@ M.apply_water() var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot && !istype(T, /turf/open/space)) + if(hotspot && !isspaceturf(T)) if(T.air) var/datum/gas_mixture/G = T.air G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),0) G.react() qdel(hotspot) + var/obj/effect/acid/A = (locate(/obj/effect/acid) in T) + if(A) + A.acid_level = max(A.acid_level - reac_volume*50, 0) /* * Water reaction to an object */ /datum/reagent/water/reaction_obj(obj/O, reac_volume) - if(istype(O)) - O.extinguish() - + O.extinguish() + O.acid_level = 0 // Monkey cube if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube)) var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O @@ -270,7 +272,7 @@ overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle. /datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) if(method == PATCH || method == VAPOR) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") @@ -335,7 +337,7 @@ /datum/reagent/spraytan/overdose_process(mob/living/M) metabolization_rate = 1 * REAGENTS_METABOLISM - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") // If they're human, turn em to the "orange" race, and give em spiky black hair N.skin_tone = "orange" @@ -346,52 +348,167 @@ N.regenerate_icons() if(prob(7)) if(N.w_uniform) - M.visible_message(pick("[M]'s collar pops up without warning.
", "[M] flexes [M.their_pronoun()] arms.")) + M.visible_message(pick("[M]'s collar pops up without warning.
", "[M] flexes [M.p_their()] arms.")) else - M.visible_message("[M] [M.their_pronoun()] their arms.") + M.visible_message("[M] [M.p_their()] their arms.") if(prob(10)) M.say(pick("Check these sweet biceps bro!", "Deal with it.", "CHUG! CHUG! CHUG! CHUG!", "Winning!", "NERDS!", "My name is John and I hate every single one of you.")) ..() return -/datum/reagent/slimetoxin - name = "Mutation Toxin" - id = "mutationtoxin" - description = "A corruptive toxin produced by slimes." - color = "#13BC5E" // rgb: 19, 188, 94 - -/datum/reagent/unstableslimetoxin - name = "Unstable Mutation Toxin" - id = "unstablemutationtoxin" - description = "An unstable and unpredictable corruptive toxin produced by slimes." +/datum/reagent/stableslimetoxin + name = "Stable Mutation Toxin" + id = "stablemutationtoxin" + description = "A humanizing toxin produced by slimes." color = "#5EFF3B" //RGB: 94, 255, 59 metabolization_rate = INFINITY //So it instantly removes all of itself + var/datum/species/race = /datum/species/human + var/mutationtext = "The pain subsides. You feel... human." -/datum/reagent/unstableslimetoxin/on_mob_life(mob/living/carbon/human/H) +/datum/reagent/stableslimetoxin/on_mob_life(mob/living/carbon/human/H) ..() H << "You crumple in agony as your flesh wildly morphs into new forms!" - H.visible_message("[H] falls to the ground and screams as [H.their_pronoun()] skin bubbles and froths!") //'froths' sounds painful when used with SKIN. + H.visible_message("[H] falls to the ground and screams as [H.p_their()] skin bubbles and froths!") //'froths' sounds painful when used with SKIN. H.Weaken(3, 0) spawn(30) if(!H || qdeleted(H)) return - var/list/possible_morphs = list() - for(var/type in subtypesof(/datum/species)) - var/datum/species/S = type - if(initial(S.blacklisted)) - continue - possible_morphs += S var/current_species = H.dna.species.type - var/datum/species/mutation = pick(possible_morphs) + var/datum/species/mutation = race if(mutation && mutation != current_species) - H << "The pain subsides. You feel... different." + H << mutationtext H.set_species(mutation) else H << "The pain vanishes suddenly. You feel no different." return 1 +/datum/reagent/stableslimetoxin/classic //The one from plasma on green slimes + name = "Mutation Toxin" + id = "mutationtoxin" + description = "A corruptive toxin produced by slimes." + color = "#13BC5E" // rgb: 19, 188, 94 + race = /datum/species/jelly/slime + mutationtext = "The pain subsides. Your whole body feels like slime." + +/datum/reagent/stableslimetoxin/lizard + name = "Lizard Mutation Toxin" + id = "lizardmutationtoxin" + description = "A lizarding toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/lizard + mutationtext = "The pain subsides. You feel... scaly." + +/datum/reagent/stableslimetoxin/fly + name = "Fly Mutation Toxin" + id = "flymutationtoxin" + description = "An insectifying toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/fly + mutationtext = "The pain subsides. You feel... buzzy." + +/datum/reagent/stableslimetoxin/pod + name = "Podperson Mutation Toxin" + id = "podmutationtoxin" + description = "A vegetalizing toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/pod + mutationtext = "The pain subsides. You feel... plantlike." + +/datum/reagent/stableslimetoxin/jelly + name = "Imperfect Mutation Toxin" + id = "jellymutationtoxin" + description = "An jellyfying toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/jelly + mutationtext = "The pain subsides. You feel... wobbly." + +/datum/reagent/stableslimetoxin/golem + name = "Golem Mutation Toxin" + id = "golemmutationtoxin" + description = "A crystal toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/golem/random + mutationtext = "The pain subsides. You feel... rocky." + +/datum/reagent/stableslimetoxin/abductor + name = "Abductor Mutation Toxin" + id = "abductormutationtoxin" + description = "An alien toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/abductor + mutationtext = "The pain subsides. You feel... alien." + +/datum/reagent/stableslimetoxin/android + name = "Android Mutation Toxin" + id = "androidmutationtoxin" + description = "A robotic toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/android + mutationtext = "The pain subsides. You feel... artificial." + + +//BLACKLISTED RACES +/datum/reagent/stableslimetoxin/skeleton + name = "Skeleton Mutation Toxin" + id = "skeletonmutationtoxin" + description = "A scary toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/skeleton + mutationtext = "The pain subsides. You feel... spooky." + +/datum/reagent/stableslimetoxin/zombie + name = "Zombie Mutation Toxin" + id = "zombiemutationtoxin" + description = "An undead toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/zombie //Not the infectious kind. The days of xenobio zombie outbreaks are long past. + mutationtext = "The pain subsides. You feel... undead." + +/datum/reagent/stableslimetoxin/ash + name = "Ash Mutation Toxin" + id = "ashmutationtoxin" + description = "An ashen toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/lizard/ashwalker + mutationtext = "The pain subsides. You feel... savage." + + +//DANGEROUS RACES +/datum/reagent/stableslimetoxin/shadow + name = "Shadow Mutation Toxin" + id = "shadowmutationtoxin" + description = "A dark toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/shadow + mutationtext = "The pain subsides. You feel... darker." + +/datum/reagent/stableslimetoxin/plasma + name = "Plasma Mutation Toxin" + id = "plasmamutationtoxin" + description = "A plasma-based toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + race = /datum/species/plasmaman + mutationtext = "The pain subsides. You feel... flammable." + +/datum/reagent/stableslimetoxin/unstable //PSYCH + name = "Unstable Mutation Toxin" + id = "unstablemutationtoxin" + description = "An unstable and unpredictable corruptive toxin produced by slimes." + color = "#5EFF3B" //RGB: 94, 255, 59 + mutationtext = "The pain subsides. You feel... different." + +/datum/reagent/stableslimetoxin/unstable/on_mob_life(mob/living/carbon/human/H) + var/list/possible_morphs = list() + for(var/type in subtypesof(/datum/species)) + var/datum/species/S = type + if(initial(S.blacklisted)) + continue + possible_morphs += S + race = pick(possible_morphs) + ..() + /datum/reagent/mulligan name = "Mulligan Toxin" id = "mulligan" @@ -500,7 +617,7 @@ color = "#484848" // rgb: 72, 72, 72 /datum/reagent/mercury/on_mob_life(mob/living/M) - if(M.canmove && istype(M.loc, /turf/open/space)) + if(M.canmove && isspaceturf(M.loc)) step(M, pick(cardinal)) if(prob(5)) M.emote(pick("twitch","drool","moan")) @@ -522,7 +639,7 @@ color = "#1C1300" // rgb: 30, 20, 0 /datum/reagent/carbon/reaction_turf(turf/T, reac_volume) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/dirt/D = locate() in T.contents if(!D) new /obj/effect/decal/cleanable/dirt(T) @@ -573,7 +690,7 @@ color = "#808080" // rgb: 128, 128, 128 /datum/reagent/lithium/on_mob_life(mob/living/M) - if(M.canmove && istype(M.loc, /turf/open/space)) + if(M.canmove && isspaceturf(M.loc)) step(M, pick(cardinal)) if(prob(5)) M.emote(pick("twitch","drool","moan")) @@ -598,7 +715,7 @@ /datum/reagent/radium/reaction_turf(turf/T, reac_volume) if(reac_volume >= 3) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents if(!GG) GG = new/obj/effect/decal/cleanable/greenglow(T) @@ -635,7 +752,7 @@ ..() /datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(M.has_bane(BANE_IRON)) //If the target is weak to cold iron, then poison them. if(holder && holder.chem_temp < 100) // COLD iron. @@ -657,7 +774,7 @@ color = "#D0D0D0" // rgb: 208, 208, 208 /datum/reagent/silver/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(M.has_bane(BANE_SILVER)) M.reagents.add_reagent("toxin", reac_volume) @@ -676,7 +793,7 @@ /datum/reagent/uranium/reaction_turf(turf/T, reac_volume) if(reac_volume >= 3) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents if(!GG) GG = new/obj/effect/decal/cleanable/greenglow(T) @@ -703,7 +820,7 @@ color = "#660000" // rgb: 102, 0, 0 /datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(method == TOUCH || method == VAPOR) M.adjust_fire_stacks(reac_volume / 10) @@ -741,7 +858,7 @@ if(method == TOUCH || method == VAPOR) if(iscarbon(M)) var/mob/living/carbon/C = M - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.lip_style) H.lip_style = null diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm index d2958b475da..5c8d19cb960 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm @@ -7,7 +7,7 @@ color = "#550000" /datum/reagent/thermite/reaction_turf(turf/T, reac_volume) - if(reac_volume >= 1 && istype(T, /turf/closed/wall)) + if(reac_volume >= 1 && iswallturf(T)) var/turf/closed/wall/Wall = T if(istype(Wall, /turf/closed/wall/r_wall)) Wall.thermite = Wall.thermite+(reac_volume*2.5) @@ -54,17 +54,17 @@ var/turf/open/floor/plating/F = T if(prob(10 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed F.ChangeTurf(F.baseturf) - if(istype(T, /turf/open/floor/)) + if(isfloorturf(T)) var/turf/open/floor/F = T if(prob(reac_volume)) F.make_plating() else if(prob(reac_volume)) F.burn_tile() - if(istype(F, /turf/open/floor/)) + if(isfloorturf(F)) for(var/turf/turf in range(1,F)) if(!locate(/obj/effect/hotspot) in turf) PoolOrNew(/obj/effect/hotspot, F) - if(istype(T, /turf/closed/wall/)) + if(iswallturf(T)) var/turf/closed/wall/W = T if(prob(reac_volume)) W.ChangeTurf(/turf/open/floor/plating) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 69255dee31c..f6da5758e77 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -74,7 +74,7 @@ return /datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(method == TOUCH || method == VAPOR) M.adjust_fire_stacks(reac_volume / 5) @@ -520,12 +520,12 @@ M.adjustOxyLoss(rand(5,25), 0) . = 1 if(3) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.heart_attack) H.heart_attack = 1 // rip in pepperoni if(H.stat == CONSCIOUS) - H.visible_message("[H] clutches at [H.their_pronoun()] chest as if [H.their_pronoun()] heart stopped!") + H.visible_message("[H] clutches at [H.p_their()] chest as if [H.p_their()] heart stopped!") else H.losebreath += 10 H.adjustOxyLoss(rand(5,25), 0) @@ -679,7 +679,7 @@ if(method == INJECT) C.adjustBruteLoss(1.5 * min(6*toxpwr, reac_volume * toxpwr)) return - C.acid_act(acidpwr, toxpwr, reac_volume) + C.acid_act(acidpwr, reac_volume) /datum/reagent/toxin/acid/reaction_obj(obj/O, reac_volume) if(istype(O.loc, /mob)) //handled in human acid_act() @@ -691,8 +691,7 @@ if (!istype(T)) return reac_volume = round(reac_volume,0.1) - for(var/obj/O in T) - O.acid_act(acidpwr, reac_volume) + T.acid_act(acidpwr, reac_volume) /datum/reagent/toxin/acid/fluacid name = "Fluorosulfuric acid" diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index ee027a5d23b..f3e46619d71 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -107,6 +107,98 @@ required_reagents = list("carbon" = 1, "oxygen" = 2) required_temp = 777 // pure carbon isn't especially reactive. +////////////////////////////////// Mutation Toxins /////////////////////////////////// + +/datum/chemical_reaction/stable_mutation_toxin + name = "Stable Mutation Toxin" + id = "stablemutationtoxin" + results = list("stablemutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "blood" = 1) //classic + +/datum/chemical_reaction/lizard_mutation_toxin + name = "Lizard Mutation Toxin" + id = "lizardmutationtoxin" + results = list("lizardmutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "radium" = 1) //mutant + +/datum/chemical_reaction/fly_mutation_toxin + name = "Fly Mutation Toxin" + id = "flymutationtoxin" + results = list("flymutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "mutagen" = 1) //VERY mutant + +/datum/chemical_reaction/jelly_mutation_toxin + name = "Imperfect Mutation Toxin" + id = "jellymutationtoxin" + results = list("jellymutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "slimejelly" = 1) //why would you even make this + +/datum/chemical_reaction/abductor_mutation_toxin + name = "Abductor Mutation Toxin" + id = "abductormutationtoxin" + results = list("abductormutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "morphine" = 1) + +/datum/chemical_reaction/android_mutation_toxin + name = "Android Mutation Toxin" + id = "androidmutationtoxin" + results = list("androidmutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "teslium" = 1) //beep boop + +/datum/chemical_reaction/pod_mutation_toxin + name = "Podperson Mutation Toxin" + id = "podmutationtoxin" + results = list("podmutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "eznutriment" = 1) //plant food + +/datum/chemical_reaction/golem_mutation_toxin + name = "Golem Mutation Toxin" + id = "golemmutationtoxin" + results = list("golemmutationtoxin" = 1) + required_reagents = list("unstablemutationtoxin" = 1, "silver" = 1) //not too hard to get but also not just there in xenobio + + +//BLACKLISTED RACES +/datum/chemical_reaction/skeleton_mutation_toxin + name = "Skeleton Mutation Toxin" + id = "skeletonmutationtoxin" + results = list("skeletonmutationtoxin" = 1) + required_reagents = list("amutationtoxin" = 1, "milk" = 1) //good for yer bones + +/datum/chemical_reaction/zombie_mutation_toxin + name = "Zombie Mutation Toxin" + id = "zombiemutationtoxin" + results = list("zombiemutationtoxin" = 1) + required_reagents = list("amutationtoxin" = 1, "toxin" = 1) + +/datum/chemical_reaction/ash_mutation_toxin //ash lizard + name = "Ash Mutation Toxin" + id = "ashmutationtoxin" + results = list("ashmutationtoxin" = 1) + required_reagents = list("amutationtoxin" = 1, "lizardmutationtoxin" = 1, "ash" = 1) + + +//DANGEROUS RACES +/datum/chemical_reaction/plasma_mutation_toxin + name = "Plasma Mutation Toxin" + id = "plasmamutationtoxin" + results = list("plasmamutationtoxin" = 1) + required_reagents = list("skeletonmutationtoxin" = 1, "plasma" = 1, "uranium" = 1) //this is very fucking powerful, so it's hard to make + +/datum/chemical_reaction/shadow_mutation_toxin + name = "Shadow Mutation Toxin" + id = "shadowmutationtoxin" + results = list("shadowmutationtoxin" = 1) + required_reagents = list("amutationtoxin" = 1, "liquid_dark_matter" = 1, "holywater" = 1) + +//Technically a mutation toxin +/datum/chemical_reaction/mulligan + name = "Mulligan" + id = "mulligan" + results = list("mulligan" = 1) + required_reagents = list("humanmutationtoxin" = 1, "mutagen" = 1) + + ////////////////////////////////// VIROLOGY ////////////////////////////////////////// /datum/chemical_reaction/virus_food diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 9831f73bc60..b126e44344b 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -233,6 +233,17 @@ P.loc = get_turf(holder.my_atom) +/datum/chemical_reaction/slimefoam + name = "Slime Foam" + id = "m_foam" + results = list("fluorosurfactant" = 20, "water" = 20) + required_reagents = list("water" = 5) + required_container = /obj/item/slime_extract/blue + required_other = 1 + +/datum/chemical_reaction/slimefoam/on_reaction(datum/reagents/holder) + feedback_add_details("slime_cores_used","[type]") + //Dark Blue /datum/chemical_reaction/slimefreeze @@ -289,15 +300,27 @@ feedback_add_details("slime_cores_used","[type]") var/turf/TU = get_turf(holder.my_atom) TU.visible_message("The slime extract begins to vibrate adorably!") - addtimer(src, "burn", 50, FALSE, holder) + addtimer(src, "slime_burn", 50, FALSE, holder) -/datum/chemical_reaction/slimefire/proc/burn(datum/reagents/holder) +/datum/chemical_reaction/slimefire/proc/slime_burn(datum/reagents/holder) if(holder && holder.my_atom) var/turf/open/T = get_turf(holder.my_atom) if(istype(T)) T.atmos_spawn_air("plasma=50;TEMP=1000") + +/datum/chemical_reaction/slimesmoke + name = "Slime Smoke" + id = "m_smoke" + results = list("phosphorus" = 10, "potassium" = 10, "sugar" = 10) + required_reagents = list("water" = 5) + required_container = /obj/item/slime_extract/orange + required_other = 1 + +/datum/chemical_reaction/slimesmoke/on_reaction(datum/reagents/holder) + feedback_add_details("slime_cores_used","[type]") + //Yellow /datum/chemical_reaction/slimeoverload @@ -480,6 +503,18 @@ if(holder && holder.my_atom) explosion(get_turf(holder.my_atom), 1 ,3, 6) + +/datum/chemical_reaction/slimecornoil + name = "Slime Corn Oil" + id = "m_cornoil" + results = list("cornoil" = 10) + required_reagents = list("blood" = 1) + required_container = /obj/item/slime_extract/oil + required_other = 1 + +/datum/chemical_reaction/slimecornoil/on_reaction(datum/reagents/holder) + feedback_add_details("slime_cores_used","[type]") + //Light Pink /datum/chemical_reaction/slimepotion2 name = "Slime Potion 2" @@ -549,7 +584,6 @@ P.loc = get_turf(holder.my_atom) - /datum/chemical_reaction/slime_territory name = "Slime Territory" id = "s_territory" @@ -625,6 +659,22 @@ if(P) P.loc = get_turf(holder.my_atom) + +/datum/chemical_reaction/slimecrayon + name = "Slime Crayon" + id = "s_crayon" + required_reagents = list("blood" = 1) + required_container = /obj/item/slime_extract/pyrite + required_other = 1 + +/datum/chemical_reaction/slimecrayon/on_reaction(datum/reagents/holder) + feedback_add_details("slime_cores_used","[type]") + var/list/crayons = difflist(subtypesof(/obj/item/toy/crayon),typesof(/obj/item/toy/crayon/spraycan)) + var/chosen = pick(crayons) + var/obj/P = new chosen + if(P) + P.loc = get_turf(holder.my_atom) + //Rainbow :o) /datum/chemical_reaction/slimeRNG name = "Random Core" diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 1c54b6f22ce..3c98b775e44 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -62,7 +62,7 @@ else if(C.is_mouth_covered(mask_only = 1)) covered = "mask" if(covered) - var/who = (isnull(user) || eater == user) ? "your" : "[eater.their_pronoun()]" + var/who = (isnull(user) || eater == user) ? "your" : "[eater.p_their()]" user << "You have to remove [who] [covered] first!" return 0 return 1 @@ -73,7 +73,7 @@ R.on_ex_act() ..() -/obj/item/weapon/reagent_containers/fire_act() +/obj/item/weapon/reagent_containers/fire_act(exposed_temperature, exposed_volume) reagents.chem_temp += 30 reagents.handle_reactions() ..() diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 735d0e13cca..a9057ac6f19 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -74,7 +74,7 @@ Borg Hypospray R.add_reagent(reagent, 30) /obj/item/weapon/reagent_containers/borghypo/proc/regenerate_reagents() - if(isrobot(src.loc)) + if(iscyborg(src.loc)) var/mob/living/silicon/robot/R = src.loc if(R && R.cell) for(var/i in 1 to reagent_ids.len) @@ -162,7 +162,7 @@ Borg Shaker return //Can't inject stuff with a shaker, can we? //not with that attitude /obj/item/weapon/reagent_containers/borghypo/borgshaker/regenerate_reagents() - if(isrobot(src.loc)) + if(iscyborg(src.loc)) var/mob/living/silicon/robot/R = src.loc if(R && R.cell) for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious. diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index 8bd874837df..61bd6b78ff6 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -19,7 +19,7 @@ update_icon() /obj/item/weapon/reagent_containers/glass/bottle/update_icon() - overlays.Cut() + cut_overlays() if(reagents.total_volume) var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]-10") diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 469be2bbbb2..b6edef2315d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -5,6 +5,7 @@ volume = 50 flags = OPENCONTAINER spillable = 1 + resistance_flags = ACID_PROOF /obj/item/weapon/reagent_containers/glass/attack(mob/M, mob/user, obj/target) @@ -212,7 +213,7 @@ /obj/item/weapon/reagent_containers/glass/beaker/large/epinephrine name = "epinephrine reserve tank" list_reagents = list("epinephrine" = 50) - + /obj/item/weapon/reagent_containers/glass/beaker/synthflesh list_reagents = list("synthflesh" = 50) @@ -230,7 +231,8 @@ flags = OPENCONTAINER flags_inv = HIDEHAIR slot_flags = SLOT_HEAD - armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) //Weak melee protection, because you can wear it on your head + resistance_flags = 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_equipment_priority = list( \ slot_back, slot_wear_id,\ slot_w_uniform, slot_wear_suit,\ diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index b258903653e..9f959083c00 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -81,7 +81,7 @@ ..() update_icon() spawn(80) - if(isrobot(user) && !reagents.total_volume) + if(iscyborg(user) && !reagents.total_volume) var/mob/living/silicon/robot/R = user if(R.cell.use(100)) reagents.add_reagent_list(list_reagents) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 962649807d4..7cc303bc814 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -6,28 +6,16 @@ density = 1 anchored = 0 pressure_resistance = 2*ONE_ATMOSPHERE + obj_integrity = 300 + 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 -/obj/structure/reagent_dispensers/ex_act(severity, target) - switch(severity) - if(1) +/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() - return - if(2) - if (prob(50)) - boom() - return - if(3) - if (prob(5)) - boom() - return - else - return - -/obj/structure/reagent_dispensers/blob_act(obj/structure/blob/B) - if(prob(50)) - boom() /obj/structure/reagent_dispensers/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers)) @@ -53,21 +41,18 @@ chem_splash(loc, 5, list(reagents)) qdel(src) +/obj/structure/reagent_dispensers/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(!disassembled) + boom() + else + qdel(src) + /obj/structure/reagent_dispensers/watertank name = "water tank" desc = "A water tank." icon_state = "water" -/obj/structure/reagent_dispensers/bullet_act(obj/item/projectile/Proj) - ..() - if(tank_volume && istype(Proj) && !Proj.nodamage && ((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))) - boom() - -/obj/structure/reagent_dispensers/watertank/blob_act(obj/structure/blob/B) - if(prob(50)) - PoolOrNew(/obj/effect/particle_effect/water, loc) - qdel(src) - /obj/structure/reagent_dispensers/watertank/high name = "high-capacity water tank" desc = "A highly-pressurized water tank made to hold gargantuan amounts of water.." @@ -80,15 +65,6 @@ icon_state = "fuel" reagent_id = "welding_fuel" -/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/Proj) - ..() - if(istype(Proj) && !Proj.nodamage && ((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE))) - var/boom_message = "[key_name_admin(Proj.firer)] triggered a fueltank explosion via projectile." - bombers += boom_message - message_admins(boom_message) - log_game("[key_name(Proj.firer)] triggered a fueltank explosion via projectile.") - boom() - /obj/structure/reagent_dispensers/fueltank/boom() explosion(get_turf(src), 0, 1, 5, flame_range = 5) qdel(src) @@ -99,13 +75,23 @@ /obj/structure/reagent_dispensers/fueltank/ex_act() boom() -/obj/structure/reagent_dispensers/fueltank/fire_act() +/obj/structure/reagent_dispensers/fueltank/fire_act(exposed_temperature, exposed_volume) boom() /obj/structure/reagent_dispensers/fueltank/tesla_act() ..() //extend the zap boom() +/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/P) + ..() + if(!qdeleted(src)) //wasn't deleted by the projectile's effects. + if(!P.nodamage && ((P.damage_type == BURN) || (P.damage_type == BRUTE))) + var/boom_message = "[key_name_admin(P.firer)] triggered a fueltank explosion via projectile." + bombers += boom_message + message_admins(boom_message) + log_game("[key_name(P.firer)] triggered a fueltank explosion via projectile.") + boom() + /obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/living/user, params) if(istype(I, /obj/item/weapon/weldingtool)) if(!reagents.has_reagent("welding_fuel")) @@ -176,6 +162,8 @@ /obj/structure/reagent_dispensers/beerkeg/blob_act(obj/structure/blob/B) explosion(src.loc,0,3,5,7,10) + if(!qdeleted(src)) + qdel(src) /obj/structure/reagent_dispensers/virusfood diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index c6fe91dace4..1969ece4830 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -297,7 +297,7 @@ id = C.id /obj/item/conveyor_construct/afterattack(atom/A, mob/user, proximity) - if(!proximity || user.stat || !istype(A, /turf/open/floor) || istype(A, /area/shuttle)) + if(!proximity || user.stat || !isfloorturf(A) || istype(A, /area/shuttle)) return var/cdir = get_dir(A, user) if(A == user.loc) @@ -321,7 +321,7 @@ id = rand() //this couldn't possibly go wrong /obj/item/conveyor_switch_construct/afterattack(atom/A, mob/user, proximity) - if(!proximity || user.stat || !istype(A, /turf/open/floor) || istype(A, /area/shuttle)) + if(!proximity || user.stat || !isfloorturf(A) || istype(A, /area/shuttle)) return var/found = 0 for(var/obj/machinery/conveyor/C in view()) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 6f41c5fb43b..8982370ff3a 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -11,6 +11,8 @@ density = 0 pressure_resistance = 5*ONE_ATMOSPHERE level = 2 + obj_integrity = 200 + max_integrity = 200 var/ptype = 0 var/dpdir = 0 // directions as disposalpipe @@ -182,11 +184,11 @@ nicetype = "pipe" var/turf/T = loc - if(T.intact && istype(T, /turf/open/floor)) + if(T.intact && isfloorturf(T)) user << "You can only attach the [nicetype] if the floor plating is removed!" return - if(!ispipe && istype(T, /turf/closed/wall)) + if(!ispipe && iswallturf(T)) user << "You can't build [nicetype]s on walls, only disposal pipes!" return diff --git a/code/modules/recycling/disposal-structures.dm b/code/modules/recycling/disposal-structures.dm index e31ecf4beff..0389b87fd99 100644 --- a/code/modules/recycling/disposal-structures.dm +++ b/code/modules/recycling/disposal-structures.dm @@ -6,6 +6,7 @@ /obj/structure/disposalholder invisibility = INVISIBILITY_MAXIMUM + 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 @@ -123,6 +124,8 @@ /obj/structure/disposalholder/allow_drop() return 1 + + // Disposal pipes /obj/structure/disposalpipe @@ -135,7 +138,9 @@ level = 1 // underfloor only var/dpdir = 0 // bitmask of pipe directions dir = 0// dir will contain dominant direction for junction pipes - var/health = 10 // health points 0-10 + obj_integrity = 200 + max_integrity = 200 + armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 90, acid = 30) layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes var/base_icon_state // initial icon state on map var/obj/structure/disposalconstruct/stored @@ -178,22 +183,9 @@ /obj/structure/disposalpipe/Destroy() var/obj/structure/disposalholder/H = locate() in src if(H) - // holder was present H.active = 0 var/turf/T = src.loc - if(T.density) - // deleting pipe is inside a dense turf (wall) - // this is unlikely, but just dump out everything into the turf in case - - for(var/atom/movable/AM in H) - AM.forceMove(src.loc) - AM.pipe_eject(0) - qdel(H) - return ..() - - // otherwise, do normal expel from turf - else - expel(H, T, 0) + expel(H, T, 0) return ..() // returns the direction of the next pipe object, given the entrance dir @@ -228,7 +220,7 @@ // update the icon_state to reflect hidden status /obj/structure/disposalpipe/proc/update() var/turf/T = src.loc - hide(T.intact && !istype(T,/turf/open/space)) // space never hides pipes + hide(T.intact && !isspaceturf(T)) // space never hides pipes // hide called by levelupdate if turf intact status changes // change visibility status and force update of icon @@ -255,72 +247,34 @@ /obj/structure/disposalpipe/proc/expel(obj/structure/disposalholder/H, turf/T, direction) var/turf/target + var/eject_range = 5 + var/turf/open/floor/floorturf - if(istype(T, /turf/open/floor)) //intact floor, pop the tile - var/turf/open/floor/myturf = T - if(myturf.floor_tile) - PoolOrNew(myturf.floor_tile, T) - myturf.make_plating() + if(isfloorturf(T)) //intact floor, pop the tile + floorturf = T + if(floorturf.floor_tile) + PoolOrNew(floorturf.floor_tile, T) + floorturf.make_plating() if(direction) // direction is specified - if(istype(T, /turf/open/space)) // if ended in space, then range is unlimited + if(isspaceturf(T)) // if ended in space, then range is unlimited target = get_edge_target_turf(T, direction) else // otherwise limit to 10 tiles target = get_ranged_target_turf(T, direction, 10) - playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0) - if(H) - for(var/atom/movable/AM in H) - AM.forceMove(src.loc) - AM.pipe_eject(direction) - AM.throw_at_fast(target, 10, 1) + eject_range = 10 - else // no specified direction, so throw in random direction + else if(floorturf) + target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5)) - playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0) - if(H) - for(var/atom/movable/AM in H) - target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5)) - AM.forceMove(src.loc) - AM.pipe_eject(0) - AM.throw_at_fast(target, 5, 1) + playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0) + for(var/atom/movable/AM in H) + AM.forceMove(src.loc) + AM.pipe_eject(direction) + if(target) + AM.throw_at_fast(target, eject_range, 1) H.vent_gas(T) 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(remains = 0) - if(remains) - for(var/D in cardinal) - if(D & dpdir) - var/obj/structure/disposalpipe/broken/P = new(src.loc) - P.setDir(D) - - src.invisibility = INVISIBILITY_MAXIMUM // make invisible (since we won't delete the pipe immediately) - var/obj/structure/disposalholder/H = locate() in src - if(H) - // holder was present - H.active = 0 - var/turf/T = src.loc - if(T.density) - // broken pipe is inside a dense turf (wall) - // this is unlikely, but just dump out everything into the turf in case - - for(var/atom/movable/AM in H) - AM.forceMove(src.loc) - AM.pipe_eject(0) - qdel(H) - return - - // otherwise, do normal expel from turf - if(H) - expel(H, T, 0) - - spawn(2) // delete pipe after 2 ticks to ensure expel proc finished - qdel(src) // pipe affected by explosion @@ -330,28 +284,20 @@ var/obj/structure/disposalholder/H = locate() in src if(H) H.contents_explosion(severity, target) - - switch(severity) - if(1) - broken(0) - return - if(2) - health -= rand(5,15) - healthcheck() - return - if(3) - health -= rand(0,15) - healthcheck() - return + ..() -// test health for brokenness -/obj/structure/disposalpipe/proc/healthcheck() - if(health < -2) - broken(0) - else if(health<1) - broken(1) - return +/obj/structure/disposalpipe/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 10) + return 0 + . = ..() + +/obj/structure/disposalpipe/fire_act(exposed_temperature, exposed_volume) + var/turf/T = src.loc + if(T && T.intact) //protected from fire when hidden behind a floor. + return + ..() + //attack by item //weldingtool: unfasten and convert to obj/disposalconstruct @@ -370,7 +316,7 @@ // check if anything changed over 2 seconds if(do_after(user,30, target = src)) if(!src || !W.isOn()) return - Deconstruct() + deconstruct() user << "You slice the disposal pipe." else return ..() @@ -380,20 +326,28 @@ . = 1 // called when pipe is cut with welder -/obj/structure/disposalpipe/Deconstruct() - if(stored) - var/turf/T = loc - stored.loc = T - transfer_fingerprints_to(stored) - stored.setDir(dir) - stored.density = 0 - stored.anchored = 1 - stored.update_icon() - ..() +/obj/structure/disposalpipe/deconstruct(disassembled = TRUE) + if(!(flags & NODECONSTRUCT)) + if(disassembled) + if(stored) + var/turf/T = loc + stored.loc = T + transfer_fingerprints_to(stored) + stored.setDir(dir) + stored.density = 0 + stored.anchored = 1 + stored.update_icon() + else + for(var/D in cardinal) + if(D & dpdir) + var/obj/structure/disposalpipe/broken/P = new(src.loc) + P.setDir(D) + qdel(src) + /obj/structure/disposalpipe/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) - Deconstruct() + deconstruct() // *** TEST verb //client/verb/dispstop() @@ -679,11 +633,10 @@ /obj/structure/disposalpipe/broken/New() ..() update() - return // the disposal outlet machine -/obj/structure/disposalpipe/broken/Deconstruct() +/obj/structure/disposalpipe/broken/deconstruct() qdel(src) /obj/structure/disposaloutlet diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm index ab2da6b7189..fd9f6866d58 100644 --- a/code/modules/recycling/disposal-unit.dm +++ b/code/modules/recycling/disposal-unit.dm @@ -8,6 +8,9 @@ anchored = 1 density = 1 on_blueprints = TRUE + armor = list(melee = 25, bullet = 10, laser = 10, energy = 100, bomb = 0, bio = 100, rad = 100, fire = 90, acid = 30) + obj_integrity = 200 + max_integrity = 200 var/datum/gas_mixture/air_contents // internal reservoir var/mode = 1 // mode -1=screws removed 0=off 1=charging 2=charged var/flush = 0 // true if flush handle is pulled @@ -54,7 +57,7 @@ /obj/machinery/disposal/singularity_pull(S, current_size) if(current_size >= STAGE_FIVE) - Deconstruct() + deconstruct() /obj/machinery/disposal/initialize() // this will get a copy of the air turf and take a SEND PRESSURE amount of air from it @@ -91,7 +94,7 @@ if(!W.isOn()) return user << "You slice the floorweld off \the [src]." - Deconstruct() + deconstruct() return if(user.a_intent != "harm") @@ -118,7 +121,7 @@ /obj/machinery/disposal/proc/stuff_mob_in(mob/living/target, mob/living/user) if(!iscarbon(user) && !user.ventcrawler) //only carbon and ventcrawlers can climb into disposal by themselves. return - if(!istype(user.loc, /turf/)) //No magically doing it from inside closets + if(!isturf(user.loc)) //No magically doing it from inside closets return if(target.buckled || target.has_buckled_mobs()) return @@ -146,10 +149,6 @@ target.LAssailant = user update_icon() -// can breath normally in the disposal -/obj/machinery/disposal/alter_health() - return get_turf(src) - /obj/machinery/disposal/relaymove(mob/user) attempt_escape(user) @@ -195,14 +194,6 @@ */ interact(user, 0) -// hostile mob escape from disposals -/obj/machinery/disposal/attack_animal(mob/living/simple_animal/M) - if(M.environment_smash) - M.do_attack_animation(src) - visible_message("[M.name] smashes \the [src] apart!") - qdel(src) - return - // eject the contents of the disposal unit /obj/machinery/disposal/proc/eject() var/turf/T = get_turf(src) @@ -265,14 +256,15 @@ H.vent_gas(loc) qdel(H) -/obj/machinery/disposal/Deconstruct() - if(stored) - var/turf/T = loc - stored.loc = T - src.transfer_fingerprints_to(stored) - stored.anchored = 0 - stored.density = 1 - stored.update_icon() +/obj/machinery/disposal/deconstruct() + if(!(flags & NODECONSTRUCT)) + if(stored) + var/turf/T = loc + stored.loc = T + src.transfer_fingerprints_to(stored) + stored.anchored = 0 + stored.density = 1 + stored.update_icon() ..() //How disposal handles getting a storage dump from a storage object @@ -516,7 +508,7 @@ if(WEST) if(AM.loc.x != loc.x-1) return - if(istype(AM, /obj)) + if(isobj(AM)) var/obj/O = AM O.loc = src else if(istype(AM, /mob)) diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 2feff376587..83ec00b423f 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -114,7 +114,6 @@ var/global/list/obj/machinery/message_server/message_servers = list() rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth) /obj/machinery/message_server/attack_hand(mob/user) -// user << "\blue There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few Centcom delays." user << "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]" active = !active update_icon() diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 339d468a7df..156de6e3c46 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -107,5 +107,5 @@ //we eject the loaded item when deconstructing the machine /obj/machinery/r_n_d/on_deconstruction() if(loaded_item) - loaded_item.loc = loc + loaded_item.forceMove(loc) ..() diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 7545803b9e0..cfc64d6ab01 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/machines/research.dmi' icon_state = "server" var/datum/research/files - var/health = 100 + var/heat_health = 100 var/list/id_with_upload = list() //List of R&D consoles with upload to server access. var/list/id_with_download = list() //List of R&D consoles with download from server access. var/id_with_upload_string = "" //String versions for easy editing in map editor. @@ -56,12 +56,12 @@ var/datum/gas_mixture/environment = loc.return_air() switch(environment.temperature) if(0 to T0C) - health = min(100, health + 1) + heat_health = min(100, heat_health + 1) if(T0C to (T20C + 20)) - health = Clamp(health, 0, 100) + heat_health = Clamp(heat_health, 0, 100) if((T20C + 20) to (T0C + 70)) - health = max(0, health - 1) - if(health <= 0) + heat_health = max(0, heat_health - 1) + if(heat_health <= 0) /*griefProtection() This seems to get called twice before running any code that deletes/damages the server or it's files anwyay. refreshParts and the hasReq procs that get called by this are laggy and do not need to be called by every server on the map every tick */ var/updateRD = 0 @@ -84,18 +84,10 @@ griefProtection() ..() - /obj/machinery/r_n_d/server/ex_act(severity, target) griefProtection() ..() - -/obj/machinery/r_n_d/server/blob_act(obj/structure/blob/B) - griefProtection() - ..() - - - //Backup files to centcom to help admins recover data after greifer attacks /obj/machinery/r_n_d/server/proc/griefProtection() for(var/obj/machinery/r_n_d/server/centcom/C in machines) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index c42594790e9..8afa443751b 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -194,7 +194,7 @@ SM.mind.enslave_mind_to_creator(user) SM.sentience_act() SM << "All at once it makes sense: you know what you are and who you are! Self awareness is yours!" - SM << "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist [user.them_pronoun()] in completing [user.their_pronoun()] goals at any cost." + SM << "You are grateful to be self aware and owe [user] a great debt. Serve [user], and assist [user.p_them()] in completing [user.p_their()] goals at any cost." user << "[SM] accepts the potion and suddenly becomes attentive and aware. It worked!" qdel(src) else @@ -418,7 +418,7 @@ item_state = "golem" item_color = "golem" flags = ABSTRACT | NODROP - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF has_sensor = 0 /obj/item/clothing/suit/golem @@ -431,7 +431,7 @@ permeability_coefficient = 0.50 body_parts_covered = FULL_BODY flags_inv = HIDEGLOVES | HIDESHOES | HIDEJUMPSUIT - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = ABSTRACT | NODROP /obj/item/clothing/shoes/golem @@ -439,7 +439,7 @@ desc = "sturdy adamantine feet" icon_state = "golem" item_state = null - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = NOSLIP | ABSTRACT | NODROP @@ -449,7 +449,7 @@ icon_state = "golem" item_state = "golem" siemens_coefficient = 0 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = ABSTRACT | NODROP @@ -460,7 +460,7 @@ item_state = null siemens_coefficient = 0 flags = ABSTRACT | NODROP - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/item/clothing/head/space/golem @@ -469,7 +469,7 @@ item_color = "dermal" name = "golem's head" desc = "a golem's head" - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags = ABSTRACT | NODROP /obj/effect/golemrune @@ -478,7 +478,7 @@ name = "rune" icon = 'icons/obj/rune.dmi' icon_state = "golem" - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF layer = TURF_LAYER /obj/effect/golemrune/New() @@ -564,13 +564,13 @@ playsound(get_turf(src), 'sound/magic/TIMEPARADOX2.ogg', 100, 1, -1) for(var/i in 1 to duration-1) for(var/atom/A in orange (freezerange, src.loc)) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A if(M in immune) continue M.Stun(10, 1, 1) M.anchored = 1 - if(istype(M, /mob/living/simple_animal/hostile)) + if(ishostile(M)) var/mob/living/simple_animal/hostile/H = M H.AIStatus = AI_OFF H.LoseTarget() diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm index 71ee2153806..96dc4c28bea 100644 --- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm +++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm @@ -10,7 +10,7 @@ bound_width = 96 bound_height = 96 pixel_x = -32 - resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF luminosity = 1 var/boss = FALSE var/is_anyone_home = FALSE diff --git a/code/modules/ruins/objects_and_mobs/sin_ruins.dm b/code/modules/ruins/objects_and_mobs/sin_ruins.dm index 609f295acbd..a2de405894f 100644 --- a/code/modules/ruins/objects_and_mobs/sin_ruins.dm +++ b/code/modules/ruins/objects_and_mobs/sin_ruins.dm @@ -20,7 +20,7 @@ user << "No... just one more try..." user.gib() else - user.visible_message("[user] pulls [src]'s lever with a glint in [user.their_pronoun()] eyes!", "You feel a draining as you pull the lever, but you \ + user.visible_message("[user] pulls [src]'s lever with a glint in [user.p_their()] eyes!", "You feel a draining as you pull the lever, but you \ know it'll be worth it.") icon_state = "slots2" playsound(src, 'sound/lavaland/cursed_slot_machine.ogg', 50, 0) @@ -79,7 +79,7 @@ /obj/effect/gluttony/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff. if(height==0) return 1 - if(istype(mover, /mob/living/carbon/human)) + if(ishuman(mover)) var/mob/living/carbon/human/H = mover if(H.nutrition >= NUTRITION_LEVEL_FAT) H.visible_message("[H] pushes through [src]!", "You've seen and eaten worse than this.") @@ -97,7 +97,7 @@ icon_state = "magic_mirror" /obj/structure/mirror/magic/pride/curse(mob/user) - user.visible_message("The ground splits beneath [user] as [user.their_pronoun()] hand leaves the mirror!", \ + user.visible_message("The ground splits beneath [user] as [user.p_their()] hand leaves the mirror!", \ "Perfect. Much better! Now nobody will be able to resist yo-") var/turf/T = get_turf(user) T.ChangeTurf(/turf/open/chasm/straight_down) @@ -123,7 +123,7 @@ return if(!istype(user)) return - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(user.real_name != H.dna.real_name) user.real_name = H.dna.real_name diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 34be79ef84d..9a90b43541e 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -11,6 +11,7 @@ var/datum/events/keycard_events = new() active_power_usage = 6 power_channel = ENVIRON req_access = list(access_keycard_auth) + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/datum/event/ev var/event = "" var/obj/machinery/keycard_auth/event_source diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm index eb64c406645..0ebc8ef0436 100644 --- a/code/modules/shuttle/ferry.dm +++ b/code/modules/shuttle/ferry.dm @@ -12,6 +12,7 @@ var/cooldown = 600 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) ..() diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 76bc75f6128..770a1673ac2 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -8,7 +8,7 @@ //icon = 'icons/dirsquare.dmi' icon_state = "pinonfar" - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF anchored = 1 var/id @@ -29,12 +29,16 @@ else return QDEL_HINT_LETMELIVE +/obj/docking_port/take_damage() + return + /obj/docking_port/singularity_pull() return /obj/docking_port/singularity_act() return 0 /obj/docking_port/shuttleRotate() return //we don't rotate with shuttles via this code. + //returns a list(x0,y0, x1,y1) where points 0 and 1 are bounding corners of the projected rectangle /obj/docking_port/proc/return_coords(_x, _y, _dir) if(_dir == null) @@ -472,7 +476,7 @@ areaInstance.contents += T1 //copy over air - if(istype(T1, /turf/open)) + if(isopenturf(T1)) var/turf/open/Ts1 = T1 Ts1.copy_air_with_tile(T0) diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index f018168952c..af697b2336f 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -57,7 +57,8 @@ name = "wabbajack altar" desc = "Whether you're sleeping or waking, it's going to be \ quite chaotic." - health = 1000 + obj_integrity = 1000 + max_integrity = 1000 verb_say = "chants" var/obj/machinery/power/emitter/energycannon/magical/our_statue var/list/mob/living/sleepers = list() @@ -95,8 +96,7 @@ for(var/i in found - sleepers) var/mob/living/L = i L.color = "#800080" - L.visible_message("A strange purple glow \ - wraps itself around [L] as they suddenly fall unconcious.", + L.visible_message("A strange purple glow wraps itself around [L] as [L.p_they()] suddenly fall[L.p_s()] unconscious.", "[desc]") // Don't let them sit suround unconscious forever addtimer(src, "sleeper_dreams", 100, FALSE, L) @@ -187,7 +187,8 @@ /obj/structure/table/wood/bar resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF flags = NODECONSTRUCT - health = 1000 + obj_integrity = 1000 + max_integrity = 1000 var/boot_dir = 1 /obj/structure/table/wood/bar/Crossed(atom/movable/AM) diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index 8d993a45c49..c835013866a 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -8,6 +8,7 @@ req_access = list(access_syndicate) shuttleId = "syndicate" possible_destinations = "syndicate_away;syndicate_z5;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s" + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/machinery/computer/shuttle/syndicate/recall name = "syndicate shuttle recall terminal" diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index c8ad0935759..c4f20f931b9 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -249,9 +249,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(overlay) for(var/atom/target in targets) var/location - if(istype(target,/mob/living)) + if(isliving(target)) location = target.loc - else if(istype(target,/turf)) + else if(isturf(target)) location = target var/obj/effect/overlay/spell = new /obj/effect/overlay(location) spell.icon = overlay_icon @@ -263,11 +263,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/after_cast(list/targets) for(var/atom/target in targets) var/location - if(istype(target,/mob/living)) + if(isliving(target)) location = target.loc - else if(istype(target,/turf)) + else if(isturf(target)) location = target - if(istype(target,/mob/living) && message) + if(isliving(target) && message) target << text("[message]") if(sparks_spread) var/datum/effect_system/spark_spread/sparks = new diff --git a/code/modules/spells/spell_types/charge.dm b/code/modules/spells/spell_types/charge.dm index ebd4933f58d..c97369e774b 100644 --- a/code/modules/spells/spell_types/charge.dm +++ b/code/modules/spells/spell_types/charge.dm @@ -18,7 +18,7 @@ var/charged_item = null var/burnt_out = 0 - if(L.pulling && (istype(L.pulling, /mob/living))) + if(L.pulling && isliving(L.pulling)) var/mob/living/M = L.pulling if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0)) for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list) diff --git a/code/modules/spells/spell_types/ethereal_jaunt.dm b/code/modules/spells/spell_types/ethereal_jaunt.dm index 5aba7f5b5c3..bd91b8ff347 100644 --- a/code/modules/spells/spell_types/ethereal_jaunt.dm +++ b/code/modules/spells/spell_types/ethereal_jaunt.dm @@ -78,7 +78,7 @@ density = 0 anchored = 1 invisibility = 60 - resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE + resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/effect/dummy/spell_jaunt/Destroy() // Eject contents if deleted somehow diff --git a/code/modules/spells/spell_types/lichdom.dm b/code/modules/spells/spell_types/lichdom.dm index 1cf58b7fd9b..75e9d5642ad 100644 --- a/code/modules/spells/spell_types/lichdom.dm +++ b/code/modules/spells/spell_types/lichdom.dm @@ -80,7 +80,7 @@ lich.real_name = M.mind.name M.mind.transfer_to(lich) lich.hardset_dna(null,null,lich.real_name,null,/datum/species/skeleton) - lich << "Your bones clatter and shutter as they're pulled back into this world!" + lich << "Your bones clatter and shutter as you are pulled back into this world!" charge_max += 600 var/mob/old_body = current_body var/turf/body_turf = get_turf(old_body) diff --git a/code/modules/spells/spell_types/mind_transfer.dm b/code/modules/spells/spell_types/mind_transfer.dm index b67415dcfff..6068af33026 100644 --- a/code/modules/spells/spell_types/mind_transfer.dm +++ b/code/modules/spells/spell_types/mind_transfer.dm @@ -31,8 +31,11 @@ Also, you never added distance checking after target is selected. I've went ahea var/mob/living/target = targets[1] + var/t_He = target.p_they(TRUE) + var/t_is = target.p_are() + if(!(target in oview(range)) && !distanceoverride)//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it. - user << "They are too far away!" + user << "[t_He] [t_is] too far away!" return if(ismegafauna(target)) @@ -44,7 +47,7 @@ Also, you never added distance checking after target is selected. I've went ahea return if(!target.key || !target.mind) - user << "They appear to be catatonic! Not even magic can affect their vacant mind." + user << "[t_He] appear[target.p_s()] to be catatonic! Not even magic can affect [target.p_their()] vacant mind." return if(user.suiciding) @@ -52,7 +55,7 @@ Also, you never added distance checking after target is selected. I've went ahea return if((target.mind.special_role in protected_roles) || cmptext(copytext(target.key,1,2),"@")) - user << "Their mind is resisting your spell!" + user << "[target.p_their(TRUE)] mind is resisting your spell!" return var/mob/living/victim = target//The target of the spell whos body will be transferred to. diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm index 78790328ea3..b330adcdf9f 100644 --- a/code/modules/spells/spell_types/wizard.dm +++ b/code/modules/spells/spell_types/wizard.dm @@ -354,13 +354,13 @@ throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user))) distfromcaster = get_dist(user, AM) if(distfromcaster == 0) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/M = AM M.Weaken(5) M.adjustBruteLoss(5) M << "You're slammed into the floor by [user]!" else - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/M = AM M.Weaken(stun_amt) M << "You're thrown back by [user]!" diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index fdc5247f4aa..352831bbece 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -99,7 +99,7 @@ x_max = x - 6 for(var/turf/T in block(locate(x_min,y-1,z),locate(x_max,y+1,z))) - if(T.density || istype(T, /turf/open/space)) + if(T.density || isspaceturf(T)) return FALSE return TRUE diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 20f5a76f6d4..b82ee24952b 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -139,7 +139,7 @@ /obj/machinery/satellite/meteor_shield/proc/space_los(meteor) for(var/turf/T in getline(src,meteor)) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) return FALSE return TRUE diff --git a/code/modules/stock_market/stocks.dm b/code/modules/stock_market/stocks.dm index b75a5e56a16..9969136ec51 100644 --- a/code/modules/stock_market/stocks.dm +++ b/code/modules/stock_market/stocks.dm @@ -90,7 +90,7 @@ /datum/stock/proc/frc(amt) var/shares = available_shares + outside_shareholders * average_shares var/fr = amt / 100 / shares * fluctuational_coefficient * fluctuation_rate * max(-(current_trend / 100), 1) - if (fr < 0 && speculation < 0 || fr > 0 && speculation > 0) + if ((fr < 0 && speculation < 0) || (fr > 0 && speculation > 0)) fr *= max(abs(speculation) / 5, 1) else fr /= max(abs(speculation) / 5, 1) diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 8999f6216ff..a2acadb0f93 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -104,7 +104,7 @@ //Applies brute and burn damage to the organ. Returns 1 if the damage-icon states changed at all. //Damage will not exceed max_damage using this proc //Cannot apply negative damage -/obj/item/bodypart/proc/take_damage(brute, burn, updating_health = 1) +/obj/item/bodypart/proc/receive_damage(brute, burn, updating_health = 1) if(owner && (owner.status_flags & GODMODE)) return 0 //godmode brute = max(brute * config.damage_multiplier,0) @@ -345,6 +345,11 @@ return standing + +/obj/item/bodypart/deconstruct(disassembled = TRUE) + drop_organs() + qdel(src) + /obj/item/bodypart/chest name = "chest" desc = "It's impolite to stare at a person's chest." @@ -402,6 +407,7 @@ max_damage = 50 body_zone ="l_arm" body_part = ARM_LEFT + held_index = 1 px_x = -6 px_y = 0 @@ -435,6 +441,7 @@ max_damage = 50 body_zone = "r_arm" body_part = ARM_RIGHT + held_index = 2 px_x = 6 px_y = 0 diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 7c153342226..17301005738 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -16,7 +16,7 @@ return 0 var/obj/item/bodypart/affecting = C.get_bodypart("chest") - affecting.take_damage(Clamp(brute_dam/2, 15, 50), Clamp(burn_dam/2, 0, 50)) //Damage the chest based on limb's existing damage + affecting.receive_damage(Clamp(brute_dam/2, 15, 50), Clamp(burn_dam/2, 0, 50)) //Damage the chest based on limb's existing damage C.visible_message("[C]'s [src.name] has been violently dismembered!") C.emote("scream") drop_limb() @@ -84,7 +84,7 @@ C.bodyparts -= src if(held_index) C.unEquip(owner.get_item_for_held_index(held_index), 1) - C.hand_bodyparts[held_index] = null + C.hand_bodyparts -= src owner = null diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index c3d86b5d4a2..067788acfcf 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -174,10 +174,6 @@ return standing -/obj/item/bodypart/head/burn() - drop_organs() - ..() - /obj/item/bodypart/head/monkey icon = 'icons/mob/animal_parts.dmi' icon_state = "default_monkey_head" diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index c07e5208bef..2bbcb36fcc6 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -73,7 +73,7 @@ F.SetLuminosity(0) owner.unEquip(holder, 1) - holder.loc = src + holder.forceMove(src) holder = null playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1) @@ -84,7 +84,7 @@ holder = item holder.flags |= NODROP - holder.resistance_flags |= LAVA_PROOF | UNACIDABLE + holder.resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF holder.slot_flags = null holder.w_class = 5 holder.materials = null @@ -158,7 +158,8 @@ origin_tech = "materials=4;combat=4;biotech=4;powerstorage=4;syndicate=3" holder = /obj/item/weapon/gun/energy/laser/mounted -/obj/item/organ/cyberimp/arm/gun/laser/l/zone = "l_arm" +/obj/item/organ/cyberimp/arm/gun/laser/l + zone = "l_arm" /obj/item/organ/cyberimp/arm/gun/taser @@ -168,7 +169,8 @@ origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4" holder = /obj/item/weapon/gun/energy/gun/advtaser/mounted -/obj/item/organ/cyberimp/arm/gun/taser/l/zone = "l_arm" +/obj/item/organ/cyberimp/arm/gun/taser/l + zone = "l_arm" /obj/item/organ/cyberimp/arm/toolset @@ -178,7 +180,8 @@ contents = newlist(/obj/item/weapon/screwdriver/cyborg, /obj/item/weapon/wrench/cyborg, /obj/item/weapon/weldingtool/largetank/cyborg, /obj/item/weapon/crowbar/cyborg, /obj/item/weapon/wirecutters/cyborg, /obj/item/device/multitool/cyborg) -/obj/item/organ/cyberimp/arm/toolset/l/zone = "l_arm" +/obj/item/organ/cyberimp/arm/toolset/l + zone = "l_arm" /obj/item/organ/cyberimp/arm/toolset/emag_act() if(!(locate(/obj/item/weapon/kitchen/knife/combat/cyborg) in items_list)) diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index 5121e955a1b..8e336ec6494 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -96,7 +96,7 @@ else cooldown += 200 - if(istype(owner, /mob/living/carbon/human)) + if(ishuman(owner)) var/mob/living/carbon/human/H = owner if(H.stat != DEAD && prob(50 / severity)) H.heart_attack = TRUE diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index eef8bf6dfd3..5c14365d981 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -18,7 +18,7 @@ /obj/item/organ/cyberimp/eyes/Insert(var/mob/living/carbon/M, var/special = 0) ..() - if(istype(owner, /mob/living/carbon/human) && eye_color) + if(ishuman(owner) && eye_color) var/mob/living/carbon/human/HMN = owner old_eye_color = HMN.eye_color HMN.eye_color = eye_color @@ -30,7 +30,7 @@ /obj/item/organ/cyberimp/eyes/Remove(var/mob/living/carbon/M, var/special = 0) M.sight ^= sight_flags - if(istype(M,/mob/living/carbon/human) && eye_color) + if(ishuman(M) && eye_color) var/mob/living/carbon/human/HMN = owner HMN.eye_color = old_eye_color HMN.regenerate_icons() diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index ed61adba152..0e34e14dc23 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -20,7 +20,7 @@ var/oldname = target.real_name target.real_name = target.dna.species.random_name(target.gender,1) var/newname = target.real_name //something about how the code handles names required that I use this instead of target.real_name - user.visible_message("[user] alters [oldname]'s appearance completely, they are now [newname]!", "You alter [oldname]'s appearance completely, they are now [newname].") + user.visible_message("[user] alters [oldname]'s appearance completely, [target.p_they()] are now [newname]!", "You alter [oldname]'s appearance completely, [target.p_they()] are now [newname].") if(ishuman(target)) var/mob/living/carbon/human/H = target H.sec_hud_set_ID() diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index dae2c7092e2..62067171862 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -30,7 +30,7 @@ else user << "You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!" return 1 //returns 1 so we don't stab the guy in the dick or wherever. - if(isrobot(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache + if(iscyborg(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache return 1 return 0 @@ -50,7 +50,7 @@ prob_chance = implements[implement_type] prob_chance *= surgery.get_propability_multiplier() - if(prob(prob_chance) || isrobot(user)) + if(prob(prob_chance) || iscyborg(user)) if(success(user, target, target_zone, tool, surgery)) advance = 1 else diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index 50b73da7bc2..c3e7d9b0c98 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -20,7 +20,7 @@ if(!state) return - if(istype(user, /mob/dead/observer)) + if(isobserver(user)) // If they turn on ghost AI control, admins can always interact. if(IsAdminGhost(user)) . = max(., UI_INTERACTIVE) diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index 4e001cb1680..4058a763519 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -7,6 +7,11 @@ var/obj/item/weapon/storage/bag/trash/mybag = null var/floorbuffer = 0 +/obj/vehicle/janicart/Destroy() + if(mybag) + qdel(mybag) + mybag = null + return ..() /obj/vehicle/janicart/handle_vehicle_offsets() ..() diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index f21275b6fce..be42e5ef8d9 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -8,6 +8,9 @@ anchored = 0 can_buckle = 1 buckle_lying = 0 + obj_integrity = 300 + max_integrity = 300 + armor = list(melee = 30, bullet = 30, laser = 30, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 60, acid = 60) var/keytype = null //item typepath, if non-null an item of this type is needed in your hands to drive this vehicle var/next_vehicle_move = 0 //used for move delays var/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower @@ -144,3 +147,28 @@ /obj/vehicle/space/Process_Spacemove(direction) return 1 + +/obj/vehicle/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) + if(damage_flag == "melee" && damage_amount < 20) + return 0 + . = ..() + +/obj/vehicle/deconstruct(disassembled = TRUE) + new /obj/item/stack/sheet/metal (loc, 5) + qdel(src) + +/obj/vehicle/examine(mob/user) + ..() + if(!(resistance_flags & INDESTRUCTIBLE)) + if(resistance_flags & ON_FIRE) + user << "It's on fire!" + var/healthpercent = (obj_integrity/max_integrity) * 100 + switch(healthpercent) + if(100 to INFINITY) + user << "It seems pristine and undamaged." + if(50 to 100) + user << "It looks slightly damaged." + if(25 to 50) + user << "It appears heavily damaged." + if(0 to 25) + user << "It's falling apart!" \ No newline at end of file diff --git a/code/modules/zombie/organs.dm b/code/modules/zombie/organs.dm index f3f127071a7..c477af9bc64 100644 --- a/code/modules/zombie/organs.dm +++ b/code/modules/zombie/organs.dm @@ -52,12 +52,12 @@ owner.revive(full_heal = TRUE) switch(old_stat) if(DEAD, UNCONSCIOUS) - owner.visible_message("[owner] staggers to [owner.their_pronoun()] feet!") + owner.visible_message("[owner] staggers to [owner.p_their()] feet!") owner << "You stagger to your feet!" // Conscious conversions will generally only happen for an event // or for a converts_living=TRUE infection if(CONSCIOUS) - owner.visible_message("[owner] suddenly convulses, as [owner.they_pronoun()] gain a ravenous hunger in [owner.their_pronoun()] eyes!", + owner.visible_message("[owner] suddenly convulses, as [owner.p_they()] gain a ravenous hunger in [owner.p_their()] eyes!", "You HUNGER!") playsound(owner.loc, 'sound/hallucinations/growl3.ogg', 50, 1) owner.do_jitter_animation(living_transformation_time) diff --git a/code/orphaned_procs/priority_announce.dm b/code/orphaned_procs/priority_announce.dm index 38e1a24d5d3..1ad4a33f8f4 100644 --- a/code/orphaned_procs/priority_announce.dm +++ b/code/orphaned_procs/priority_announce.dm @@ -25,7 +25,7 @@ announcement += "
" for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !M.ear_deaf) + if(!isnewplayer(M) && !M.ear_deaf) M << announcement if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS) M << sound(sound) @@ -45,7 +45,7 @@ return for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !M.ear_deaf) + if(!isnewplayer(M) && !M.ear_deaf) M << "[title]
[message]

" if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS) if(alert) diff --git a/code/world.dm b/code/world.dm index 97242e14e7e..79cf68722b5 100644 --- a/code/world.dm +++ b/code/world.dm @@ -4,9 +4,13 @@ area = /area/space view = "15x15" cache_lifespan = 7 + hub = "Exadv1.spacestation13" + hub_password = "kMZy3U5jJHSiBQjr" + name = "/tg/ Station 13" fps = 20 + visibility = 0 -var/global/list/map_transition_config = MAP_TRANSITION_CONFIG +var/list/map_transition_config = MAP_TRANSITION_CONFIG /world/New() check_for_cleanbot_bug() @@ -32,7 +36,6 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) - load_configuration() load_mode() load_motd() diff --git a/config/admins.txt b/config/admins.txt index 8be65927ee9..1930f4d68f0 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -120,3 +120,4 @@ SnipeDragon = Game Master Fjeld = Game Master kevinz000 = Game Master TrustyGun = Game Master +Cyberboss = Game Master \ No newline at end of file diff --git a/config/config.txt b/config/config.txt index 5ea1efcfb79..a8cc323f2ce 100644 --- a/config/config.txt +++ b/config/config.txt @@ -4,6 +4,9 @@ ## Station name: The name of the station as it is referred to in-game. If commented out, the game will generate a random name instead. STATIONNAME Space Station 13 +## Put on byond hub: uncomment this to put your server on the byond hub. +#HUB + # Lobby time: This is the amount of time between rounds that players have to setup their characters and be ready. LOBBY_COUNTDOWN 120 diff --git a/html/changelog.html b/html/changelog.html index 35cadd978c2..757ce8bb157 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,6 +55,63 @@ -->
+

10 October 2016

+

ChemicalRascal updated:

+
    +
  • Previously, improving the incinerator's efficiency made the RPM decay more quickly, instead of less quickly. No more!
  • +
+

Cyberboss updated:

+
    +
  • More reagent containers can be used for filling your dirty vapor cancer sticks
  • +
  • Fixed some vape spelling/grammar
  • +
+

MrStonedOne updated:

+
    +
  • Player Preferences window made slightly faster.
  • +
+

Nanotrasen Stress Relief Board updated:

+
    +
  • Claymores created through Highlander no longer thirst for blood or announce their wielder's location incessantly.
  • +
  • Claymores should now properly absorb fallen foes' corpses.
  • +
  • Losing a limb now properly destroys your claymore.
  • +
+

Supermichael777 updated:

+
    +
  • The wizards federation have instituted a strict 1 demon limit on demon bottles.
  • +
+

XDTM updated:

+
    +
  • Using blood on an Oil Slime will create Corn Oil.
  • +
  • Using blood on Pyrite Slimes will create a random crayon.
  • +
  • Using water on Orange Slimes will create a small smoke cloud.
  • +
  • Using water on Blue Slimes will spawn foam.
  • +
  • You can now retrieve materials inserted in a Drone Shell Dispenser with a crowbar.
  • +
+

phil235 updated:

+
    +
  • A whole bunch of structures and machines can now be broken and destroyed using conventional attack methods.
  • +
  • The effect of fire on objects is overhauled. When on fire, your external clothes now take fire damage and can become ashes, unless fire proof. All objects caught in a fire can now take fire damage, instead of just flammable ones, unless fire proof.
  • +
  • Acid effect is overhauled. Splashing acid on something puts a green effect on it and start slowly melting it. Throwing acid on mobs puts acid on their clothes. Acid can destroy structures and items alike, as long as they're not acid proof. The more acid put on an object, the faster it melts. Walking on an acid puddle puts acid on your shoes or burns your bare feet. Picking up an item with acid without adequate glove protection burns your hand. Acid can be washed away with any sort of water source (extinguisher, shower, water glass,etc...).
  • +
  • When a mob receives melee attacks, its clothes also get damaged. Clothes with enough damage get a visual effect. Damaged clothes can be repaired with cloth (produced with botany's biogenerator). Clothes that receives too much melee damage become shreds.
  • +
  • Clicking a structure/machine with an item on help intent can never result in an attack.
  • +
  • Hostile animals that are environment destroyers no longer destroys tables&closets in one hit. It now takes several hits depending on the animal.
  • +
+ +

07 October 2016

+

WJohnston updated:

+
    +
  • Improved/resprited AI card, pAI, easel/canvases, shotgun shells, RCD cartridge, speedloaders, and certain older buttons.
  • +
  • Improved/resprited a few bar signs, basketball/dodgeball/hoop, blood bags, and body bags.
  • +
  • Improved/resprited Paper, stamps, folders, small fires, pens, energy daggers, cabinets, newspaper and other bureaucracy related items.
  • +
+ +

01 October 2016

+

Incoming5643 updated:

+
    +
  • After years of having to live on a mostly blown up hunk of junk the wizard's ship has finally been repaired
  • +
  • No one paid attention to that lore anyway
  • +
+

28 September 2016

Cuboos updated:

    @@ -951,173 +1008,6 @@
    • Added a new PDA button/app: Drone Phone!
    - -

    08 August 2016

    -

    Ergovisavi updated:

    -
      -
    • Added bonfires to botany. Requires five tower cap logs to create, and mobs can be buckled to them if an iron rod is added to the bonfire and the mob is restrained.
    • -
    -

    Joan updated:

    -
      -
    • Added the clockcult "Global Records" alert, which clock cultists can mouse over to check a variety of information on the clockcult's status, including living servants, number of caches, CV, tinkerer's daemons, if there's an unconverted AI, what clockwork generals can be invoked, and what scripture is unlocked.
    • -
    -

    Shadowlight213 updated:

    -
      -
    • Ghosts can now see human player's huds when using the OOC -> Observe verb
    • -
    -

    WJohnston, Gun Hog updated:

    -
      -
    • Xenos are now considered female.
    • -
    • Hunter pounce are now always blocked by shields, and may be blocked more often by other protective items.
    • -
    • Alien Queen is now somewhat faster.
    • -
    • Adjusted larva growth sprites.
    • -
    • Removed 20% facehugger failure chance for masks.
    • -
    • Disarm now always forces a person to drop an item in the active hand, and if a person's hand is empty/undroppable, Disarm will always result in a tackle.
    • -
    • Cyborgs disarmed by a Xeno will first disable their selected module, and if there is none selected, the cyborg will be pushed back and stunned.
    • -
    • Tail Sweep now has a slightly longer stun.
    • -
    - -

    07 August 2016

    -

    Arctophylax updated:

    -
      -
    • You can unbuckle mobs from meat spikes by clicking on the spike once again.
    • -
    -

    Joan updated:

    -
      -
    • Barrier runes will now block air while active.
    • -
    • Trying to use sleeping carp against the colossus will now anger it.
    • -
    -

    frtbngll updated:

    -
      -
    • Fixed Paper Wizard summoning only 9 minions in its lifespan by making the dead stickman decrease it's summoned_minions variable
    • -
    -

    lordpidey updated:

    -
      -
    • Centcom has received reports of cyborgs electrocuting themselves when working on the power grid, and we have decided to stop storing important electronics on the wirecutter's blade.
    • -
    - -

    05 August 2016

    -

    Arctophylax updated:

    -
      -
    • The Emergency Medical and Winter Wonderland Holodeck programs work once again.
    • -
    -

    Cruix updated:

    -
      -
    • RCDs can no longer place multiple grilles on the same tile.
    • -
    • RCDs will no longer use all their ammo if you try to build a wall on the same turf multiple times.
    • -
    • RCDs will now inform their user if they do not have enough ammo to complete an operation.
    • -
    -

    Incoming5643 updated:

    -
      -
    • Parrots have been made more robust.
    • -
    -

    Joan updated:

    -
      -
    • Clockwork Constructs, including anima fragments, marauders, and reclaimers, can now communicate over the Hierophant Network.
    • -
    • Plasma cutters(normal, advanced, and mech) now have double range in low pressure areas, but slightly lower range in high pressure areas.
    • -
    • Vitality Matrices will consume dead non-servant mobs to gain a large amount of Vitality. This doesn't work on mobs that did not have a mind at some point.
    • -
    -

    Lordpidey and PKPenguin321 updated:

    -
      -
    • Recent studies have revealed that fly amanita can give you a huge trip.
    • -
    -

    Lzimann updated:

    -
      -
    • Holy water no longers makes you confused.
    • -
    -

    ModernViolence updated:

    -
      -
    • Photocopier fixes: proper sprites for not empty copies; removing originals now does not delete them
    • -
    -

    PKPenguin321 updated:

    -
      -
    • Chef, do your station a favor and make a home run baseball burger (TM)
    • -
    -

    Robustin updated:

    -
      -
    • The initial supply talisman can now be used to create runed metal, 5 per use
    • -
    • The void torch is now available from the altar, use it to transport any item instantly to any cultist! It appears alongside the veil shifter as part of the "Veil Walker" set.
    • -
    • Cult floors no longer appear on mesons!
    • -
    • Flagellant's Robes now increases damage taken by 50%, down from 100%
    • -
    • Veil Shifter has 4 uses, up from 2
    • -
    • Shuttle curse now delays shuttle 3 minutes, up from 2.5 minutes
    • -
    • Cult forges, archives, and airlocks have had their cost reduced by 1 runed metal each
    • -
    -

    Shadowlight213 updated:

    -
      -
    • You will now receive an achievement for winning a pulse rifle at the arcade.
    • -
    -

    TheCarlSaganExpress updated:

    -
      -
    • Added lighting effects to the welder.
    • -
    - -

    02 August 2016

    -

    CoreOverload updated:

    -
      -
    • Pockets in coats!
    • -
    - -

    01 August 2016

    -

    Bawhoppen updated:

    -
      -
    • Added crowns. Make them from gold. Cap gets a fancy one.
    • -
    -

    Fox McCloud updated:

    -
      -
    • Adds in generic uplink refund system that potentially allows for even regular traitors to refund uplink items
    • -
    -

    Joan updated:

    -
      -
    • Soul Vessels can now be used on unconscious or dead humans to extract their consciousness, much like a soulstone.
    • -
    • Soul Vessels no longer automatically ping ghosts when created, though they can still be used in-hand to ping ghosts.
    • -
    • Soul Vessels can now communicate over the Hierophant Network
    • -
    • Xenobiology golems enslaved to someone will become convertable if their enslaver is converted to the enslaving antag type; this applies to gang and both cult types.
    • -
    -

    oranges updated:

    -
      -
    • Reverted toolboxes fitting in backpacks due to being incorrectly merged
    • -
    - -

    31 July 2016

    -

    Arctophylax updated:

    -
      -
    • Birdboat's atmospheric tanks now function normally again.
    • -
    • Birdboat's TEG is now orientated to match the pipe layout.
    • -
    -

    Bawhoppen updated:

    -
      -
    • toolboxes fit in backpacks
    • -
    -

    Gun Hog updated:

    -
      -
    • In an effort to reduce the demoralizing effects that accompany the death of a crew member, Nanotrasen has provided the prototype designs for the Sad Trombone implant. It can be fabricated at your station's protolathe, if you manage to secure the ever elusive Bananium ore.
    • -
    -

    Joan updated:

    -
      -
    • Megafauna will now seek and consume corpses of enemies to heal or otherwise.
    • -
    • Toolboxes are slightly more robust.
    • -
    • Vanguard now only stuns for 25% of absorbed stuns, from 50%.
    • -
    -

    Kor updated:

    -
      -
    • Hostile mobs will now attack turrets.
    • -
    -

    Robustin updated:

    -
      -
    • Amber ERT Commanders no longer have thermal goggles
    • -
    -

    lordpidey updated:

    -
      -
    • Added Devil agent gamemode, where multiple devils are each trying to buy more souls than the next in line.
    • -
    • If you've already sold your soul, you can sell it again to a different devil. You can even go back and forth for INFINITE POWER.
    • -
    - -

    30 July 2016

    -

    astralenigma updated:

    -
      -
    • Admins can now turn people into red god.
    • -
GoonStation 13 Development Team diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 2e5523ab41a..40a9d1bce64 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -7280,3 +7280,63 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - rscdel: Removed Stimulants and Coffee from survival pens. - tweak: Nanites have been replaced with Mining Nanites which heal more when you are lower health, and do not have the ridiculous healing Adminorazine had. +2016-10-01: + Incoming5643: + - rscadd: After years of having to live on a mostly blown up hunk of junk the wizard's + ship has finally been repaired + - rscdel: No one paid attention to that lore anyway +2016-10-07: + WJohnston: + - imageadd: Improved/resprited AI card, pAI, easel/canvases, shotgun shells, RCD + cartridge, speedloaders, and certain older buttons. + - imageadd: Improved/resprited a few bar signs, basketball/dodgeball/hoop, blood + bags, and body bags. + - imageadd: Improved/resprited Paper, stamps, folders, small fires, pens, energy + daggers, cabinets, newspaper and other bureaucracy related items. +2016-10-10: + ChemicalRascal: + - bugfix: Previously, improving the incinerator's efficiency made the RPM decay + more quickly, instead of less quickly. No more! + Cyberboss: + - rscadd: More reagent containers can be used for filling your dirty vapor cancer + sticks + - spellcheck: Fixed some vape spelling/grammar + MrStonedOne: + - tweak: Player Preferences window made slightly faster. + Nanotrasen Stress Relief Board: + - rscdel: Claymores created through Highlander no longer thirst for blood or announce + their wielder's location incessantly. + - bugfix: Claymores should now properly absorb fallen foes' corpses. + - bugfix: Losing a limb now properly destroys your claymore. + Supermichael777: + - bugfix: The wizards federation have instituted a strict 1 demon limit on demon + bottles. + XDTM: + - rscadd: Using blood on an Oil Slime will create Corn Oil. + - rscadd: Using blood on Pyrite Slimes will create a random crayon. + - rscadd: Using water on Orange Slimes will create a small smoke cloud. + - rscadd: Using water on Blue Slimes will spawn foam. + - rscadd: You can now retrieve materials inserted in a Drone Shell Dispenser with + a crowbar. + phil235: + - rscadd: A whole bunch of structures and machines can now be broken and destroyed + using conventional attack methods. + - rscadd: The effect of fire on objects is overhauled. When on fire, your external + clothes now take fire damage and can become ashes, unless fire proof. All objects + caught in a fire can now take fire damage, instead of just flammable ones, unless + fire proof. + - rscadd: Acid effect is overhauled. Splashing acid on something puts a green effect + on it and start slowly melting it. Throwing acid on mobs puts acid on their + clothes. Acid can destroy structures and items alike, as long as they're not + acid proof. The more acid put on an object, the faster it melts. Walking on + an acid puddle puts acid on your shoes or burns your bare feet. Picking up an + item with acid without adequate glove protection burns your hand. Acid can be + washed away with any sort of water source (extinguisher, shower, water glass,etc...). + - rscadd: When a mob receives melee attacks, its clothes also get damaged. Clothes + with enough damage get a visual effect. Damaged clothes can be repaired with + cloth (produced with botany's biogenerator). Clothes that receives too much + melee damage become shreds. + - tweak: Clicking a structure/machine with an item on help intent can never result + in an attack. + - tweak: Hostile animals that are environment destroyers no longer destroys tables&closets + in one hit. It now takes several hits depending on the animal. diff --git a/icons/effects/blood.dmi b/icons/effects/blood.dmi index 5e71e45d4bf..c29eb7d616f 100644 Binary files a/icons/effects/blood.dmi and b/icons/effects/blood.dmi differ diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index adef4345cc9..84611b698b9 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/effects/item_damage.dmi b/icons/effects/item_damage.dmi new file mode 100644 index 00000000000..cc23d9fca4a Binary files /dev/null and b/icons/effects/item_damage.dmi differ diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index f5d72f57c75..fa98af4dc92 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 0d61c44cbbd..be5760d7cf5 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/mob/ties.dmi b/icons/mob/ties.dmi index 967c466a5fd..19b36bfc948 100644 Binary files a/icons/mob/ties.dmi and b/icons/mob/ties.dmi differ diff --git a/icons/obj/aicards.dmi b/icons/obj/aicards.dmi index 6f1aa625ecd..423623ee482 100644 Binary files a/icons/obj/aicards.dmi and b/icons/obj/aicards.dmi differ diff --git a/icons/obj/airlock_machines.dmi b/icons/obj/airlock_machines.dmi index 12546b99eae..4bb40dde0ad 100644 Binary files a/icons/obj/airlock_machines.dmi and b/icons/obj/airlock_machines.dmi differ diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index c0b821cdd51..756d94b9496 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/artstuff.dmi b/icons/obj/artstuff.dmi index a11d1a81d0e..ea24341f5e0 100644 Binary files a/icons/obj/artstuff.dmi and b/icons/obj/artstuff.dmi differ diff --git a/icons/obj/barsigns.dmi b/icons/obj/barsigns.dmi index c0d2348ae4e..94256a6b1fb 100644 Binary files a/icons/obj/barsigns.dmi and b/icons/obj/barsigns.dmi differ diff --git a/icons/obj/basketball.dmi b/icons/obj/basketball.dmi index 1395fa81eaa..d069a905e44 100644 Binary files a/icons/obj/basketball.dmi and b/icons/obj/basketball.dmi differ diff --git a/icons/obj/bloodpack.dmi b/icons/obj/bloodpack.dmi index afd95f6dba5..bd1995d1633 100644 Binary files a/icons/obj/bloodpack.dmi and b/icons/obj/bloodpack.dmi differ diff --git a/icons/obj/bodybag.dmi b/icons/obj/bodybag.dmi index 0b33b0e3d88..7fcc193ad69 100644 Binary files a/icons/obj/bodybag.dmi and b/icons/obj/bodybag.dmi differ diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi index 3f0b5eb70c9..dd9987eaf53 100644 Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index 97f450831fa..626b4a8d6cd 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index 06c3a0ce8a4..b18297ab468 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ diff --git a/icons/obj/clothing/ties.dmi b/icons/obj/clothing/ties.dmi index 3bb8d73b39d..83c1ffedf20 100644 Binary files a/icons/obj/clothing/ties.dmi and b/icons/obj/clothing/ties.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index c629012bb16..a1a3c03a759 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/radio.dmi b/icons/obj/radio.dmi index 44ad56c7cac..4e6c7b0877a 100644 Binary files a/icons/obj/radio.dmi and b/icons/obj/radio.dmi differ diff --git a/sound/eguitar/Ab4.ogg b/sound/eguitar/Ab4.ogg index 2bb51a74963..2e0eec164fe 100644 Binary files a/sound/eguitar/Ab4.ogg and b/sound/eguitar/Ab4.ogg differ diff --git a/sound/eguitar/Ab5.ogg b/sound/eguitar/Ab5.ogg index d93f0a54ed9..c608bcb956d 100644 Binary files a/sound/eguitar/Ab5.ogg and b/sound/eguitar/Ab5.ogg differ diff --git a/sound/eguitar/Ab6.ogg b/sound/eguitar/Ab6.ogg index 514113b97a0..16ad7c12971 100644 Binary files a/sound/eguitar/Ab6.ogg and b/sound/eguitar/Ab6.ogg differ diff --git a/sound/eguitar/An4.ogg b/sound/eguitar/An4.ogg index f68a17d35ea..20a0fb86c0f 100644 Binary files a/sound/eguitar/An4.ogg and b/sound/eguitar/An4.ogg differ diff --git a/sound/eguitar/An5.ogg b/sound/eguitar/An5.ogg index fa3efd30647..cada6b39338 100644 Binary files a/sound/eguitar/An5.ogg and b/sound/eguitar/An5.ogg differ diff --git a/sound/eguitar/An6.ogg b/sound/eguitar/An6.ogg index 034aff99342..2049e1c380f 100644 Binary files a/sound/eguitar/An6.ogg and b/sound/eguitar/An6.ogg differ diff --git a/sound/eguitar/Bb3.ogg b/sound/eguitar/Bb3.ogg deleted file mode 100644 index ce0be53df76..00000000000 Binary files a/sound/eguitar/Bb3.ogg and /dev/null differ diff --git a/sound/eguitar/Bb4.ogg b/sound/eguitar/Bb4.ogg index 84f008c26fa..fd9ee26319a 100644 Binary files a/sound/eguitar/Bb4.ogg and b/sound/eguitar/Bb4.ogg differ diff --git a/sound/eguitar/Bb5.ogg b/sound/eguitar/Bb5.ogg index d6d5b4bba74..25e00e89927 100644 Binary files a/sound/eguitar/Bb5.ogg and b/sound/eguitar/Bb5.ogg differ diff --git a/sound/eguitar/Bb6.ogg b/sound/eguitar/Bb6.ogg index af2a80e74e9..d88b147dd93 100644 Binary files a/sound/eguitar/Bb6.ogg and b/sound/eguitar/Bb6.ogg differ diff --git a/sound/eguitar/Bn4.ogg b/sound/eguitar/Bn4.ogg index 43d5ca1a18c..9f4546066bc 100644 Binary files a/sound/eguitar/Bn4.ogg and b/sound/eguitar/Bn4.ogg differ diff --git a/sound/eguitar/Bn5.ogg b/sound/eguitar/Bn5.ogg index 441313ad135..e70804d4c26 100644 Binary files a/sound/eguitar/Bn5.ogg and b/sound/eguitar/Bn5.ogg differ diff --git a/sound/eguitar/Bn6.ogg b/sound/eguitar/Bn6.ogg index 6e6f0012928..27566333bac 100644 Binary files a/sound/eguitar/Bn6.ogg and b/sound/eguitar/Bn6.ogg differ diff --git a/sound/eguitar/Cn4.ogg b/sound/eguitar/Cn4.ogg new file mode 100644 index 00000000000..395b341148f Binary files /dev/null and b/sound/eguitar/Cn4.ogg differ diff --git a/sound/eguitar/Cn5.ogg b/sound/eguitar/Cn5.ogg index da0d611bf1d..90b7ee36d39 100644 Binary files a/sound/eguitar/Cn5.ogg and b/sound/eguitar/Cn5.ogg differ diff --git a/sound/eguitar/Cn6.ogg b/sound/eguitar/Cn6.ogg index d0719c3ea43..963ca7a6514 100644 Binary files a/sound/eguitar/Cn6.ogg and b/sound/eguitar/Cn6.ogg differ diff --git a/sound/eguitar/Cn7.ogg b/sound/eguitar/Cn7.ogg index 3f2133ea5ec..a75cc96a47b 100644 Binary files a/sound/eguitar/Cn7.ogg and b/sound/eguitar/Cn7.ogg differ diff --git a/sound/eguitar/Db4.ogg b/sound/eguitar/Db4.ogg index dd074463a71..4a5e2ca3624 100644 Binary files a/sound/eguitar/Db4.ogg and b/sound/eguitar/Db4.ogg differ diff --git a/sound/eguitar/Db5.ogg b/sound/eguitar/Db5.ogg index b2318f465e6..0ff3cb2bb9b 100644 Binary files a/sound/eguitar/Db5.ogg and b/sound/eguitar/Db5.ogg differ diff --git a/sound/eguitar/Db6.ogg b/sound/eguitar/Db6.ogg index 80cfdd8cc31..19c8323a38d 100644 Binary files a/sound/eguitar/Db6.ogg and b/sound/eguitar/Db6.ogg differ diff --git a/sound/eguitar/Db7.ogg b/sound/eguitar/Db7.ogg deleted file mode 100644 index 03ae1a0e060..00000000000 Binary files a/sound/eguitar/Db7.ogg and /dev/null differ diff --git a/sound/eguitar/Dn4.ogg b/sound/eguitar/Dn4.ogg index d765d233076..6ba106a7e2d 100644 Binary files a/sound/eguitar/Dn4.ogg and b/sound/eguitar/Dn4.ogg differ diff --git a/sound/eguitar/Dn5.ogg b/sound/eguitar/Dn5.ogg index 694ebf3ff17..cfee416673a 100644 Binary files a/sound/eguitar/Dn5.ogg and b/sound/eguitar/Dn5.ogg differ diff --git a/sound/eguitar/Dn6.ogg b/sound/eguitar/Dn6.ogg index e1af85f65fc..4b418d1480c 100644 Binary files a/sound/eguitar/Dn6.ogg and b/sound/eguitar/Dn6.ogg differ diff --git a/sound/eguitar/Dn7.ogg b/sound/eguitar/Dn7.ogg deleted file mode 100644 index b80fa3f798f..00000000000 Binary files a/sound/eguitar/Dn7.ogg and /dev/null differ diff --git a/sound/eguitar/Eb4.ogg b/sound/eguitar/Eb4.ogg index ee4fd001f0f..ba21b35f3a7 100644 Binary files a/sound/eguitar/Eb4.ogg and b/sound/eguitar/Eb4.ogg differ diff --git a/sound/eguitar/Eb5.ogg b/sound/eguitar/Eb5.ogg index 57228ad373d..2940c672071 100644 Binary files a/sound/eguitar/Eb5.ogg and b/sound/eguitar/Eb5.ogg differ diff --git a/sound/eguitar/Eb6.ogg b/sound/eguitar/Eb6.ogg index b0893576615..ceddb0f6aaa 100644 Binary files a/sound/eguitar/Eb6.ogg and b/sound/eguitar/Eb6.ogg differ diff --git a/sound/eguitar/Eb7.ogg b/sound/eguitar/Eb7.ogg deleted file mode 100644 index 182eb5be779..00000000000 Binary files a/sound/eguitar/Eb7.ogg and /dev/null differ diff --git a/sound/eguitar/En4.ogg b/sound/eguitar/En4.ogg index fa113951620..7bbd919c188 100644 Binary files a/sound/eguitar/En4.ogg and b/sound/eguitar/En4.ogg differ diff --git a/sound/eguitar/En5.ogg b/sound/eguitar/En5.ogg index 6ffa8fa068c..5692f1f9bb9 100644 Binary files a/sound/eguitar/En5.ogg and b/sound/eguitar/En5.ogg differ diff --git a/sound/eguitar/En6.ogg b/sound/eguitar/En6.ogg index af0010480b0..7190f49ff63 100644 Binary files a/sound/eguitar/En6.ogg and b/sound/eguitar/En6.ogg differ diff --git a/sound/eguitar/En7.ogg b/sound/eguitar/En7.ogg deleted file mode 100644 index 92a3043b118..00000000000 Binary files a/sound/eguitar/En7.ogg and /dev/null differ diff --git a/sound/eguitar/Fn4.ogg b/sound/eguitar/Fn4.ogg index 6510ddebcb3..c67095b28af 100644 Binary files a/sound/eguitar/Fn4.ogg and b/sound/eguitar/Fn4.ogg differ diff --git a/sound/eguitar/Fn5.ogg b/sound/eguitar/Fn5.ogg index 4fac6914d59..02fc7f1991c 100644 Binary files a/sound/eguitar/Fn5.ogg and b/sound/eguitar/Fn5.ogg differ diff --git a/sound/eguitar/Fn6.ogg b/sound/eguitar/Fn6.ogg index 4663cfb53da..2a4f7769215 100644 Binary files a/sound/eguitar/Fn6.ogg and b/sound/eguitar/Fn6.ogg differ diff --git a/sound/eguitar/Fn7.ogg b/sound/eguitar/Fn7.ogg deleted file mode 100644 index 6f7b365e498..00000000000 Binary files a/sound/eguitar/Fn7.ogg and /dev/null differ diff --git a/sound/eguitar/Gb4.ogg b/sound/eguitar/Gb4.ogg index 94d8b2fb920..68623203a04 100644 Binary files a/sound/eguitar/Gb4.ogg and b/sound/eguitar/Gb4.ogg differ diff --git a/sound/eguitar/Gb5.ogg b/sound/eguitar/Gb5.ogg index 8177e1bbc4a..f8a0f79c322 100644 Binary files a/sound/eguitar/Gb5.ogg and b/sound/eguitar/Gb5.ogg differ diff --git a/sound/eguitar/Gb6.ogg b/sound/eguitar/Gb6.ogg index 0ca896f81bd..7ab658e12d9 100644 Binary files a/sound/eguitar/Gb6.ogg and b/sound/eguitar/Gb6.ogg differ diff --git a/sound/eguitar/Gb7.ogg b/sound/eguitar/Gb7.ogg deleted file mode 100644 index 1e37c7afa34..00000000000 Binary files a/sound/eguitar/Gb7.ogg and /dev/null differ diff --git a/sound/eguitar/Gn4.ogg b/sound/eguitar/Gn4.ogg index f2202957c5d..0a2bc3770a7 100644 Binary files a/sound/eguitar/Gn4.ogg and b/sound/eguitar/Gn4.ogg differ diff --git a/sound/eguitar/Gn5.ogg b/sound/eguitar/Gn5.ogg index 76574a6ac4a..38e04cef3b4 100644 Binary files a/sound/eguitar/Gn5.ogg and b/sound/eguitar/Gn5.ogg differ diff --git a/sound/eguitar/Gn6.ogg b/sound/eguitar/Gn6.ogg index e3c3ee14355..df8cf865172 100644 Binary files a/sound/eguitar/Gn6.ogg and b/sound/eguitar/Gn6.ogg differ diff --git a/sound/eguitar/Gn7.ogg b/sound/eguitar/Gn7.ogg deleted file mode 100644 index 9e67a7588dd..00000000000 Binary files a/sound/eguitar/Gn7.ogg and /dev/null differ diff --git a/tgstation.dme b/tgstation.dme index 3498b295a39..02781f35c61 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -16,7 +16,6 @@ #include "_maps\__MAP_DEFINES.dm" #include "_maps\tgstation2.dm" #include "code\_compile_options.dm" -#include "code\hub.dm" #include "code\world.dm" #include "code\__DATASTRUCTURES\heap.dm" #include "code\__DATASTRUCTURES\linked_lists.dm" @@ -136,11 +135,13 @@ #include "code\controllers\failsafe.dm" #include "code\controllers\master.dm" #include "code\controllers\subsystem.dm" +#include "code\controllers\subsystem\acid.dm" #include "code\controllers\subsystem\air.dm" #include "code\controllers\subsystem\assets.dm" #include "code\controllers\subsystem\augury.dm" #include "code\controllers\subsystem\diseases.dm" #include "code\controllers\subsystem\events.dm" +#include "code\controllers\subsystem\fire_burning.dm" #include "code\controllers\subsystem\garbage.dm" #include "code\controllers\subsystem\icon_smooth.dm" #include "code\controllers\subsystem\ipintel.dm" @@ -549,6 +550,7 @@ #include "code\game\objects\empulse.dm" #include "code\game\objects\explosion.dm" #include "code\game\objects\items.dm" +#include "code\game\objects\obj_defense.dm" #include "code\game\objects\objs.dm" #include "code\game\objects\radiation.dm" #include "code\game\objects\structures.dm" @@ -764,6 +766,7 @@ #include "code\game\objects\structures\grille.dm" #include "code\game\objects\structures\guncase.dm" #include "code\game\objects\structures\hivebot.dm" +#include "code\game\objects\structures\holosign.dm" #include "code\game\objects\structures\janicart.dm" #include "code\game\objects\structures\kitchen_spike.dm" #include "code\game\objects\structures\ladders.dm" diff --git a/tgui/assets/tgui.js b/tgui/assets/tgui.js index ec8b0ce7eed..15dd54c62fa 100644 --- a/tgui/assets/tgui.js +++ b/tgui/assets/tgui.js @@ -1,16 +1,16 @@ -require=function t(e,n,a){function r(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var p=Error("Cannot find module '"+o+"'");throw p.code="MODULE_NOT_FOUND",p}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return r(n?n:t)},c,c.exports,t,e,n,a)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o2?p[2]:void 0,l=Math.min((void 0===c?o:r(c,o))-u,o-s),f=1;for(s>u&&u+l>s&&(f=-1,u+=l-1,s+=l-1);l-- >0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},{76:76,79:79,80:80}],6:[function(t,e,n){"use strict";var a=t(80),r=t(76),i=t(79);e.exports=[].fill||function(t){for(var e=a(this),n=i(e.length),o=arguments,s=o.length,u=r(s>1?o[1]:void 0,n),p=s>2?o[2]:void 0,c=void 0===p?n:r(p,n);c>u;)e[u++]=t;return e}},{76:76,79:79,80:80}],7:[function(t,e,n){var a=t(78),r=t(79),i=t(76);e.exports=function(t){return function(e,n,o){var s,u=a(e),p=r(u.length),c=i(o,p);if(t&&n!=n){for(;p>c;)if(s=u[c++],s!=s)return!0}else for(;p>c;c++)if((t||c in u)&&u[c]===n)return t||c;return!t&&-1}}},{76:76,78:78,79:79}],8:[function(t,e,n){var a=t(17),r=t(34),i=t(80),o=t(79),s=t(9);e.exports=function(t){var e=1==t,n=2==t,u=3==t,p=4==t,c=6==t,l=5==t||c;return function(f,d,h){for(var m,v,g=i(f),b=r(g),y=a(d,h,3),_=o(b.length),x=0,w=e?s(f,_):n?s(f,0):void 0;_>x;x++)if((l||x in b)&&(m=b[x],v=y(m,x,g),t))if(e)w[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(p)return!1;return c?-1:u||p?p:w}}},{17:17,34:34,79:79,80:80,9:9}],9:[function(t,e,n){var a=t(38),r=t(36),i=t(83)("species");e.exports=function(t,e){var n;return r(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)||(n=void 0),a(n)&&(n=n[i],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},{36:36,38:38,83:83}],10:[function(t,e,n){var a=t(11),r=t(83)("toStringTag"),i="Arguments"==a(function(){return arguments}());e.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=(e=Object(t))[r])?n:i?a(e):"Object"==(o=a(e))&&"function"==typeof e.callee?"Arguments":o}},{11:11,83:83}],11:[function(t,e,n){var a={}.toString;e.exports=function(t){return a.call(t).slice(8,-1)}},{}],12:[function(t,e,n){"use strict";var a=t(46),r=t(31),i=t(60),o=t(17),s=t(69),u=t(18),p=t(27),c=t(42),l=t(44),f=t(82)("id"),d=t(30),h=t(38),m=t(65),v=t(19),g=Object.isExtensible||h,b=v?"_s":"size",y=0,_=function(t,e){if(!h(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!d(t,f)){if(!g(t))return"F";if(!e)return"E";r(t,f,++y)}return"O"+t[f]},x=function(t,e){var n,a=_(e);if("F"!==a)return t._i[a];for(n=t._f;n;n=n.n)if(n.k==e)return n};e.exports={getConstructor:function(t,e,n,r){var c=t(function(t,i){s(t,c,e),t._i=a.create(null),t._f=void 0,t._l=void 0,t[b]=0,void 0!=i&&p(i,n,t[r],t)});return i(c.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[b]=0},"delete":function(t){var e=this,n=x(e,t);if(n){var a=n.n,r=n.p;delete e._i[n.i],n.r=!0,r&&(r.n=a),a&&(a.p=r),e._f==n&&(e._f=a),e._l==n&&(e._l=r),e[b]--}return!!n},forEach:function(t){for(var e,n=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!x(this,t)}}),v&&a.setDesc(c.prototype,"size",{get:function(){return u(this[b])}}),c},def:function(t,e,n){var a,r,i=x(t,e);return i?i.v=n:(t._l=i={i:r=_(e,!0),k:e,v:n,p:a=t._l,n:void 0,r:!1},t._f||(t._f=i),a&&(a.n=i),t[b]++,"F"!==r&&(t._i[r]=i)),t},getEntry:x,setStrong:function(t,e,n){c(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),m(e)}}},{17:17,18:18,19:19,27:27,30:30,31:31,38:38,42:42,44:44,46:46,60:60,65:65,69:69,82:82}],13:[function(t,e,n){var a=t(27),r=t(10);e.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return a(this,!1,e.push,e),e}}},{10:10,27:27}],14:[function(t,e,n){"use strict";var a=t(31),r=t(60),i=t(4),o=t(38),s=t(69),u=t(27),p=t(8),c=t(30),l=t(82)("weak"),f=Object.isExtensible||o,d=p(5),h=p(6),m=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},b=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=b(this,t);return e?e[1]:void 0},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},e.exports={getConstructor:function(t,e,n,a){var i=t(function(t,r){s(t,i,e),t._i=m++,t._l=void 0,void 0!=r&&u(r,n,t[a],t)});return r(i.prototype,{"delete":function(t){return o(t)?f(t)?c(t,l)&&c(t[l],this._i)&&delete t[l][this._i]:v(this)["delete"](t):!1},has:function(t){return o(t)?f(t)?c(t,l)&&c(t[l],this._i):v(this).has(t):!1}}),i},def:function(t,e,n){return f(i(e))?(c(e,l)||a(e,l,{}),e[l][t._i]=n):v(t).set(e,n),t},frozenStore:v,WEAK:l}},{27:27,30:30,31:31,38:38,4:4,60:60,69:69,8:8,82:82}],15:[function(t,e,n){"use strict";var a=t(29),r=t(22),i=t(61),o=t(60),s=t(27),u=t(69),p=t(38),c=t(24),l=t(43),f=t(66);e.exports=function(t,e,n,d,h,m){var v=a[t],g=v,b=h?"set":"add",y=g&&g.prototype,_={},x=function(t){var e=y[t];i(y,t,"delete"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!p(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof g&&(m||y.forEach&&!c(function(){(new g).entries().next()}))){var w,k=new g,P=k[b](m?{}:-0,1)!=k,E=c(function(){k.has(1)}),C=l(function(t){new g(t)});C||(g=e(function(e,n){u(e,g,t);var a=new v;return void 0!=n&&s(n,h,a[b],a),a}),g.prototype=y,y.constructor=g),m||k.forEach(function(t,e){w=1/e===-(1/0)}),(E||w)&&(x("delete"),x("has"),h&&x("get")),(w||P)&&x(b),m&&y.clear&&delete y.clear}else g=d.getConstructor(e,t,h,b),o(g.prototype,n);return f(g,t),_[t]=g,r(r.G+r.W+r.F*(g!=v),_),m||d.setStrong(g,t,h),g}},{22:22,24:24,27:27,29:29,38:38,43:43,60:60,61:61,66:66,69:69}],16:[function(t,e,n){var a=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=a)},{}],17:[function(t,e,n){var a=t(2);e.exports=function(t,e,n){if(a(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,a){return t.call(e,n,a)};case 3:return function(n,a,r){return t.call(e,n,a,r)}}return function(){return t.apply(e,arguments)}}},{2:2}],18:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],19:[function(t,e,n){e.exports=!t(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{24:24}],20:[function(t,e,n){var a=t(38),r=t(29).document,i=a(r)&&a(r.createElement);e.exports=function(t){return i?r.createElement(t):{}}},{29:29,38:38}],21:[function(t,e,n){var a=t(46);e.exports=function(t){var e=a.getKeys(t),n=a.getSymbols;if(n)for(var r,i=n(t),o=a.isEnum,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e}},{46:46}],22:[function(t,e,n){var a=t(29),r=t(16),i=t(31),o=t(61),s=t(17),u="prototype",p=function(t,e,n){var c,l,f,d,h=t&p.F,m=t&p.G,v=t&p.S,g=t&p.P,b=t&p.B,y=m?a:v?a[e]||(a[e]={}):(a[e]||{})[u],_=m?r:r[e]||(r[e]={}),x=_[u]||(_[u]={});m&&(n=e);for(c in n)l=!h&&y&&c in y,f=(l?y:n)[c],d=b&&l?s(f,a):g&&"function"==typeof f?s(Function.call,f):f,y&&!l&&o(y,c,f),_[c]!=f&&i(_,c,d),g&&x[c]!=f&&(x[c]=f)};a.core=r,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,e.exports=p},{16:16,17:17,29:29,31:31,61:61}],23:[function(t,e,n){var a=t(83)("match");e.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[a]=!1,!"/./"[t](e)}catch(r){}}return!0}},{83:83}],24:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],25:[function(t,e,n){"use strict";var a=t(31),r=t(61),i=t(24),o=t(18),s=t(83);e.exports=function(t,e,n){var u=s(t),p=""[t];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,n(o,u,p)),a(RegExp.prototype,u,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)}))}},{18:18,24:24,31:31,61:61,83:83}],26:[function(t,e,n){"use strict";var a=t(4);e.exports=function(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},{4:4}],27:[function(t,e,n){var a=t(17),r=t(40),i=t(35),o=t(4),s=t(79),u=t(84);e.exports=function(t,e,n,p){var c,l,f,d=u(t),h=a(n,p,e?2:1),m=0;if("function"!=typeof d)throw TypeError(t+" is not iterable!");if(i(d))for(c=s(t.length);c>m;m++)e?h(o(l=t[m])[0],l[1]):h(t[m]);else for(f=d.call(t);!(l=f.next()).done;)r(f,h,l.value,e)}},{17:17,35:35,4:4,40:40,79:79,84:84}],28:[function(t,e,n){var a=t(78),r=t(46).getNames,i={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(e){return o.slice()}};e.exports.get=function(t){return o&&"[object Window]"==i.call(t)?s(t):r(a(t))}},{46:46,78:78}],29:[function(t,e,n){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},{}],30:[function(t,e,n){var a={}.hasOwnProperty;e.exports=function(t,e){return a.call(t,e)}},{}],31:[function(t,e,n){var a=t(46),r=t(59);e.exports=t(19)?function(t,e,n){return a.setDesc(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},{19:19,46:46,59:59}],32:[function(t,e,n){e.exports=t(29).document&&document.documentElement},{29:29}],33:[function(t,e,n){e.exports=function(t,e,n){var a=void 0===n;switch(e.length){case 0:return a?t():t.call(n);case 1:return a?t(e[0]):t.call(n,e[0]);case 2:return a?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return a?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return a?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],34:[function(t,e,n){var a=t(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},{11:11}],35:[function(t,e,n){var a=t(45),r=t(83)("iterator"),i=Array.prototype;e.exports=function(t){return void 0!==t&&(a.Array===t||i[r]===t)}},{45:45,83:83}],36:[function(t,e,n){var a=t(11);e.exports=Array.isArray||function(t){return"Array"==a(t)}},{11:11}],37:[function(t,e,n){var a=t(38),r=Math.floor;e.exports=function(t){return!a(t)&&isFinite(t)&&r(t)===t}},{38:38}],38:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],39:[function(t,e,n){var a=t(38),r=t(11),i=t(83)("match");e.exports=function(t){var e;return a(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==r(t))}},{11:11,38:38,83:83}],40:[function(t,e,n){var a=t(4);e.exports=function(t,e,n,r){try{return r?e(a(n)[0],n[1]):e(n)}catch(i){var o=t["return"];throw void 0!==o&&a(o.call(t)),i}}},{4:4}],41:[function(t,e,n){"use strict";var a=t(46),r=t(59),i=t(66),o={};t(31)(o,t(83)("iterator"),function(){return this}),e.exports=function(t,e,n){t.prototype=a.create(o,{next:r(1,n)}),i(t,e+" Iterator")}},{31:31,46:46,59:59,66:66,83:83}],42:[function(t,e,n){"use strict";var a=t(48),r=t(22),i=t(61),o=t(31),s=t(30),u=t(45),p=t(41),c=t(66),l=t(46).getProto,f=t(83)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(t,e,n,b,y,_,x){p(n,e,b);var w,k,P=function(t){if(!d&&t in A)return A[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",C=y==v,S=!1,A=t.prototype,O=A[f]||A[h]||y&&A[y],T=O||P(y);if(O){var M=l(T.call(new t));c(M,E,!0),!a&&s(A,h)&&o(M,f,g),C&&O.name!==v&&(S=!0,T=function(){return O.call(this)})}if(a&&!x||!d&&!S&&A[f]||o(A,f,T),u[e]=T,u[E]=g,y)if(w={values:C?T:P(v),keys:_?T:P(m),entries:C?P("entries"):T},x)for(k in w)k in A||i(A,k,w[k]);else r(r.P+r.F*(d||S),e,w);return w}},{22:22,30:30,31:31,41:41,45:45,46:46,48:48,61:61,66:66,83:83}],43:[function(t,e,n){var a=t(83)("iterator"),r=!1;try{var i=[7][a]();i["return"]=function(){r=!0},Array.from(i,function(){throw 2})}catch(o){}e.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var i=[7],o=i[a]();o.next=function(){n=!0},i[a]=function(){return o},t(i)}catch(s){}return n}},{83:83}],44:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],45:[function(t,e,n){e.exports={}},{}],46:[function(t,e,n){var a=Object;e.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},{}],47:[function(t,e,n){var a=t(46),r=t(78);e.exports=function(t,e){for(var n,i=r(t),o=a.getKeys(i),s=o.length,u=0;s>u;)if(i[n=o[u++]]===e)return n}},{46:46,78:78}],48:[function(t,e,n){e.exports=!1},{}],49:[function(t,e,n){e.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},{}],50:[function(t,e,n){e.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},{}],51:[function(t,e,n){e.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},{}],52:[function(t,e,n){var a,r,i,o=t(29),s=t(75).set,u=o.MutationObserver||o.WebKitMutationObserver,p=o.process,c=o.Promise,l="process"==t(11)(p),f=function(){var t,e,n;for(l&&(t=p.domain)&&(p.domain=null,t.exit());a;)e=a.domain,n=a.fn,e&&e.enter(),n(),e&&e.exit(),a=a.next;r=void 0,t&&t.enter()};if(l)i=function(){p.nextTick(f)};else if(u){var d=1,h=document.createTextNode("");new u(f).observe(h,{characterData:!0}),i=function(){h.data=d=-d}}else i=c&&c.resolve?function(){c.resolve().then(f)}:function(){s.call(o,f)};e.exports=function(t){var e={fn:t,next:void 0,domain:l&&p.domain};r&&(r.next=e),a||(a=e,i()),r=e}},{11:11,29:29,75:75}],53:[function(t,e,n){var a=t(46),r=t(80),i=t(34);e.exports=t(24)(function(){var t=Object.assign,e={},n={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(t){n[t]=t}),7!=t({},e)[a]||Object.keys(t({},n)).join("")!=r})?function(t,e){for(var n=r(t),o=arguments,s=o.length,u=1,p=a.getKeys,c=a.getSymbols,l=a.isEnum;s>u;)for(var f,d=i(o[u++]),h=c?p(d).concat(c(d)):p(d),m=h.length,v=0;m>v;)l.call(d,f=h[v++])&&(n[f]=d[f]);return n}:Object.assign},{24:24,34:34,46:46,80:80}],54:[function(t,e,n){var a=t(22),r=t(16),i=t(24);e.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],o={};o[t]=e(n),a(a.S+a.F*i(function(){n(1)}),"Object",o)}},{16:16,22:22,24:24}],55:[function(t,e,n){var a=t(46),r=t(78),i=a.isEnum;e.exports=function(t){return function(e){for(var n,o=r(e),s=a.getKeys(o),u=s.length,p=0,c=[];u>p;)i.call(o,n=s[p++])&&c.push(t?[n,o[n]]:o[n]);return c}}},{46:46,78:78}],56:[function(t,e,n){var a=t(46),r=t(4),i=t(29).Reflect;e.exports=i&&i.ownKeys||function(t){var e=a.getNames(r(t)),n=a.getSymbols;return n?e.concat(n(t)):e}},{29:29,4:4,46:46}],57:[function(t,e,n){"use strict";var a=t(58),r=t(33),i=t(2);e.exports=function(){for(var t=i(this),e=arguments.length,n=Array(e),o=0,s=a._,u=!1;e>o;)(n[o]=arguments[o++])===s&&(u=!0);return function(){var a,i=this,o=arguments,p=o.length,c=0,l=0;if(!u&&!p)return r(t,n,i);if(a=n.slice(),u)for(;e>c;c++)a[c]===s&&(a[c]=o[l++]);for(;p>l;)a.push(o[l++]);return r(t,a,i)}}},{2:2,33:33,58:58}],58:[function(t,e,n){e.exports=t(29)},{29:29}],59:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],60:[function(t,e,n){var a=t(61);e.exports=function(t,e){for(var n in e)a(t,n,e[n]);return t}},{61:61}],61:[function(t,e,n){var a=t(29),r=t(31),i=t(82)("src"),o="toString",s=Function[o],u=(""+s).split(o);t(16).inspectSource=function(t){return s.call(t)},(e.exports=function(t,e,n,o){"function"==typeof n&&(n.hasOwnProperty(i)||r(n,i,t[e]?""+t[e]:u.join(e+"")),n.hasOwnProperty("name")||r(n,"name",e)),t===a?t[e]=n:(o||delete t[e],r(t,e,n))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||s.call(this)})},{16:16,29:29,31:31,82:82}],62:[function(t,e,n){e.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return(e+"").replace(t,n)}}},{}],63:[function(t,e,n){e.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},{}],64:[function(t,e,n){var a=t(46).getDesc,r=t(38),i=t(4),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{r=t(17)(Function.call,a(Object.prototype,"__proto__").set,2),r(e,[]),n=!(e instanceof Array)}catch(i){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},{17:17,38:38,4:4,46:46}],65:[function(t,e,n){"use strict";var a=t(29),r=t(46),i=t(19),o=t(83)("species");e.exports=function(t){var e=a[t];i&&e&&!e[o]&&r.setDesc(e,o,{configurable:!0,get:function(){return this}})}},{19:19,29:29,46:46,83:83}],66:[function(t,e,n){var a=t(46).setDesc,r=t(30),i=t(83)("toStringTag");e.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&a(t,i,{configurable:!0,value:e})}},{30:30,46:46,83:83}],67:[function(t,e,n){var a=t(29),r="__core-js_shared__",i=a[r]||(a[r]={});e.exports=function(t){return i[t]||(i[t]={})}},{29:29}],68:[function(t,e,n){var a=t(4),r=t(2),i=t(83)("species");e.exports=function(t,e){var n,o=a(t).constructor;return void 0===o||void 0==(n=a(o)[i])?e:r(n)}},{2:2,4:4,83:83}],69:[function(t,e,n){e.exports=function(t,e,n){if(!(t instanceof e))throw TypeError(n+": use the 'new' operator!");return t}},{}],70:[function(t,e,n){var a=t(77),r=t(18);e.exports=function(t){return function(e,n){var i,o,s=r(e)+"",u=a(n),p=s.length;return 0>u||u>=p?t?"":void 0:(i=s.charCodeAt(u),55296>i||i>56319||u+1===p||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(o-56320)+65536)}}},{18:18,77:77}],71:[function(t,e,n){var a=t(39),r=t(18);e.exports=function(t,e,n){if(a(e))throw TypeError("String#"+n+" doesn't accept regex!");return r(t)+""}},{18:18,39:39}],72:[function(t,e,n){var a=t(79),r=t(73),i=t(18);e.exports=function(t,e,n,o){var s=i(t)+"",u=s.length,p=void 0===n?" ":n+"",c=a(e);if(u>=c)return s;""==p&&(p=" ");var l=c-u,f=r.call(p,Math.ceil(l/p.length));return f.length>l&&(f=f.slice(0,l)),o?f+s:s+f}},{18:18,73:73,79:79}],73:[function(t,e,n){"use strict";var a=t(77),r=t(18);e.exports=function(t){var e=r(this)+"",n="",i=a(t);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},{18:18,77:77}],74:[function(t,e,n){var a=t(22),r=t(18),i=t(24),o=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",s="["+o+"]",u="​…",p=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e){var n={};n[t]=e(f),a(a.P+a.F*i(function(){return!!o[t]()||u[t]()!=u}),"String",n)},f=l.trim=function(t,e){return t=r(t)+"",1&e&&(t=t.replace(p,"")),2&e&&(t=t.replace(c,"")),t};e.exports=l},{18:18,22:22,24:24}],75:[function(t,e,n){var a,r,i,o=t(17),s=t(33),u=t(32),p=t(20),c=t(29),l=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,m=0,v={},g="onreadystatechange",b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},y=function(t){b.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++m]=function(){s("function"==typeof t?t:Function(t),e)},a(m),m},d=function(t){delete v[t]},"process"==t(11)(l)?a=function(t){l.nextTick(o(b,t,1))}:h?(r=new h,i=r.port2,r.port1.onmessage=y,a=o(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",y,!1)):a=g in p("script")?function(t){u.appendChild(p("script"))[g]=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(o(b,t,1),0)}),e.exports={set:f,clear:d}},{11:11,17:17,20:20,29:29,32:32,33:33}],76:[function(t,e,n){var a=t(77),r=Math.max,i=Math.min;e.exports=function(t,e){return t=a(t),0>t?r(t+e,0):i(t,e)}},{77:77}],77:[function(t,e,n){var a=Math.ceil,r=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?r:a)(t)}},{}],78:[function(t,e,n){var a=t(34),r=t(18);e.exports=function(t){return a(r(t))}},{18:18,34:34}],79:[function(t,e,n){var a=t(77),r=Math.min;e.exports=function(t){return t>0?r(a(t),9007199254740991):0}},{77:77}],80:[function(t,e,n){var a=t(18);e.exports=function(t){return Object(a(t))}},{18:18}],81:[function(t,e,n){var a=t(38);e.exports=function(t,e){if(!a(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!a(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},{38:38}],82:[function(t,e,n){var a=0,r=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+r).toString(36))}},{}],83:[function(t,e,n){var a=t(67)("wks"),r=t(82),i=t(29).Symbol;e.exports=function(t){return a[t]||(a[t]=i&&i[t]||(i||r)("Symbol."+t))}},{29:29,67:67,82:82}],84:[function(t,e,n){var a=t(10),r=t(83)("iterator"),i=t(45);e.exports=t(16).getIteratorMethod=function(t){return void 0!=t?t[r]||t["@@iterator"]||i[a(t)]:void 0}},{10:10,16:16,45:45,83:83}],85:[function(t,e,n){"use strict";var a,r=t(46),i=t(22),o=t(19),s=t(59),u=t(32),p=t(20),c=t(30),l=t(11),f=t(33),d=t(24),h=t(4),m=t(2),v=t(38),g=t(80),b=t(78),y=t(77),_=t(76),x=t(79),w=t(34),k=t(82)("__proto__"),P=t(8),E=t(7)(!1),C=Object.prototype,S=Array.prototype,A=S.slice,O=S.join,T=r.setDesc,M=r.getDesc,R=r.setDescs,j={};o||(a=!d(function(){return 7!=T(p("div"),"a",{get:function(){return 7}}).a}),r.setDesc=function(t,e,n){if(a)try{return T(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(h(t)[e]=n.value),t},r.getDesc=function(t,e){if(a)try{return M(t,e)}catch(n){}return c(t,e)?s(!C.propertyIsEnumerable.call(t,e),t[e]):void 0},r.setDescs=R=function(t,e){h(t);for(var n,a=r.getKeys(e),i=a.length,o=0;i>o;)r.setDesc(t,n=a[o++],e[n]);return t}),i(i.S+i.F*!o,"Object",{getOwnPropertyDescriptor:r.getDesc,defineProperty:r.setDesc,defineProperties:R});var L="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),N=L.concat("length","prototype"),D=L.length,F=function(){var t,e=p("iframe"),n=D,a=">";for(e.style.display="none",u.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("