mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-04 13:20:15 +00:00
# Conflicts: # code/__defines/holomap.dm # code/__defines/mobs.dm # code/_helpers/icons.dm # code/_helpers/unsorted.dm # code/_onclick/hud/hud.dm # code/_onclick/item_attack.dm # code/controllers/Processes/supply.dm # code/controllers/subsystems/planets.dm # code/datums/supplypacks/munitions.dm # code/datums/supplypacks/science.dm # code/datums/supplypacks/security.dm # code/datums/supplypacks/supply.dm # code/game/area/Space Station 13 areas.dm # code/game/atoms_movable.dm # code/game/machinery/autolathe.dm # code/game/machinery/doors/door.dm # code/game/machinery/jukebox.dm # code/game/machinery/recharger.dm # code/game/machinery/vending.dm # code/game/mecha/equipment/tools/medical_tools.dm # code/game/mecha/equipment/weapons/weapons.dm # code/game/objects/items/devices/PDA/PDA.dm # code/game/objects/items/devices/megaphone.dm # code/game/objects/items/poi_items.dm # code/game/objects/items/weapons/implants/implantlanguage.dm # code/game/objects/items/weapons/storage/firstaid.dm # code/game/objects/items/weapons/tools/weldingtool.dm # code/game/objects/structures/flora/trees.dm # code/game/objects/structures/plasticflaps.dm # code/game/supplyshuttle.dm # code/game/turfs/simulated/wall_attacks.dm # code/modules/admin/admin_verbs.dm # code/modules/assembly/infrared.dm # code/modules/client/client procs.dm # code/modules/client/preference_setup/loadout/loadout_utility.dm # code/modules/client/preferences.dm # code/modules/clothing/suits/miscellaneous.dm # code/modules/holomap/holomap_datum.dm # code/modules/holomap/station_holomap.dm # code/modules/integrated_electronics/core/printer.dm # code/modules/mining/machine_processing.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm # code/modules/mob/living/death.dm # code/modules/mob/living/silicon/ai/ai.dm # code/modules/mob/living/silicon/pai/pai.dm # code/modules/mob/living/silicon/robot/robot.dm # code/modules/mob/living/simple_animal/animals/parrot.dm # code/modules/mob/mob_movement.dm # code/modules/organs/organ_external.dm # code/modules/organs/organ_icon.dm # code/modules/organs/subtypes/standard.dm # code/modules/planet/weather.dm # code/modules/power/cable.dm # code/modules/power/fusion/core/core_control.dm # code/modules/power/fusion/fuel_assembly/fuel_control.dm # code/modules/power/fusion/gyrotron/gyrotron_control.dm # code/modules/projectiles/gun.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm # config/names/first_name_skrell.txt # config/names/last_name_skrell.txt # icons/mob/head.dmi # icons/mob/robots.dmi # icons/mob/species/tajaran/helmet.dmi # icons/obj/ammo.dmi # icons/obj/gun.dmi # icons/obj/mining.dmi # icons/obj/projectiles.dmi # icons/obj/rig_modules.dmi # icons/obj/surgery.dmi # icons/turf/walls.dmi # maps/southern_cross/southern_cross-1.dmm # maps/southern_cross/southern_cross-3.dmm # maps/southern_cross/southern_cross-6.dmm # maps/southern_cross/southern_cross-8.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1A.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1B.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1C.dmm # maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm # maps/submaps/surface_submaps/mountains/deadspy.dmm # maps/submaps/surface_submaps/mountains/mountains_areas.dm # maps/submaps/surface_submaps/plains/Thiefc.dmm # maps/~map_system/maps.dm # vorestation.dme
153 lines
5.7 KiB
Plaintext
153 lines
5.7 KiB
Plaintext
/obj/machinery/replicator
|
|
name = "alien machine"
|
|
desc = "It's some kind of pod with strange wires and gadgets all over it."
|
|
icon = 'icons/obj/xenoarchaeology.dmi'
|
|
icon_state = "borgcharger0(old)"
|
|
density = 1
|
|
|
|
idle_power_usage = 100
|
|
active_power_usage = 1000
|
|
use_power = 1
|
|
|
|
var/spawn_progress_time = 0
|
|
var/max_spawn_time = 50
|
|
var/last_process_time = 0
|
|
|
|
var/list/construction = list()
|
|
var/list/spawning_types = list()
|
|
var/list/stored_materials = list()
|
|
|
|
var/fail_message
|
|
|
|
/obj/machinery/replicator/New()
|
|
..()
|
|
|
|
var/list/viables = list(
|
|
/obj/item/roller,
|
|
/obj/structure/closet/crate,
|
|
/obj/structure/closet/acloset,
|
|
/mob/living/simple_animal/hostile/mimic/crate,
|
|
/mob/living/simple_animal/hostile/viscerator,
|
|
/mob/living/simple_animal/hostile/hivebot,
|
|
/obj/item/device/analyzer,
|
|
/obj/item/device/camera,
|
|
/obj/item/device/flash,
|
|
/obj/item/device/flashlight,
|
|
/obj/item/device/healthanalyzer,
|
|
/obj/item/device/multitool,
|
|
/obj/item/device/paicard,
|
|
/obj/item/device/radio,
|
|
/obj/item/device/radio/headset,
|
|
/obj/item/device/radio/beacon,
|
|
/obj/item/weapon/autopsy_scanner,
|
|
/obj/item/weapon/bikehorn,
|
|
/obj/item/weapon/surgical/bonesetter,
|
|
/obj/item/weapon/material/knife/butch,
|
|
/obj/item/weapon/caution,
|
|
/obj/item/weapon/caution/cone,
|
|
/obj/item/weapon/tool/crowbar,
|
|
/obj/item/weapon/clipboard,
|
|
/obj/item/weapon/cell,
|
|
/obj/item/weapon/surgical/circular_saw,
|
|
/obj/item/weapon/material/knife/machete/hatchet,
|
|
/obj/item/weapon/handcuffs,
|
|
/obj/item/weapon/surgical/hemostat,
|
|
/obj/item/weapon/material/knife,
|
|
/obj/item/weapon/flame/lighter,
|
|
/obj/item/weapon/light/bulb,
|
|
/obj/item/weapon/light/tube,
|
|
/obj/item/weapon/pickaxe,
|
|
/obj/item/weapon/shovel,
|
|
/obj/item/weapon/weldingtool,
|
|
/obj/item/weapon/tool/wirecutters,
|
|
/obj/item/weapon/tool/wrench,
|
|
/obj/item/weapon/tool/screwdriver,
|
|
/obj/item/weapon/grenade/chem_grenade/cleaner,
|
|
/obj/item/weapon/grenade/chem_grenade/metalfoam)
|
|
|
|
var/quantity = rand(5, 15)
|
|
for(var/i=0, i<quantity, i++)
|
|
var/button_desc = "a [pick("yellow","purple","green","blue","red","orange","white")], "
|
|
button_desc += "[pick("round","square","diamond","heart","dog","human")] shaped "
|
|
button_desc += "[pick("toggle","switch","lever","button","pad","hole")]"
|
|
var/type = pick(viables)
|
|
viables.Remove(type)
|
|
construction[button_desc] = type
|
|
|
|
fail_message = "<font color='blue'>\icon[src] a [pick("loud","soft","sinister","eery","triumphant","depressing","cheerful","angry")] \
|
|
[pick("horn","beep","bing","bleep","blat","honk","hrumph","ding")] sounds and a \
|
|
[pick("yellow","purple","green","blue","red","orange","white")] \
|
|
[pick("light","dial","meter","window","protrusion","knob","antenna","swirly thing")] \
|
|
[pick("swirls","flashes","whirrs","goes schwing","blinks","flickers","strobes","lights up")] on the \
|
|
[pick("front","side","top","bottom","rear","inside")] of [src]. A [pick("slot","funnel","chute","tube")] opens up in the \
|
|
[pick("front","side","top","bottom","rear","inside")].</font>"
|
|
|
|
/obj/machinery/replicator/process()
|
|
if(spawning_types.len && powered())
|
|
spawn_progress_time += world.time - last_process_time
|
|
if(spawn_progress_time > max_spawn_time)
|
|
src.visible_message("<span class='notice'>\icon[src] [src] pings!</span>")
|
|
|
|
var/obj/source_material = pop(stored_materials)
|
|
var/spawn_type = pop(spawning_types)
|
|
var/obj/spawned_obj = new spawn_type(src.loc)
|
|
if(source_material)
|
|
if(lentext(source_material.name) < MAX_MESSAGE_LEN)
|
|
spawned_obj.name = "[source_material] " + spawned_obj.name
|
|
if(lentext(source_material.desc) < MAX_MESSAGE_LEN * 2)
|
|
if(spawned_obj.desc)
|
|
spawned_obj.desc += " It is made of [source_material]."
|
|
else
|
|
spawned_obj.desc = "It is made of [source_material]."
|
|
qdel(source_material)
|
|
|
|
spawn_progress_time = 0
|
|
max_spawn_time = rand(30,100)
|
|
|
|
if(!spawning_types.len || !stored_materials.len)
|
|
use_power = 1
|
|
icon_state = "borgcharger0(old)"
|
|
|
|
else if(prob(5))
|
|
src.visible_message("<span class='notice'>\icon[src] [src] [pick("clicks","whizzes","whirrs","whooshes","clanks","clongs","clonks","bangs")].</span>")
|
|
|
|
last_process_time = world.time
|
|
|
|
/obj/machinery/replicator/attack_hand(mob/user as mob)
|
|
interact(user)
|
|
|
|
/obj/machinery/replicator/interact(mob/user)
|
|
var/dat = "The control panel displays an incomprehensible selection of controls, many with unusual markings or text around them.<br>"
|
|
dat += "<br>"
|
|
for(var/index=1, index<=construction.len, index++)
|
|
dat += "<A href='?src=\ref[src];activate=[index]'>\[[construction[index]]\]</a><br>"
|
|
|
|
user << browse(dat, "window=alien_replicator")
|
|
|
|
/obj/machinery/replicator/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
|
if(!W.canremove || !user.canUnEquip(W)) //No armblades, no grabs. No other-thing-I-didn't-think-of.
|
|
to_chat(user, "<span class='notice'>You cannot put \the [W] into the machine.</span>")
|
|
return
|
|
user.drop_item()
|
|
W.loc = src
|
|
stored_materials.Add(W)
|
|
src.visible_message("<span class='notice'>\The [user] inserts \the [W] into \the [src].</span>")
|
|
|
|
/obj/machinery/replicator/Topic(href, href_list)
|
|
|
|
if(href_list["activate"])
|
|
var/index = text2num(href_list["activate"])
|
|
if(index > 0 && index <= construction.len)
|
|
if(stored_materials.len > spawning_types.len)
|
|
if(spawning_types.len)
|
|
src.visible_message("<span class='notice'>\icon[src] a [pick("light","dial","display","meter","pad")] on [src]'s front [pick("blinks","flashes")] [pick("red","yellow","blue","orange","purple","green","white")].</span>")
|
|
else
|
|
src.visible_message("<span class='notice'>\icon[src] [src]'s front compartment slides shut.</span>")
|
|
|
|
spawning_types.Add(construction[construction[index]])
|
|
spawn_progress_time = 0
|
|
use_power = 2
|
|
icon_state = "borgcharger1(old)"
|
|
else
|
|
src.visible_message(fail_message)
|