diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 7ed82b476f9..2bc9196740e 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -348,28 +348,28 @@ Class Procs: return attack_hand(user) /obj/machinery/attack_hand(mob/user as mob) - if(user.lying || user.stat) - return 1 + if(user.incapacitated()) + return TRUE if(!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") - return 1 + return TRUE if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.getBrainLoss() >= 60) visible_message("[H] stares cluelessly at [src] and drools.") - return 1 + return TRUE else if(prob(H.getBrainLoss())) to_chat(user, "You momentarily forget how to use [src].") - return 1 + return TRUE if(panel_open) add_fingerprint(user) - return 0 + return FALSE if(!interact_offline && stat & (NOPOWER|BROKEN|MAINT)) - return 1 + return TRUE add_fingerprint(user) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 860692673a5..03b8404b1f0 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -20,18 +20,27 @@ anchored = TRUE var/obj/machinery/mineral/processing_unit/machine = null var/machinedir = EAST + speed_process = TRUE -/obj/machinery/mineral/processing_unit_console/New() - ..() +/obj/machinery/mineral/processing_unit_console/Initialize(mapload) + . = ..() machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir)) if(machine) machine.CONSOLE = src else - qdel(src) + return INITIALIZE_HINT_QDEL + +/obj/machinery/mineral/processing_unit_console/attack_ghost(mob/user) + return ui_interact(user) /obj/machinery/mineral/processing_unit_console/attack_hand(mob/user) if(..()) - return + return TRUE + + return ui_interact(user) + +/obj/machinery/mineral/processing_unit_console/ui_interact(mob/user) + . = ..() if(!machine) return @@ -43,7 +52,8 @@ /obj/machinery/mineral/processing_unit_console/Topic(href, href_list) if(..()) - return + return TRUE + usr.set_machine(src) add_fingerprint(usr) @@ -59,15 +69,14 @@ machine.on = (href_list["set_on"] == "on") updateUsrDialog() + return TRUE /obj/machinery/mineral/processing_unit_console/Destroy() machine = null return ..() - /**********************Mineral processing unit**************************/ - /obj/machinery/mineral/processing_unit name = "furnace" icon = 'icons/obj/machines/mining_machines.dmi' @@ -81,8 +90,8 @@ var/datum/research/files speed_process = TRUE -/obj/machinery/mineral/processing_unit/New() - ..() +/obj/machinery/mineral/processing_unit/Initialize(mapload) + . = ..() AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE), INFINITY, TRUE, /obj/item/stack) files = new /datum/research/smelter(src) @@ -99,6 +108,7 @@ for(var/obj/item/stack/ore/O in T) process_ore(O) CHECK_TICK + if(on) if(selected_material) smelt_ore() @@ -106,11 +116,9 @@ else if(selected_alloy) smelt_alloy() - if(CONSOLE) CONSOLE.updateUsrDialog() - /obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O) GET_COMPONENT(materials, /datum/component/material_container) var/material_amount = materials.get_item_material_amount(O) @@ -167,7 +175,6 @@ var/out = get_step(src, output_dir) materials.retrieve_sheets(sheets_to_remove, selected_material, out) - /obj/machinery/mineral/processing_unit/proc/smelt_alloy() var/datum/design/alloy = files.FindDesignByID(selected_alloy) //check if it's a valid design if(!alloy) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index e0c58c484d8..276ee7b246e 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -3,9 +3,9 @@ set background = BACKGROUND_ENABLED if(notransform) - return 0 + return FALSE if(!loc) - return 0 + return FALSE var/datum/gas_mixture/environment = loc.return_air() if(client || registered_z) // This is a temporary error tracker to make sure we've caught everything diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 0f4fd774dc5..9c787639ba4 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -67,7 +67,7 @@ . = ..() if(!.) walk(src, 0) - return 0 + return FALSE /mob/living/simple_animal/hostile/handle_automated_action() if(AIStatus == AI_OFF) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm index 66f8e4fd873..a1c488b4068 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm @@ -10,7 +10,7 @@ attack_sound = 'sound/weapons/punch4.ogg' mouse_opacity = MOUSE_OPACITY_OPAQUE move_to_delay = 40 - ranged = 1 + ranged = TRUE ranged_cooldown = 2 //By default, start the Goliath with his cooldown off so that people can run away quickly on first sight ranged_cooldown_time = 120 friendly = "wails at" @@ -31,12 +31,12 @@ move_force = MOVE_FORCE_VERY_STRONG move_resist = MOVE_FORCE_VERY_STRONG pull_force = MOVE_FORCE_VERY_STRONG - var/pre_attack = 0 + var/pre_attack = FALSE var/pre_attack_icon = "Goliath_preattack" loot = list(/obj/item/stack/sheet/animalhide/goliath_hide) /mob/living/simple_animal/hostile/asteroid/goliath/Life() - ..() + . = ..() handle_preattack() /mob/living/simple_animal/hostile/asteroid/goliath/proc/handle_preattack() @@ -59,8 +59,7 @@ new /obj/effect/temp_visual/goliath_tentacle/original(tturf, src) ranged_cooldown = world.time + ranged_cooldown_time icon_state = icon_aggro - pre_attack = 0 - return + pre_attack = FALSE /mob/living/simple_animal/hostile/asteroid/goliath/adjustHealth(damage) ranged_cooldown-- @@ -72,7 +71,6 @@ handle_preattack() if(icon_state != icon_aggro) icon_state = icon_aggro - return // Lavaland Goliath /mob/living/simple_animal/hostile/asteroid/goliath/beast @@ -87,8 +85,8 @@ pre_attack_icon = "goliath2" butcher_results = list(/obj/item/reagent_containers/food/snacks/goliath = 2, /obj/item/stack/sheet/animalhide/goliath_hide = 1, /obj/item/stack/sheet/bone = 2) loot = list() - stat_attack = 1 - robust_searching = 1 + stat_attack = TRUE + robust_searching = TRUE /mob/living/simple_animal/hostile/asteroid/goliath/beast/random/Initialize() . = ..() @@ -136,7 +134,7 @@ /mob/living/simple_animal/hostile/asteroid/goliath/beast/tendril fromtendril = TRUE -//tentacles +// Tentacles /obj/effect/temp_visual/goliath_tentacle name = "goliath tentacle" icon = 'icons/mob/lavaland/lavaland_monsters.dmi'