mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-17 09:07:10 +01:00
* spanish? * aaaagain * keep maptext * Update robot_items.dm * Update span_defines.dm * compiles * Update silicon_mob.dm * compile
227 lines
8.2 KiB
Plaintext
227 lines
8.2 KiB
Plaintext
///////////////////////////////////
|
|
//////// Mecha wreckage ////////
|
|
///////////////////////////////////
|
|
|
|
|
|
/obj/structure/mecha_wreckage
|
|
name = "exosuit wreckage"
|
|
desc = "Remains of some unfortunate mecha. Completely unrepairable, but perhaps something can be salvaged."
|
|
icon = 'icons/mecha/mecha.dmi'
|
|
density = TRUE
|
|
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/metal, /obj/item/stack/rods)
|
|
var/salvage_num = 5
|
|
var/list/crowbar_salvage = list()
|
|
var/wires_removed = FALSE
|
|
var/mob/living/silicon/ai/AI //AIs to be salvaged
|
|
var/list/parts
|
|
|
|
/obj/structure/mecha_wreckage/Initialize(mapload, mob/living/silicon/ai/AI_pilot)
|
|
. = ..()
|
|
if(parts)
|
|
for(var/i in 1 to 2)
|
|
if(!length(parts))
|
|
break
|
|
if(prob(60))
|
|
continue
|
|
var/part = pick(parts)
|
|
welder_salvage += part
|
|
parts = null
|
|
if(!AI_pilot) //Type-checking for this is already done in mecha/Destroy()
|
|
return
|
|
AI = AI_pilot
|
|
AI.apply_damage(150, BURN) //Give the AI a bit of damage from the "shock" of being suddenly shut down
|
|
AI.death() //The damage is not enough to kill the AI, but to be 'corrupted files' in need of repair.
|
|
AI.forceMove(src) //Put the dead AI inside the wreckage for recovery
|
|
add_overlay(mutable_appearance('icons/obj/projectiles.dmi', "green_laser")) //Overlay for the recovery beacon
|
|
AI.controlled_mech = null
|
|
AI.remote_control = null
|
|
|
|
/obj/structure/mecha_wreckage/Destroy()
|
|
QDEL_NULL(AI)
|
|
QDEL_LIST_CONTENTS(crowbar_salvage)
|
|
return ..()
|
|
|
|
/obj/structure/mecha_wreckage/examine(mob/user)
|
|
. = ..()
|
|
if(!AI)
|
|
return
|
|
. += SPAN_NOTICE("The AI recovery beacon is active.")
|
|
|
|
/obj/structure/mecha_wreckage/crowbar_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
|
return
|
|
if(length(crowbar_salvage))
|
|
var/obj/S = pick(crowbar_salvage)
|
|
S.forceMove(user.drop_location())
|
|
user.visible_message(SPAN_NOTICE("[user] pries [S] from [src]."), SPAN_NOTICE("You pry [S] from [src]."))
|
|
crowbar_salvage -= S
|
|
return
|
|
to_chat(user, SPAN_NOTICE("You don't see anything that can be pried with [I]!"))
|
|
|
|
/obj/structure/mecha_wreckage/welder_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(!I.tool_use_check(user, 0))
|
|
return
|
|
if(salvage_num <= 0 || !length(welder_salvage))
|
|
to_chat(user, SPAN_NOTICE("You don't see anything that can be cut with [I]!"))
|
|
return
|
|
if(prob(30))
|
|
to_chat(user, SPAN_NOTICE("You fail to salvage anything valuable from [src]!"))
|
|
return
|
|
var/type = pick(welder_salvage)
|
|
var/N = new type(get_turf(user))
|
|
user.visible_message("[user] cuts [N] from [src].", SPAN_NOTICE("You cut [N] from [src]."))
|
|
if(!istype(N, /obj/item/stack))
|
|
welder_salvage -= type
|
|
salvage_num--
|
|
|
|
/obj/structure/mecha_wreckage/wirecutter_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
|
return
|
|
if(wires_removed)
|
|
to_chat(user, SPAN_NOTICE("You don't see anything that can be cut with [I]!"))
|
|
return
|
|
var/N = new /obj/item/stack/cable_coil(get_turf(user), rand(1, 3))
|
|
user.visible_message("[user] cuts [N] from [src].", SPAN_NOTICE("You cut [N] from [src]."))
|
|
wires_removed = TRUE
|
|
|
|
/obj/structure/mecha_wreckage/transfer_ai(interaction, mob/user, mob/living/silicon/ai/the_ai, obj/item/aicard/card)
|
|
if(!..())
|
|
return
|
|
|
|
//Proc called on the wreck by the AI card.
|
|
if(interaction != AI_TRANS_TO_CARD) //AIs can only be transferred in one direction, from the wreck to the card.
|
|
return
|
|
if(!AI) //No AI in the wreck
|
|
to_chat(user, SPAN_WARNING("No AI backups found."))
|
|
return
|
|
cut_overlays() //Remove the recovery beacon overlay
|
|
AI.forceMove(card) //Move the dead AI to the card.
|
|
if(AI.client) //AI player is still in the dead AI and is connected
|
|
to_chat(AI, "The remains of your file system have been recovered on a mobile storage device.")
|
|
else //Give the AI a heads-up that it is probably going to get fixed.
|
|
AI.notify_ghost_cloning("You have been recovered from the wreckage!", source = card)
|
|
to_chat(user, "[SPAN_BOLDNOTICE("Backup files recovered")]: [AI.name] ([rand(1000, 9999)].exe) salvaged from [name] and stored within local memory.")
|
|
AI = null
|
|
|
|
/obj/structure/mecha_wreckage/gygax
|
|
name = "\improper Gygax wreckage"
|
|
icon_state = "gygax-broken"
|
|
parts = list(
|
|
/obj/item/mecha_parts/part/gygax_torso,
|
|
/obj/item/mecha_parts/part/gygax_head,
|
|
/obj/item/mecha_parts/part/gygax_left_arm,
|
|
/obj/item/mecha_parts/part/gygax_right_arm,
|
|
/obj/item/mecha_parts/part/gygax_left_leg,
|
|
/obj/item/mecha_parts/part/gygax_right_leg
|
|
)
|
|
|
|
/obj/structure/mecha_wreckage/gygax/dark
|
|
name = "\improper Dark Gygax wreckage"
|
|
icon_state = "darkgygax-broken"
|
|
|
|
/obj/structure/mecha_wreckage/marauder
|
|
name = "\improper Marauder wreckage"
|
|
icon_state = "marauder-broken"
|
|
|
|
/obj/structure/mecha_wreckage/ares
|
|
name = "\improper Ares wreckage"
|
|
icon_state = "ares-broken"
|
|
desc = "The truth is you lost an expensive piece of Nanotrasen-issue equipment. That suit is going to come out of your pay, and you will remain in this corporation until you are five hundred and ten years old, which is the number of years it will take for you to pay for an Ares Biohazard Containment Exosuit you have lost!"
|
|
|
|
/obj/structure/mecha_wreckage/mauler
|
|
name = "\improper Mauler wreckage"
|
|
icon_state = "mauler-broken"
|
|
desc = "The syndicate won't be very happy about this..."
|
|
|
|
/obj/structure/mecha_wreckage/seraph
|
|
name = "\improper Seraph wreckage"
|
|
icon_state = "seraph-broken"
|
|
|
|
/obj/structure/mecha_wreckage/reticence
|
|
name = "\improper Reticence wreckage"
|
|
icon_state = "mime-broken"
|
|
color = "#87878715"
|
|
desc = "..."
|
|
|
|
/obj/structure/mecha_wreckage/ripley
|
|
name = "\improper Ripley wreckage"
|
|
icon_state = "ripley-broken"
|
|
parts = list(/obj/item/mecha_parts/part/ripley_torso,
|
|
/obj/item/mecha_parts/part/ripley_left_arm,
|
|
/obj/item/mecha_parts/part/ripley_right_arm,
|
|
/obj/item/mecha_parts/part/ripley_left_leg,
|
|
/obj/item/mecha_parts/part/ripley_right_leg)
|
|
|
|
/obj/structure/mecha_wreckage/ripley/firefighter
|
|
name = "\improper Firefighter wreckage"
|
|
icon_state = "firefighter-broken"
|
|
parts = list(/obj/item/mecha_parts/part/ripley_torso,
|
|
/obj/item/mecha_parts/part/ripley_left_arm,
|
|
/obj/item/mecha_parts/part/ripley_right_arm,
|
|
/obj/item/mecha_parts/part/ripley_left_leg,
|
|
/obj/item/mecha_parts/part/ripley_right_leg,
|
|
/obj/item/clothing/suit/fire)
|
|
|
|
/obj/structure/mecha_wreckage/ripley/deathripley
|
|
name = "\improper Death-Ripley wreckage"
|
|
icon_state = "deathripley-broken"
|
|
parts = null
|
|
|
|
/obj/structure/mecha_wreckage/honker
|
|
name = "\improper H.O.N.K wreckage"
|
|
icon_state = "honker-broken"
|
|
desc = "All is right in the universe."
|
|
parts = list(
|
|
/obj/item/mecha_parts/chassis/honker,
|
|
/obj/item/mecha_parts/part/honker_torso,
|
|
/obj/item/mecha_parts/part/honker_head,
|
|
/obj/item/mecha_parts/part/honker_left_arm,
|
|
/obj/item/mecha_parts/part/honker_right_arm,
|
|
/obj/item/mecha_parts/part/honker_left_leg,
|
|
/obj/item/mecha_parts/part/honker_right_leg)
|
|
|
|
/obj/structure/mecha_wreckage/durand
|
|
name = "\improper Durand wreckage"
|
|
icon_state = "durand-broken"
|
|
parts = list(
|
|
/obj/item/mecha_parts/part/durand_torso,
|
|
/obj/item/mecha_parts/part/durand_head,
|
|
/obj/item/mecha_parts/part/durand_left_arm,
|
|
/obj/item/mecha_parts/part/durand_right_arm,
|
|
/obj/item/mecha_parts/part/durand_left_leg,
|
|
/obj/item/mecha_parts/part/durand_right_leg)
|
|
|
|
/obj/structure/mecha_wreckage/durand/old
|
|
icon_state = "old_durand-broken"
|
|
|
|
/obj/structure/mecha_wreckage/phazon
|
|
name = "\improper Phazon wreckage"
|
|
icon_state = "phazon-broken"
|
|
|
|
|
|
/obj/structure/mecha_wreckage/odysseus
|
|
name = "\improper Odysseus wreckage"
|
|
icon_state = "odysseus-broken"
|
|
parts = list(
|
|
/obj/item/mecha_parts/part/odysseus_torso,
|
|
/obj/item/mecha_parts/part/odysseus_head,
|
|
/obj/item/mecha_parts/part/odysseus_left_arm,
|
|
/obj/item/mecha_parts/part/odysseus_right_arm,
|
|
/obj/item/mecha_parts/part/odysseus_left_leg,
|
|
/obj/item/mecha_parts/part/odysseus_right_leg)
|
|
|
|
/obj/structure/mecha_wreckage/nkarrdem
|
|
name = "\improper Nkarrdem wreckage"
|
|
icon_state = "nkarrdem-broken"
|
|
parts = list(
|
|
/obj/item/mecha_parts/part/nkarrdem_torso,
|
|
/obj/item/mecha_parts/part/nkarrdem_head,
|
|
/obj/item/mecha_parts/part/nkarrdem_left_arm,
|
|
/obj/item/mecha_parts/part/nkarrdem_right_arm,
|
|
/obj/item/mecha_parts/part/nkarrdem_left_leg,
|
|
/obj/item/mecha_parts/part/nkarrdem_right_leg
|
|
)
|