Skip to content

Commit

Permalink
refactor: move damaged ruin ripley to subtype (ParadiseSS13#27294)
Browse files Browse the repository at this point in the history
* refactor: move damaged ruin ripley to subtype

* set script PR number

* derp

* fix typepath
  • Loading branch information
warriorstar-orion authored Nov 23, 2024
1 parent 586805a commit 0de5514
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
/turf/simulated/floor/wood,
/area/ruin/powered/snow_cabin)
"aL" = (
/obj/mecha/working/ripley/mining,
/obj/mecha/working/ripley/mining/old,
/turf/simulated/floor/wood,
/area/ruin/powered/snow_cabin)
"aM" = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
/turf/simulated/floor/plating/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
"d" = (
/obj/mecha/working/ripley/mining{
ruin_mecha = 1
},
/obj/mecha/working/ripley/mining/old,
/turf/simulated/floor/plating/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
"e" = (
Expand Down
1 change: 0 additions & 1 deletion code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
armor = list(melee = 20, bullet = 10, laser = 0, energy = 0, bomb = 0, rad = 0, fire = 100, acid = 75)
bubble_icon = "machine"
var/list/facing_modifiers = list(MECHA_FRONT_ARMOUR = 1.5, MECHA_SIDE_ARMOUR = 1, MECHA_BACK_ARMOUR = 0.5)
var/ruin_mecha = FALSE //if the mecha starts on a ruin, don't automatically give it a tracking beacon to prevent metagaming.
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
var/can_move = 0 // time of next allowed movement
/// Time it takes to enter the mech
Expand Down
28 changes: 27 additions & 1 deletion code/game/mecha/working/ripley.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,40 @@
An altercation even occurred where an individual dressed in a poorly-made Killjoy costume attempted to kill a collector to gain a Death Ripley, who was later sent to a mental institution after screaming, “THE DEATHSQUAD IS REAL.</i>"

/obj/mecha/working/ripley/mining
name = "APLU \"Miner\""

/obj/mecha/working/ripley/mining/proc/prepare_equipment()
SHOULD_CALL_PARENT(FALSE)

// Diamond drill as a treat
var/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill/D = new
D.attach(src)

// Add ore box to cargo
cargo.Add(new /obj/structure/ore_box(src))

// Attach hydraulic clamp
var/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/HC = new
HC.attach(src)

var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
scanner.attach(src)

/obj/mecha/working/ripley/mining/Initialize(mapload)
. = ..()
prepare_equipment()

/obj/mecha/working/ripley/mining/old
desc = "An old, dusty mining ripley."
name = "APLU \"Miner\""
obj_integrity = 75 //Low starting health

/obj/mecha/working/ripley/mining/Initialize(mapload)
/obj/mecha/working/ripley/mining/old/add_cell()
. = ..()
if(cell)
cell.charge = FLOOR(cell.charge * 0.25, 1) //Starts at very low charge

/obj/mecha/working/ripley/mining/old/prepare_equipment()
//Attach drill
if(prob(70)) //Maybe add a drill
if(prob(15)) //Possible diamond drill... Feeling lucky?
Expand Down
1 change: 1 addition & 0 deletions tools/UpdatePaths/Scripts/27294_old_ripley.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/obj/mecha/working/ripley/mining : /obj/mecha/working/ripley/mining/old

0 comments on commit 0de5514

Please sign in to comment.