mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Figure out max techlevels, make a reference sheet and a tool.
This commit is contained in:
@@ -769,7 +769,7 @@
|
|||||||
name = "nano-manipulator"
|
name = "nano-manipulator"
|
||||||
desc = "A tiny little manipulator used in the construction of certain devices."
|
desc = "A tiny little manipulator used in the construction of certain devices."
|
||||||
icon_state = "nano_mani"
|
icon_state = "nano_mani"
|
||||||
origin_tech = "materials=3,programming=2"
|
origin_tech = "materials=3;programming=2"
|
||||||
rating = 2
|
rating = 2
|
||||||
m_amt = 30
|
m_amt = 30
|
||||||
|
|
||||||
@@ -812,7 +812,7 @@
|
|||||||
name = "pico-manipulator"
|
name = "pico-manipulator"
|
||||||
desc = "A tiny little manipulator used in the construction of certain devices."
|
desc = "A tiny little manipulator used in the construction of certain devices."
|
||||||
icon_state = "pico_mani"
|
icon_state = "pico_mani"
|
||||||
origin_tech = "materials=5,programming=2"
|
origin_tech = "materials=5;programming=2"
|
||||||
rating = 3
|
rating = 3
|
||||||
m_amt = 30
|
m_amt = 30
|
||||||
|
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ to destroy them and players will be able to make replacements.
|
|||||||
name = "Circuit Board (PACMAN-type Generator)"
|
name = "Circuit Board (PACMAN-type Generator)"
|
||||||
build_path = "/obj/machinery/power/port_gen/pacman"
|
build_path = "/obj/machinery/power/port_gen/pacman"
|
||||||
board_type = "machine"
|
board_type = "machine"
|
||||||
origin_tech = "programming=3:powerstorage=3;plasmatech=3;engineering=3"
|
origin_tech = "programming=3;powerstorage=3;plasmatech=3;engineering=3"
|
||||||
frame_desc = "Requires 1 Matter Bin, 1 Micro-Laser, and 1 Capacitor."
|
frame_desc = "Requires 1 Matter Bin, 1 Micro-Laser, and 1 Capacitor."
|
||||||
req_components = list(
|
req_components = list(
|
||||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||||
|
|||||||
@@ -332,10 +332,8 @@
|
|||||||
|
|
||||||
/obj/item/mecha_parts/part/phazon_phase_array
|
/obj/item/mecha_parts/part/phazon_phase_array
|
||||||
name="Phase Array"
|
name="Phase Array"
|
||||||
//desc = "A peice of bluespace technology so advanced, it seems magical."
|
|
||||||
//icon='icons/mecha/mecha_equipment.dmi'
|
|
||||||
icon_state = "phazon_phase_array"
|
icon_state = "phazon_phase_array"
|
||||||
origin_tech = "materials=9;bluespace=10,magnets"
|
origin_tech = "materials=9;bluespace=10;magnets=3"
|
||||||
construction_time = 1200
|
construction_time = 1200
|
||||||
construction_cost = list("metal"=5000,"phazon"=2000)
|
construction_cost = list("metal"=5000,"phazon"=2000)
|
||||||
|
|
||||||
|
|||||||
@@ -204,13 +204,13 @@ datum/tech/plasmatech
|
|||||||
name = "Plasma Research"
|
name = "Plasma Research"
|
||||||
desc = "Research into the mysterious substance colloqually known as 'plasma'."
|
desc = "Research into the mysterious substance colloqually known as 'plasma'."
|
||||||
id = "plasmatech"
|
id = "plasmatech"
|
||||||
max_level=3
|
max_level=4
|
||||||
|
|
||||||
datum/tech/powerstorage
|
datum/tech/powerstorage
|
||||||
name = "Power Manipulation Technology"
|
name = "Power Manipulation Technology"
|
||||||
desc = "The various technologies behind the storage and generation of electicity."
|
desc = "The various technologies behind the storage and generation of electicity."
|
||||||
id = "powerstorage"
|
id = "powerstorage"
|
||||||
max_level=6
|
max_level=8
|
||||||
|
|
||||||
datum/tech/bluespace
|
datum/tech/bluespace
|
||||||
name = "'Blue-space' Research"
|
name = "'Blue-space' Research"
|
||||||
@@ -222,25 +222,25 @@ datum/tech/biotech
|
|||||||
name = "Biological Technology"
|
name = "Biological Technology"
|
||||||
desc = "Research into the deeper mysteries of life and organic substances."
|
desc = "Research into the deeper mysteries of life and organic substances."
|
||||||
id = "biotech"
|
id = "biotech"
|
||||||
max_level=7
|
max_level=8
|
||||||
|
|
||||||
datum/tech/combat
|
datum/tech/combat
|
||||||
name = "Combat Systems Research"
|
name = "Combat Systems Research"
|
||||||
desc = "The development of offensive and defensive systems."
|
desc = "The development of offensive and defensive systems."
|
||||||
id = "combat"
|
id = "combat"
|
||||||
max_level=6
|
max_level=8
|
||||||
|
|
||||||
datum/tech/magnets
|
datum/tech/magnets
|
||||||
name = "Electromagnetic Spectrum Research"
|
name = "Electromagnetic Spectrum Research"
|
||||||
desc = "Research into the electromagnetic spectrum. No clue how they actually work, though."
|
desc = "Research into the electromagnetic spectrum. No clue how they actually work, though."
|
||||||
id = "magnets"
|
id = "magnets"
|
||||||
max_level=5
|
max_level=8
|
||||||
|
|
||||||
datum/tech/programming
|
datum/tech/programming
|
||||||
name = "Data Theory Research"
|
name = "Data Theory Research"
|
||||||
desc = "The development of new computer and artificial intelligence and data storage systems."
|
desc = "The development of new computer and artificial intelligence and data storage systems."
|
||||||
id = "programming"
|
id = "programming"
|
||||||
max_level=4
|
max_level=9
|
||||||
|
|
||||||
datum/tech/syndicate
|
datum/tech/syndicate
|
||||||
name = "Illegal Technologies Research"
|
name = "Illegal Technologies Research"
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
14
max_tech_origins.txt
Normal file
14
max_tech_origins.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Calculated Max Tech Levels:
|
||||||
|
These tech levels have been determined by parsing ALL origin_tech variables in code included by C:\Users\Rob\Documents\Projects\vgstation13\baystation12.dme, C:\Users\Rob\Documents\Projects\vgstation13\tools\Redirector\Redirect_Tgstation.dme.
|
||||||
|
biotech: 8
|
||||||
|
bluespace: 10
|
||||||
|
combat: 8
|
||||||
|
engineering: 5
|
||||||
|
magnets: 8
|
||||||
|
materials: 9
|
||||||
|
plasma: 3
|
||||||
|
plasmatech: 4
|
||||||
|
power: 4
|
||||||
|
powerstorage: 8
|
||||||
|
programming: 9
|
||||||
|
syndicate: 8
|
||||||
355
tech_origin_list.csv
Normal file
355
tech_origin_list.csv
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
Atom,biotech,bluespace,combat,engineering,magnets,materials,plasma,plasmatech,power,powerstorage,programming,syndicate
|
||||||
|
,,,4,,,2,,,,,,
|
||||||
|
/obj/item/ammo_magazine/a12mm,,,2,,,,,,,,,
|
||||||
|
/obj/item/ammo_magazine/a50,,,2,,,,,,,,,
|
||||||
|
/obj/item/ammo_magazine/a762,,,2,,,,,,,,,
|
||||||
|
/obj/item/ammo_magazine/c45,,,2,,,,,,,,,
|
||||||
|
/obj/item/ammo_magazine/c9mm,,,2,,,,,,,,,
|
||||||
|
/obj/item/ammo_magazine/mc9mm,,,2,,,,,,,,,
|
||||||
|
/obj/item/brain,3,,,,,,,,,,,
|
||||||
|
/obj/item/clothing/glasses/hud,2,,,,3,,,,,,,
|
||||||
|
/obj/item/clothing/glasses/material,,,,3,3,,,,,,,
|
||||||
|
/obj/item/clothing/glasses/meson,,,,2,2,,,,,,,
|
||||||
|
/obj/item/clothing/glasses/night,,,,,2,,,,,,,
|
||||||
|
/obj/item/clothing/glasses/thermal,,,,,3,,,,,,,4
|
||||||
|
/obj/item/clothing/mask/gas/voice,,,,,,,,,,,,4
|
||||||
|
/obj/item/clothing/shoes/syndigaloshes,,,,,,,,,,,,3
|
||||||
|
/obj/item/clothing/under/chameleon,,,,,,,,,,,,3
|
||||||
|
/obj/item/device/aicard,,,,,,4,,,,,4,
|
||||||
|
/obj/item/device/analyzer,,,,1,1,,,,,,,
|
||||||
|
/obj/item/device/assembly,,,,,1,,,,,,,
|
||||||
|
/obj/item/device/assembly/igniter,,,,,1,,,,,,,
|
||||||
|
/obj/item/device/assembly/infra,,,,,2,,,,,,,
|
||||||
|
/obj/item/device/assembly/mousetrap,,,1,,,,,,,,,
|
||||||
|
/obj/item/device/assembly/prox_sensor,,,,,1,,,,,,,
|
||||||
|
/obj/item/device/assembly/signaler,,,,,1,,,,,,,
|
||||||
|
/obj/item/device/assembly/timer,,,,,1,,,,,,,
|
||||||
|
/obj/item/device/batterer,,,3,,3,,,,,,,3
|
||||||
|
/obj/item/device/chameleon,,,,,4,,,,,,,4
|
||||||
|
/obj/item/device/debugger,,,,1,1,,,,,,,
|
||||||
|
/obj/item/device/encryptionkey/binary,,,,,,,,,,,,3
|
||||||
|
/obj/item/device/encryptionkey/syndicate,,,,,,,,,,,,3
|
||||||
|
/obj/item/device/flash,,,1,,2,,,,,,,
|
||||||
|
/obj/item/device/flash/synthetic,,,1,,2,,,,,,,
|
||||||
|
/obj/item/device/healthanalyzer,1,,,,1,,,,,,,
|
||||||
|
/obj/item/device/lightreplacer,,,,,3,2,,,,,,
|
||||||
|
/obj/item/device/mass_spectrometer,2,,,,2,,,,,,,
|
||||||
|
/obj/item/device/mass_spectrometer/adv,2,,,,4,,,,,,,
|
||||||
|
/obj/item/device/mmi,3,,,,,,,,,,,
|
||||||
|
/obj/item/device/mmi/posibrain,,2,,4,,4,,,,,4,
|
||||||
|
/obj/item/device/mmi/radio_enabled,4,,,,,,,,,,,
|
||||||
|
/obj/item/device/multitool,,,,1,1,,,,,,,
|
||||||
|
/obj/item/device/paicard,,,,,,,,,,,2,
|
||||||
|
/obj/item/device/powersink,,,,,,,,,,3,,5
|
||||||
|
/obj/item/device/radio/beacon,,1,,,,,,,,,,
|
||||||
|
/obj/item/device/radio/beacon/syndicate,,1,,,,,,,,,,7
|
||||||
|
/obj/item/device/radio/headset/binary,,,,,,,,,,,,3
|
||||||
|
/obj/item/device/radio/headset/syndicate,,,,,,,,,,,,3
|
||||||
|
/obj/item/device/soulstone,,4,,,,4,,,,,,
|
||||||
|
/obj/item/device/t_scanner,,,,1,1,,,,,,,
|
||||||
|
/obj/item/mecha_parts,,,,,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/chassis/phazon,,,,,,7,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment,,,,,,2,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster,,,,,,4,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/generator,,,,1,,,,2,,2,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/generator/nuclear,,,,3,,,,,,3,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/gravcatapult,,,,,,3,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/repair_droid,,,,,3,,,,,,3,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/teleporter,,10,,,,,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay,,,,,4,,,,,,,2
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill,,,,3,,4,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/rcd,,3,,,4,4,,,,4,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/sleeper,3,,,,,,,,,,2,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun,4,,,,4,3,,,,,3,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/weapon,,,3,,,3,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse,,,6,,,3,,,,4,,
|
||||||
|
/obj/item/mecha_parts/mecha_equipment/wormhole_generator,,3,,,,,,,,,,
|
||||||
|
/obj/item/mecha_parts/mecha_tracking,,,,,2,,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/durand_armour,,,4,5,,5,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/durand_head,,,,3,3,3,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/durand_left_arm,,,,3,,3,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/durand_left_leg,,,,3,,3,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/durand_right_arm,,,,3,,3,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/durand_right_leg,,,,3,,3,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/durand_torso,3,,,3,,3,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/gygax_armour,,,4,5,,6,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/gygax_head,,,,3,3,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/gygax_left_arm,,,,3,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/gygax_left_leg,,,,3,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/gygax_right_arm,,,,3,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/gygax_right_leg,,,,3,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/gygax_torso,3,,,3,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/odysseus_head,,,,,,2,,,,,3,
|
||||||
|
/obj/item/mecha_parts/part/odysseus_left_arm,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/odysseus_left_leg,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/odysseus_right_arm,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/odysseus_right_leg,,,,3,,3,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/odysseus_torso,2,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/phazon_head,,,,,6,9,,,,,9,
|
||||||
|
/obj/item/mecha_parts/part/phazon_left_arm,,6,,,2,9,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/phazon_left_leg,,6,,,3,9,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/phazon_phase_array,,10,,,3,9,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/phazon_right_arm,,6,,,2,9,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/phazon_right_leg,,6,,,3,9,,,,,,
|
||||||
|
/obj/item/mecha_parts/part/phazon_torso,,10,,,,9,,,,6,5,
|
||||||
|
/obj/item/mecha_parts/part/ripley_left_arm,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/ripley_left_leg,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/ripley_right_arm,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/ripley_right_leg,,,,2,,2,,,,,2,
|
||||||
|
/obj/item/mecha_parts/part/ripley_torso,2,,,2,,2,,,,,2,
|
||||||
|
/obj/item/slime_extract,4,,,,,,,,,,,
|
||||||
|
/obj/item/stack,,,,,,1,,,,,,
|
||||||
|
/obj/item/stack/medical/advanced/bruise_pack,1,,,,,,,,,,,
|
||||||
|
/obj/item/stack/medical/advanced/ointment,1,,,,,,,,,,,
|
||||||
|
/obj/item/stack/medical/bruise_pack,1,,,,,,,,,,,
|
||||||
|
/obj/item/stack/medical/ointment,1,,,,,,,,,,,
|
||||||
|
/obj/item/stack/nanopaste,,,,3,,4,,,,,,
|
||||||
|
/obj/item/stack/sheet/cloth,,,,,,1,,,,,,
|
||||||
|
/obj/item/stack/sheet/glass,,,,,,1,,,,,,
|
||||||
|
/obj/item/stack/sheet/leather,,,,,,2,,,,,,
|
||||||
|
/obj/item/stack/sheet/metal,,,,,,1,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/adamantine,,,,,,4,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/clown,,,,,,4,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/diamond,,,,,,6,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/enruranium,,,,,,5,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/gold,,,,,,4,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/mythril,,,,,,4,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/phazon,,,,,,9,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/plasma,,,,,,2,,2,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/plastic,,,,,,3,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/sandstone,,,,,,1,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/silver,,,,,,3,,,,,,
|
||||||
|
/obj/item/stack/sheet/mineral/uranium,,,,,,5,,,,,,
|
||||||
|
/obj/item/stack/sheet/plasteel,,,,,,2,,,,,,
|
||||||
|
/obj/item/stack/sheet/rglass,,,,,,2,,,,,,
|
||||||
|
/obj/item/stack/sheet/wood,1,,,,,1,,,,,,
|
||||||
|
/obj/item/stack/tile/grass,1,,,,,,,,,,,
|
||||||
|
/obj/item/weapon/FixOVein,3,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/SWF_uplink,,,,,1,,,,,,,
|
||||||
|
/obj/item/weapon/aiModule,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/aiModule/corp,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/aiModule/oxygen,,,,,,4,,,,,4,
|
||||||
|
/obj/item/weapon/aiModule/prototypeEngineOffline,,,,,,4,,,,,3,
|
||||||
|
/obj/item/weapon/aiModule/quarantine,2,,,,,4,,,,,3,
|
||||||
|
/obj/item/weapon/aiModule/reset,,,,,,4,,,,,3,
|
||||||
|
/obj/item/weapon/aiModule/safeguard,,,,,,4,,,,,3,
|
||||||
|
/obj/item/weapon/aiModule/teleporterOffline,,,,,,4,,,,,3,
|
||||||
|
/obj/item/weapon/autopsy_scanner,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/butch,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/card/emag,,,,,2,,,,,,,2
|
||||||
|
/obj/item/weapon/card/id/syndicate,,,,,,,,,,,,3
|
||||||
|
/obj/item/weapon/cautery,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/cell,,,,,,,,,,1,,
|
||||||
|
/obj/item/weapon/cell/crap,,,,,,,,,,0,,
|
||||||
|
/obj/item/weapon/cell/high,,,,,,,,,,2,,
|
||||||
|
/obj/item/weapon/cell/hyper,,,,,,,,,,6,,
|
||||||
|
/obj/item/weapon/cell/potato,,,,,,,,,,1,,
|
||||||
|
/obj/item/weapon/cell/secborg,,,,,,,,,,0,,
|
||||||
|
/obj/item/weapon/cell/slime,4,,,,,,,,,2,,
|
||||||
|
/obj/item/weapon/cell/super,,,,,,,,,,5,,
|
||||||
|
/obj/item/weapon/circuitboard,,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/aicore,2,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/aifixer,2,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/aiupload,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/arcade,,,,,,,,,,,1,
|
||||||
|
/obj/item/weapon/circuitboard/area_atmos,,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/autolathe,,,,2,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/biogenerator,3,,,2,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/borgupload,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/chem_dispenser,5,,,4,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/chemmaster3000,4,,,3,,,,,,,,
|
||||||
|
/obj/item/weapon/circuitboard/circuit_imprinter,,,,2,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/clonepod,3,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/clonescanner,2,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/cloning,3,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/comm_monitor,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/comm_server,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/comm_traffic,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/communications,,,,,2,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/condimaster,4,,,3,,,,,,,,
|
||||||
|
/obj/item/weapon/circuitboard/crew,2,,,,2,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/cryo,3,,,2,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/defib_recharger,4,,,2,,,,,2,,3,
|
||||||
|
/obj/item/weapon/circuitboard/destructive_analyzer,,,,2,2,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/freezer,4,,,4,,,,,3,,,
|
||||||
|
/obj/item/weapon/circuitboard/gibber,3,,,2,,,,,,2,3,
|
||||||
|
/obj/item/weapon/circuitboard/heater,4,,,5,,,,,3,,,
|
||||||
|
/obj/item/weapon/circuitboard/hydroponics,3,,,2,,,,,,2,3,
|
||||||
|
/obj/item/weapon/circuitboard/mech_bay_power_console,,,,,,,,,,3,2,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/durand,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/durand/targeting,,,4,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/gygax,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/gygax/targeting,,,4,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/honker,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/odysseus,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/phazon,,10,,,,9,,,,,,
|
||||||
|
/obj/item/weapon/circuitboard/mecha/ripley,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/mechfab,,,,3,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/message_monitor,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/microwave,,,,2,3,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/mining,,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/mining_shuttle,,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/operating,2,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/ordercomp,,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/pacman,,,,3,,,,3,,3,3,
|
||||||
|
/obj/item/weapon/circuitboard/pacman/mrs,,,,5,,,,,,5,3,
|
||||||
|
/obj/item/weapon/circuitboard/pacman/super,,,,4,,,,,,4,3,
|
||||||
|
/obj/item/weapon/circuitboard/pandemic,2,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/photocopier,,,,2,,,,,2,,4,
|
||||||
|
/obj/item/weapon/circuitboard/pipedispenser,3,,,2,,,,,,2,3,
|
||||||
|
/obj/item/weapon/circuitboard/pipedispenser/disposal,3,,,2,,,,,,2,3,
|
||||||
|
/obj/item/weapon/circuitboard/prison_shuttle,,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/processor,3,,,2,,,,,,2,3,
|
||||||
|
/obj/item/weapon/circuitboard/protolathe,,,,2,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/rdserver,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/reagentgrinder,,,,2,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/recharge_station,,,,,,,,,4,,3,
|
||||||
|
/obj/item/weapon/circuitboard/research_shuttle,,,,,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/robotics,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/rust_core,,3,,,5,,,4,,6,,
|
||||||
|
/obj/item/weapon/circuitboard/rust_core_control,,,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/rust_fuel_control,,,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/rust_injector,,,,4,,6,,4,,3,,
|
||||||
|
/obj/item/weapon/circuitboard/scan_consolenew,2,,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/seed_extractor,3,,,2,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/shield_cap,,,,,3,,,,,4,,
|
||||||
|
/obj/item/weapon/circuitboard/shield_gen,,4,,,,,,3,,,,
|
||||||
|
/obj/item/weapon/circuitboard/shield_gen_ex,,4,,,,,,3,,,,
|
||||||
|
/obj/item/weapon/circuitboard/smartfridge,,,,2,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/smes,,,,4,,,,,4,,4,
|
||||||
|
/obj/item/weapon/circuitboard/solar_control,,,,,,,,,,2,2,
|
||||||
|
/obj/item/weapon/circuitboard/supplycomp,,,,,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/broadcaster,,2,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/bus,,,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/hub,,,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/processor,,,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/receiver,,2,,3,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/relay,,3,,4,,,,,,,3,
|
||||||
|
/obj/item/weapon/circuitboard/telecomms/server,,,,4,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/telehub,,3,,3,,,,,,,4,
|
||||||
|
/obj/item/weapon/circuitboard/teleporter,,2,,,,,,,,,2,
|
||||||
|
/obj/item/weapon/circuitboard/telestation,,3,,3,,,,,,,4,
|
||||||
|
/obj/item/weapon/circular_saw,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/cloaking_device,,,,,3,,,,,,,4
|
||||||
|
/obj/item/weapon/conversion_kit,,,2,,,,,,,,,
|
||||||
|
/obj/item/weapon/crowbar,,,,1,,,,,,,,
|
||||||
|
/obj/item/weapon/dart_cartridge,,,,,,2,,,,,,
|
||||||
|
/obj/item/weapon/ectoplasm,8,8,8,,8,8,,,,8,8,8
|
||||||
|
/obj/item/weapon/flamethrower,,,1,,,,,1,,,,
|
||||||
|
/obj/item/weapon/grenade/chem_grenade/large,,,3,,,3,,,,,,
|
||||||
|
/obj/item/weapon/grenade/empgrenade,,,,,3,2,,,,,,
|
||||||
|
/obj/item/weapon/grenade/flashbang,,,1,,,2,,,,,,
|
||||||
|
/obj/item/weapon/grenade/spawnergrenade,,,,,4,3,,,,,,
|
||||||
|
/obj/item/weapon/grenade/spawnergrenade/manhacks,,,,,4,3,,,,,,4
|
||||||
|
/obj/item/weapon/grenade/spawnergrenade/spesscarp,,,,,4,3,,,,,,4
|
||||||
|
/obj/item/weapon/grown/log,,,3,,,,,,,,,
|
||||||
|
/obj/item/weapon/gun,,,1,,,,,,,,,
|
||||||
|
/obj/item/weapon/gun/energy/crossbow,,,2,,2,,,,,,,5
|
||||||
|
/obj/item/weapon/gun/energy/decloner,,,5,,,4,,,,3,,
|
||||||
|
/obj/item/weapon/gun/energy/floragun,3,,,,,2,,,,3,,
|
||||||
|
/obj/item/weapon/gun/energy/gun,,,3,,2,,,,,,,
|
||||||
|
/obj/item/weapon/gun/energy/gun/nuclear,,,3,,,5,,,,3,,
|
||||||
|
/obj/item/weapon/gun/energy/ionrifle,,,2,,4,,,,,,,
|
||||||
|
/obj/item/weapon/gun/energy/laser,,,3,,2,,,,,,,
|
||||||
|
/obj/item/weapon/gun/energy/laser/bluetag,,,1,,2,,,,,,,
|
||||||
|
/obj/item/weapon/gun/energy/laser/redtag,,,1,,2,,,,,,,
|
||||||
|
/obj/item/weapon/gun/energy/lasercannon,,,4,,,3,,,,3,,
|
||||||
|
/obj/item/weapon/gun/energy/stunrevolver,,,3,,,3,,,,2,,
|
||||||
|
/obj/item/weapon/gun/energy/temperature,,,3,,2,4,,,,3,,
|
||||||
|
/obj/item/weapon/gun/energy/xray,,,5,,2,3,,,,,,2
|
||||||
|
/obj/item/weapon/gun/projectile,,,2,,,2,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/automatic/c20r,,,5,,,2,,,,,,8
|
||||||
|
/obj/item/weapon/gun/projectile/automatic/l6_saw,,,5,,,1,,,,,,2
|
||||||
|
/obj/item/weapon/gun/projectile/automatic/mini_uzi,,,5,,,2,,,,,,8
|
||||||
|
/obj/item/weapon/gun/projectile/detective,,,2,,,2,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/gyropistol,,,3,,,,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/mateba,,,2,,,2,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/pistol,,,2,,,2,,,,,,2
|
||||||
|
/obj/item/weapon/gun/projectile/russian,,,2,,,2,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,,,3,,,1,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/shotgun/pump,,,4,,,2,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/shotgun/pump/combat,,,5,,,2,,,,,,
|
||||||
|
/obj/item/weapon/gun/projectile/silenced,,,2,,,2,,,,,,8
|
||||||
|
/obj/item/weapon/hand_tele,,3,,,1,,,,,,,
|
||||||
|
/obj/item/weapon/handcuffs,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/hatchet,,,1,,,2,,,,,,
|
||||||
|
/obj/item/weapon/hemostat,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/kitchen/utensil,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/kitchenknife,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/legcuffs,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/locator,,,,,1,,,,,,,
|
||||||
|
/obj/item/weapon/match,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/melee/baton,,,2,,,,,,,,,
|
||||||
|
/obj/item/weapon/melee/chainofcommand,,,4,,,,,,,,,
|
||||||
|
/obj/item/weapon/melee/defibrilator,3,,,,,,,,,,,
|
||||||
|
/obj/item/weapon/melee/energy/axe,,,3,,,,,,,,,
|
||||||
|
/obj/item/weapon/melee/energy/sword/color,,,,,3,,,,,,,4
|
||||||
|
/obj/item/weapon/module/rust_fuel_compressor,,,,,,6,,4,,,,
|
||||||
|
/obj/item/weapon/module/rust_fuel_port,,,,4,,5,,,,,,
|
||||||
|
/obj/item/weapon/ore/clown,,,,,,4,,,,,,
|
||||||
|
/obj/item/weapon/ore/diamond,,,,,,6,,,,,,
|
||||||
|
/obj/item/weapon/ore/glass,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/ore/gold,,,,,,4,,,,,,
|
||||||
|
/obj/item/weapon/ore/iron,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/ore/phazon,,,,,,7,,,,,,
|
||||||
|
/obj/item/weapon/ore/plasma,,,,,,2,,,,,,
|
||||||
|
/obj/item/weapon/ore/silver,,,,,,3,,,,,,
|
||||||
|
/obj/item/weapon/ore/strangerock,,,,,,5,,,,,,
|
||||||
|
/obj/item/weapon/ore/uranium,,,,,,5,,,,,,
|
||||||
|
/obj/item/weapon/pen/sleepypen,,,,,,2,,,,,,5
|
||||||
|
/obj/item/weapon/pickaxe,,,,1,,1,,,,,,
|
||||||
|
/obj/item/weapon/pickaxe/diamond,,,,5,,6,,,,4,,
|
||||||
|
/obj/item/weapon/pickaxe/drill,,,,2,,2,,,,3,,
|
||||||
|
/obj/item/weapon/pickaxe/gold,,,,,,4,,,,,,
|
||||||
|
/obj/item/weapon/pickaxe/jackhammer,,,,2,,3,,,,2,,
|
||||||
|
/obj/item/weapon/pickaxe/plasmacutter,,,,3,,4,,3,,,,
|
||||||
|
/obj/item/weapon/pickaxe/silver,,,,,,3,,,,,,
|
||||||
|
/obj/item/weapon/pipe_dispenser,,,,4,,2,,,,,,
|
||||||
|
/obj/item/weapon/plastique,,,,,,,,,,,,2
|
||||||
|
/obj/item/weapon/rcd,,,,4,,2,,,,,,
|
||||||
|
/obj/item/weapon/rcd_ammo,,,,,,2,,,,,,
|
||||||
|
/obj/item/weapon/reagent_containers/food/snacks/grown/bluespacetomato,,3,,,,,,,,,,
|
||||||
|
/obj/item/weapon/reagent_containers/spray/chemsprayer,,,3,3,,3,,,,,,
|
||||||
|
/obj/item/weapon/retractor,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/scalpel,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/scythe,,,2,,,2,,,,,,
|
||||||
|
/obj/item/weapon/shield/energy,,,,,3,4,,,,,,4
|
||||||
|
/obj/item/weapon/shield/riot,,,,,,2,,,,,,
|
||||||
|
/obj/item/weapon/shovel,,,,1,,1,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/capacitor,,,,,,,,,,1,,
|
||||||
|
/obj/item/weapon/stock_parts/capacitor/adv,,,,,,,,,,3,,
|
||||||
|
/obj/item/weapon/stock_parts/capacitor/super,,,,,,4,,,,5,,
|
||||||
|
/obj/item/weapon/stock_parts/console_screen,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/manipulator,,,,,,1,,,,,1,
|
||||||
|
/obj/item/weapon/stock_parts/manipulator/nano,,,,,,3,,,,,2,
|
||||||
|
/obj/item/weapon/stock_parts/manipulator/pico,,,,,,5,,,,,2,
|
||||||
|
/obj/item/weapon/stock_parts/matter_bin,,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/matter_bin/adv,,,,,,3,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/matter_bin/super,,,,,,5,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/micro_laser,,,,,1,,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/micro_laser/high,,,,,3,,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/micro_laser/ultra,,,,,5,,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/scanning_module,,,,,1,,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/scanning_module/adv,,,,,3,,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/scanning_module/phasic,,,,,5,,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/amplifier,,2,,,4,4,,,,,3,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/analyzer,,2,,,4,4,,,,,3,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/ansible,,2,,,5,4,,,,,3,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/crystal,,2,,,4,4,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/filter,,,,,2,,,,,,4,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/transmitter,,3,,,5,5,,,,,,
|
||||||
|
/obj/item/weapon/stock_parts/subspace/treatment,,2,,,2,5,,,,,3,
|
||||||
|
/obj/item/weapon/storage/backpack/holding,,4,,,,,,,,,,
|
||||||
|
/obj/item/weapon/storage/toolbox,,,1,,,,,,,,,
|
||||||
|
/obj/item/weapon/storage/toolbox/syndicate,,,1,,,,,,,,,1
|
||||||
|
/obj/item/weapon/surgicaldrill,1,,,,,1,,,,,,
|
||||||
|
/obj/item/weapon/syntiflesh,2,,,,,,,,,,,
|
||||||
|
/obj/item/weapon/teleportation_scroll,,4,,,,,,,,,,
|
||||||
|
/obj/item/weapon/twohanded/dualsaber,,,,,3,,,,,,,4
|
||||||
|
/obj/item/weapon/twohanded/hfrequency,,,5,,4,,,,,,,
|
||||||
|
/obj/item/weapon/weldingtool,,,,1,,,,,,,,
|
||||||
|
/obj/item/weapon/weldingtool/experimental,,,,4,,,3,,,,,
|
||||||
|
/obj/item/weapon/weldingtool/hugetank,,,,3,,,,,,,,
|
||||||
|
/obj/item/weapon/weldingtool/largetank,,,,2,,,,,,,,
|
||||||
|
/obj/item/weapon/wirecutters,,,,1,,1,,,,,,
|
||||||
|
/obj/item/weapon/wrench,,,,1,,1,,,,,,
|
||||||
|
177
tools/calculateMaxTechLevels.py
Normal file
177
tools/calculateMaxTechLevels.py
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
import os, sys, re
|
||||||
|
"""
|
||||||
|
Usage:
|
||||||
|
$ python calculateMaxTechLevels.py path/to/your.dme .dm
|
||||||
|
|
||||||
|
calculateMaxTechLevels.py - Get techlevels of all objects and generate reports.
|
||||||
|
|
||||||
|
Copyright 2013 Rob "N3X15" Nelson <nexis@7chan.org>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
"""
|
||||||
|
REGEX_TECH_ORIGIN = re.compile('^(?P<tabs>\t+)(?:var/)?origin_tech\s*=\s*"(?P<content>.+)"\s*$')
|
||||||
|
REGEX_ATOMDEF = re.compile('^(?P<tabs>\t*)(?P<atom>[a-zA-Z0-9_/]+)\s*$')
|
||||||
|
|
||||||
|
#Calculated Max Tech Levels.
|
||||||
|
CMTLs = {}
|
||||||
|
|
||||||
|
# All known atoms with tech origins.
|
||||||
|
AtomTechOrigins = {}
|
||||||
|
|
||||||
|
def debug(filename, line, path, message):
|
||||||
|
print('{0}:{1}: {2} - {3}'.format(filename, line, '/'.join(path), message))
|
||||||
|
|
||||||
|
def ProcessFile(filename):
|
||||||
|
with open(filename, 'r') as f:
|
||||||
|
cpath = []
|
||||||
|
popLevels = []
|
||||||
|
pindent = 0 # Previous Indent
|
||||||
|
ln = 0
|
||||||
|
ignoreLevel = []
|
||||||
|
debugOn = False
|
||||||
|
for line in f:
|
||||||
|
ln += 1
|
||||||
|
if '/*' in line:
|
||||||
|
ignoreLevel += ['*/']
|
||||||
|
if '{"' in line:
|
||||||
|
ignoreLevel += ['"}']
|
||||||
|
if len(ignoreLevel) > 0:
|
||||||
|
if ignoreLevel[-1] in line:
|
||||||
|
ignoreLevel.pop()
|
||||||
|
continue
|
||||||
|
m = REGEX_ATOMDEF.match(line)
|
||||||
|
if m is not None:
|
||||||
|
numtabs = len(m.group('tabs'))
|
||||||
|
atom = m.group('atom')
|
||||||
|
atom_path = m.group('atom').split('/')
|
||||||
|
if atom in ('else', 'break', 'return', 'continue', 'spawn', 'proc'):
|
||||||
|
continue
|
||||||
|
if atom.startswith('var/') or atom.startswith('//') or (numtabs > 0 and atom.strip().startswith('/')):
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Was used to debug a weird path resolution issue with mecha boards.
|
||||||
|
#if line.startswith('/obj/item/weapon/circuitboard/mecha'):
|
||||||
|
# debugOn = True
|
||||||
|
if debugOn: print('{} > {}'.format(numtabs, line.rstrip()))
|
||||||
|
if numtabs == 0:
|
||||||
|
cpath = atom_path
|
||||||
|
if cpath[0] != '':
|
||||||
|
cpath.insert(0, '')
|
||||||
|
popLevels = [len(cpath)]
|
||||||
|
if debugOn: debug(filename, ln, cpath, '0')
|
||||||
|
elif numtabs > pindent:
|
||||||
|
cpath += atom_path
|
||||||
|
popLevels += [len(atom_path)]
|
||||||
|
if debugOn: debug(filename, ln, cpath, '>')
|
||||||
|
elif numtabs < pindent:
|
||||||
|
for i in range(pindent - numtabs):
|
||||||
|
popsToDo = popLevels.pop()
|
||||||
|
if debugOn: print(' pop {} {}'.format(popsToDo, popLevels))
|
||||||
|
for i in range(popsToDo):
|
||||||
|
cpath.pop()
|
||||||
|
if debugOn: print(repr(cpath))
|
||||||
|
cpath += atom_path
|
||||||
|
if debugOn: debug(filename, ln, cpath, '<')
|
||||||
|
elif numtabs == pindent:
|
||||||
|
for i in range(popLevels.pop()):
|
||||||
|
cpath.pop()
|
||||||
|
if debugOn: print(repr(cpath))
|
||||||
|
cpath += atom_path
|
||||||
|
popLevels += [len(atom_path)]
|
||||||
|
if debugOn: debug(filename, ln, cpath, '==')
|
||||||
|
pindent = numtabs
|
||||||
|
continue
|
||||||
|
path = '/'.join(cpath)
|
||||||
|
m = REGEX_TECH_ORIGIN.match(line)
|
||||||
|
if m is not None:
|
||||||
|
tech_origin = {}
|
||||||
|
# materials=9;bluespace=10;magnets=3
|
||||||
|
techchunks = m.group('content').split(';')
|
||||||
|
for techchunk in techchunks:
|
||||||
|
parts = techchunk.split('=')
|
||||||
|
tech = parts[0]
|
||||||
|
level = int(parts[1])
|
||||||
|
tech_origin[tech] = level
|
||||||
|
if tech not in CMTLs:
|
||||||
|
CMTLs[tech] = level
|
||||||
|
if CMTLs[tech] < level:
|
||||||
|
CMTLs[tech] = level
|
||||||
|
AtomTechOrigins[path] = tech_origin
|
||||||
|
|
||||||
|
def ProcessFilesFromDME(dmefile='baystation12.dme', ext='.dm'):
|
||||||
|
numFilesTotal = 0
|
||||||
|
rootdir = os.path.dirname(dmefile)
|
||||||
|
with open(dmefile, 'r') as dmeh:
|
||||||
|
for line in dmeh:
|
||||||
|
if line.startswith('#include'):
|
||||||
|
inString = False
|
||||||
|
# escaped=False
|
||||||
|
filename = ''
|
||||||
|
for c in line:
|
||||||
|
"""
|
||||||
|
if c == '\\' and not escaped:
|
||||||
|
escaped = True
|
||||||
|
continue
|
||||||
|
if escaped:
|
||||||
|
if
|
||||||
|
escaped = False
|
||||||
|
continue
|
||||||
|
"""
|
||||||
|
if c == '"':
|
||||||
|
inString = not inString
|
||||||
|
if not inString:
|
||||||
|
filepath = os.path.join(rootdir, filename)
|
||||||
|
if filepath.endswith(ext):
|
||||||
|
# print('Processing {0}...'.format(filepath))
|
||||||
|
ProcessFile(filepath)
|
||||||
|
numFilesTotal += 1
|
||||||
|
filename = ''
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
if inString:
|
||||||
|
filename += c
|
||||||
|
|
||||||
|
if os.path.isdir(sys.argv[1]):
|
||||||
|
selectedDMEs = []
|
||||||
|
for root, _, files in os.walk(sys.argv[1]):
|
||||||
|
for filename in files:
|
||||||
|
filepath = os.path.join(root, filename)
|
||||||
|
if filepath.endswith('.dme'):
|
||||||
|
ProcessFilesFromDME(filepath, sys.argv[2])
|
||||||
|
selectedDMEs.append(filepath)
|
||||||
|
break
|
||||||
|
with open(os.path.join(sys.argv[1], 'tech_origin_list.csv'), 'w') as w:
|
||||||
|
with open(os.path.join(sys.argv[1], 'max_tech_origins.txt'), 'w') as mto:
|
||||||
|
tech_columns = []
|
||||||
|
mto.write('Calculated Max Tech Levels:\n These tech levels have been determined by parsing ALL origin_tech variables in code included by {0}.\n'.format(', '.join(selectedDMEs)))
|
||||||
|
for tech in sorted(CMTLs.keys()):
|
||||||
|
tech_columns.append(tech)
|
||||||
|
mto.write('{:>15}: {}\n'.format(tech, CMTLs[tech]))
|
||||||
|
w.write(','.join(['Atom'] + tech_columns) + "\n")
|
||||||
|
for atom in sorted(AtomTechOrigins.keys()):
|
||||||
|
techs = []
|
||||||
|
for tech in tech_columns:
|
||||||
|
if tech in AtomTechOrigins[atom]:
|
||||||
|
techs.append(str(AtomTechOrigins[atom][tech]))
|
||||||
|
else:
|
||||||
|
techs.append('')
|
||||||
|
w.write(','.join([atom] + techs) + "\n")
|
||||||
|
if os.path.isfile(sys.argv[1]):
|
||||||
|
ProcessFilesFromDME(sys.argv[1], sys.argv[2])
|
||||||
Reference in New Issue
Block a user