Ports a lot of stuff from all around (#23)

* shhh

* checks the thing

* please don't hurt me, it is my first time

* there, much better

* this is huge

Co-authored-by: crazyraio2 <44246096+crazyraio2@users.noreply.github.com>
This commit is contained in:
Enric Gabriel
2020-07-14 01:31:52 -03:00
committed by GitHub
co-authored by crazyraio2
parent 66dc5b5a7e
commit b5f77eeb66
57 changed files with 1810 additions and 11 deletions
@@ -0,0 +1,21 @@
/datum/asset/simple/tetris
assets = list(
"tetris_0.gif" = 'sandcode/icons/tetris/tetris_0.gif',
"tetris_1.gif" = 'sandcode/icons/tetris/tetris_1.gif',
"tetris_2.gif" = 'sandcode/icons/tetris/tetris_2.gif',
"tetris_3.gif" = 'sandcode/icons/tetris/tetris_3.gif',
"tetris_4.gif" = 'sandcode/icons/tetris/tetris_4.gif',
"tetris_5.gif" = 'sandcode/icons/tetris/tetris_5.gif',
"tetris_6.gif" = 'sandcode/icons/tetris/tetris_6.gif',
"tetris_7.gif" = 'sandcode/icons/tetris/tetris_7.gif',
"tetrisp0.gif" = 'sandcode/icons/tetris/tetrisp0.gif',
"tetrisp1.gif" = 'sandcode/icons/tetris/tetrisp1.gif',
"tetrisp2.gif" = 'sandcode/icons/tetris/tetrisp2.gif',
"tetrisp3.gif" = 'sandcode/icons/tetris/tetrisp3.gif',
"tetrisp4.gif" = 'sandcode/icons/tetris/tetrisp4.gif',
"tetrisp5.gif" = 'sandcode/icons/tetris/tetrisp5.gif',
"tetrisp6.gif" = 'sandcode/icons/tetris/tetrisp6.gif',
"tetrisp7.gif" = 'sandcode/icons/tetris/tetrisp7.gif',
"tetris.js" = 'tgui/src/interfaces/tetris/tetris.js',
"tetris2.js" = 'tgui/src/interfaces/tetris/tetris2.js'
)
@@ -0,0 +1,124 @@
//Power armor
/obj/item/clothing/head/helmet/space/hardsuit/powerarmor
name = "Power Armor Helmet MK. I"
desc = "An advanced helmet attached to a powered exoskeleton suit. Protects well against most forms of harm, but struggles against exotic hazards."
icon = 'sandcode/icons/obj/clothing/hats.dmi'
mob_overlay_icon = 'sandcode/icons/mob/clothing/head.dmi'
anthro_mob_worn_overlay = 'sandcode/icons/mob/clothing/head_muzzled.dmi'
icon_state = "hardsuit0-powerarmor-1"
item_state = "hardsuit0-powerarmor-1"
hardsuit_type = "powerarmor"
clothing_flags = THICKMATERIAL //Ouchie oofie my bones
armor = list("melee" = 40, "bullet" = 35, "laser" = 30, "energy" = 20, "bomb" = 40, "bio" = 100, "rad" = 5, "fire" = 75, "acid" = 100)
resistance_flags = ACID_PROOF
mutantrace_variation = STYLE_MUZZLE | STYLE_NO_ANTHRO_ICON
/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/Initialize()
. = ..()
AddComponent(/datum/component/spraycan_paintable)
update_icon()
/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/update_overlays()
. = ..()
var/mutable_appearance/glass_overlay = mutable_appearance(icon, "hardsuit0-powerarmor-2")
if(icon_state == "hardsuit1-powerarmor-1")
glass_overlay = mutable_appearance(icon, "hardsuit1-powerarmor-2")
var/mutable_appearance/flight_overlay = mutable_appearance(icon, "hardsuit1-powerarmor-3")
flight_overlay.appearance_flags = RESET_COLOR
. += flight_overlay
glass_overlay.appearance_flags = RESET_COLOR
. += glass_overlay
/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
. = ..()
if(!isinhands)
var/mutable_appearance/M1 = mutable_appearance(icon_file, "hardsuit0-powerarmor-2")
if(icon_state == "hardsuit1-powerarmor-1")
M1 = mutable_appearance(icon_file, "hardsuit1-powerarmor-2")
var/mutable_appearance/M2 = mutable_appearance(icon, "hardsuit1-powerarmor-3")
M2.appearance_flags = RESET_COLOR
. += M2
M1.appearance_flags = RESET_COLOR
. += M1
/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/equipped(mob/living/carbon/human/user, slot)
..()
if (slot == SLOT_HEAD)
var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
DHUD.add_hud_to(user)
/obj/item/clothing/head/helmet/space/hardsuit/powerarmor/dropped(mob/living/carbon/human/user)
..()
if (user.head == src)
var/datum/atom_hud/DHUD = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
DHUD.remove_hud_from(user)
/obj/item/clothing/suit/space/hardsuit/powerarmor
name = "Power Armor MK. I"
desc = "A self-powered exoskeleton suit comprised of flexible Plasteel sheets and advanced components, designed to offer excellent protection while still allowing mobility. Does not protect against Space, and struggles against more exotic hazards."
icon = 'sandcode/icons/obj/clothing/suits.dmi'
mob_overlay_icon = 'sandcode/icons/mob/clothing/suit.dmi'
anthro_mob_worn_overlay = 'sandcode/icons/mob/clothing/suit_digi.dmi'
icon_state = "hardsuit-powerarmor-1"
item_state = "hardsuit-powerarmor-1"
slowdown = -0.1
clothing_flags = THICKMATERIAL //Not spaceproof. No, it isn't Spaceproof in Rimworld either.
armor = list("melee" = 40, "bullet" = 35, "laser" = 30, "energy" = 20, "bomb" = 40, "bio" = 100, "rad" = 5, "fire" = 75, "acid" = 100) //I was asked to buff this again. Here, fine.
resistance_flags = ACID_PROOF
var/explodioprobemp = 1
var/stamdamageemp = 200
var/brutedamageemp = 20
var/rebootdelay
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/powerarmor
mutantrace_variation = STYLE_DIGITIGRADE | STYLE_NO_ANTHRO_ICON
/obj/item/clothing/suit/space/hardsuit/powerarmor/Initialize()
. = ..()
AddComponent(/datum/component/spraycan_paintable)
update_icon()
/obj/item/clothing/suit/space/hardsuit/powerarmor/update_overlays()
. = ..()
var/mutable_appearance/black_overlay = mutable_appearance(icon, "hardsuit-powerarmor-2")
black_overlay.appearance_flags = RESET_COLOR
var/mutable_appearance/bluecore_overlay = mutable_appearance(icon, "hardsuit-powerarmor-3")
bluecore_overlay.appearance_flags = RESET_COLOR
. += black_overlay
. += bluecore_overlay
/obj/item/clothing/suit/space/hardsuit/powerarmor/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
. = ..()
if(!isinhands)
var/mutable_appearance/M1 = mutable_appearance(icon_file, "hardsuit-powerarmor-2")
M1.appearance_flags = RESET_COLOR
var/mutable_appearance/M2 = mutable_appearance(icon_file, "hardsuit-powerarmor-3")
M2.appearance_flags = RESET_COLOR
. += M1
. += M2
/obj/item/clothing/suit/space/hardsuit/powerarmor/emp_act()
. = ..()
var/mob/living/carbon/human/user = src.loc
playsound(src.loc, 'sandcode/sound/misc/suitmalf.ogg', 60, 1, 10)
if (ishuman(user) && (user.wear_suit == src))
to_chat(user, "<span class='danger'>The motors on your armor cease to function, causing the full weight of the suit to weigh on you all at once!</span>")
user.emote("scream")
user.adjustStaminaLoss(stamdamageemp)
user.adjustBruteLoss(brutedamageemp)
if(prob(explodioprobemp))
playsound(src.loc, 'sound/effects/fuse.ogg', 60, 1, 10)
visible_message("<span class ='warning'>The power module on the [src] begins to smoke, glowing with an alarming warmth! Get away from it, now!")
addtimer(CALLBACK(src, .proc/detonate),50)
else
addtimer(CALLBACK(src, .proc/revivemessage), rebootdelay)
return
/obj/item/clothing/suit/space/hardsuit/powerarmor/proc/revivemessage() //we use this proc to add a timer, so we can have it take a while to boot
visible_message("<span class ='warning'>The power module on the [src] briefly flickers, before humming to life once more.</span>") //without causing any problems
return //that sleep() would
/obj/item/clothing/suit/space/hardsuit/powerarmor/proc/detonate()
visible_message("<span class ='danger'>The power module of the [src] overheats, causing it to destabilize and explode!")
explosion(src.loc,0,0,3,flame_range = 3)
qdel(src)
return
@@ -0,0 +1,55 @@
/obj/machinery/mineral/bluespace_miner
name = "bluespace mining machine"
desc = "A machine that uses the magic of Bluespace to slowly generate materials and add them to a linked ore silo."
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "stacker"
density = TRUE
circuit = /obj/item/circuitboard/machine/bluespace_miner
layer = BELOW_OBJ_LAYER
var/list/ore_rates = list(/datum/material/iron = 0.3, /datum/material/glass = 0.3, /datum/material/plasma = 0.1, /datum/material/silver = 0.1, /datum/material/gold = 0.05, /datum/material/titanium = 0.05, /datum/material/uranium = 0.05, /datum/material/diamond = 0.02)
var/datum/component/remote_materials/materials
/obj/machinery/mineral/bluespace_miner/Initialize(mapload)
. = ..()
materials = AddComponent(/datum/component/remote_materials, "bsm", mapload)
/obj/machinery/mineral/bluespace_miner/Destroy()
materials = null
return ..()
/obj/machinery/mineral/bluespace_miner/multitool_act(mob/living/user, obj/item/multitool/M)
if(istype(M))
if(!M.buffer || !istype(M.buffer, /obj/machinery/ore_silo))
to_chat(user, "<span class='warning'>You need to multitool the ore silo first.</span>")
return FALSE
/obj/machinery/mineral/bluespace_miner/examine(mob/user)
. = ..()
if(!materials?.silo)
. += "<span class='notice'>No ore silo connected. Use a multi-tool to link an ore silo to this machine.</span>"
else if(materials?.on_hold())
. += "<span class='warning'>Ore silo access is on hold, please contact the quartermaster.</span>"
/obj/machinery/mineral/bluespace_miner/process()
if(!materials?.silo || materials?.on_hold())
return
var/datum/component/material_container/mat_container = materials.mat_container
if(!mat_container || panel_open || !powered())
return
var/datum/material/ore = pick(ore_rates)
mat_container.bsm_insert((ore_rates[ore] * 1000), ore)
/datum/component/material_container/proc/bsm_insert(amt, var/datum/material/mat)
if(!istype(mat))
mat = SSmaterials.GetMaterialRef(mat)
if(amt > 0 && has_space(amt))
var/total_amount_saved = total_amount
if(mat)
materials[mat] += amt
total_amount += amt
else
for(var/i in materials)
materials[i] += amt
total_amount += amt
return (total_amount - total_amount_saved)
return FALSE
@@ -39,3 +39,37 @@
build_path = /obj/item/circuitboard/machine/spaceship_navigation_beacon
category = list ("Teleportation Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/board/autodoc
name = "Machine Design (Autodoc)"
desc = "The circuit board for an Autodoc."
id = "autodoc"
build_path = /obj/item/circuitboard/machine/autodoc
category = list("Medical Machinery")
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
//Cryptocurrency Miners
/datum/design/board/cryptominer
name = "Machine Design (Cryptocurrency Miner)"
desc = "The circuit board for a Cryptocurrency Miner."
id = "cryptominer"
build_path = /obj/item/circuitboard/machine/cryptominer
category = list("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/datum/design/board/cryptominer/syndie
name = "Machine Design (Syndicate Cryptocurrency Miner)"
desc = "The circuit board for a Syndicate Cryptocurrency Miner."
id = "cryptominersyndie"
build_path = /obj/item/circuitboard/machine/cryptominer/syndie
category = list("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
//BS miner
/datum/design/board/bluespace_miner
name = "Machine Design (Bluespace Miner)"
desc = "The circuit board for a Bluespace Miner."
id = "bluespace_miner"
build_path = /obj/item/circuitboard/machine/bluespace_miner
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING
@@ -0,0 +1,7 @@
/datum/design/board/tetris
name = "Computer Design (T.E.T.R.I.S.)"
desc = "Allows for the construction of circuit boards used to build a TETRIS research system."
id = "tetris"
build_path = /obj/item/circuitboard/computer/arcade/tetris
category = list("Research Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
@@ -6,3 +6,68 @@
materials = list(/datum/material/iron = 1000, /datum/material/glass = 1000, /datum/material/bluespace = 500)
construction_time = 100
category = list("Cyborg Upgrade Modules")
///Power Armor
/datum/design/powerarmor_skeleton
name = "Power Armor Skeleton"
id = "powerarmor_skeleton"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/chassis/powerarmor
materials = list(/datum/material/iron=15000, /datum/material/plasma=5000)
construction_time = 500
category = list("Misc")
/datum/design/powerarmor_torso
name = "Power Armor Torso"
id = "powerarmor_torso"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/powerarmor_torso
materials = list(/datum/material/iron=40000, /datum/material/plasma=10000, /datum/material/titanium=5000)
construction_time = 500
category = list("Misc")
/datum/design/powerarmor_helmet
name = "Power Armor Helmet"
id = "powerarmor_helmet"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/powerarmor_helmet
materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000, /datum/material/glass=5000)
construction_time = 500
category = list("Misc")
/datum/design/powerarmor_armL
name = "Power Armor Left Arm"
id = "powerarmor_armL"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/powerarmor_left_arm
materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,)
construction_time = 500
category = list("Misc")
/datum/design/powerarmor_armR
name = "Power Armor Right Arm"
id = "powerarmor_armR"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/powerarmor_right_arm
materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,)
construction_time = 500
category = list("Misc")
/datum/design/powerarmor_legL
name = "Power Armor Left Leg"
id = "powerarmor_legL"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/powerarmor_left_leg
materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,)
construction_time = 500
category = list("Misc")
/datum/design/powerarmor_legR
name = "Power Armor Right Leg"
id = "powerarmor_legR"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/part/powerarmor_right_leg
materials = list(/datum/material/iron=20000, /datum/material/plasma=10000, /datum/material/titanium=5000,)
construction_time = 500
category = list("Misc")
///End of Power Armor
@@ -0,0 +1,56 @@
///////////////////////////////////
/////Headset Encryption////////////
///////////////////////////////////
/datum/design/encryption
materials = list(/datum/material/iron = 500, /datum/material/glass = 500, /datum/material/silver = 200)
build_type = PROTOLATHE | IMPRINTER
construction_time = 50
category = list("Subspace Telecomms")
/datum/design/encryption/eng_key
name = "Engineering radio encryption key"
desc = "Encryption key for the Engineering channel."
id = "eng_key"
build_path = /obj/item/encryptionkey/headset_eng
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
/datum/design/encryption/sci_key
name = "Science radio encryption key"
desc = "Encryption key for the Science channel."
id = "sci_key"
build_path = /obj/item/encryptionkey/headset_sci
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
/datum/design/encryption/supply_key
name = "Supply radio encryption key"
desc = "Encryption key for the Supply channel."
id = "supply_key"
build_path = /obj/item/encryptionkey/headset_cargo
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/datum/design/encryption/med_key
name = "Medical radio encryption key"
desc = "Encryption key for the Medical channel."
id = "med_key"
build_path = /obj/item/encryptionkey/headset_med
departmental_flags = DEPARTMENTAL_FLAG_MEDICAL
/datum/design/encryption/serv_key
name = "Service radio encryption key"
desc = "Encryption key for the Service channel."
id = "serv_key"
build_path = /obj/item/encryptionkey/headset_service
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
///////////////////////////////////
////////Telecomm Server////////////
///////////////////////////////////
/datum/design/board/message_server
name = "Machine Design (Message Server)"
desc = "Allows for the construction of Message Server."
id = "message-server"
build_path = /obj/item/circuitboard/machine/telecomms/message_server
category = list("Subspace Telecomms")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
@@ -7,3 +7,13 @@
build_path = /obj/item/pipe_dispenser/bluespace // Skyrat edit
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
/datum/design/computermath
name = "Problem Computer"
desc = "Solve math problems. Get them correct, get credits."
id = "computermath"
build_type = PROTOLATHE
materials = list(/datum/material/iron = 250, /datum/material/glass = 250, /datum/material/plastic = 250)
build_path = /obj/item/computermath/default
category = list("Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE
@@ -46,3 +46,11 @@
prereq_ids = list("alien_bio")
design_ids = list("ci-toolset-adv","ci-surgery-adv")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
/datum/techweb_node/adv_surgery/New()
design_ids += "autodoc"
. = ..()
/datum/techweb_node/computer_board_gaming/New()
design_ids += "tetris"
. = ..()
@@ -2,3 +2,43 @@
design_ids += "borg_upgrade_bsrpd"
design_ids += "bsrpd"
. = ..()
/datum/techweb_node/cryptominer
id = "cryptominer"
display_name = "Cryptocurrency Mining"
description = "Harness the power of cryptocurrency to make credits for Cargo-- slowly."
prereq_ids = list("bluespace_mining")
design_ids = list("cryptominer")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
/datum/techweb_node/cryptominersyndie
id = "cryptominersyndie"
display_name = "Illegal Cryptocurrency Mining"
description = "Harness the power of bluespace to make credits for Cargo-- slowly."
prereq_ids = list("cryptominer","syndicate_basic")
design_ids = list("cryptominersyndie")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
/datum/techweb_node/computermath
id = "computermath"
display_name = "Problem Computer"
description = "Solve problems for either cargo credits or research points."
prereq_ids = list("base")
design_ids = list("computermath")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
/datum/techweb_node/encryption
id = "encryption_key"
display_name = "Communication Encryption"
description = "Study into usage of frequencies within headsets and their repoduction."
prereq_ids = list("telecomms")
design_ids = list("eng_key", "sci_key", "med_key", "supply_key", "serv_key")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000)
/datum/techweb_node/bs_mining
id = "bluespace_mining"
display_name = "Bluespace Mining Technology"
description = "Harness the power of bluespace to make materials out of nothing. Slowly."
prereq_ids = list("practical_bluespace", "adv_mining")
design_ids = list("bluespace_miner")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
@@ -0,0 +1,3 @@
/datum/techweb_node/telecomms/New()
. = ..()
design_ids += "message-server"
@@ -0,0 +1,7 @@
/datum/techweb_node/powerarmor
id = "powerarmor"
display_name = "Full Body Exoskeleton"
description = "Utilizing fluctuations in bluespace crystals, we can draw small amounts of energy to create self-powered body enhancing suits."
prereq_ids = list("adv_biotech", "adv_bluespace", "adv_robotics")
design_ids = list("powerarmor_skeleton","powerarmor_torso","powerarmor_helmet","powerarmor_armR","powerarmor_armL","powerarmor_legR","powerarmor_legL")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)