diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm new file mode 100644 index 0000000000..bd5f742128 --- /dev/null +++ b/code/game/machinery/transformer.dm @@ -0,0 +1,54 @@ +/obj/machinery/transformer + name = "Automatic Robotic Factory 5000" + desc = "A large metalic machine with an entrance and an exit. A sign on the side reads, 'human go in, robot come out', human must be lying down and alive." + icon = 'icons/obj/recycling.dmi' + icon_state = "separator-AO1" + layer = MOB_LAYER+1 // Overhead + anchored = 1 + density = 1 + var/transform_dead = 0 + +/obj/machinery/transformer/New() + ..() + var/turf/T = loc + if(T) + // Spawn Conveyour Belts + + //East + var/turf/east = locate(T.x + 1, T.y, T.z) + if(istype(east, /turf/simulated/floor)) + new /obj/machinery/conveyor(east, WEST, 1) + + // West + var/turf/west = locate(T.x - 1, T.y, T.z) + if(istype(west, /turf/simulated/floor)) + new /obj/machinery/conveyor(west, WEST, 1) + + // On us + new /obj/machinery/conveyor(T, WEST, 1) + +/obj/machinery/transformer/Bumped(var/atom/movable/AM) + // HasEntered didn't like people lying down. + world << "BUMP!" + if(ishuman(AM)) + // Only humans can enter from the west side, while lying down. + var/move_dir = get_dir(loc, AM.loc) + var/mob/living/carbon/human/H = AM + if(H.lying && move_dir == EAST)// || move_dir == WEST) + AM.loc = src.loc + transform(AM) + +/obj/machinery/transformer/proc/transform(var/mob/living/carbon/human/H) + if(stat & (BROKEN|NOPOWER)) + return + if(!transform_dead && H.stat == DEAD) + playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0) + return + playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) + use_power(5000) // Use a lot of power. + var/mob/living/silicon/robot = H.Robotize() + robot.lying = 1 + spawn(50) // So he can't jump out the gate right away. + playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + if(robot) + robot.lying = 0 \ No newline at end of file diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 369a0153b4..40c8fcdc89 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -152,12 +152,9 @@ var/produce_heat = 1500 /obj/item/device/flashlight/flare/New() - fuel = rand(6000, 9000) // Last 10 to 15 minutes. + fuel = rand(3000, 4500) // Last 10 to 15 minutes. ..() -/obj/item/device/flashlight/flare/attack(mob/living/M as mob, mob/living/user as mob) - ..(M, user, 0) - /obj/item/device/flashlight/flare/process() var/turf/pos = get_turf(src) pos.hotspot_expose(produce_heat, 5) diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index 5dc3c834e3..f4f63059b7 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -75,6 +75,9 @@ for(var/camera in cameras) var/obj/machinery/camera/c = camera + if(!c) + continue + if(!c.can_use()) continue @@ -142,6 +145,9 @@ for(var/camera in cameras) var/obj/machinery/camera/c = camera + if(!c) + continue + if(!c.can_use()) continue diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index cf2b3a87c6..3b96378ffb 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -65,8 +65,6 @@ updatename("Default") updateicon() - playsound(src, 'sound/voice/liveagain.ogg', 75, 1) - if(!cell) cell = new /obj/item/weapon/cell(src) cell.maxcharge = 7500 @@ -101,6 +99,9 @@ camera.status = 0 ..() + playsound(loc, 'sound/voice/liveagain.ogg', 75, 1) + + //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO //Improved /N /mob/living/silicon/robot/Del() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 2b9e4e2bc8..e329023bb8 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -473,9 +473,14 @@ var/global/list/uneatable = list( pixel_y = -256 current_size = 12 move_self = 1 //Do we move on our own? - grav_pull = 13 //How many tiles out do we pull? consume_range = 12 //How many tiles out do we eat +/obj/machinery/singularity/narsie/large/New() + ..() + world << "NAR-SIE HAS RISEN" + if(emergency_shuttle) + emergency_shuttle.incall(0.5) // Cannot recall + /obj/machinery/singularity/narsie/process() eat() if(!target || prob(5)) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 0b80389d1d..f8cd9ea6d8 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -20,8 +20,10 @@ id = "round_end_belt" // create a conveyor -/obj/machinery/conveyor/New() - ..() +/obj/machinery/conveyor/New(loc, newdir, on = 0) + ..(loc) + if(newdir) + dir = newdir switch(dir) if(NORTH) forwards = NORTH @@ -47,6 +49,9 @@ if(SOUTHWEST) forwards = WEST backwards = NORTH + if(on) + operating = 1 + setmove() /obj/machinery/conveyor/proc/setmove() if(operating == 1) diff --git a/tgstation.dme b/tgstation.dme index 1ba6de996c..c6b2d5788e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -759,6 +759,7 @@ #include "code\game\machinery\suit_storage_unit.dm" #include "code\game\machinery\syndicatebeacon.dm" #include "code\game\machinery\teleporter.dm" +#include "code\game\machinery\transformer.dm" #include "code\game\machinery\turrets.dm" #include "code\game\machinery\vending.dm" #include "code\game\machinery\washing_machine.dm"