diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index b366cc64f7..c16102bc55 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -122,9 +122,9 @@ if(use_external_power) battery = get_external_power_supply() - if(times_used <= max_flashes && battery && battery.checked_use(charge_cost)) + if(times_used <= max_flashes && battery && battery.charge >= charge_cost) last_used = world.time - if(prob( max(0, times_used - safe_flashes) * 2 + (times_used >= 1) ) && can_break) //if you use it 10 times in a minute it has a 30% chance to break. + if(prob( max(0, times_used - safe_flashes) * 2 + (times_used >= safe_flashes)) && can_break) //if you use it 10 times in a minute it has a 30% chance to break. broken = TRUE if(user) to_chat(user, "The bulb has burnt out!") diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm index e6b02663ee..8cd02d9bb0 100644 --- a/code/game/objects/structures/simple_doors.dm +++ b/code/game/objects/structures/simple_doors.dm @@ -131,7 +131,7 @@ user << "You finished digging." Dismantle() else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc? - hardness -= W.force/100 + hardness -= W.force/10 user << "You hit the [name] with your [W.name]!" CheckHardness() else if(istype(W,/obj/item/weapon/weldingtool)) @@ -142,6 +142,10 @@ attack_hand(user) return +/obj/structure/simple_door/bullet_act(var/obj/item/projectile/Proj) + hardness -= Proj.force/10 + CheckHardness() + /obj/structure/simple_door/proc/CheckHardness() if(hardness <= 0) Dismantle(1) diff --git a/code/modules/events/camera_damage.dm b/code/modules/events/camera_damage.dm index 3205a93137..6a86581b70 100644 --- a/code/modules/events/camera_damage.dm +++ b/code/modules/events/camera_damage.dm @@ -33,6 +33,6 @@ return acquire_random_camera(remaining_attempts--) /datum/event/camera_damage/proc/is_valid_camera(var/obj/machinery/camera/C) - // Only return a functional camera, not installed in a silicon, and that exists somewhere players have access + // Only return a functional camera, not installed in a silicon/hardsuit/circuit/etc, and that exists somewhere players have access var/turf/T = get_turf(C) - return T && C.can_use() && !istype(C.loc, /mob/living/silicon) && (T.z in using_map.player_levels) + return T && C.can_use() && istype(C.loc, /turf) && (T.z in using_map.player_levels) diff --git a/code/modules/gamemaster/actions/camera_damage.dm b/code/modules/gamemaster/actions/camera_damage.dm index 0f1ef38e9c..e064c3cb1f 100644 --- a/code/modules/gamemaster/actions/camera_damage.dm +++ b/code/modules/gamemaster/actions/camera_damage.dm @@ -44,9 +44,9 @@ return acquire_random_camera(remaining_attempts--) /datum/gm_action/camera_damage/proc/is_valid_camera(var/obj/machinery/camera/C) - // Only return a functional camera, not installed in a silicon, and that exists somewhere players have access + // Only return a functional camera, not installed in a silicon/hardsuit/circuit/etc, and that exists somewhere players have access var/turf/T = get_turf(C) - return T && C.can_use() && !istype(C.loc, /mob/living/silicon) && (T.z in using_map.player_levels) + return T && C.can_use() && istype(C.loc, /turf) && (T.z in using_map.player_levels) /datum/gm_action/camera_damage/get_weight() return 40 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20) + (metric.count_people_in_department(ROLE_SYNTHETIC) * 40) diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index f45adba787..687e5df27e 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -197,8 +197,13 @@ /material/wood/sif/generate_recipes() ..() recipes += new/datum/stack_recipe("alien wood floor tile", /obj/item/stack/tile/wood/sif, 1, 4, 20) - recipes -= new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20) - recipes -= new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1) + for(var/datum/stack_recipe/r_recipe in recipes) + if(r_recipe.title == "wood floor tile") + recipes -= r_recipe + continue + if(r_recipe.title == "wooden chair") + recipes -= r_recipe + continue /material/supermatter/generate_recipes() recipes = list() diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 46cb30e3d2..0bc877cdcc 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -864,7 +864,7 @@ var/list/name_to_material /material/wood/sif name = MAT_SIFWOOD -// stack_type = /obj/item/stack/material/wood/sif + stack_type = /obj/item/stack/material/wood/sif icon_colour = "#0099cc" // Cyan-ish stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) // Alien wood would presumably be more interesting to the analyzer. diff --git a/code/modules/projectiles/targeting/targeting_gun.dm b/code/modules/projectiles/targeting/targeting_gun.dm index e2ef466255..3b80658226 100644 --- a/code/modules/projectiles/targeting/targeting_gun.dm +++ b/code/modules/projectiles/targeting/targeting_gun.dm @@ -17,5 +17,7 @@ user.face_atom(A) if(ismob(A) && user.aiming) user.aiming.aim_at(A, src) + if(!isliving(A)) + return 0 return 1 return 0 \ No newline at end of file diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index a6875ce62c..b06407b74c 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -24,6 +24,7 @@ // Gambling tables. I'd prefer reinforced with carpet/felt/cloth/whatever, but AFAIK it's either harder or impossible to get /obj/item/stack/material of those. // Convert if/when you can easily get stacks of these. var/carpeted = 0 + var/carpeted_type = /obj/item/stack/tile/carpet var/list/connections = list("nw0", "ne0", "sw0", "se0") @@ -108,7 +109,7 @@ if(carpeted && W.is_crowbar()) user.visible_message("\The [user] removes the carpet from \the [src].", "You remove the carpet from \the [src].") - new /obj/item/stack/tile/carpet(loc) + new carpeted_type(loc) carpeted = 0 update_icon() return 1 @@ -119,6 +120,7 @@ user.visible_message("\The [user] adds \the [C] to \the [src].", "You add \the [C] to \the [src].") carpeted = 1 + carpeted_type = W.type update_icon() return 1 else @@ -313,7 +315,7 @@ S = material.place_shard(loc) if(S) shards += S if(carpeted && (full_return || prob(50))) // Higher chance to get the carpet back intact, since there's no non-intact option - new /obj/item/stack/tile/carpet(src.loc) + new carpeted_type(src.loc) if(full_return || prob(20)) new /obj/item/stack/material/steel(src.loc) else diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index f653a7f636..0183da53ed 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -16,6 +16,7 @@ var/list/ventcrawl_machinery = list( /mob/living/var/list/icon/pipes_shown = list() /mob/living/var/last_played_vent /mob/living/var/is_ventcrawling = 0 +/mob/living/var/prepping_to_ventcrawl = 0 /mob/var/next_play_vent = 0 /mob/living/proc/can_ventcrawl() @@ -104,7 +105,7 @@ var/list/ventcrawl_machinery = list( /mob/living/var/ventcrawl_layer = 3 /mob/living/proc/handle_ventcrawl(var/atom/clicked_on) - if(!can_ventcrawl()) + if(!can_ventcrawl() || prepping_to_ventcrawl) return var/obj/machinery/atmospherics/unary/vent_found @@ -151,6 +152,9 @@ var/list/ventcrawl_machinery = list( to_chat(src, "You feel a roaring wind pushing you away from the vent!") fade_towards(vent_found,45) + prepping_to_ventcrawl = 1 + spawn(50) + prepping_to_ventcrawl = 0 if(!do_after(src, 45, vent_found, 1, 1)) return if(!can_ventcrawl())