diff --git a/code/game/machinery/poweredfans.dm b/code/game/machinery/poweredfans.dm new file mode 100644 index 00000000..f10c7cb3 --- /dev/null +++ b/code/game/machinery/poweredfans.dm @@ -0,0 +1,59 @@ +/obj/machinery/poweredfans + icon = 'icons/obj/poweredfans.dmi' + icon_state = "mfan_powered" + name = "placeholder big fan" + desc = "A large machine releasing a constant gust of air." + anchored = TRUE + density = TRUE + var/buildstacktype = /obj/item/stack/sheet/metal + var/buildstackamount = 5 + CanAtmosPass = ATMOS_PASS_NO + +/obj/machinery/poweredfans/mpfan + name = "micro powered fan" + desc = "A handmade fan, releasing a thin gust of air." + layer = ABOVE_NORMAL_TURF_LAYER + density = FALSE + icon_state = "mfan_powered" + buildstackamount = 2 + use_power = ACTIVE_POWER_USE + idle_power_usage = 1 + active_power_usage = 3 + CanAtmosPass = ATMOS_PASS_NO + +/obj/machinery/poweredfans/deconstruct() + if(!(flags_1 & NODECONSTRUCT_1)) + if(buildstacktype) + new buildstacktype(loc,buildstackamount) + qdel(src) + +/obj/machinery/poweredfans/wrench_act(mob/living/user, obj/item/I) + if(flags_1 & NODECONSTRUCT_1) + return TRUE + + user.visible_message("[user] disassembles [src].", + "You start to disassemble [src]...", "You hear clanking and banging noises.") + if(I.use_tool(src, user, 20, volume=50)) + deconstruct() + return TRUE + +/obj/machinery/poweredfans/Initialize(mapload) + . = ..() + air_update_turf(1) + +/obj/machinery/poweredfans/power_change() + ..() + update_icon() + +/obj/machinery/poweredfans/update_icon() + //if(state & NOPOWER) + if(powered()) + icon_state = "mfan_powered" + CanAtmosPass = ATMOS_PASS_NO + air_update_turf(1) + return + else + icon_state = "mfan_unpowered" + CanAtmosPass = ATMOS_PASS_YES + air_update_turf(1) + return diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 9872f407..db4816e9 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -92,7 +92,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ null, \ new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, one_per_turf = TRUE, on_floor = TRUE), \ - new/datum/stack_recipe("tiny fan", /obj/structure/fans/tiny, 3, time = 35, one_per_turf = TRUE, on_floor = TRUE), \ + new/datum/stack_recipe("micro powered fan", /obj/machinery/poweredfans/mpfan, 2, time = 35, one_per_turf = TRUE, on_floor = TRUE), \ )) /obj/item/stack/sheet/metal diff --git a/icons/obj/poweredfans.dmi b/icons/obj/poweredfans.dmi new file mode 100644 index 00000000..9e80ce43 Binary files /dev/null and b/icons/obj/poweredfans.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 8e89617c..0fbce8f1 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -611,6 +611,7 @@ #include "code\game\machinery\newscaster.dm" #include "code\game\machinery\PDApainter.dm" #include "code\game\machinery\posi_alert.dm" +#include "code\game\machinery\poweredfans.dm" #include "code\game\machinery\quantum_pad.dm" #include "code\game\machinery\recharger.dm" #include "code\game\machinery\rechargestation.dm"