Buffs the MK-2 Ripley, adds the MK-1 (#33995)

* Yes.

* Yes.

* Yeah.

* Yes.

* yuppers

* yeah probs

* probs yea

* stuff

* fix
This commit is contained in:
githubuser4141
2023-02-18 13:23:00 +13:00
committed by GitHub
parent 4b2a8df50b
commit 3f7572ca5a
11 changed files with 219 additions and 50 deletions

View File

@@ -347,7 +347,7 @@
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher/can_attach(obj/mecha/working/M)
if(..())
if(istype(M, /obj/mecha/working/ripley/firefighter) || istype(M, /obj/mecha/working/clarke))
if(istype(M, /obj/mecha/working/ripley/mk2/firefighter) || istype(M, /obj/mecha/working/clarke))
return 1
return 0
@@ -1595,5 +1595,58 @@
return "[..()] ERROR: Tank empty. \[<a href='?src=\ref[src];eject=0'>eject tank</a>\]"
return "[..()] \[<a href='?src=\ref[src];toggle=0'>[collector.active ? "Deactivate" : "Activate"] radiation collector array</a>\]\[<a href='?src=\ref[src];eject=0'>eject tank</a>\]"
/obj/item/mecha_parts/mecha_equipment/tool/ripleyupgrade
name = "Ripley MK-II Conversion Kit"
desc = "A pressurized canopy attachment kit for an Autonomous Power Loader Unit \"Ripley\" MK-I mecha, to convert it to the slower, but space-worthy MK-II design. This kit cannot be removed, once applied."
icon_state = "ripleyupgrade"
/obj/item/mecha_parts/mecha_equipment/tool/ripleyupgrade/can_attach(obj/mecha/working/ripley/M)
if(M.enclosed) // i'm dumb and missed why istype wasn't working :c
to_chat(src, "<span class='warning'>This conversion kit can only be applied to APLU MK-I models.</span>")
return 0
if(M.cargo.len)
to_chat(src, "<span class='warning'>[M]'s cargo hold must be empty before this conversion kit can be applied.</span>")
return 0
if(!M.mech_maints_ready) //non-removable upgrade, so lets make sure the pilot or owner has their say.
to_chat(src, "<span class='warning'>[M] must have maintenance protocols active in order to allow this conversion kit.</span>")
return 0
if(M.occupant) //We're actualy making a new mech and swapping things over, it might get weird if players are involved
to_chat(src, "<span class='warning'>[M] must be unoccupied before this conversion kit can be applied.</span>")
return 0
if(!M.cell) //Turns out things break if the cell is missing
to_chat(src, "<span class='warning'>The conversion process requires a cell installed.</span>")
return 0
return 1
/obj/item/mecha_parts/mecha_equipment/tool/ripleyupgrade/attach(obj/mecha/markone)
var/obj/mecha/working/ripley/mk2/marktwo = new (get_turf(markone),1)
if(!marktwo)
return
qdel(marktwo.cell)
marktwo.cell = null
if (markone.cell)
marktwo.cell = markone.cell
markone.cell.forceMove(marktwo)
markone.cell = null
qdel(marktwo.tracking)
marktwo.tracking = null
if (markone.tracking)
marktwo.tracking = markone.tracking
markone.tracking.forceMove(marktwo)
markone.tracking = null
for(var/obj/item/mecha_parts/mecha_equipment/equipment in markone.equipment) //Move the equipment over...
equipment.detach(marktwo)
equipment.attach(marktwo)
marktwo.dna = markone.dna
if(markone.get_health() < 100)
marktwo.health = markone.health
marktwo.health = marktwo.health
if(markone.name != initial(markone.name))
marktwo.name = markone.name
markone.wreckage = FALSE
qdel(markone)
qdel(src)
playsound(get_turf(marktwo),'sound/items/ratchet.ogg',50,TRUE)
#undef MECHDRILL_SAND_SPEED
#undef MECHDRILL_ROCK_SPEED

View File

@@ -76,6 +76,11 @@
var/dash_dir = null
var/wreckage
var/enclosed = TRUE
var/silicon_pilot
var/silicon_icon_state = null
var/mech_maints_ready = FALSE
var/enter_delay = 40
var/list/equipment = new
var/obj/item/mecha_parts/mecha_equipment/selected
@@ -104,7 +109,7 @@
..()
add_radio()
add_cabin()
if(!add_airtank()) //we check this here in case mecha does not have an internal tank available by default - WIP
if(!add_airtank() || !enclosed) //we check this here in case mecha does not have an internal tank available by default - WIP
removeVerb(/obj/mecha/verb/connect_to_port)
removeVerb(/obj/mecha/verb/toggle_internal_tank)
add_cell()
@@ -130,7 +135,7 @@
W.cargo -= O
T.Entered(O, src)
if(prob(30))
if(prob(30 || src.enclosed)) // no enclosed space no explosion :)
explosion(T, 0, 0, 1, 3)
if(wreckage)
var/obj/effect/decal/mecha_wreckage/WR = new wreckage(T)
@@ -200,6 +205,8 @@
verbs += verb_path
/obj/mecha/proc/add_airtank()
if(!enclosed)
return
internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src)
mech_parts.Add(internal_tank)
return internal_tank
@@ -262,6 +269,13 @@
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
to_chat(user, "[bicon(ME)] [ME]")
if(enclosed)
return
if(silicon_pilot)
to_chat(user, "<span class='info'>[src] appears to be piloting itself..</span>")
else
to_chat(user, "<span class='info'>You can see [occupant] inside.</span>")
/obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits.
return
@@ -307,6 +321,19 @@
/obj/mecha/proc/range_action(atom/target)
return
//////////////////////////////////
//////// Misc procs ////////
//////////////////////////////////
/obj/mecha/proc/get_health()
return (health/initial(health)*100)
/obj/mecha/proc/get_mecha_occupancy_state()
if((silicon_pilot) && silicon_icon_state)
return silicon_icon_state
if(occupant)
return icon_state
return "[icon_state]-open"
//////////////////////////////////
//////// Movement procs ////////
@@ -524,6 +551,13 @@
//////// Health related procs ////////
////////////////////////////////////////
/obj/mecha/proc/take_flat_damage(amount, type="brute")
if(amount)
health -= amount
update_health()
log_append_to_last("Took [amount] points of damage.",1)
return
/obj/mecha/take_damage(incoming_damage, damage_type = "brute", skip_break, mute)
if(incoming_damage)
var/damage = absorbDamage(incoming_damage, damage_type)
@@ -636,6 +670,12 @@
/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper
if(!enclosed && occupant && !silicon_pilot)
if(prob(75))
occupant.bullet_act(Proj)
visible_message("<span class='warning'>[occupant] is hit by \the [Proj]!")
Proj.on_hit(src,2)
return PROJECTILE_COLLISION_DEFAULT
src.log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).",1)
call((proc_res["dynbulletdamage"]||src), "dynbulletdamage")(Proj) //calls equipment
return ..()
@@ -672,11 +712,8 @@
src.take_damage(initial(src.health)/2)
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
if(3.0)
if (prob(5))
qdel(src)
else
src.take_damage(initial(src.health)/5)
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
src.take_damage(initial(src.health)/5)
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
return
/*Will fix later -Sieve
@@ -720,6 +757,14 @@
src.log_message("Exposed to dangerous temperature.",1)
src.take_damage(5, damage_type = "fire")
src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL))
if(enclosed)// || mecha_flags & SILICON_PILOT)
return
for(var/mob/living/cookedalive as anything in occupant)
if(cookedalive.fire_stacks < 5)
cookedalive.adjust_fire_stacks(1)
cookedalive.IgniteMob()
return
/obj/mecha/proc/dynattackby(obj/item/weapon/W as obj, mob/living/user as mob)
@@ -788,9 +833,11 @@
if(state==STATE_BOLTSEXPOSED)
state = STATE_BOLTSOPENED
to_chat(user, "You undo the securing bolts.")
mech_maints_ready = TRUE
W.playtoolsound(src, 50)
else if(state==STATE_BOLTSOPENED)
state = STATE_BOLTSEXPOSED
mech_maints_ready = FALSE
to_chat(user, "You tighten the securing bolts.")
W.playtoolsound(src, 50)
return
@@ -1140,7 +1187,7 @@
visible_message("<span class='good'>[usr] is instantly lifted into \the [src] by the running board!</span>")
else
visible_message("<span class='notice'>[usr] starts to climb into \the [src].</span>")
if(do_after(usr, src, 40))
if(do_after(usr, src, enter_delay))
if(!src.occupant)
moved_inside(usr)
refresh_spells()
@@ -1228,7 +1275,8 @@
src.verbs -= /obj/mecha/verb/eject
src.Entered(mmi_as_oc)
src.Move(src.loc)
src.icon_state = src.initial_icon
src.silicon_pilot = TRUE
src.icon_state = src.silicon_icon_state
if(!lights) //if the main lights are off, turn on cabin lights
light_power = light_brightness_off
set_light(light_range_off)
@@ -1519,9 +1567,9 @@
[integrity<30?"<font color='red'><b>DAMAGE LEVEL CRITICAL</b></font><br>":null]
<b>Integrity: </b> [integrity]%<br>
<b>Powercell charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
<b>Airtank pressure: </b>[tank_pressure]kPa<br>
<b>Airtank temperature: </b>[tank_temperature]K|[tank_temperature - T0C]&deg;C<br>
<b>Air source: </b>[internal_tank?"[use_internal_tank?"Internal Airtank":"Environment"]":"Environment"]<br>
<b>Airtank pressure: </b>[internal_tank?"[tank_pressure]kPa":"N/A"]<br>
<b>Airtank temperature: </b>[internal_tank?"[tank_temperature]&deg;K|[tank_temperature - T0C]&deg;C":"N/A"]<br>
<b>Cabin pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
<b>Cabin temperature: </b> [return_temperature()]K|[return_temperature() - T0C]&deg;C<br>
<b>Lights: </b>[lights?"on":"off"]<br>
@@ -1550,7 +1598,7 @@
<div class='wr'>
<div class='header'>Airtank</div>
<div class='links'>
<a href='?src=\ref[src];toggle_airtank=1'>Toggle Internal Airtank Usage</a><br>
[(/obj/mecha/verb/toggle_internal_tank in src.verbs)?"<a href='?src=\ref[src];toggle_airtank=1'>Toggle Internal Airtank Usage</a><br>":null]
[(/obj/mecha/verb/disconnect_from_port in src.verbs)?"<a href='?src=\ref[src];port_disconnect=1'>Disconnect from port</a><br>":null]
[(/obj/mecha/verb/connect_to_port in src.verbs)?"<a href='?src=\ref[src];port_connect=1'>Connect to port</a><br>":null]
</div>

View File

@@ -14,28 +14,28 @@
steps = list(
//1
list(Co_DESC="External armor is wrenched.",
list(Co_DESC="Cockpit wire mesh is installed.",
Co_NEXTSTEP = list(Co_KEY=/obj/item/tool/weldingtool,
Co_AMOUNT = 3,
Co_VIS_MSG = "{USER} weld{s} external armor layer to {HOLDER}."),
Co_BACKSTEP = list(Co_KEY=/obj/item/tool/wrench,
Co_VIS_MSG = "{USER} unfasten{s} the external armor layer.")
Co_VIS_MSG = "{USER} unfasten{s} the cockpit wire screen.")
),
//2
list(Co_DESC="External armor is installed.",
list(Co_DESC="Cockpit wire mesh is installed.",
Co_NEXTSTEP = list(Co_KEY=/obj/item/tool/wrench,
Co_VIS_MSG = "{USER} secure{s} external armor layer."),
Co_BACKSTEP = list(Co_KEY=/obj/item/tool/crowbar,
Co_VIS_MSG = "{USER} prie{s} external armor layer from {HOLDER}.",
Co_START_MSG = "{USER} begin{s} removing the external reinforced armor...",
Co_START_MSG = "{USER} begin{s} removing the cockpit's wire screen...",
Co_DELAY = 30,)
),
//3
list(Co_DESC="Internal armor is welded.",
Co_NEXTSTEP = list(Co_KEY=/obj/item/stack/sheet/plasteel,
Co_AMOUNT = 5,
Co_VIS_MSG = "{USER} install{s} external reinforced armor layer to {HOLDER}.",
Co_START_MSG = "{USER} begin{s} installing the external reinforced armor...",
Co_NEXTSTEP = list(Co_KEY=/obj/item/stack/rods,
Co_AMOUNT = 10,
Co_VIS_MSG = "{USER} install{s} a steel wire mesh to {HOLDER}'s cabin.",
Co_START_MSG = "{USER} begin{s} installing the wire mesh...",
Co_DELAY = 30),
Co_BACKSTEP = list(Co_KEY=/obj/item/tool/weldingtool,
Co_AMOUNT = 3,

View File

@@ -26,7 +26,7 @@
/obj/machinery/computer/mecha/ui_data(mob/user)
var/list/data = list()
data["mechas"] = list()
for(var/obj/item/mecha_parts/mecha_tracking/TR in mech_tracking_beacons)
var/obj/mecha/M = TR.in_mecha()
@@ -82,7 +82,7 @@
log_game("[key_name_admin(usr)] overloaded [M] using an exosuit control console.")
M.log_message("Exosuit tracking beacon overload activated.",1)
M.occupant_message("<span class='red'><b>The exosuit tracking beacon short-circuits!</b></span>")
M.use_power(M.cell.charge)
M.use_power(M.cell.charge)
if (M.get_charge())
if (M.cell.charge < 5000 && M)
M.use_power(M.cell.charge/4)

View File

@@ -186,20 +186,14 @@
/obj/item/mecha_parts/part/ripley_right_leg)
welder_salvage += pick_random_loot(parts)
/obj/effect/decal/mecha_wreckage/ripley/mk2
name = "Ripley MK-II wreckage"
icon_state = "ripleymkii-broken"
/obj/effect/decal/mecha_wreckage/ripley/firefighter
name = "Firefighter wreckage"
icon_state = "firefighter-broken"
/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
..()
var/list/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)
welder_salvage += pick_random_loot(parts)
/obj/effect/decal/mecha_wreckage/ripley/deathripley
name = "Death-Ripley wreckage"
icon_state = "deathripley-broken"

View File

@@ -1,38 +1,71 @@
/obj/mecha/working/ripley
desc = "Autonomous Power Loader Unit. The workhorse of the exosuit world."
name = "APLU \"Ripley\""
name = "APLU MK-I \"Ripley\""
icon_state = "ripley"
initial_icon = "ripley"
step_in = 4
silicon_icon_state = "ripley-empty"
step_in = 2.5 //Move speed, lower is faster.
/// How fast the mech is in low pressure
var/fast_pressure_step_in = 1.5
/// How fast the mech is in normal pressure
var/slow_pressure_step_in = 2.5
max_temperature = 20000
health = 200
damage_absorption = list("brute"=0.65,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
wreckage = /obj/effect/decal/mecha_wreckage/ripley
enclosed = FALSE
enter_delay = 15
mech_sprites = list(
"ripley",
"ripley_glass",
"titan",
"ripley_flames_red",
"ripley_flames_blue",
"hivisripley"
"hauler"
)
paintable = 1
/obj/mecha/working/ripley/Move()
. = ..()
update_pressure()
/*
/obj/mecha/working/ripley/New()
..()
return
*/
/obj/mecha/working/ripley/firefighter
desc = "Standard APLU chassis, refitted with additional thermal protection and cistern."
/obj/mecha/working/ripley/mk2
desc = "Autonomous Power Loader Unit. The workhorse of the exosuit world, this variant is fitted with a pressurized cabin. "
name = "APLU MK-II \"Ripley\""
icon_state = "ripleymkii"
initial_icon = "ripleymkii"
step_in = 2.5 //Move speed, lower is faster.
/// How fast the mech is in low pressure
fast_pressure_step_in = 2.5
/// How fast the mech is in normal pressure
slow_pressure_step_in = 4
health = 250
damage_absorption = list("brute"=0.6,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=0.8)
wreckage = /obj/effect/decal/mecha_wreckage/ripley/mk2
enclosed = TRUE
enter_delay = 40
mech_sprites = list(
"ripleymkii",
"titan",
"ripley_flames_red",
"ripley_flames_blue",
"hivisripley"
)
paintable = 1
/obj/mecha/working/ripley/mk2/firefighter
desc = "Standard APLU MK-II chassis, refitted with additional thermal protection and cistern."
name = "APLU \"Firefighter\""
icon_state = "firefighter"
initial_icon = "firefighter"
max_temperature = 65000
health = 250
health = 300
light_range_on = 10
light_brightness_on = 3
damage_absorption = list("brute"=0.8,"fire"=0.5,"bullet"=0.8,"bomb"=0.5)
damage_absorption = list("brute"=0.6,"fire"=0.5,"bullet"=0.8,"laser"=0.85, "bomb"=0.7)
wreckage = /obj/effect/decal/mecha_wreckage/ripley/firefighter
paintable = 1
mech_sprites = list(
@@ -40,7 +73,7 @@
"aluminizer"
)
/obj/mecha/working/ripley/deathripley
/obj/mecha/working/ripley/mk2/firefighter/deathripley
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
name = "DEATH-RIPLEY"
icon_state = "deathripley"
@@ -49,6 +82,8 @@
opacity = 0
light_range_on = 12
light_brightness_on = 3
internal_damage_threshold = 35
damage_absorption = list("brute"=0.5,"fire"=0.5,"bullet"=0.6,"laser"=0.6, "energy"=0.75, "bomb"=0.5) // I mean, it's still a nukie mech
wreckage = /obj/effect/decal/mecha_wreckage/ripley/deathripley
step_energy_drain = 0
paintable = 0
@@ -84,4 +119,35 @@
D.attach(src)
var/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
HC.attach(src)
src.hydraulic_clamp = HC
src.hydraulic_clamp = HC
/obj/mecha/working/ripley/proc/update_pressure()
var/turf/T = get_turf(loc)
. = FALSE
if(!istype(T))
return
var/datum/gas_mixture/environment = T.return_air()
if(!istype(environment))
return
var/pressure = environment.return_pressure()
if(pressure <= 20)
. = TRUE
if(low_atmos_pressure_check (T))
step_in = fast_pressure_step_in
else
step_in = slow_pressure_step_in
/proc/low_atmos_pressure_check(turf/T)
. = FALSE
if(!istype(T))
return
var/datum/gas_mixture/environment = T.return_air()
if(!istype(environment))
return
var/pressure = environment.return_pressure()
if(pressure <= 20)
. = TRUE

