Merge pull request #1772 from Citadel-Station-13/upstream-merge-28749

[MIRROR] Exporting mechs!
This commit is contained in:
LetterJay
2017-06-26 06:28:22 -05:00
committed by GitHub
5 changed files with 92 additions and 6 deletions
+4 -5
View File
@@ -56,7 +56,7 @@
var/datum/gas_mixture/cabin_air
var/obj/machinery/atmospherics/components/unary/portables_connector/connected_port = null
var/obj/item/device/radio/radio = null
var/obj/item/device/radio/mech/radio
var/list/trackers = list()
var/max_temperature = 25000
@@ -117,6 +117,7 @@
hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_TRACK_HUD)
/obj/item/device/radio/mech //this has to go somewhere
/obj/mecha/Initialize()
. = ..()
@@ -155,11 +156,9 @@
AI = M //AIs are loaded into the mech computer itself. When the mech dies, so does the AI. They can be recovered with an AI card from the wreck.
else
M.forceMove(loc)
if(prob(30))
explosion(get_turf(loc), 0, 0, 1, 3)
if(wreckage)
if(prob(30))
explosion(get_turf(src), 0, 0, 1, 3)
var/obj/structure/mecha_wreckage/WR = new wreckage(loc, AI)
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
if(E.salvageable && prob(30))
+10
View File
@@ -0,0 +1,10 @@
diff a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm (rejected hunks)
@@ -146,7 +146,7 @@
/obj/mecha/get_cell()
return cell
-/obj/mecha/deconstruct(disassembled = TRUE)
+/obj/mecha/Destroy()
go_out()
var/mob/living/silicon/ai/AI
for(var/mob/M in src) //Let's just be ultra sure
@@ -103,3 +103,79 @@
cost = 325
unit_name = "security barrier"
export_types = list(/obj/item/weapon/grenade/barrier, /obj/structure/barricade/security)
//Mecha
/datum/export/large/mech
export_types = list(/obj/mecha)
var/sellable
/datum/export/large/mech/applies_to(obj/O)
if(!..())
return FALSE
var/obj/mecha/ME = O
ME.wreckage = null // So the mech doesn't blow up in the cargo shuttle
if(sellable)
return TRUE
/datum/export/large/mech/sellable
export_types = list()
sellable = TRUE
/datum/export/large/mech/sellable/ripley
cost = 7500 //boards cost 2500 and takes another 1566 worth of materials (glass, metal, plaseel) to build + significant labor
unit_name = "APLU \"Ripley\""
export_types = list(/obj/mecha/working/ripley)
exclude_types = list(/obj/mecha/working/ripley/firefighter)
/datum/export/large/mech/sellable/firefighter
cost = 9000 //same as a ripley but takes 10 more plasteel and 5 less metal
unit_name = "APLU \"Firefighter\""
export_types = list(/obj/mecha/working/ripley/firefighter)
/datum/export/large/mech/sellable/odysseus
cost = 6000 // 1540 of material + 2000 price boards + labor
unit_name = "odysseus"
export_types = list(/obj/mecha/medical/odysseus)
/datum/export/large/mech/sellable/gygax
cost = 25000 // The material is worth 22631 alone. Not as big of a premium as one would expect, since R&D would have provided upgrades by then.
unit_name = "gygax"
export_types = list(/obj/mecha/combat/gygax)
exclude_types = list(/obj/mecha/combat/gygax/dark)
/datum/export/large/mech/sellable/honkmech
cost = 80000 // The bananium alone is worth around 64887 credits
unit_name = "H.O.N.K"
message = "- HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONK HONKHONKHONKHONK"
export_types = list(/obj/mecha/combat/honker)
/datum/export/large/mech/sellable/durand
cost = 12000 // 7586 worth of material. That's less than a gygax. Players will be disappointed by the durand's comparative lack of worth but oh well. Still a large premium because this requires significant cooperation between R&D, robotics, and cargo.
unit_name = "durand"
export_types = list(/obj/mecha/combat/durand)
/datum/export/large/mech/sellable/phazon
cost = 50000 // 15767 material + anomaly core. Fuck it, if you're willing to try selling one of these you should get BIG FUCKING MONEY
unit_name = "phazon"
export_types = list(/obj/mecha/combat/phazon)
/datum/export/large/mech/sellable/syndiegygax
cost = 50000 // You somehow stole a nuke op's gygax and sold it to nanotrasen. Go you.
unit_name = "captured syndicate gygax"
export_types = list(/obj/mecha/combat/gygax/dark)
/datum/export/large/mech/sellable/syndiegygax/syndie
cost = 25000 // You somehow stole a nuke op's gygax and sold it back to the syndicate. Why would you do this?
unit_name = "gygax"
emagged = TRUE
/datum/export/large/mech/sellable/mauler
cost = 87500 // Whoa, momma.
unit_name = "captured mauler"
export_types = list(/obj/mecha/combat/marauder/mauler)
/datum/export/large/mech/sellable/mauler/syndie
cost = 43750 // Just like the mauler is worth 1.75x the telecrystals compared to the gygax, the price reflects this
unit_name = "mauler"
emagged = TRUE
+1
View File
@@ -99,6 +99,7 @@
cost = 5
unit_name = "radio"
export_types = list(/obj/item/device/radio)
exclude_types = list(/obj/item/device/radio/mech)
// High-tech tools.
+1 -1
View File
@@ -109,7 +109,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
var/sold_atoms = ""
for(var/atom/movable/AM in areaInstance)
if(AM.anchored)
if(AM.anchored && !istype(AM, /obj/mecha))
continue
sold_atoms += export_item_and_contents(AM, contraband, emagged, dry_run = FALSE)