Files
Paradise/code/game/mecha/mecha_wreckage.dm
ff8e0404b9 New Mech - The Nkarrdem, Janitor Supreme (#26453)
* Nkarrdem Mech - Initial Commit

* Fabricator category, garbage bag, module designs

* Added combat tech requirement to cleaning grenade launcher

* Fixed a comment's spacing

* Construction codersprites

* Construction path updated

* Open and Broken sprites

* Codersprites, Construction fixes, Wreckage

* Better spacing for equalities, better return bool

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Equality spacing

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* playsound boolean fix

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Mech part comment spacing

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Parts list parenthesis spacing

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Spacing and boolean returns

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Another boolean return

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* More comment spacing

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* More comment spacing

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Ditto

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Comment spacing

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Comment spacing

Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Snake cased floor_buffer, removed excess comment

* Enhanced floor buffer

* Whole lot of time format changes

* HUD warning message update

* Cutting cargo

* Max equipment fix

* Spray fixes

* Light replacer fixes and defines moved

* Mop sound cooldowns

* Formatting, autodoc, spacing, and chat alert fixes

* Emag warning

* Removed excess returns, added click when spray empty

* Minor refactor of cleaning_act, removed the async mopping

* Excess user

* Formatting, Typecaching

* Replaces to_chat with occupant_message

* Type def, attack log, and timer for CGL

* Moved light replacement logic to light object as fix() proc

* Free performance is free performance

* To chat fix

* replaceLight changes

* Ranged fix

* Moved autodoc

* Early return in mop refilling

* Reordered early returns in mop action

* Applied change to cleaning documentation

* Moved acrtion, removed excess subtype

* Spray moved to internal spray item, various fixes

* Removed excess

* Internal garbage storage for garbage magnet

* Janimech storage handling, effect when emptying into disposals, user check in handle_item_insertion

* Extraneous Return

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Var declaration fix

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

---------

Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
2024-10-10 09:40:48 +00:00

233 lines
8.5 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
anchored = FALSE
opacity = FALSE
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 class='notice'>The AI recovery beacon is active.</span>"
/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 class='notice'>[user] pries [S] from [src].</span>", "<span class='notice'>You pry [S] from [src].</span>")
crowbar_salvage -= S
return
to_chat(user, "<span class='notice'>You don't see anything that can be pried with [I]!</span>")
/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 class='notice'>You don't see anything that can be cut with [I]!</span>")
return
if(prob(30))
to_chat(user, "<span class='notice'>You fail to salvage anything valuable from [src]!</span>")
return
var/type = pick(welder_salvage)
var/N = new type(get_turf(user))
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
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 class='notice'>You don't see anything that can be cut with [I]!</span>")
return
var/N = new /obj/item/stack/cable_coil(get_turf(user), rand(1, 3))
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
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 class='warning'>No AI backups found.</span>")
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 class='boldnotice'>Backup files recovered</span>: [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 = "reticence-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/mkii
name = "\improper Ripley MK-II wreckage"
icon_state = "ripleymkii-broken"
/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
)