View File

@@ -35,8 +35,6 @@
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
return
/obj/mecha/working/get_stats_part()
var/output = ..()
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"

View File

@@ -17,3 +17,13 @@
build_path = /obj/item/mecha_parts/chassis/firefighter
category = "Exosuit_Modules"
materials = list(MAT_IRON=25000)
/datum/design/ripleyupgrade
name = "APLU 'Ripley' MK-II Upgrade Kit"
desc = "Used to upgrade an existing MK-I Ripley to its space-proof cousin. Cannot be removed once applied."
id = "ripley_upgrade"
req_tech = list(Tc_ENGINEERING = 2)
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/tool/ripleyupgrade
category = "Exosuit_Modules"
materials = list(MAT_IRON= 20000, MAT_PLASMA = 5000)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 483 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -50284,7 +50284,7 @@
/turf/simulated/floor,
/area/lamprey/researchwarehousemaintenanceblob)
"cja" = (
/obj/mecha/working/ripley/deathripley,
/obj/mecha/working/ripley/mk2/firefighter/deathripley,
/obj/structure/window/reinforced{
dir = 1
},
@@ -63272,7 +63272,7 @@
/area/lamprey/hellmaintenanceblob)
"cLP" = (
/obj/effect/decal/cleanable/dirt,
/obj/mecha/working/ripley/firefighter,
/obj/mecha/working/ripley/mk2/firefighter,
/turf/simulated/floor/wood{
icon_state = "wood-broken7"
},