Merge branch 'Ghommie-cit265' of https://github.com/Ghommie/Citadel-Station-13 into Ghommie-cit435
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/obj/mecha/combat
|
||||
force = 30
|
||||
internal_damage_threshold = 50
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 15, "energy" = 20, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
mouse_pointer = 'icons/mecha/mecha_mouse.dmi'
|
||||
var/spawn_tracked = TRUE
|
||||
|
||||
/obj/mecha/combat/Initialize()
|
||||
. = ..()
|
||||
if(spawn_tracked)
|
||||
/obj/mecha/combat
|
||||
force = 30
|
||||
internal_damage_threshold = 50
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 15, "energy" = 20, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
mouse_pointer = 'icons/mecha/mecha_mouse.dmi'
|
||||
var/spawn_tracked = TRUE
|
||||
|
||||
/obj/mecha/combat/Initialize()
|
||||
. = ..()
|
||||
if(spawn_tracked)
|
||||
trackers += new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
@@ -1,21 +1,21 @@
|
||||
/obj/mecha/combat/durand
|
||||
desc = "An aging combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
|
||||
name = "\improper Durand"
|
||||
icon_state = "durand"
|
||||
step_in = 4
|
||||
dir_in = 1 //Facing North.
|
||||
max_integrity = 400
|
||||
deflect_chance = 20
|
||||
armor = list("melee" = 40, "bullet" = 35, "laser" = 15, "energy" = 10, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 30000
|
||||
infra_luminosity = 8
|
||||
force = 40
|
||||
wreckage = /obj/structure/mecha_wreckage/durand
|
||||
|
||||
/obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
defense_action.Grant(user, src)
|
||||
|
||||
/obj/mecha/combat/durand/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
defense_action.Remove(user)
|
||||
/obj/mecha/combat/durand
|
||||
desc = "An aging combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
|
||||
name = "\improper Durand"
|
||||
icon_state = "durand"
|
||||
step_in = 4
|
||||
dir_in = 1 //Facing North.
|
||||
max_integrity = 400
|
||||
deflect_chance = 20
|
||||
armor = list("melee" = 40, "bullet" = 35, "laser" = 15, "energy" = 10, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 30000
|
||||
infra_luminosity = 8
|
||||
force = 40
|
||||
wreckage = /obj/structure/mecha_wreckage/durand
|
||||
|
||||
/obj/mecha/combat/durand/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
defense_action.Grant(user, src)
|
||||
|
||||
/obj/mecha/combat/durand/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
defense_action.Remove(user)
|
||||
|
||||
@@ -1,67 +1,68 @@
|
||||
/obj/mecha/combat/gygax
|
||||
desc = "A lightweight, security exosuit. Popular among private and corporate security."
|
||||
name = "\improper Gygax"
|
||||
icon_state = "gygax"
|
||||
step_in = 3
|
||||
dir_in = 1 //Facing North.
|
||||
max_integrity = 250
|
||||
deflect_chance = 5
|
||||
force = 20
|
||||
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 25000
|
||||
infra_luminosity = 6
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax
|
||||
internal_damage_threshold = 35
|
||||
max_equip = 3
|
||||
step_energy_drain = 3
|
||||
leg_overload_coeff = 300
|
||||
|
||||
/obj/mecha/combat/gygax/dark
|
||||
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
|
||||
name = "\improper Dark Gygax"
|
||||
icon_state = "darkgygax"
|
||||
max_integrity = 300
|
||||
deflect_chance = 15
|
||||
force = 25
|
||||
armor = list("melee" = 40, "bullet" = 40, "laser" = 50, "energy" = 35, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 35000
|
||||
leg_overload_coeff = 100
|
||||
operation_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax/dark
|
||||
max_equip = 4
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/gygax/dark/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
|
||||
if(C)
|
||||
C.forceMove(src)
|
||||
cell = C
|
||||
return
|
||||
cell = new /obj/item/stock_parts/cell/hyper(src)
|
||||
|
||||
/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
overload_action.Grant(user, src)
|
||||
|
||||
/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
thrusters_action.Grant(user, src)
|
||||
|
||||
|
||||
/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
overload_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
thrusters_action.Remove(user)
|
||||
/obj/mecha/combat/gygax
|
||||
desc = "A lightweight, security exosuit. Popular among private and corporate security."
|
||||
name = "\improper Gygax"
|
||||
icon_state = "gygax"
|
||||
step_in = 3
|
||||
dir_in = 1 //Facing North.
|
||||
max_integrity = 250
|
||||
deflect_chance = 5
|
||||
force = 20
|
||||
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 25000
|
||||
infra_luminosity = 6
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax
|
||||
internal_damage_threshold = 35
|
||||
max_equip = 3
|
||||
step_energy_drain = 3
|
||||
leg_overload_coeff = 300
|
||||
|
||||
/obj/mecha/combat/gygax/dark
|
||||
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
|
||||
name = "\improper Dark Gygax"
|
||||
icon_state = "darkgygax"
|
||||
max_integrity = 300
|
||||
deflect_chance = 15
|
||||
force = 25
|
||||
armor = list("melee" = 40, "bullet" = 40, "laser" = 50, "energy" = 35, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 35000
|
||||
leg_overload_coeff = 100
|
||||
operation_req_access = list(ACCESS_SYNDICATE)
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/gygax/dark
|
||||
max_equip = 4
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/gygax/dark/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/gygax/dark/add_cell(obj/item/stock_parts/cell/C=null)
|
||||
if(C)
|
||||
C.forceMove(src)
|
||||
cell = C
|
||||
return
|
||||
cell = new /obj/item/stock_parts/cell/hyper(src)
|
||||
|
||||
/obj/mecha/combat/gygax/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
overload_action.Grant(user, src)
|
||||
|
||||
/obj/mecha/combat/gygax/dark/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
thrusters_action.Grant(user, src)
|
||||
|
||||
|
||||
/obj/mecha/combat/gygax/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
overload_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/gygax/dark/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
thrusters_action.Remove(user)
|
||||
|
||||
+155
-154
@@ -1,155 +1,156 @@
|
||||
/obj/mecha/combat/honker
|
||||
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. Used to spread the fun and joy of life. HONK!"
|
||||
name = "\improper H.O.N.K"
|
||||
icon_state = "honker"
|
||||
step_in = 3
|
||||
max_integrity = 140
|
||||
deflect_chance = 60
|
||||
internal_damage_threshold = 60
|
||||
armor = list("melee" = -20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 25000
|
||||
infra_luminosity = 5
|
||||
operation_req_access = list(ACCESS_THEATRE)
|
||||
wreckage = /obj/structure/mecha_wreckage/honker
|
||||
add_req_access = 0
|
||||
max_equip = 3
|
||||
var/squeak = 0
|
||||
|
||||
/obj/mecha/combat/honker/get_stats_part()
|
||||
var/integrity = obj_integrity/max_integrity*100
|
||||
var/cell_charge = get_charge()
|
||||
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
|
||||
var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None"
|
||||
var/tank_temperature = internal_tank ? int_tank_air.temperature : "Unknown"
|
||||
var/cabin_pressure = round(return_pressure(),0.01)
|
||||
var/output = {"[report_internal_damage()]
|
||||
[integrity<30?"<font color='red'><b>DAMAGE LEVEL CRITICAL</b></font><br>":null]
|
||||
[internal_damage&MECHA_INT_TEMP_CONTROL?"<font color='red'><b>CLOWN SUPPORT SYSTEM MALFUNCTION</b></font><br>":null]
|
||||
[internal_damage&MECHA_INT_TANK_BREACH?"<font color='red'><b>GAS TANK HONK</b></font><br>":null]
|
||||
[internal_damage&MECHA_INT_CONTROL_LOST?"<font color='red'><b>HONK-A-DOODLE</b></font> - <a href='?src=[REF(src)];repair_int_control_lost=1'>Recalibrate</a><br>":null]
|
||||
<b>IntegriHONK: </b> [integrity]%<br>
|
||||
<b>PowerHONK charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
|
||||
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
|
||||
<b>AirHONK pressure: </b>[tank_pressure]kPa<br>
|
||||
<b>AirHONK temperature: </b>[tank_temperature]°K|[tank_temperature - T0C]°C<br>
|
||||
<b>HONK pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
|
||||
<b>HONK temperature: </b> [return_temperature()]°K|[return_temperature() - T0C]°C<br>
|
||||
<b>Lights: </b>[lights?"on":"off"]<br>
|
||||
[dna_lock?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna_lock]</span> \[<a href='?src=[REF(src)];reset_dna=1'>Reset</a>\]<br>":null]
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/honker/get_stats_html()
|
||||
var/output = {"<html>
|
||||
<head><title>[src.name] data</title>
|
||||
<style>
|
||||
body {color: #00ff00; background: #32CD32; font-family:"Courier",monospace; font-size: 12px;}
|
||||
hr {border: 1px solid #0f0; color: #fff; background-color: #000;}
|
||||
a {padding:2px 5px;;color:#0f0;}
|
||||
.wr {margin-bottom: 5px;}
|
||||
.header {cursor:pointer;}
|
||||
.open, .closed {background: #32CD32; color:#000; padding:1px 2px;}
|
||||
.links a {margin-bottom: 2px;padding-top:3px;}
|
||||
.visible {display: block;}
|
||||
.hidden {display: none;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
[js_dropdowns]
|
||||
function SSticker() {
|
||||
setInterval(function(){
|
||||
window.location='byond://?src=[REF(src)]&update_content=1';
|
||||
document.body.style.color = get_rand_color_string();
|
||||
document.body.style.background = get_rand_color_string();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function get_rand_color_string() {
|
||||
var color = new Array;
|
||||
for(var i=0;i<3;i++){
|
||||
color.push(Math.floor(Math.random()*255));
|
||||
}
|
||||
return "rgb("+color.toString()+")";
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
dropdowns();
|
||||
SSticker();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='content'>
|
||||
[src.get_stats_part()]
|
||||
</div>
|
||||
<div id='eq_list'>
|
||||
[src.get_equipment_list()]
|
||||
</div>
|
||||
<hr>
|
||||
<div id='commands'>
|
||||
[src.get_commands()]
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/honker/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Sounds of HONK:</div>
|
||||
<div class='links'>
|
||||
<a href='?src=[REF(src)];play_sound=sadtrombone'>Sad Trombone</a>
|
||||
<a href='?src=[REF(src)];play_sound=bikehorn'>Bike Horn</a>
|
||||
<a href='?src=[REF(src)];play_sound=airhorn2'>Air Horn</a>
|
||||
<a href='?src=[REF(src)];play_sound=carhorn'>Car Horn</a>
|
||||
<a href='?src=[REF(src)];play_sound=party_horn'>Party Horn</a>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/get_equipment_list()
|
||||
if(!equipment.len)
|
||||
return
|
||||
var/output = "<b>Honk-ON-Systems:</b><div style=\"margin-left: 15px;\">"
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
|
||||
output += "<div id='[REF(MT)]'>[MT.get_equip_info()]</div>"
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
if(!squeak)
|
||||
playsound(src, "clownstep", 70, 1)
|
||||
squeak = 1
|
||||
else
|
||||
squeak = 0
|
||||
return result
|
||||
|
||||
/obj/mecha/combat/honker/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["play_sound"])
|
||||
switch(href_list["play_sound"])
|
||||
if("sadtrombone")
|
||||
playsound(src, 'sound/misc/sadtrombone.ogg', 50)
|
||||
if("bikehorn")
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50)
|
||||
if("airhorn2")
|
||||
playsound(src, 'sound/items/airhorn2.ogg', 40) //soundfile has higher than average volume
|
||||
if("carhorn")
|
||||
playsound(src, 'sound/items/carhorn.ogg', 80) //soundfile has lower than average volume
|
||||
if("party_horn")
|
||||
playsound(src, 'sound/items/party_horn.ogg', 50)
|
||||
return
|
||||
|
||||
/proc/rand_hex_color()
|
||||
var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")
|
||||
var/color=""
|
||||
for (var/i=0;i<6;i++)
|
||||
color = color+pick(colors)
|
||||
/obj/mecha/combat/honker
|
||||
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. Used to spread the fun and joy of life. HONK!"
|
||||
name = "\improper H.O.N.K"
|
||||
icon_state = "honker"
|
||||
step_in = 3
|
||||
max_integrity = 140
|
||||
deflect_chance = 60
|
||||
internal_damage_threshold = 60
|
||||
armor = list("melee" = -20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 25000
|
||||
infra_luminosity = 5
|
||||
operation_req_access = list(ACCESS_THEATRE)
|
||||
internals_req_access = list(ACCESS_THEATRE, ACCESS_ROBOTICS)
|
||||
wreckage = /obj/structure/mecha_wreckage/honker
|
||||
add_req_access = 0
|
||||
max_equip = 3
|
||||
var/squeak = 0
|
||||
|
||||
/obj/mecha/combat/honker/get_stats_part()
|
||||
var/integrity = obj_integrity/max_integrity*100
|
||||
var/cell_charge = get_charge()
|
||||
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
|
||||
var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None"
|
||||
var/tank_temperature = internal_tank ? int_tank_air.temperature : "Unknown"
|
||||
var/cabin_pressure = round(return_pressure(),0.01)
|
||||
var/output = {"[report_internal_damage()]
|
||||
[integrity<30?"<font color='red'><b>DAMAGE LEVEL CRITICAL</b></font><br>":null]
|
||||
[internal_damage&MECHA_INT_TEMP_CONTROL?"<font color='red'><b>CLOWN SUPPORT SYSTEM MALFUNCTION</b></font><br>":null]
|
||||
[internal_damage&MECHA_INT_TANK_BREACH?"<font color='red'><b>GAS TANK HONK</b></font><br>":null]
|
||||
[internal_damage&MECHA_INT_CONTROL_LOST?"<font color='red'><b>HONK-A-DOODLE</b></font> - <a href='?src=[REF(src)];repair_int_control_lost=1'>Recalibrate</a><br>":null]
|
||||
<b>IntegriHONK: </b> [integrity]%<br>
|
||||
<b>PowerHONK charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
|
||||
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
|
||||
<b>AirHONK pressure: </b>[tank_pressure]kPa<br>
|
||||
<b>AirHONK temperature: </b>[tank_temperature]°K|[tank_temperature - T0C]°C<br>
|
||||
<b>HONK pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
|
||||
<b>HONK temperature: </b> [return_temperature()]°K|[return_temperature() - T0C]°C<br>
|
||||
<b>Lights: </b>[lights?"on":"off"]<br>
|
||||
[dna_lock?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna_lock]</span> \[<a href='?src=[REF(src)];reset_dna=1'>Reset</a>\]<br>":null]
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/honker/get_stats_html()
|
||||
var/output = {"<html>
|
||||
<head><title>[src.name] data</title>
|
||||
<style>
|
||||
body {color: #00ff00; background: #32CD32; font-family:"Courier",monospace; font-size: 12px;}
|
||||
hr {border: 1px solid #0f0; color: #fff; background-color: #000;}
|
||||
a {padding:2px 5px;;color:#0f0;}
|
||||
.wr {margin-bottom: 5px;}
|
||||
.header {cursor:pointer;}
|
||||
.open, .closed {background: #32CD32; color:#000; padding:1px 2px;}
|
||||
.links a {margin-bottom: 2px;padding-top:3px;}
|
||||
.visible {display: block;}
|
||||
.hidden {display: none;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
[js_dropdowns]
|
||||
function SSticker() {
|
||||
setInterval(function(){
|
||||
window.location='byond://?src=[REF(src)]&update_content=1';
|
||||
document.body.style.color = get_rand_color_string();
|
||||
document.body.style.background = get_rand_color_string();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function get_rand_color_string() {
|
||||
var color = new Array;
|
||||
for(var i=0;i<3;i++){
|
||||
color.push(Math.floor(Math.random()*255));
|
||||
}
|
||||
return "rgb("+color.toString()+")";
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
dropdowns();
|
||||
SSticker();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='content'>
|
||||
[src.get_stats_part()]
|
||||
</div>
|
||||
<div id='eq_list'>
|
||||
[src.get_equipment_list()]
|
||||
</div>
|
||||
<hr>
|
||||
<div id='commands'>
|
||||
[src.get_commands()]
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/honker/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Sounds of HONK:</div>
|
||||
<div class='links'>
|
||||
<a href='?src=[REF(src)];play_sound=sadtrombone'>Sad Trombone</a>
|
||||
<a href='?src=[REF(src)];play_sound=bikehorn'>Bike Horn</a>
|
||||
<a href='?src=[REF(src)];play_sound=airhorn2'>Air Horn</a>
|
||||
<a href='?src=[REF(src)];play_sound=carhorn'>Car Horn</a>
|
||||
<a href='?src=[REF(src)];play_sound=party_horn'>Party Horn</a>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/get_equipment_list()
|
||||
if(!equipment.len)
|
||||
return
|
||||
var/output = "<b>Honk-ON-Systems:</b><div style=\"margin-left: 15px;\">"
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
|
||||
output += "<div id='[REF(MT)]'>[MT.get_equip_info()]</div>"
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
if(!squeak)
|
||||
playsound(src, "clownstep", 70, 1)
|
||||
squeak = 1
|
||||
else
|
||||
squeak = 0
|
||||
return result
|
||||
|
||||
/obj/mecha/combat/honker/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["play_sound"])
|
||||
switch(href_list["play_sound"])
|
||||
if("sadtrombone")
|
||||
playsound(src, 'sound/misc/sadtrombone.ogg', 50)
|
||||
if("bikehorn")
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50)
|
||||
if("airhorn2")
|
||||
playsound(src, 'sound/items/airhorn2.ogg', 40) //soundfile has higher than average volume
|
||||
if("carhorn")
|
||||
playsound(src, 'sound/items/carhorn.ogg', 80) //soundfile has lower than average volume
|
||||
if("party_horn")
|
||||
playsound(src, 'sound/items/party_horn.ogg', 50)
|
||||
return
|
||||
|
||||
/proc/rand_hex_color()
|
||||
var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")
|
||||
var/color=""
|
||||
for (var/i=0;i<6;i++)
|
||||
color = color+pick(colors)
|
||||
return color
|
||||
@@ -1,91 +1,94 @@
|
||||
/obj/mecha/combat/marauder
|
||||
desc = "Heavy-duty, combat exosuit, developed after the Durand model. Rarely found among civilian populations."
|
||||
name = "\improper Marauder"
|
||||
icon_state = "marauder"
|
||||
step_in = 5
|
||||
max_integrity = 500
|
||||
deflect_chance = 25
|
||||
armor = list("melee" = 50, "bullet" = 55, "laser" = 40, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 60000
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
infra_luminosity = 3
|
||||
operation_req_access = list(ACCESS_CENT_SPECOPS)
|
||||
wreckage = /obj/structure/mecha_wreckage/marauder
|
||||
add_req_access = 0
|
||||
internal_damage_threshold = 25
|
||||
force = 45
|
||||
max_equip = 4
|
||||
bumpsmash = 1
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
smoke_action.Grant(user, src)
|
||||
thrusters_action.Grant(user, src)
|
||||
zoom_action.Grant(user, src)
|
||||
|
||||
/obj/mecha/combat/marauder/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
smoke_action.Remove(user)
|
||||
thrusters_action.Remove(user)
|
||||
zoom_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/marauder/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/seraph
|
||||
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
|
||||
name = "\improper Seraph"
|
||||
icon_state = "seraph"
|
||||
operation_req_access = list(ACCESS_CENT_SPECOPS)
|
||||
step_in = 3
|
||||
max_integrity = 550
|
||||
wreckage = /obj/structure/mecha_wreckage/seraph
|
||||
internal_damage_threshold = 20
|
||||
force = 55
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/seraph/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/mauler
|
||||
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
|
||||
name = "\improper Mauler"
|
||||
icon_state = "mauler"
|
||||
operation_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/mauler
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/mauler/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
|
||||
/obj/mecha/combat/marauder
|
||||
desc = "Heavy-duty, combat exosuit, developed after the Durand model. Rarely found among civilian populations."
|
||||
name = "\improper Marauder"
|
||||
icon_state = "marauder"
|
||||
step_in = 5
|
||||
max_integrity = 500
|
||||
deflect_chance = 25
|
||||
armor = list("melee" = 50, "bullet" = 55, "laser" = 40, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 60000
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
infra_luminosity = 3
|
||||
operation_req_access = list(ACCESS_CENT_SPECOPS)
|
||||
internals_req_access = list(ACCESS_CENT_SPECOPS, ACCESS_ROBOTICS)
|
||||
wreckage = /obj/structure/mecha_wreckage/marauder
|
||||
add_req_access = 0
|
||||
internal_damage_threshold = 25
|
||||
force = 45
|
||||
max_equip = 4
|
||||
bumpsmash = 1
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/marauder/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
smoke_action.Grant(user, src)
|
||||
thrusters_action.Grant(user, src)
|
||||
zoom_action.Grant(user, src)
|
||||
|
||||
/obj/mecha/combat/marauder/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
smoke_action.Remove(user)
|
||||
thrusters_action.Remove(user)
|
||||
zoom_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/marauder/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/seraph
|
||||
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
|
||||
name = "\improper Seraph"
|
||||
icon_state = "seraph"
|
||||
operation_req_access = list(ACCESS_CENT_SPECOPS)
|
||||
internals_req_access = list(ACCESS_CENT_SPECOPS, ACCESS_ROBOTICS)
|
||||
step_in = 3
|
||||
max_integrity = 550
|
||||
wreckage = /obj/structure/mecha_wreckage/seraph
|
||||
internal_damage_threshold = 20
|
||||
force = 55
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/seraph/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/mauler
|
||||
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
|
||||
name = "\improper Mauler"
|
||||
icon_state = "mauler"
|
||||
operation_req_access = list(ACCESS_SYNDICATE)
|
||||
internals_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/mauler
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/mauler/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
layer = ABOVE_MOB_LAYER
|
||||
breach_time = 100 //ten seconds till all goes to shit
|
||||
recharge_rate = 100
|
||||
internals_req_access = list()
|
||||
add_req_access = 0
|
||||
wreckage = /obj/structure/mecha_wreckage/durand/neovgre
|
||||
spawn_tracked = FALSE
|
||||
|
||||
@@ -47,7 +49,7 @@
|
||||
for(var/mob/M in src)
|
||||
to_chat(M, "<span class='brass'>You are consumed by the fires raging within Neovgre...</span>")
|
||||
M.dust()
|
||||
playsound(src, 'sound/magic/lightning_chargeup.ogg', 100, 0)
|
||||
playsound(src, 'sound/effects/neovgre_exploding.ogg', 100, 0)
|
||||
src.visible_message("<span class = 'userdanger'>The reactor has gone critical, its going to blow!</span>")
|
||||
addtimer(CALLBACK(src,.proc/go_critical),breach_time)
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/obj/mecha/combat/phazon
|
||||
desc = "This is a Phazon exosuit. The pinnacle of scientific research and pride of Nanotrasen, it uses cutting edge bluespace technology and expensive materials."
|
||||
name = "\improper Phazon"
|
||||
icon_state = "phazon"
|
||||
step_in = 2
|
||||
dir_in = 2 //Facing South.
|
||||
step_energy_drain = 3
|
||||
max_integrity = 200
|
||||
deflect_chance = 30
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 25000
|
||||
infra_luminosity = 3
|
||||
wreckage = /obj/structure/mecha_wreckage/phazon
|
||||
add_req_access = 1
|
||||
internal_damage_threshold = 25
|
||||
force = 15
|
||||
max_equip = 3
|
||||
phase_state = "phazon-phase"
|
||||
|
||||
/obj/mecha/combat/phazon/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
switch_damtype_action.Grant(user, src)
|
||||
phasing_action.Grant(user, src)
|
||||
|
||||
|
||||
/obj/mecha/combat/phazon/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
switch_damtype_action.Remove(user)
|
||||
phasing_action.Remove(user)
|
||||
/obj/mecha/combat/phazon
|
||||
desc = "This is a Phazon exosuit. The pinnacle of scientific research and pride of Nanotrasen, it uses cutting edge bluespace technology and expensive materials."
|
||||
name = "\improper Phazon"
|
||||
icon_state = "phazon"
|
||||
step_in = 2
|
||||
dir_in = 2 //Facing South.
|
||||
step_energy_drain = 3
|
||||
max_integrity = 200
|
||||
deflect_chance = 30
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 25000
|
||||
infra_luminosity = 3
|
||||
wreckage = /obj/structure/mecha_wreckage/phazon
|
||||
add_req_access = 1
|
||||
internal_damage_threshold = 25
|
||||
force = 15
|
||||
max_equip = 3
|
||||
phase_state = "phazon-phase"
|
||||
|
||||
/obj/mecha/combat/phazon/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
switch_damtype_action.Grant(user, src)
|
||||
phasing_action.Grant(user, src)
|
||||
|
||||
|
||||
/obj/mecha/combat/phazon/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
switch_damtype_action.Remove(user)
|
||||
phasing_action.Remove(user)
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
/obj/mecha/combat/reticence
|
||||
desc = "A silent, fast, and nigh-invisible miming exosuit. Popular among mimes and mime assassins."
|
||||
name = "\improper reticence"
|
||||
icon_state = "reticence"
|
||||
step_in = 2
|
||||
dir_in = 1 //Facing North.
|
||||
max_integrity = 100
|
||||
deflect_chance = 3
|
||||
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 15000
|
||||
wreckage = /obj/structure/mecha_wreckage/reticence
|
||||
operation_req_access = list(ACCESS_THEATRE)
|
||||
add_req_access = 0
|
||||
internal_damage_threshold = 25
|
||||
max_equip = 2
|
||||
step_energy_drain = 3
|
||||
color = "#87878715"
|
||||
stepsound = null
|
||||
turnsound = null
|
||||
opacity = 0
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/reticence/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/rcd //HAHA IT MAKES WALLS GET IT
|
||||
ME.attach(src)
|
||||
/obj/mecha/combat/reticence
|
||||
desc = "A silent, fast, and nigh-invisible miming exosuit. Popular among mimes and mime assassins."
|
||||
name = "\improper reticence"
|
||||
icon_state = "reticence"
|
||||
step_in = 2
|
||||
dir_in = 1 //Facing North.
|
||||
max_integrity = 100
|
||||
deflect_chance = 3
|
||||
armor = list("melee" = 25, "bullet" = 20, "laser" = 30, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 15000
|
||||
wreckage = /obj/structure/mecha_wreckage/reticence
|
||||
operation_req_access = list(ACCESS_THEATRE)
|
||||
internals_req_access = list(ACCESS_THEATRE, ACCESS_ROBOTICS)
|
||||
add_req_access = 0
|
||||
internal_damage_threshold = 25
|
||||
max_equip = 2
|
||||
step_energy_drain = 3
|
||||
color = "#87878715"
|
||||
stepsound = null
|
||||
turnsound = null
|
||||
opacity = 0
|
||||
spawn_tracked = FALSE
|
||||
|
||||
/obj/mecha/combat/reticence/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/rcd //HAHA IT MAKES WALLS GET IT
|
||||
ME.attach(src)
|
||||
|
||||
@@ -1,167 +1,167 @@
|
||||
//DO NOT ADD MECHA PARTS TO THE GAME WITH THE DEFAULT "SPRITE ME" SPRITE!
|
||||
//I'm annoyed I even have to tell you this! SPRITE FIRST, then commit.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment
|
||||
name = "mecha equipment"
|
||||
icon = 'icons/mecha/mecha_equipment.dmi'
|
||||
icon_state = "mecha_equip"
|
||||
force = 5
|
||||
max_integrity = 300
|
||||
var/equip_cooldown = 0 // cooldown after use
|
||||
var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
|
||||
var/energy_drain = 0
|
||||
var/obj/mecha/chassis = null
|
||||
var/range = MELEE //bitFflags
|
||||
var/salvageable = 1
|
||||
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
|
||||
var/harmful = FALSE //Controls if equipment can be used to attack by a pacifist.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
|
||||
send_byjax(chassis.occupant,"exosuit.browser","equipment_menu",chassis.get_equipment_menu(),"dropdowns")
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/update_equip_info()
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",get_equip_info())
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/Destroy()
|
||||
if(chassis)
|
||||
chassis.equipment -= src
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
src.update_chassis_page()
|
||||
chassis.occupant_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
chassis.log_append_to_last("[src] is destroyed.",1)
|
||||
SEND_SOUND(chassis.occupant, sound(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon) ? 'sound/mecha/weapdestr.ogg' : 'sound/mecha/critdestr.ogg', volume=50))
|
||||
chassis = null
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
log_message("Critical failure", color="red")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis)
|
||||
return
|
||||
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> "
|
||||
if(chassis.selected == src)
|
||||
txt += "<b>[src.name]</b>"
|
||||
else if(selectable)
|
||||
txt += "<a href='?src=[REF(chassis)];select_equip=[REF(src)]'>[src.name]</a>"
|
||||
else
|
||||
txt += "[src.name]"
|
||||
|
||||
return txt
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
|
||||
return range&RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_melee()
|
||||
return range&MELEE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target)
|
||||
if(!target)
|
||||
return 0
|
||||
if(!chassis)
|
||||
return 0
|
||||
if(!equip_ready)
|
||||
return 0
|
||||
if(crit_fail)
|
||||
return 0
|
||||
if(energy_drain && !chassis.has_charge(energy_drain))
|
||||
return 0
|
||||
if(chassis.equipment_disabled)
|
||||
to_chat(chassis.occupant, "<span=warn>Error -- Equipment control unit is unresponsive.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target)
|
||||
if(!chassis)
|
||||
return
|
||||
var/C = chassis.loc
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
. = do_after(chassis.occupant, equip_cooldown, target=target)
|
||||
set_ready_state(1)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_mecha(atom/target, delay)
|
||||
if(!chassis)
|
||||
return
|
||||
var/C = chassis.loc
|
||||
. = do_after(chassis.occupant, delay, target=target)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M)
|
||||
if(M.equipment.len<M.max_equip)
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
|
||||
M.equipment += src
|
||||
chassis = M
|
||||
forceMove(M)
|
||||
M.log_message("[src] initialized.")
|
||||
if(!M.selected && selectable)
|
||||
M.selected = src
|
||||
src.update_chassis_page()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/detach(atom/moveto=null)
|
||||
moveto = moveto || get_turf(chassis)
|
||||
if(src.Move(moveto))
|
||||
chassis.equipment -= src
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
update_chassis_page()
|
||||
chassis.log_message("[src] removed from equipment.")
|
||||
chassis = null
|
||||
set_ready_state(1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/Topic(href,href_list)
|
||||
if(href_list["detach"])
|
||||
detach()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/set_ready_state(state)
|
||||
equip_ready = state
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/occupant_message(message)
|
||||
if(chassis)
|
||||
chassis.occupant_message("[icon2html(src, chassis.occupant)] [message]")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/log_message(message, message_type=LOG_GAME, color=null, log_globally)
|
||||
if(chassis)
|
||||
chassis.log_message("([src]) [message]", message_type, color)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
//Used for reloading weapons/tools etc. that use some form of resource
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/rearm()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/needs_rearm()
|
||||
return 0
|
||||
//DO NOT ADD MECHA PARTS TO THE GAME WITH THE DEFAULT "SPRITE ME" SPRITE!
|
||||
//I'm annoyed I even have to tell you this! SPRITE FIRST, then commit.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment
|
||||
name = "mecha equipment"
|
||||
icon = 'icons/mecha/mecha_equipment.dmi'
|
||||
icon_state = "mecha_equip"
|
||||
force = 5
|
||||
max_integrity = 300
|
||||
var/equip_cooldown = 0 // cooldown after use
|
||||
var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
|
||||
var/energy_drain = 0
|
||||
var/obj/mecha/chassis = null
|
||||
var/range = MELEE //bitFflags
|
||||
var/salvageable = 1
|
||||
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
|
||||
var/harmful = FALSE //Controls if equipment can be used to attack by a pacifist.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
|
||||
send_byjax(chassis.occupant,"exosuit.browser","equipment_menu",chassis.get_equipment_menu(),"dropdowns")
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/update_equip_info()
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",get_equip_info())
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/Destroy()
|
||||
if(chassis)
|
||||
chassis.equipment -= src
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
src.update_chassis_page()
|
||||
chassis.occupant_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
chassis.log_append_to_last("[src] is destroyed.",1)
|
||||
SEND_SOUND(chassis.occupant, sound(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon) ? 'sound/mecha/weapdestr.ogg' : 'sound/mecha/critdestr.ogg', volume=50))
|
||||
chassis = null
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
log_message("Critical failure", color="red")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis)
|
||||
return
|
||||
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> "
|
||||
if(chassis.selected == src)
|
||||
txt += "<b>[src.name]</b>"
|
||||
else if(selectable)
|
||||
txt += "<a href='?src=[REF(chassis)];select_equip=[REF(src)]'>[src.name]</a>"
|
||||
else
|
||||
txt += "[src.name]"
|
||||
|
||||
return txt
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
|
||||
return range&RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_melee()
|
||||
return range&MELEE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target)
|
||||
if(!target)
|
||||
return 0
|
||||
if(!chassis)
|
||||
return 0
|
||||
if(!equip_ready)
|
||||
return 0
|
||||
if(crit_fail)
|
||||
return 0
|
||||
if(energy_drain && !chassis.has_charge(energy_drain))
|
||||
return 0
|
||||
if(chassis.equipment_disabled)
|
||||
to_chat(chassis.occupant, "<span=warn>Error -- Equipment control unit is unresponsive.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target)
|
||||
if(!chassis)
|
||||
return
|
||||
var/C = chassis.loc
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
. = do_after(chassis.occupant, equip_cooldown, target=target)
|
||||
set_ready_state(1)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_mecha(atom/target, delay)
|
||||
if(!chassis)
|
||||
return
|
||||
var/C = chassis.loc
|
||||
. = do_after(chassis.occupant, delay, target=target)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M)
|
||||
if(M.equipment.len<M.max_equip)
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
|
||||
M.equipment += src
|
||||
chassis = M
|
||||
forceMove(M)
|
||||
M.log_message("[src] initialized.")
|
||||
if(!M.selected && selectable)
|
||||
M.selected = src
|
||||
src.update_chassis_page()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/detach(atom/moveto=null)
|
||||
moveto = moveto || get_turf(chassis)
|
||||
if(src.Move(moveto))
|
||||
chassis.equipment -= src
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
update_chassis_page()
|
||||
chassis.log_message("[src] removed from equipment.")
|
||||
chassis = null
|
||||
set_ready_state(1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/Topic(href,href_list)
|
||||
if(href_list["detach"])
|
||||
detach()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/set_ready_state(state)
|
||||
equip_ready = state
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/occupant_message(message)
|
||||
if(chassis)
|
||||
chassis.occupant_message("[icon2html(src, chassis.occupant)] [message]")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/log_message(message, message_type=LOG_GAME, color=null, log_globally)
|
||||
if(chassis)
|
||||
chassis.log_message("([src]) [message]", message_type, color)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
//Used for reloading weapons/tools etc. that use some form of resource
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/rearm()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/needs_rearm()
|
||||
return 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -171,7 +171,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/Initialize()
|
||||
. = ..()
|
||||
create_reagents(1000)
|
||||
reagents.add_reagent("water", 1000)
|
||||
reagents.add_reagent(/datum/reagent/water, 1000)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3)
|
||||
@@ -262,14 +262,14 @@
|
||||
occupant_message("Deconstructing [W]...")
|
||||
if(do_after_cooldown(W))
|
||||
chassis.spark_system.start()
|
||||
W.ScrapeAway()
|
||||
W.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
playsound(W, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
else if(isfloorturf(target))
|
||||
var/turf/open/floor/F = target
|
||||
occupant_message("Deconstructing [F]...")
|
||||
if(do_after_cooldown(target))
|
||||
chassis.spark_system.start()
|
||||
F.ScrapeAway()
|
||||
F.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
playsound(F, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
else if (istype(target, /obj/machinery/door/airlock))
|
||||
occupant_message("Deconstructing [target]...")
|
||||
@@ -282,7 +282,7 @@
|
||||
var/turf/open/space/S = target
|
||||
occupant_message("Building Floor...")
|
||||
if(do_after_cooldown(S))
|
||||
S.PlaceOnTop(/turf/open/floor/plating)
|
||||
S.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
||||
playsound(S, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
chassis.spark_system.start()
|
||||
else if(isfloorturf(target))
|
||||
|
||||
@@ -1,444 +1,444 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon
|
||||
name = "mecha weapon"
|
||||
range = RANGED
|
||||
var/projectile
|
||||
var/fire_sound
|
||||
var/projectiles_per_shot = 1
|
||||
var/variance = 0
|
||||
var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
|
||||
var/projectile_delay = 0
|
||||
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
|
||||
var/kickback = TRUE //Will using this weapon in no grav push mecha back.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/proc/get_shot_amount()
|
||||
return projectiles_per_shot
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/action(atom/target, params)
|
||||
if(!action_checks(target))
|
||||
return 0
|
||||
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc) || !curloc)
|
||||
return 0
|
||||
if (targloc == curloc)
|
||||
return 0
|
||||
|
||||
set_ready_state(0)
|
||||
for(var/i=1 to get_shot_amount())
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
A.firer = chassis.occupant
|
||||
A.original = target
|
||||
if(!A.suppressed && firing_effect_type)
|
||||
new firing_effect_type(get_turf(src), chassis.dir)
|
||||
|
||||
var/spread = 0
|
||||
if(variance)
|
||||
if(randomspread)
|
||||
spread = round((rand() - 0.5) * variance)
|
||||
else
|
||||
spread = round((i / projectiles_per_shot - 0.5) * variance)
|
||||
A.preparePixelProjectile(target, chassis.occupant, params, spread)
|
||||
|
||||
A.fire()
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
|
||||
sleep(max(0, projectile_delay))
|
||||
|
||||
if(kickback)
|
||||
chassis.newtonian_move(turn(chassis.dir,180))
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
return 1
|
||||
|
||||
|
||||
//Base energy weapon type
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "general energy weapon"
|
||||
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/get_shot_amount()
|
||||
return min(round(chassis.cell.charge / energy_drain), projectiles_per_shot)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain*get_shot_amount())
|
||||
addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
equip_cooldown = 8
|
||||
name = "\improper CH-PS \"Immolator\" laser"
|
||||
desc = "A weapon for combat exosuits. Shoots basic lasers."
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/beam/laser
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
|
||||
equip_cooldown = 15
|
||||
name = "\improper CH-LC \"Solaris\" laser cannon"
|
||||
desc = "A weapon for combat exosuits. Shoots heavy lasers."
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 60
|
||||
projectile = /obj/item/projectile/beam/laser/heavylaser
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||
equip_cooldown = 20
|
||||
name = "\improper MKIV ion heavy cannon"
|
||||
desc = "A weapon for combat exosuits. Shoots technology-disabling ion beams. Don't catch yourself in the blast!"
|
||||
icon_state = "mecha_ion"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/ion
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla
|
||||
equip_cooldown = 35
|
||||
name = "\improper MKI Tesla Cannon"
|
||||
desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine."
|
||||
icon_state = "mecha_ion"
|
||||
energy_drain = 500
|
||||
projectile = /obj/item/projectile/energy/tesla/cannon
|
||||
fire_sound = 'sound/magic/lightningbolt.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
equip_cooldown = 30
|
||||
name = "eZ-13 MK2 heavy pulse rifle"
|
||||
desc = "A weapon for combat exosuits. Shoots powerful destructive blasts capable of demolishing obstacles."
|
||||
icon_state = "mecha_pulse"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/beam/pulse/heavy
|
||||
fire_sound = 'sound/weapons/marauder.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
|
||||
equip_cooldown = 10
|
||||
name = "217-D Heavy Plasma Cutter"
|
||||
desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demolishing solid obstacles."
|
||||
icon_state = "mecha_plasmacutter"
|
||||
item_state = "plasmacutter"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/plasma/adv/mech
|
||||
fire_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/working/M)
|
||||
if(..()) //combat mech
|
||||
return 1
|
||||
else if(M.equipment.len < M.max_equip && istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||
name = "\improper PBT \"Pacifier\" mounted taser"
|
||||
desc = "A weapon for combat exosuits. Shoots non-lethal stunning electrodes."
|
||||
icon_state = "mecha_taser"
|
||||
energy_drain = 20
|
||||
equip_cooldown = 8
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
fire_sound = 'sound/weapons/taser.ogg'
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||
name = "\improper HoNkER BlAsT 5000"
|
||||
desc = "Equipment for clown exosuits. Spreads fun and joy to everyone around. Honk!"
|
||||
icon_state = "mecha_honker"
|
||||
energy_drain = 200
|
||||
equip_cooldown = 150
|
||||
range = MELEE|RANGED
|
||||
kickback = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
playsound(chassis, 'sound/items/airhorn.ogg', 100, 1)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
to_chat(M, "<font color='red' size='7'>HONK</font>")
|
||||
M.SetSleeping(0)
|
||||
M.stuttering += 20
|
||||
M.adjustEarDamage(0, 30)
|
||||
M.Knockdown(60)
|
||||
if(prob(30))
|
||||
M.Stun(200)
|
||||
M.Unconscious(80)
|
||||
else
|
||||
M.Jitter(500)
|
||||
|
||||
log_message("Honked from [src.name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
|
||||
return 1
|
||||
|
||||
|
||||
//Base ballistic weapon type
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
|
||||
name = "general ballistic weapon"
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
var/projectiles
|
||||
var/projectile_energy_cost
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_shot_amount()
|
||||
return min(projectiles, projectiles_per_shot)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(target)
|
||||
if(!..())
|
||||
return 0
|
||||
if(projectiles <= 0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||
return "[..()] \[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/rearm()
|
||||
if(projectiles < initial(projectiles))
|
||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
log_message("Rearmed [src.name].")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/needs_rearm()
|
||||
. = !(projectiles > 0)
|
||||
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["rearm"])
|
||||
src.rearm()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action(atom/target)
|
||||
if(..())
|
||||
projectiles -= get_shot_amount()
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
name = "\improper FNX-99 \"Hades\" Carbine"
|
||||
desc = "A weapon for combat exosuits. Shoots incendiary bullets."
|
||||
icon_state = "mecha_carbine"
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/incendiary/fnx99
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
desc = "A weapon for combat exosuits. A mime invention, field tests have shown that targets cannot even scream before going down."
|
||||
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
|
||||
icon_state = "mecha_mime"
|
||||
equip_cooldown = 30
|
||||
projectile = /obj/item/projectile/bullet/mime
|
||||
projectiles = 6
|
||||
projectile_energy_cost = 50
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
||||
name = "\improper LBX AC 10 \"Scattershot\""
|
||||
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/scattershot
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
projectiles_per_shot = 4
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
|
||||
name = "\improper Melon Seed \"Scattershot\""
|
||||
desc = "A weapon for combat exosuits. Shoots a spread of pellets, shaped as seed."
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/seed
|
||||
projectiles = 20
|
||||
projectile_energy_cost = 25
|
||||
projectiles_per_shot = 10
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
name = "\improper Ultra AC 2"
|
||||
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
|
||||
icon_state = "mecha_uac2"
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/lmg
|
||||
projectiles = 300
|
||||
projectile_energy_cost = 20
|
||||
projectiles_per_shot = 3
|
||||
variance = 6
|
||||
randomspread = 1
|
||||
projectile_delay = 2
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
name = "\improper SRM-8 missile rack"
|
||||
desc = "A weapon for combat exosuits. Shoots light explosive missiles."
|
||||
icon_state = "mecha_missilerack"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_he
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
equip_cooldown = 60
|
||||
harmful = TRUE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
|
||||
var/missile_speed = 2
|
||||
var/missile_range = 30
|
||||
var/diags_first = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/action(target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
var/obj/O = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
projectiles--
|
||||
proj_init(O)
|
||||
O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
|
||||
return 1
|
||||
|
||||
//used for projectile initilisation (priming flashbang) and additional logging
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/proc/proj_init(var/obj/O)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
name = "\improper SGL-6 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed flashbangs."
|
||||
icon_state = "mecha_grenadelnchr"
|
||||
projectile = /obj/item/grenade/flashbang
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 800
|
||||
equip_cooldown = 60
|
||||
var/det_time = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(var/obj/item/grenade/flashbang/F)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] fired a [src] in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] in [AREACOORD(T)]")
|
||||
addtimer(CALLBACK(F, /obj/item/grenade/flashbang.proc/prime), det_time)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
|
||||
name = "\improper SOB-3 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
|
||||
projectiles = 3
|
||||
projectile = /obj/item/grenade/clusterbuster
|
||||
projectile_energy_cost = 1600 //getting off cheap seeing as this is 3 times the flashbangs held in the grenade launcher.
|
||||
equip_cooldown = 90
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
|
||||
name = "banana mortar"
|
||||
desc = "Equipment for clown exosuits. Launches banana peels."
|
||||
icon_state = "mecha_bananamrtr"
|
||||
projectile = /obj/item/grown/bananapeel
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
projectiles = 15
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar
|
||||
name = "mousetrap mortar"
|
||||
desc = "Equipment for clown exosuits. Launches armed mousetraps."
|
||||
icon_state = "mecha_mousetrapmrtr"
|
||||
projectile = /obj/item/assembly/mousetrap/armed
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
projectiles = 15
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 10
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/proj_init(var/obj/item/assembly/mousetrap/armed/M)
|
||||
M.secured = 1
|
||||
|
||||
|
||||
//Classic extending punching glove, but weaponised!
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove
|
||||
name = "\improper Oingo Boingo Punch-face"
|
||||
desc = "Equipment for clown exosuits. Delivers fun right to your face!"
|
||||
icon_state = "mecha_punching_glove"
|
||||
energy_drain = 250
|
||||
equip_cooldown = 20
|
||||
range = MELEE|RANGED
|
||||
missile_range = 5
|
||||
projectile = /obj/item/punching_glove
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
projectiles = 10
|
||||
projectile_energy_cost = 500
|
||||
diags_first = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/action(target)
|
||||
. = ..()
|
||||
if(.)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/proj_init(obj/item/punching_glove/PG)
|
||||
if(!istype(PG))
|
||||
return
|
||||
//has to be low sleep or it looks weird, the beam doesn't exist for very long so it's a non-issue
|
||||
chassis.Beam(PG, icon_state = "chain", time = missile_range * 20, maxdistance = missile_range + 2, beam_sleep_time = 1)
|
||||
|
||||
/obj/item/punching_glove
|
||||
name = "punching glove"
|
||||
desc = "INCOMING HONKS"
|
||||
throwforce = 35
|
||||
icon_state = "punching_glove"
|
||||
|
||||
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(!..())
|
||||
if(ismovableatom(hit_atom))
|
||||
var/atom/movable/AM = hit_atom
|
||||
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
|
||||
qdel(src)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon
|
||||
name = "mecha weapon"
|
||||
range = RANGED
|
||||
var/projectile
|
||||
var/fire_sound
|
||||
var/projectiles_per_shot = 1
|
||||
var/variance = 0
|
||||
var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter
|
||||
var/projectile_delay = 0
|
||||
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the weapon is fired.
|
||||
var/kickback = TRUE //Will using this weapon in no grav push mecha back.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/proc/get_shot_amount()
|
||||
return projectiles_per_shot
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/action(atom/target, params)
|
||||
if(!action_checks(target))
|
||||
return 0
|
||||
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
var/turf/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc) || !curloc)
|
||||
return 0
|
||||
if (targloc == curloc)
|
||||
return 0
|
||||
|
||||
set_ready_state(0)
|
||||
for(var/i=1 to get_shot_amount())
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
A.firer = chassis.occupant
|
||||
A.original = target
|
||||
if(!A.suppressed && firing_effect_type)
|
||||
new firing_effect_type(get_turf(src), chassis.dir)
|
||||
|
||||
var/spread = 0
|
||||
if(variance)
|
||||
if(randomspread)
|
||||
spread = round((rand() - 0.5) * variance)
|
||||
else
|
||||
spread = round((i / projectiles_per_shot - 0.5) * variance)
|
||||
A.preparePixelProjectile(target, chassis.occupant, params, spread)
|
||||
|
||||
A.fire()
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
|
||||
sleep(max(0, projectile_delay))
|
||||
|
||||
if(kickback)
|
||||
chassis.newtonian_move(turn(chassis.dir,180))
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
return 1
|
||||
|
||||
|
||||
//Base energy weapon type
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "general energy weapon"
|
||||
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/get_shot_amount()
|
||||
return min(round(chassis.cell.charge / energy_drain), projectiles_per_shot)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain*get_shot_amount())
|
||||
addtimer(CALLBACK(src, .proc/set_ready_state, 1), equip_cooldown)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
equip_cooldown = 8
|
||||
name = "\improper CH-PS \"Immolator\" laser"
|
||||
desc = "A weapon for combat exosuits. Shoots basic lasers."
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/beam/laser
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
|
||||
equip_cooldown = 15
|
||||
name = "\improper CH-LC \"Solaris\" laser cannon"
|
||||
desc = "A weapon for combat exosuits. Shoots heavy lasers."
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 60
|
||||
projectile = /obj/item/projectile/beam/laser/heavylaser
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||
equip_cooldown = 20
|
||||
name = "\improper MKIV ion heavy cannon"
|
||||
desc = "A weapon for combat exosuits. Shoots technology-disabling ion beams. Don't catch yourself in the blast!"
|
||||
icon_state = "mecha_ion"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/ion
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla
|
||||
equip_cooldown = 35
|
||||
name = "\improper MKI Tesla Cannon"
|
||||
desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine."
|
||||
icon_state = "mecha_ion"
|
||||
energy_drain = 500
|
||||
projectile = /obj/item/projectile/energy/tesla/cannon
|
||||
fire_sound = 'sound/magic/lightningbolt.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
equip_cooldown = 30
|
||||
name = "eZ-13 MK2 heavy pulse rifle"
|
||||
desc = "A weapon for combat exosuits. Shoots powerful destructive blasts capable of demolishing obstacles."
|
||||
icon_state = "mecha_pulse"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/beam/pulse/heavy
|
||||
fire_sound = 'sound/weapons/marauder.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
|
||||
equip_cooldown = 10
|
||||
name = "217-D Heavy Plasma Cutter"
|
||||
desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demolishing solid obstacles."
|
||||
icon_state = "mecha_plasmacutter"
|
||||
item_state = "plasmacutter"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/plasma/adv/mech
|
||||
fire_sound = 'sound/weapons/plasma_cutter.ogg'
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/working/M)
|
||||
if(..()) //combat mech
|
||||
return 1
|
||||
else if(M.equipment.len < M.max_equip && istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||
name = "\improper PBT \"Pacifier\" mounted taser"
|
||||
desc = "A weapon for combat exosuits. Shoots non-lethal stunning electrodes."
|
||||
icon_state = "mecha_taser"
|
||||
energy_drain = 20
|
||||
equip_cooldown = 8
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
fire_sound = 'sound/weapons/taser.ogg'
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||
name = "\improper HoNkER BlAsT 5000"
|
||||
desc = "Equipment for clown exosuits. Spreads fun and joy to everyone around. Honk!"
|
||||
icon_state = "mecha_honker"
|
||||
energy_drain = 200
|
||||
equip_cooldown = 150
|
||||
range = MELEE|RANGED
|
||||
kickback = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target, params)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
playsound(chassis, 'sound/items/airhorn.ogg', 100, 1)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
to_chat(M, "<font color='red' size='7'>HONK</font>")
|
||||
M.SetSleeping(0)
|
||||
M.stuttering += 20
|
||||
M.adjustEarDamage(0, 30)
|
||||
M.Knockdown(60)
|
||||
if(prob(30))
|
||||
M.Stun(200)
|
||||
M.Unconscious(80)
|
||||
else
|
||||
M.Jitter(500)
|
||||
|
||||
log_message("Honked from [src.name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] used a Mecha Honker in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("[key_name(chassis.occupant)] used a Mecha Honker in [AREACOORD(T)]")
|
||||
return 1
|
||||
|
||||
|
||||
//Base ballistic weapon type
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic
|
||||
name = "general ballistic weapon"
|
||||
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||
var/projectiles
|
||||
var/projectile_energy_cost
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_shot_amount()
|
||||
return min(projectiles, projectiles_per_shot)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(target)
|
||||
if(!..())
|
||||
return 0
|
||||
if(projectiles <= 0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||
return "[..()] \[[src.projectiles]\][(src.projectiles < initial(src.projectiles))?" - <a href='?src=[REF(src)];rearm=1'>Rearm</a>":null]"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/rearm()
|
||||
if(projectiles < initial(projectiles))
|
||||
var/projectiles_to_add = initial(projectiles) - projectiles
|
||||
while(chassis.get_charge() >= projectile_energy_cost && projectiles_to_add)
|
||||
projectiles++
|
||||
projectiles_to_add--
|
||||
chassis.use_power(projectile_energy_cost)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
log_message("Rearmed [src.name].")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/needs_rearm()
|
||||
. = !(projectiles > 0)
|
||||
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["rearm"])
|
||||
src.rearm()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action(atom/target)
|
||||
if(..())
|
||||
projectiles -= get_shot_amount()
|
||||
send_byjax(chassis.occupant,"exosuit.browser","[REF(src)]",src.get_equip_info())
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
name = "\improper FNX-99 \"Hades\" Carbine"
|
||||
desc = "A weapon for combat exosuits. Shoots incendiary bullets."
|
||||
icon_state = "mecha_carbine"
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/incendiary/fnx99
|
||||
projectiles = 24
|
||||
projectile_energy_cost = 15
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
name = "\improper S.H.H. \"Quietus\" Carbine"
|
||||
desc = "A weapon for combat exosuits. A mime invention, field tests have shown that targets cannot even scream before going down."
|
||||
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
|
||||
icon_state = "mecha_mime"
|
||||
equip_cooldown = 30
|
||||
projectile = /obj/item/projectile/bullet/mime
|
||||
projectiles = 6
|
||||
projectile_energy_cost = 50
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot
|
||||
name = "\improper LBX AC 10 \"Scattershot\""
|
||||
desc = "A weapon for combat exosuits. Shoots a spread of pellets."
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/scattershot
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
projectiles_per_shot = 4
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/seedscatter
|
||||
name = "\improper Melon Seed \"Scattershot\""
|
||||
desc = "A weapon for combat exosuits. Shoots a spread of pellets, shaped as seed."
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectile = /obj/item/projectile/bullet/seed
|
||||
projectiles = 20
|
||||
projectile_energy_cost = 25
|
||||
projectiles_per_shot = 10
|
||||
variance = 25
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
|
||||
name = "\improper Ultra AC 2"
|
||||
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
|
||||
icon_state = "mecha_uac2"
|
||||
equip_cooldown = 10
|
||||
projectile = /obj/item/projectile/bullet/lmg
|
||||
projectiles = 300
|
||||
projectile_energy_cost = 20
|
||||
projectiles_per_shot = 3
|
||||
variance = 6
|
||||
randomspread = 1
|
||||
projectile_delay = 2
|
||||
harmful = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
name = "\improper SRM-8 missile rack"
|
||||
desc = "A weapon for combat exosuits. Shoots light explosive missiles."
|
||||
icon_state = "mecha_missilerack"
|
||||
projectile = /obj/item/projectile/bullet/a84mm_he
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
equip_cooldown = 60
|
||||
harmful = TRUE
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
|
||||
var/missile_speed = 2
|
||||
var/missile_range = 30
|
||||
var/diags_first = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/action(target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
var/obj/O = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
projectiles--
|
||||
proj_init(O)
|
||||
O.throw_at(target, missile_range, missile_speed, chassis.occupant, FALSE, diagonals_first = diags_first)
|
||||
return 1
|
||||
|
||||
//used for projectile initilisation (priming flashbang) and additional logging
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/proc/proj_init(var/obj/O)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
name = "\improper SGL-6 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed flashbangs."
|
||||
icon_state = "mecha_grenadelnchr"
|
||||
projectile = /obj/item/grenade/flashbang
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 800
|
||||
equip_cooldown = 60
|
||||
var/det_time = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(var/obj/item/grenade/flashbang/F)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[ADMIN_LOOKUPFLW(chassis.occupant)] fired a [src] in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] in [AREACOORD(T)]")
|
||||
addtimer(CALLBACK(F, /obj/item/grenade/flashbang.proc/prime), det_time)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
|
||||
name = "\improper SOB-3 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
|
||||
projectiles = 3
|
||||
projectile = /obj/item/grenade/clusterbuster
|
||||
projectile_energy_cost = 1600 //getting off cheap seeing as this is 3 times the flashbangs held in the grenade launcher.
|
||||
equip_cooldown = 90
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
|
||||
name = "banana mortar"
|
||||
desc = "Equipment for clown exosuits. Launches banana peels."
|
||||
icon_state = "mecha_bananamrtr"
|
||||
projectile = /obj/item/grown/bananapeel
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
projectiles = 15
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar
|
||||
name = "mousetrap mortar"
|
||||
desc = "Equipment for clown exosuits. Launches armed mousetraps."
|
||||
icon_state = "mecha_mousetrapmrtr"
|
||||
projectile = /obj/item/assembly/mousetrap/armed
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
projectiles = 15
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 10
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/proj_init(var/obj/item/assembly/mousetrap/armed/M)
|
||||
M.secured = 1
|
||||
|
||||
|
||||
//Classic extending punching glove, but weaponised!
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove
|
||||
name = "\improper Oingo Boingo Punch-face"
|
||||
desc = "Equipment for clown exosuits. Delivers fun right to your face!"
|
||||
icon_state = "mecha_punching_glove"
|
||||
energy_drain = 250
|
||||
equip_cooldown = 20
|
||||
range = MELEE|RANGED
|
||||
missile_range = 5
|
||||
projectile = /obj/item/punching_glove
|
||||
fire_sound = 'sound/items/bikehorn.ogg'
|
||||
projectiles = 10
|
||||
projectile_energy_cost = 500
|
||||
diags_first = TRUE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/action(target)
|
||||
. = ..()
|
||||
if(.)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/punching_glove/proj_init(obj/item/punching_glove/PG)
|
||||
if(!istype(PG))
|
||||
return
|
||||
//has to be low sleep or it looks weird, the beam doesn't exist for very long so it's a non-issue
|
||||
chassis.Beam(PG, icon_state = "chain", time = missile_range * 20, maxdistance = missile_range + 2, beam_sleep_time = 1)
|
||||
|
||||
/obj/item/punching_glove
|
||||
name = "punching glove"
|
||||
desc = "INCOMING HONKS"
|
||||
throwforce = 35
|
||||
icon_state = "punching_glove"
|
||||
|
||||
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(!..())
|
||||
if(ismovableatom(hit_atom))
|
||||
var/atom/movable/AM = hit_atom
|
||||
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
|
||||
qdel(src)
|
||||
|
||||
+424
-424
@@ -1,424 +1,424 @@
|
||||
/obj/machinery/mecha_part_fabricator
|
||||
icon = 'icons/obj/robotics.dmi'
|
||||
icon_state = "fab-idle"
|
||||
name = "exosuit fabricator"
|
||||
desc = "Nothing is being built."
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
circuit = /obj/item/circuitboard/machine/mechfab
|
||||
var/time_coeff = 1
|
||||
var/component_coeff = 1
|
||||
var/datum/techweb/specialized/autounlocking/exofab/stored_research
|
||||
var/sync = 0
|
||||
var/part_set
|
||||
var/datum/design/being_built
|
||||
var/list/queue = list()
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/list/part_sets = list(
|
||||
"Cyborg",
|
||||
"Ripley",
|
||||
"Firefighter",
|
||||
"Odysseus",
|
||||
"Gygax",
|
||||
"Durand",
|
||||
"H.O.N.K",
|
||||
"Phazon",
|
||||
"Exosuit Equipment",
|
||||
"Cyborg Upgrade Modules",
|
||||
"Misc"
|
||||
)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Initialize()
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container,
|
||||
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
|
||||
TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
materials.precise_insertion = TRUE
|
||||
stored_research = new
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/RefreshParts()
|
||||
var/T = 0
|
||||
|
||||
//maximum stocking amount (default 300000, 600000 at T4)
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.max_amount = (200000 + (T*50000))
|
||||
|
||||
//resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55)
|
||||
T = 1.15
|
||||
for(var/obj/item/stock_parts/micro_laser/Ma in component_parts)
|
||||
T -= Ma.rating*0.15
|
||||
component_coeff = T
|
||||
|
||||
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
|
||||
T = -1
|
||||
for(var/obj/item/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/emag_act()
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
req_access = list()
|
||||
INVOKE_ASYNC(src, .proc/error_action_sucessful)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/error_action_sucessful()
|
||||
say("DB error \[Code 0x00F1\]")
|
||||
sleep(10)
|
||||
say("Attempting auto-repair...")
|
||||
sleep(15)
|
||||
say("User DB corrupted \[Code 0x00FA\]. Truncating data structure...")
|
||||
sleep(30)
|
||||
say("User DB truncated. Please contact your Nanotrasen system operator for future assistance.")
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name)
|
||||
var/output = ""
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(!(set_name in D.category))
|
||||
continue
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\["
|
||||
if(check_resources(D))
|
||||
output += "<a href='?src=[REF(src)];part=[D.id]'>Build</a> | "
|
||||
output += "<a href='?src=[REF(src)];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=[REF(src)];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10]sec"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
var/i = 0
|
||||
var/output
|
||||
for(var/c in D.materials)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D, c)] [material2name(c)]"
|
||||
i++
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_available_resources()
|
||||
var/output
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
output += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm³"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[mat_id]'>1</a>\]"
|
||||
if(M.amount >= (MINERAL_MATERIAL_AMOUNT * 10))
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[mat_id]'>10</a>\]"
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[mat_id]'>All</a>\]</span>"
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resources_w_coeff(datum/design/D)
|
||||
var/list/resources = list()
|
||||
for(var/R in D.materials)
|
||||
resources[R] = get_resource_cost_w_coeff(D, R)
|
||||
return resources
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
|
||||
if(D.reagents_list.len) // No reagents storage - no reagent designs.
|
||||
return FALSE
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if(materials.has_materials(get_resources_w_coeff(D)))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/build_part(datum/design/D)
|
||||
being_built = D
|
||||
desc = "It's building \a [initial(D.name)]."
|
||||
var/list/res_coef = get_resources_w_coeff(D)
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.use_amount(res_coef)
|
||||
add_overlay("fab-active")
|
||||
use_power = ACTIVE_POWER_USE
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(D))
|
||||
use_power = IDLE_POWER_USE
|
||||
cut_overlay("fab-active")
|
||||
desc = initial(desc)
|
||||
|
||||
var/location = get_step(src,(dir))
|
||||
var/obj/item/I = new D.build_path(location)
|
||||
I.materials = res_coef
|
||||
say("\The [I] is complete.")
|
||||
being_built = null
|
||||
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/update_queue_on_page()
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_part_set_to_queue(set_name)
|
||||
if(set_name in part_sets)
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(set_name in D.category)
|
||||
add_to_queue(D)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_to_queue(D)
|
||||
if(!istype(queue))
|
||||
queue = list()
|
||||
if(D)
|
||||
queue[++queue.len] = D
|
||||
return queue.len
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_from_queue(index)
|
||||
if(!isnum(index) || !ISINTEGER(index) || !istype(queue) || (index<1 || index>queue.len))
|
||||
return FALSE
|
||||
queue.Cut(index,++index)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/process_queue()
|
||||
var/datum/design/D = queue[1]
|
||||
if(!D)
|
||||
remove_from_queue(1)
|
||||
if(queue.len)
|
||||
return process_queue()
|
||||
else
|
||||
return
|
||||
temp = null
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return FALSE
|
||||
if(!check_resources(D))
|
||||
say("Not enough resources. Queue processing stopped.")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
<a href='?src=[REF(src)];process_queue=1'>Try again</a> | <a href='?src=[REF(src)];clear_temp=1'>Return</a><a>"}
|
||||
return FALSE
|
||||
remove_from_queue(1)
|
||||
build_part(D)
|
||||
D = listgetindex(queue, 1)
|
||||
say("Queue processing finished successfully.")
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/list_queue()
|
||||
var/output = "<b>Queue contains:</b>"
|
||||
if(!istype(queue) || !queue.len)
|
||||
output += "<br>Nothing"
|
||||
else
|
||||
output += "<ol>"
|
||||
var/i = 0
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>"
|
||||
output += initial(part.name) + " - "
|
||||
output += "[i>1?"<a href='?src=[REF(src)];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] "
|
||||
output += "[i<queue.len?"<a href='?src=[REF(src)];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] "
|
||||
output += "<a href='?src=[REF(src)];remove_from_queue=[i]'>Remove</a></li>"
|
||||
|
||||
output += "</ol>"
|
||||
output += "\[<a href='?src=[REF(src)];process_queue=1'>Process queue</a> | <a href='?src=[REF(src)];clear_queue=1'>Clear queue</a>\]"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/sync()
|
||||
temp = "Updating local R&D database..."
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in oview(7,src))
|
||||
RDC.stored_research.copy_research_to(stored_research)
|
||||
temp = "Processed equipment designs.<br>"
|
||||
//check if the tech coefficients have changed
|
||||
temp += "<a href='?src=[REF(src)];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
say("Successfully synchronized with R&D server.")
|
||||
return
|
||||
|
||||
temp = "Unable to connect to local R&D Database.<br>Please check your connections and try again.<br><a href='?src=[REF(src)];clear_temp=1'>Return</a>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
return round(D.materials[resource]*component_coeff, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
|
||||
return round(initial(D.construction_time)*time_coeff, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/ui_interact(mob/user as mob)
|
||||
. = ..()
|
||||
var/dat, left_part
|
||||
user.set_machine(src)
|
||||
var/turf/exit = get_step(src,(dir))
|
||||
if(exit.density)
|
||||
say("Error! Part outlet is obstructed.")
|
||||
return
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(being_built)
|
||||
var/obj/I = being_built.build_path
|
||||
left_part = {"<TT>Building [initial(I.name)].<BR>
|
||||
Please wait until completion...</TT>"}
|
||||
else
|
||||
switch(screen)
|
||||
if("main")
|
||||
left_part = output_available_resources()+"<hr>"
|
||||
left_part += "<a href='?src=[REF(src)];sync=1'>Sync with R&D servers</a><hr>"
|
||||
for(var/part_set in part_sets)
|
||||
left_part += "<a href='?src=[REF(src)];part_set=[part_set]'>[part_set]</a> - \[<a href='?src=[REF(src)];partset_to_queue=[part_set]'>Add all parts to queue</a>\]<br>"
|
||||
if("parts")
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=[REF(src)];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
.part {margin-bottom: 10px;}
|
||||
.arrow {text-decoration: none; font-size: 10px;}
|
||||
body, table {height: 100%;}
|
||||
td {vertical-align: top; padding: 5px;}
|
||||
html, body {padding: 0px; margin: 0px;}
|
||||
h1 {font-size: 18px; margin: 5px 0px;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
</head><body>
|
||||
<body>
|
||||
<table style='width: 100%;'>
|
||||
<tr>
|
||||
<td style='width: 65%; padding-right: 10px;'>
|
||||
[left_part]
|
||||
</td>
|
||||
<td style='width: 35%; background: #ccc;' id='queue'>
|
||||
[list_queue()]
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(dat, "window=mecha_fabricator;size=1000x430")
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = afilter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
else
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = afilter.getStr("part")
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(D.id == T)
|
||||
if(!processing_queue)
|
||||
build_part(D)
|
||||
else
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = afilter.getStr("add_to_queue")
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(D.id == T)
|
||||
add_to_queue(D)
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(afilter.getNum("remove_from_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(afilter.get("partset_to_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(0)
|
||||
if(processing_queue || being_built)
|
||||
return FALSE
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
if(href_list["clear_temp"])
|
||||
temp = null
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = afilter.getNum("index")
|
||||
var/new_index = index + afilter.getNum("queue_move")
|
||||
if(isnum(index) && isnum(new_index) && ISINTEGER(index) && ISINTEGER(new_index))
|
||||
if(ISINRANGE(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
return update_queue_on_page()
|
||||
if(href_list["clear_queue"])
|
||||
queue = list()
|
||||
return update_queue_on_page()
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = afilter.getStr("part_desc")
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(D.id == T)
|
||||
var/obj/part = D.build_path
|
||||
temp = {"<h1>[initial(part.name)] description:</h1>
|
||||
[initial(part.desc)]<br>
|
||||
<a href='?src=[REF(src)];clear_temp=1'>Return</a>
|
||||
"}
|
||||
break
|
||||
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"])
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/on_deconstruction()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
var/stack_name = material2name(id_inserted)
|
||||
add_overlay("fab-load-[stack_name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[stack_name]"), 10)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/material2name(ID)
|
||||
return copytext(ID,2)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
|
||||
return FALSE
|
||||
if(being_built)
|
||||
to_chat(user, "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
/obj/machinery/mecha_part_fabricator
|
||||
icon = 'icons/obj/robotics.dmi'
|
||||
icon_state = "fab-idle"
|
||||
name = "exosuit fabricator"
|
||||
desc = "Nothing is being built."
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
active_power_usage = 5000
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
circuit = /obj/item/circuitboard/machine/mechfab
|
||||
var/time_coeff = 1
|
||||
var/component_coeff = 1
|
||||
var/datum/techweb/specialized/autounlocking/exofab/stored_research
|
||||
var/sync = 0
|
||||
var/part_set
|
||||
var/datum/design/being_built
|
||||
var/list/queue = list()
|
||||
var/processing_queue = 0
|
||||
var/screen = "main"
|
||||
var/temp
|
||||
var/list/part_sets = list(
|
||||
"Cyborg",
|
||||
"Ripley",
|
||||
"Firefighter",
|
||||
"Odysseus",
|
||||
"Gygax",
|
||||
"Durand",
|
||||
"H.O.N.K",
|
||||
"Phazon",
|
||||
"Exosuit Equipment",
|
||||
"Cyborg Upgrade Modules",
|
||||
"Misc"
|
||||
)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Initialize()
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container,
|
||||
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
|
||||
TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
materials.precise_insertion = TRUE
|
||||
stored_research = new
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/RefreshParts()
|
||||
var/T = 0
|
||||
|
||||
//maximum stocking amount (default 300000, 600000 at T4)
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
T += M.rating
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.max_amount = (200000 + (T*50000))
|
||||
|
||||
//resources adjustment coefficient (1 -> 0.85 -> 0.7 -> 0.55)
|
||||
T = 1.15
|
||||
for(var/obj/item/stock_parts/micro_laser/Ma in component_parts)
|
||||
T -= Ma.rating*0.15
|
||||
component_coeff = T
|
||||
|
||||
//building time adjustment coefficient (1 -> 0.8 -> 0.6)
|
||||
T = -1
|
||||
for(var/obj/item/stock_parts/manipulator/Ml in component_parts)
|
||||
T += Ml.rating
|
||||
time_coeff = round(initial(time_coeff) - (initial(time_coeff)*(T))/5,0.01)
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/emag_act()
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
req_access = list()
|
||||
INVOKE_ASYNC(src, .proc/error_action_sucessful)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/error_action_sucessful()
|
||||
say("DB error \[Code 0x00F1\]")
|
||||
sleep(10)
|
||||
say("Attempting auto-repair...")
|
||||
sleep(15)
|
||||
say("User DB corrupted \[Code 0x00FA\]. Truncating data structure...")
|
||||
sleep(30)
|
||||
say("User DB truncated. Please contact your Nanotrasen system operator for future assistance.")
|
||||
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name)
|
||||
var/output = ""
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(!(set_name in D.category))
|
||||
continue
|
||||
output += "<div class='part'>[output_part_info(D)]<br>\["
|
||||
if(check_resources(D))
|
||||
output += "<a href='?src=[REF(src)];part=[D.id]'>Build</a> | "
|
||||
output += "<a href='?src=[REF(src)];add_to_queue=[D.id]'>Add to queue</a>\]\[<a href='?src=[REF(src)];part_desc=[D.id]'>?</a>\]</div>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_info(datum/design/D)
|
||||
var/output = "[initial(D.name)] (Cost: [output_part_cost(D)]) [get_construction_time_w_coeff(D)/10]sec"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_part_cost(datum/design/D)
|
||||
var/i = 0
|
||||
var/output
|
||||
for(var/c in D.materials)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D, c)] [material2name(c)]"
|
||||
i++
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/output_available_resources()
|
||||
var/output
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
output += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm³"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[mat_id]'>1</a>\]"
|
||||
if(M.amount >= (MINERAL_MATERIAL_AMOUNT * 10))
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[mat_id]'>10</a>\]"
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[mat_id]'>All</a>\]</span>"
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resources_w_coeff(datum/design/D)
|
||||
var/list/resources = list()
|
||||
for(var/R in D.materials)
|
||||
resources[R] = get_resource_cost_w_coeff(D, R)
|
||||
return resources
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
|
||||
if(D.reagents_list.len) // No reagents storage - no reagent designs.
|
||||
return FALSE
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if(materials.has_materials(get_resources_w_coeff(D)))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/build_part(datum/design/D)
|
||||
being_built = D
|
||||
desc = "It's building \a [initial(D.name)]."
|
||||
var/list/res_coef = get_resources_w_coeff(D)
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.use_amount(res_coef)
|
||||
add_overlay("fab-active")
|
||||
use_power = ACTIVE_POWER_USE
|
||||
updateUsrDialog()
|
||||
sleep(get_construction_time_w_coeff(D))
|
||||
use_power = IDLE_POWER_USE
|
||||
cut_overlay("fab-active")
|
||||
desc = initial(desc)
|
||||
|
||||
var/location = get_step(src,(dir))
|
||||
var/obj/item/I = new D.build_path(location)
|
||||
I.materials = res_coef
|
||||
say("\The [I] is complete.")
|
||||
being_built = null
|
||||
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/update_queue_on_page()
|
||||
send_byjax(usr,"mecha_fabricator.browser","queue",list_queue())
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_part_set_to_queue(set_name)
|
||||
if(set_name in part_sets)
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(set_name in D.category)
|
||||
add_to_queue(D)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/add_to_queue(D)
|
||||
if(!istype(queue))
|
||||
queue = list()
|
||||
if(D)
|
||||
queue[++queue.len] = D
|
||||
return queue.len
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/remove_from_queue(index)
|
||||
if(!isnum(index) || !ISINTEGER(index) || !istype(queue) || (index<1 || index>queue.len))
|
||||
return FALSE
|
||||
queue.Cut(index,++index)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/process_queue()
|
||||
var/datum/design/D = queue[1]
|
||||
if(!D)
|
||||
remove_from_queue(1)
|
||||
if(queue.len)
|
||||
return process_queue()
|
||||
else
|
||||
return
|
||||
temp = null
|
||||
while(D)
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return FALSE
|
||||
if(!check_resources(D))
|
||||
say("Not enough resources. Queue processing stopped.")
|
||||
temp = {"<span class='alert'>Not enough resources to build next part.</span><br>
|
||||
<a href='?src=[REF(src)];process_queue=1'>Try again</a> | <a href='?src=[REF(src)];clear_temp=1'>Return</a><a>"}
|
||||
return FALSE
|
||||
remove_from_queue(1)
|
||||
build_part(D)
|
||||
D = listgetindex(queue, 1)
|
||||
say("Queue processing finished successfully.")
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/list_queue()
|
||||
var/output = "<b>Queue contains:</b>"
|
||||
if(!istype(queue) || !queue.len)
|
||||
output += "<br>Nothing"
|
||||
else
|
||||
output += "<ol>"
|
||||
var/i = 0
|
||||
for(var/datum/design/D in queue)
|
||||
i++
|
||||
var/obj/part = D.build_path
|
||||
output += "<li[!check_resources(D)?" style='color: #f00;'":null]>"
|
||||
output += initial(part.name) + " - "
|
||||
output += "[i>1?"<a href='?src=[REF(src)];queue_move=-1;index=[i]' class='arrow'>↑</a>":null] "
|
||||
output += "[i<queue.len?"<a href='?src=[REF(src)];queue_move=+1;index=[i]' class='arrow'>↓</a>":null] "
|
||||
output += "<a href='?src=[REF(src)];remove_from_queue=[i]'>Remove</a></li>"
|
||||
|
||||
output += "</ol>"
|
||||
output += "\[<a href='?src=[REF(src)];process_queue=1'>Process queue</a> | <a href='?src=[REF(src)];clear_queue=1'>Clear queue</a>\]"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/sync()
|
||||
temp = "Updating local R&D database..."
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in oview(7,src))
|
||||
RDC.stored_research.copy_research_to(stored_research)
|
||||
temp = "Processed equipment designs.<br>"
|
||||
//check if the tech coefficients have changed
|
||||
temp += "<a href='?src=[REF(src)];clear_temp=1'>Return</a>"
|
||||
|
||||
updateUsrDialog()
|
||||
say("Successfully synchronized with R&D server.")
|
||||
return
|
||||
|
||||
temp = "Unable to connect to local R&D Database.<br>Please check your connections and try again.<br><a href='?src=[REF(src)];clear_temp=1'>Return</a>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
return round(D.materials[resource]*component_coeff, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
|
||||
return round(initial(D.construction_time)*time_coeff, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/ui_interact(mob/user as mob)
|
||||
. = ..()
|
||||
var/dat, left_part
|
||||
user.set_machine(src)
|
||||
var/turf/exit = get_step(src,(dir))
|
||||
if(exit.density)
|
||||
say("Error! Part outlet is obstructed.")
|
||||
return
|
||||
if(temp)
|
||||
left_part = temp
|
||||
else if(being_built)
|
||||
var/obj/I = being_built.build_path
|
||||
left_part = {"<TT>Building [initial(I.name)].<BR>
|
||||
Please wait until completion...</TT>"}
|
||||
else
|
||||
switch(screen)
|
||||
if("main")
|
||||
left_part = output_available_resources()+"<hr>"
|
||||
left_part += "<a href='?src=[REF(src)];sync=1'>Sync with R&D servers</a><hr>"
|
||||
for(var/part_set in part_sets)
|
||||
left_part += "<a href='?src=[REF(src)];part_set=[part_set]'>[part_set]</a> - \[<a href='?src=[REF(src)];partset_to_queue=[part_set]'>Add all parts to queue</a>\]<br>"
|
||||
if("parts")
|
||||
left_part += output_parts_list(part_set)
|
||||
left_part += "<hr><a href='?src=[REF(src)];screen=main'>Return</a>"
|
||||
dat = {"<html>
|
||||
<head>
|
||||
<title>[name]</title>
|
||||
<style>
|
||||
.res_name {font-weight: bold; text-transform: capitalize;}
|
||||
.red {color: #f00;}
|
||||
.part {margin-bottom: 10px;}
|
||||
.arrow {text-decoration: none; font-size: 10px;}
|
||||
body, table {height: 100%;}
|
||||
td {vertical-align: top; padding: 5px;}
|
||||
html, body {padding: 0px; margin: 0px;}
|
||||
h1 {font-size: 18px; margin: 5px 0px;}
|
||||
</style>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
</head><body>
|
||||
<body>
|
||||
<table style='width: 100%;'>
|
||||
<tr>
|
||||
<td style='width: 65%; padding-right: 10px;'>
|
||||
[left_part]
|
||||
</td>
|
||||
<td style='width: 35%; background: #ccc;' id='queue'>
|
||||
[list_queue()]
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(dat, "window=mecha_fabricator;size=1000x430")
|
||||
onclose(user, "mecha_fabricator")
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
var/tpart_set = afilter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
part_set = null
|
||||
else
|
||||
part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/T = afilter.getStr("part")
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(D.id == T)
|
||||
if(!processing_queue)
|
||||
build_part(D)
|
||||
else
|
||||
add_to_queue(D)
|
||||
break
|
||||
if(href_list["add_to_queue"])
|
||||
var/T = afilter.getStr("add_to_queue")
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(D.id == T)
|
||||
add_to_queue(D)
|
||||
break
|
||||
return update_queue_on_page()
|
||||
if(href_list["remove_from_queue"])
|
||||
remove_from_queue(afilter.getNum("remove_from_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["partset_to_queue"])
|
||||
add_part_set_to_queue(afilter.get("partset_to_queue"))
|
||||
return update_queue_on_page()
|
||||
if(href_list["process_queue"])
|
||||
spawn(0)
|
||||
if(processing_queue || being_built)
|
||||
return FALSE
|
||||
processing_queue = 1
|
||||
process_queue()
|
||||
processing_queue = 0
|
||||
if(href_list["clear_temp"])
|
||||
temp = null
|
||||
if(href_list["screen"])
|
||||
screen = href_list["screen"]
|
||||
if(href_list["queue_move"] && href_list["index"])
|
||||
var/index = afilter.getNum("index")
|
||||
var/new_index = index + afilter.getNum("queue_move")
|
||||
if(isnum(index) && isnum(new_index) && ISINTEGER(index) && ISINTEGER(new_index))
|
||||
if(ISINRANGE(new_index,1,queue.len))
|
||||
queue.Swap(index,new_index)
|
||||
return update_queue_on_page()
|
||||
if(href_list["clear_queue"])
|
||||
queue = list()
|
||||
return update_queue_on_page()
|
||||
if(href_list["sync"])
|
||||
sync()
|
||||
if(href_list["part_desc"])
|
||||
var/T = afilter.getStr("part_desc")
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(D.build_type & MECHFAB)
|
||||
if(D.id == T)
|
||||
var/obj/part = D.build_path
|
||||
temp = {"<h1>[initial(part.name)] description:</h1>
|
||||
[initial(part.desc)]<br>
|
||||
<a href='?src=[REF(src)];clear_temp=1'>Return</a>
|
||||
"}
|
||||
break
|
||||
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"])
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/on_deconstruction()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
var/stack_name = material2name(id_inserted)
|
||||
add_overlay("fab-load-[stack_name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[stack_name]"), 10)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/material2name(ID)
|
||||
return copytext(ID,2)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
|
||||
return FALSE
|
||||
if(being_built)
|
||||
to_chat(user, "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
+1072
-1072
File diff suppressed because it is too large
Load Diff
@@ -138,8 +138,10 @@
|
||||
chassis.toggle_strafe()
|
||||
|
||||
/obj/mecha/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if((user == occupant) && user.canUseTopic(src))
|
||||
toggle_strafe()
|
||||
return TRUE
|
||||
|
||||
/obj/mecha/proc/toggle_strafe()
|
||||
strafe = !strafe
|
||||
|
||||
+1773
-1773
File diff suppressed because it is too large
Load Diff
@@ -1,142 +1,142 @@
|
||||
/obj/machinery/computer/mecha
|
||||
name = "exosuit control console"
|
||||
desc = "Used to remotely locate or lockdown exosuits."
|
||||
icon_screen = "mecha"
|
||||
icon_keyboard = "tech_key"
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
circuit = /obj/item/circuitboard/computer/mecha_control
|
||||
var/list/located = list()
|
||||
var/screen = 0
|
||||
var/stored_data
|
||||
|
||||
/obj/machinery/computer/mecha/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat = "<html><head><title>[src.name]</title><style>h3 {margin: 0px; padding: 0px;}</style></head><body>"
|
||||
if(screen == 0)
|
||||
dat += "<h3>Tracking beacons data</h3>"
|
||||
var/list/trackerlist = list()
|
||||
for(var/obj/mecha/MC in GLOB.mechas_list)
|
||||
trackerlist += MC.trackers
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/TR in trackerlist)
|
||||
var/answer = TR.get_mecha_info()
|
||||
if(answer)
|
||||
dat += {"<hr>[answer]<br/>
|
||||
<a href='?src=[REF(src)];send_message=[REF(TR)]'>Send message</a><br/>
|
||||
<a href='?src=[REF(src)];get_log=[REF(TR)]'>Show exosuit log</a><br/>
|
||||
[TR.recharging?"Recharging EMP Pulse...<br>":"<a style='color: #f00;' href='?src=[REF(src)];shock=[REF(TR)]'>(EMP Pulse)</a><br>"]"}
|
||||
|
||||
if(screen==1)
|
||||
dat += "<h3>Log contents</h3>"
|
||||
dat += "<a href='?src=[REF(src)];return=1'>Return</a><hr>"
|
||||
dat += "[stored_data]"
|
||||
|
||||
dat += "<A href='?src=[REF(src)];refresh=1'>(Refresh)</A><BR>"
|
||||
dat += "</body></html>"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
|
||||
/obj/machinery/computer/mecha/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["send_message"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("send_message")
|
||||
var/message = stripped_input(usr,"Input message","Transmit message")
|
||||
var/obj/mecha/M = MT.in_mecha()
|
||||
if(trim(message) && M)
|
||||
M.occupant_message(message)
|
||||
return
|
||||
if(href_list["shock"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("shock")
|
||||
MT.shock()
|
||||
if(href_list["get_log"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("get_log")
|
||||
stored_data = MT.get_mecha_log()
|
||||
screen = 1
|
||||
if(href_list["return"])
|
||||
screen = 0
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking
|
||||
name = "exosuit tracking beacon"
|
||||
desc = "Device used to transmit exosuit data."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "motion2"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/ai_beacon = FALSE //If this beacon allows for AI control. Exists to avoid using istype() on checking.
|
||||
var/recharging = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_info()
|
||||
if(!in_mecha())
|
||||
return 0
|
||||
var/obj/mecha/M = src.loc
|
||||
var/cell_charge = M.get_charge()
|
||||
var/answer = {"<b>Name:</b> [M.name]
|
||||
<b>Integrity:</b> [M.obj_integrity/M.max_integrity*100]%
|
||||
<b>Cell charge:</b> [isnull(cell_charge)?"Not found":"[M.cell.percent()]%"]
|
||||
<b>Airtank:</b> [M.return_pressure()]kPa
|
||||
<b>Pilot:</b> [M.occupant||"None"]
|
||||
<b>Location:</b> [get_area(M)||"Unknown"]
|
||||
<b>Active equipment:</b> [M.selected||"None"] "}
|
||||
if(istype(M, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/RM = M
|
||||
answer += "<b>Used cargo space:</b> [RM.cargo.len/RM.cargo_capacity*100]%<br>"
|
||||
|
||||
return answer
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/emp_act()
|
||||
. = ..()
|
||||
if(!(. & EMP_PROTECT_SELF))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/Destroy()
|
||||
if(ismecha(loc))
|
||||
var/obj/mecha/M = loc
|
||||
if(src in M.trackers)
|
||||
M.trackers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/in_mecha()
|
||||
if(ismecha(loc))
|
||||
return loc
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/shock()
|
||||
if(recharging)
|
||||
return
|
||||
var/obj/mecha/M = in_mecha()
|
||||
if(M)
|
||||
M.emp_act(EMP_HEAVY)
|
||||
addtimer(CALLBACK(src, /obj/item/mecha_parts/mecha_tracking/proc/recharge), 15 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
recharging = 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/recharge()
|
||||
recharging = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_log()
|
||||
if(!ismecha(loc))
|
||||
return 0
|
||||
var/obj/mecha/M = src.loc
|
||||
return M.get_log_html()
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/ai_control
|
||||
name = "exosuit AI control beacon"
|
||||
desc = "A device used to transmit exosuit data. Also allows active AI units to take control of said exosuit."
|
||||
ai_beacon = TRUE
|
||||
|
||||
|
||||
/obj/item/storage/box/mechabeacons
|
||||
name = "exosuit tracking beacons"
|
||||
|
||||
/obj/item/storage/box/mechabeacons/PopulateContents()
|
||||
..()
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
/obj/machinery/computer/mecha
|
||||
name = "exosuit control console"
|
||||
desc = "Used to remotely locate or lockdown exosuits."
|
||||
icon_screen = "mecha"
|
||||
icon_keyboard = "tech_key"
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
circuit = /obj/item/circuitboard/computer/mecha_control
|
||||
var/list/located = list()
|
||||
var/screen = 0
|
||||
var/stored_data
|
||||
|
||||
/obj/machinery/computer/mecha/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat = "<html><head><title>[src.name]</title><style>h3 {margin: 0px; padding: 0px;}</style></head><body>"
|
||||
if(screen == 0)
|
||||
dat += "<h3>Tracking beacons data</h3>"
|
||||
var/list/trackerlist = list()
|
||||
for(var/obj/mecha/MC in GLOB.mechas_list)
|
||||
trackerlist += MC.trackers
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/TR in trackerlist)
|
||||
var/answer = TR.get_mecha_info()
|
||||
if(answer)
|
||||
dat += {"<hr>[answer]<br/>
|
||||
<a href='?src=[REF(src)];send_message=[REF(TR)]'>Send message</a><br/>
|
||||
<a href='?src=[REF(src)];get_log=[REF(TR)]'>Show exosuit log</a><br/>
|
||||
[TR.recharging?"Recharging EMP Pulse...<br>":"<a style='color: #f00;' href='?src=[REF(src)];shock=[REF(TR)]'>(EMP Pulse)</a><br>"]"}
|
||||
|
||||
if(screen==1)
|
||||
dat += "<h3>Log contents</h3>"
|
||||
dat += "<a href='?src=[REF(src)];return=1'>Return</a><hr>"
|
||||
dat += "[stored_data]"
|
||||
|
||||
dat += "<A href='?src=[REF(src)];refresh=1'>(Refresh)</A><BR>"
|
||||
dat += "</body></html>"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
|
||||
/obj/machinery/computer/mecha/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
var/datum/topic_input/afilter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["send_message"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("send_message")
|
||||
var/message = stripped_input(usr,"Input message","Transmit message")
|
||||
var/obj/mecha/M = MT.in_mecha()
|
||||
if(trim(message) && M)
|
||||
M.occupant_message(message)
|
||||
return
|
||||
if(href_list["shock"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("shock")
|
||||
MT.shock()
|
||||
if(href_list["get_log"])
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("get_log")
|
||||
stored_data = MT.get_mecha_log()
|
||||
screen = 1
|
||||
if(href_list["return"])
|
||||
screen = 0
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking
|
||||
name = "exosuit tracking beacon"
|
||||
desc = "Device used to transmit exosuit data."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "motion2"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/ai_beacon = FALSE //If this beacon allows for AI control. Exists to avoid using istype() on checking.
|
||||
var/recharging = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_info()
|
||||
if(!in_mecha())
|
||||
return 0
|
||||
var/obj/mecha/M = src.loc
|
||||
var/cell_charge = M.get_charge()
|
||||
var/answer = {"<b>Name:</b> [M.name]
|
||||
<b>Integrity:</b> [M.obj_integrity/M.max_integrity*100]%
|
||||
<b>Cell charge:</b> [isnull(cell_charge)?"Not found":"[M.cell.percent()]%"]
|
||||
<b>Airtank:</b> [M.return_pressure()]kPa
|
||||
<b>Pilot:</b> [M.occupant||"None"]
|
||||
<b>Location:</b> [get_area(M)||"Unknown"]
|
||||
<b>Active equipment:</b> [M.selected||"None"] "}
|
||||
if(istype(M, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/RM = M
|
||||
answer += "<b>Used cargo space:</b> [RM.cargo.len/RM.cargo_capacity*100]%<br>"
|
||||
|
||||
return answer
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/emp_act()
|
||||
. = ..()
|
||||
if(!(. & EMP_PROTECT_SELF))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/Destroy()
|
||||
if(ismecha(loc))
|
||||
var/obj/mecha/M = loc
|
||||
if(src in M.trackers)
|
||||
M.trackers -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/in_mecha()
|
||||
if(ismecha(loc))
|
||||
return loc
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/shock()
|
||||
if(recharging)
|
||||
return
|
||||
var/obj/mecha/M = in_mecha()
|
||||
if(M)
|
||||
M.emp_act(EMP_HEAVY)
|
||||
addtimer(CALLBACK(src, /obj/item/mecha_parts/mecha_tracking/proc/recharge), 15 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
recharging = 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/recharge()
|
||||
recharging = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/proc/get_mecha_log()
|
||||
if(!ismecha(loc))
|
||||
return 0
|
||||
var/obj/mecha/M = src.loc
|
||||
return M.get_log_html()
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_tracking/ai_control
|
||||
name = "exosuit AI control beacon"
|
||||
desc = "A device used to transmit exosuit data. Also allows active AI units to take control of said exosuit."
|
||||
ai_beacon = TRUE
|
||||
|
||||
|
||||
/obj/item/storage/box/mechabeacons
|
||||
name = "exosuit tracking beacons"
|
||||
|
||||
/obj/item/storage/box/mechabeacons/PopulateContents()
|
||||
..()
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
|
||||
@@ -286,10 +286,10 @@
|
||||
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
|
||||
if(target.reagents)
|
||||
if(target.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
|
||||
target.reagents.add_reagent("cryptobiolin", force/2)
|
||||
if(target.reagents.get_reagent_amount("toxin") + force < force*2)
|
||||
target.reagents.add_reagent("toxin", force/2.5)
|
||||
if(target.reagents.get_reagent_amount(/datum/reagent/cryptobiolin) + force < force*2)
|
||||
target.reagents.add_reagent(/datum/reagent/cryptobiolin, force/2)
|
||||
if(target.reagents.get_reagent_amount(/datum/reagent/toxin) + force < force*2)
|
||||
target.reagents.add_reagent(/datum/reagent/toxin, force/2.5)
|
||||
|
||||
|
||||
/obj/mecha/mech_melee_attack(obj/mecha/M)
|
||||
|
||||
+339
-339
@@ -1,339 +1,339 @@
|
||||
/////////////////////////
|
||||
////// Mecha Parts //////
|
||||
/////////////////////////
|
||||
|
||||
/obj/item/mecha_parts
|
||||
name = "mecha part"
|
||||
icon = 'icons/mecha/mech_construct.dmi'
|
||||
icon_state = "blank"
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
flags_1 = CONDUCT_1
|
||||
|
||||
/obj/item/mecha_parts/chassis
|
||||
name = "Mecha Chassis"
|
||||
icon_state = "backbone"
|
||||
interaction_flags_item = NONE //Don't pick us up!!
|
||||
var/construct_type
|
||||
|
||||
/obj/item/mecha_parts/chassis/Initialize()
|
||||
. = ..()
|
||||
if(construct_type)
|
||||
AddComponent(construct_type)
|
||||
|
||||
/////////// Ripley
|
||||
|
||||
/obj/item/mecha_parts/chassis/ripley
|
||||
name = "\improper Ripley chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/ripley
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_torso
|
||||
name = "\improper Ripley torso"
|
||||
desc = "A torso part of Ripley APLU. Contains power unit, processing core and life support systems."
|
||||
icon_state = "ripley_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_left_arm
|
||||
name = "\improper Ripley left arm"
|
||||
desc = "A Ripley APLU left arm. Data and power sockets are compatible with most exosuit tools."
|
||||
icon_state = "ripley_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_right_arm
|
||||
name = "\improper Ripley right arm"
|
||||
desc = "A Ripley APLU right arm. Data and power sockets are compatible with most exosuit tools."
|
||||
icon_state = "ripley_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_left_leg
|
||||
name = "\improper Ripley left leg"
|
||||
desc = "A Ripley APLU left leg. Contains somewhat complex servodrives and balance maintaining systems."
|
||||
icon_state = "ripley_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_right_leg
|
||||
name = "\improper Ripley right leg"
|
||||
desc = "A Ripley APLU right leg. Contains somewhat complex servodrives and balance maintaining systems."
|
||||
icon_state = "ripley_r_leg"
|
||||
|
||||
///////// Odysseus
|
||||
|
||||
/obj/item/mecha_parts/chassis/odysseus
|
||||
name = "\improper Odysseus chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/odysseus
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_head
|
||||
name = "\improper Odysseus head"
|
||||
desc = "An Odysseus head. Contains an integrated medical HUD scanner."
|
||||
icon_state = "odysseus_head"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_torso
|
||||
name = "\improper Odysseus torso"
|
||||
desc="A torso part of Odysseus. Contains power unit, processing core and life support systems along with an attachment port for a mounted sleeper."
|
||||
icon_state = "odysseus_torso"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_left_arm
|
||||
name = "\improper Odysseus left arm"
|
||||
desc = "An Odysseus left arm. Data and power sockets are compatible with specialized medical equipment."
|
||||
icon_state = "odysseus_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_right_arm
|
||||
name = "\improper Odysseus right arm"
|
||||
desc = "An Odysseus right arm. Data and power sockets are compatible with specialized medical equipment."
|
||||
icon_state = "odysseus_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_left_leg
|
||||
name = "\improper Odysseus left leg"
|
||||
desc = "An Odysseus left leg. Contains complex servodrives and balance maintaining systems to maintain stability for critical patients."
|
||||
icon_state = "odysseus_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_right_leg
|
||||
name = "\improper Odysseus right leg"
|
||||
desc = "An odysseus right leg. Contains complex servodrives and balance maintaining systems to maintain stability for critical patients."
|
||||
icon_state = "odysseus_r_leg"
|
||||
|
||||
///////// Gygax
|
||||
|
||||
/obj/item/mecha_parts/chassis/gygax
|
||||
name = "\improper Gygax chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/gygax
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_torso
|
||||
name = "\improper Gygax torso"
|
||||
desc = "A torso part of Gygax. Contains power unit, processing core and life support systems."
|
||||
icon_state = "gygax_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_head
|
||||
name = "\improper Gygax head"
|
||||
desc = "A Gygax head. Houses advanced surveillance and targeting sensors."
|
||||
icon_state = "gygax_head"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_left_arm
|
||||
name = "\improper Gygax left arm"
|
||||
desc = "A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons."
|
||||
icon_state = "gygax_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_right_arm
|
||||
name = "\improper Gygax right arm"
|
||||
desc = "A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons."
|
||||
icon_state = "gygax_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_left_leg
|
||||
name = "\improper Gygax left leg"
|
||||
desc = "A Gygax left leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
|
||||
icon_state = "gygax_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_right_leg
|
||||
name = "\improper Gygax right leg"
|
||||
desc = "A Gygax right leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
|
||||
icon_state = "gygax_r_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_armor
|
||||
gender = PLURAL
|
||||
name = "\improper Gygax armor plates"
|
||||
desc = "A set of armor plates designed for the Gygax. Designed to effectively deflect damage with a lightweight construction."
|
||||
icon_state = "gygax_armor"
|
||||
|
||||
|
||||
//////////// Durand
|
||||
|
||||
/obj/item/mecha_parts/chassis/durand
|
||||
name = "\improper Durand chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/durand
|
||||
|
||||
/obj/item/mecha_parts/part/durand_torso
|
||||
name = "\improper Durand torso"
|
||||
desc = "A torso part of Durand. Contains power unit, processing core and life support systems within a robust protective frame."
|
||||
icon_state = "durand_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_head
|
||||
name = "\improper Durand head"
|
||||
desc = "A Durand head. Houses advanced surveillance and targeting sensors."
|
||||
icon_state = "durand_head"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_left_arm
|
||||
name = "\improper Durand left arm"
|
||||
desc = "A Durand left arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
|
||||
icon_state = "durand_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_right_arm
|
||||
name = "\improper Durand right arm"
|
||||
desc = "A Durand right arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
|
||||
icon_state = "durand_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_left_leg
|
||||
name = "\improper Durand left leg"
|
||||
desc = "A Durand left leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs."
|
||||
icon_state = "durand_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_right_leg
|
||||
name = "\improper Durand right leg"
|
||||
desc = "A Durand right leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs."
|
||||
icon_state = "durand_r_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_armor
|
||||
gender = PLURAL
|
||||
name = "\improper Durand armor plates"
|
||||
desc = "A set of armor plates for the Durand. Built heavy to resist an incredible amount of brute force."
|
||||
icon_state = "durand_armor"
|
||||
|
||||
////////// Firefighter
|
||||
|
||||
/obj/item/mecha_parts/chassis/firefighter
|
||||
name = "\improper Firefighter chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/firefighter
|
||||
|
||||
|
||||
////////// HONK
|
||||
|
||||
/obj/item/mecha_parts/chassis/honker
|
||||
name = "\improper H.O.N.K chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/honker
|
||||
|
||||
/obj/item/mecha_parts/part/honker_torso
|
||||
name = "\improper H.O.N.K torso"
|
||||
desc = "A torso part of H.O.N.K. Contains chuckle unit, bananium core and honk support systems."
|
||||
icon_state = "honker_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_head
|
||||
name = "\improper H.O.N.K head"
|
||||
desc = "A H.O.N.K head. Appears to lack a face plate."
|
||||
icon_state = "honker_head"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_left_arm
|
||||
name = "\improper H.O.N.K left arm"
|
||||
desc = "A H.O.N.K left arm. With unique sockets that accept odd weaponry designed by clown scientists."
|
||||
icon_state = "honker_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_right_arm
|
||||
name = "\improper H.O.N.K right arm"
|
||||
desc = "A H.O.N.K right arm. With unique sockets that accept odd weaponry designed by clown scientists."
|
||||
icon_state = "honker_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_left_leg
|
||||
name = "\improper H.O.N.K left leg"
|
||||
desc = "A H.O.N.K left leg. The foot appears just large enough to fully accommodate a clown shoe."
|
||||
icon_state = "honker_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_right_leg
|
||||
name = "\improper H.O.N.K right leg"
|
||||
desc = "A H.O.N.K right leg. The foot appears just large enough to fully accommodate a clown shoe."
|
||||
icon_state = "honker_r_leg"
|
||||
|
||||
|
||||
////////// Phazon
|
||||
|
||||
/obj/item/mecha_parts/chassis/phazon
|
||||
name = "\improper Phazon chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/phazon
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_torso
|
||||
name="\improper Phazon torso"
|
||||
desc="A Phazon torso part. The socket for the bluespace core that powers the exosuit's unique phase drives is located in the middle."
|
||||
icon_state = "phazon_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_head
|
||||
name="\improper Phazon head"
|
||||
desc="A Phazon head. Its sensors are carefully calibrated to provide vision and data even when the exosuit is phasing."
|
||||
icon_state = "phazon_head"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_left_arm
|
||||
name="\improper Phazon left arm"
|
||||
desc="A Phazon left arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
|
||||
icon_state = "phazon_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_right_arm
|
||||
name="\improper Phazon right arm"
|
||||
desc="A Phazon right arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
|
||||
icon_state = "phazon_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_left_leg
|
||||
name="\improper Phazon left leg"
|
||||
desc="A Phazon left leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
|
||||
icon_state = "phazon_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_right_leg
|
||||
name="\improper Phazon right leg"
|
||||
desc="A Phazon right leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
|
||||
icon_state = "phazon_r_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_armor
|
||||
name="Phazon armor"
|
||||
desc="Phazon armor plates. They are layered with plasma to protect the pilot from the stress of phasing and have unusual properties."
|
||||
icon_state = "phazon_armor"
|
||||
|
||||
|
||||
///////// Circuitboards
|
||||
|
||||
/obj/item/circuitboard/mecha
|
||||
name = "exosuit circuit board"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "std_mod"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
|
||||
/obj/item/circuitboard/mecha/ripley/peripherals
|
||||
name = "Ripley Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/ripley/main
|
||||
name = "Ripley Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
|
||||
/obj/item/circuitboard/mecha/gygax/peripherals
|
||||
name = "Gygax Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/gygax/targeting
|
||||
name = "Gygax Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/gygax/main
|
||||
name = "Gygax Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/durand/peripherals
|
||||
name = "Durand Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/durand/targeting
|
||||
name = "Durand Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/durand/main
|
||||
name = "Durand Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/honker/peripherals
|
||||
name = "H.O.N.K Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/honker/targeting
|
||||
name = "H.O.N.K Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/honker/main
|
||||
name = "H.O.N.K Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/odysseus/peripherals
|
||||
name = "Odysseus Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/odysseus/main
|
||||
name = "Odysseus Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/phazon/peripherals
|
||||
name = "Phazon Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/phazon/targeting
|
||||
name = "Phazon Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/phazon/main
|
||||
name = "Phazon Central Control module (Exosuit Board)"
|
||||
/////////////////////////
|
||||
////// Mecha Parts //////
|
||||
/////////////////////////
|
||||
|
||||
/obj/item/mecha_parts
|
||||
name = "mecha part"
|
||||
icon = 'icons/mecha/mech_construct.dmi'
|
||||
icon_state = "blank"
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
flags_1 = CONDUCT_1
|
||||
|
||||
/obj/item/mecha_parts/chassis
|
||||
name = "Mecha Chassis"
|
||||
icon_state = "backbone"
|
||||
interaction_flags_item = NONE //Don't pick us up!!
|
||||
var/construct_type
|
||||
|
||||
/obj/item/mecha_parts/chassis/Initialize()
|
||||
. = ..()
|
||||
if(construct_type)
|
||||
AddComponent(construct_type)
|
||||
|
||||
/////////// Ripley
|
||||
|
||||
/obj/item/mecha_parts/chassis/ripley
|
||||
name = "\improper Ripley chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/ripley
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_torso
|
||||
name = "\improper Ripley torso"
|
||||
desc = "A torso part of Ripley APLU. Contains power unit, processing core and life support systems."
|
||||
icon_state = "ripley_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_left_arm
|
||||
name = "\improper Ripley left arm"
|
||||
desc = "A Ripley APLU left arm. Data and power sockets are compatible with most exosuit tools."
|
||||
icon_state = "ripley_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_right_arm
|
||||
name = "\improper Ripley right arm"
|
||||
desc = "A Ripley APLU right arm. Data and power sockets are compatible with most exosuit tools."
|
||||
icon_state = "ripley_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_left_leg
|
||||
name = "\improper Ripley left leg"
|
||||
desc = "A Ripley APLU left leg. Contains somewhat complex servodrives and balance maintaining systems."
|
||||
icon_state = "ripley_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/ripley_right_leg
|
||||
name = "\improper Ripley right leg"
|
||||
desc = "A Ripley APLU right leg. Contains somewhat complex servodrives and balance maintaining systems."
|
||||
icon_state = "ripley_r_leg"
|
||||
|
||||
///////// Odysseus
|
||||
|
||||
/obj/item/mecha_parts/chassis/odysseus
|
||||
name = "\improper Odysseus chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/odysseus
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_head
|
||||
name = "\improper Odysseus head"
|
||||
desc = "An Odysseus head. Contains an integrated medical HUD scanner."
|
||||
icon_state = "odysseus_head"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_torso
|
||||
name = "\improper Odysseus torso"
|
||||
desc="A torso part of Odysseus. Contains power unit, processing core and life support systems along with an attachment port for a mounted sleeper."
|
||||
icon_state = "odysseus_torso"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_left_arm
|
||||
name = "\improper Odysseus left arm"
|
||||
desc = "An Odysseus left arm. Data and power sockets are compatible with specialized medical equipment."
|
||||
icon_state = "odysseus_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_right_arm
|
||||
name = "\improper Odysseus right arm"
|
||||
desc = "An Odysseus right arm. Data and power sockets are compatible with specialized medical equipment."
|
||||
icon_state = "odysseus_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_left_leg
|
||||
name = "\improper Odysseus left leg"
|
||||
desc = "An Odysseus left leg. Contains complex servodrives and balance maintaining systems to maintain stability for critical patients."
|
||||
icon_state = "odysseus_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/odysseus_right_leg
|
||||
name = "\improper Odysseus right leg"
|
||||
desc = "An odysseus right leg. Contains complex servodrives and balance maintaining systems to maintain stability for critical patients."
|
||||
icon_state = "odysseus_r_leg"
|
||||
|
||||
///////// Gygax
|
||||
|
||||
/obj/item/mecha_parts/chassis/gygax
|
||||
name = "\improper Gygax chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/gygax
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_torso
|
||||
name = "\improper Gygax torso"
|
||||
desc = "A torso part of Gygax. Contains power unit, processing core and life support systems."
|
||||
icon_state = "gygax_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_head
|
||||
name = "\improper Gygax head"
|
||||
desc = "A Gygax head. Houses advanced surveillance and targeting sensors."
|
||||
icon_state = "gygax_head"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_left_arm
|
||||
name = "\improper Gygax left arm"
|
||||
desc = "A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons."
|
||||
icon_state = "gygax_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_right_arm
|
||||
name = "\improper Gygax right arm"
|
||||
desc = "A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons."
|
||||
icon_state = "gygax_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_left_leg
|
||||
name = "\improper Gygax left leg"
|
||||
desc = "A Gygax left leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
|
||||
icon_state = "gygax_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_right_leg
|
||||
name = "\improper Gygax right leg"
|
||||
desc = "A Gygax right leg. Constructed with advanced servomechanisms and actuators to enable faster speed."
|
||||
icon_state = "gygax_r_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/gygax_armor
|
||||
gender = PLURAL
|
||||
name = "\improper Gygax armor plates"
|
||||
desc = "A set of armor plates designed for the Gygax. Designed to effectively deflect damage with a lightweight construction."
|
||||
icon_state = "gygax_armor"
|
||||
|
||||
|
||||
//////////// Durand
|
||||
|
||||
/obj/item/mecha_parts/chassis/durand
|
||||
name = "\improper Durand chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/durand
|
||||
|
||||
/obj/item/mecha_parts/part/durand_torso
|
||||
name = "\improper Durand torso"
|
||||
desc = "A torso part of Durand. Contains power unit, processing core and life support systems within a robust protective frame."
|
||||
icon_state = "durand_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_head
|
||||
name = "\improper Durand head"
|
||||
desc = "A Durand head. Houses advanced surveillance and targeting sensors."
|
||||
icon_state = "durand_head"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_left_arm
|
||||
name = "\improper Durand left arm"
|
||||
desc = "A Durand left arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
|
||||
icon_state = "durand_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_right_arm
|
||||
name = "\improper Durand right arm"
|
||||
desc = "A Durand right arm. Data and power sockets are compatible with most exosuit tools and weapons. Packs a really mean punch as well."
|
||||
icon_state = "durand_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_left_leg
|
||||
name = "\improper Durand left leg"
|
||||
desc = "A Durand left leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs."
|
||||
icon_state = "durand_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_right_leg
|
||||
name = "\improper Durand right leg"
|
||||
desc = "A Durand right leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs."
|
||||
icon_state = "durand_r_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/durand_armor
|
||||
gender = PLURAL
|
||||
name = "\improper Durand armor plates"
|
||||
desc = "A set of armor plates for the Durand. Built heavy to resist an incredible amount of brute force."
|
||||
icon_state = "durand_armor"
|
||||
|
||||
////////// Firefighter
|
||||
|
||||
/obj/item/mecha_parts/chassis/firefighter
|
||||
name = "\improper Firefighter chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/firefighter
|
||||
|
||||
|
||||
////////// HONK
|
||||
|
||||
/obj/item/mecha_parts/chassis/honker
|
||||
name = "\improper H.O.N.K chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/honker
|
||||
|
||||
/obj/item/mecha_parts/part/honker_torso
|
||||
name = "\improper H.O.N.K torso"
|
||||
desc = "A torso part of H.O.N.K. Contains chuckle unit, bananium core and honk support systems."
|
||||
icon_state = "honker_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_head
|
||||
name = "\improper H.O.N.K head"
|
||||
desc = "A H.O.N.K head. Appears to lack a face plate."
|
||||
icon_state = "honker_head"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_left_arm
|
||||
name = "\improper H.O.N.K left arm"
|
||||
desc = "A H.O.N.K left arm. With unique sockets that accept odd weaponry designed by clown scientists."
|
||||
icon_state = "honker_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_right_arm
|
||||
name = "\improper H.O.N.K right arm"
|
||||
desc = "A H.O.N.K right arm. With unique sockets that accept odd weaponry designed by clown scientists."
|
||||
icon_state = "honker_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_left_leg
|
||||
name = "\improper H.O.N.K left leg"
|
||||
desc = "A H.O.N.K left leg. The foot appears just large enough to fully accommodate a clown shoe."
|
||||
icon_state = "honker_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/honker_right_leg
|
||||
name = "\improper H.O.N.K right leg"
|
||||
desc = "A H.O.N.K right leg. The foot appears just large enough to fully accommodate a clown shoe."
|
||||
icon_state = "honker_r_leg"
|
||||
|
||||
|
||||
////////// Phazon
|
||||
|
||||
/obj/item/mecha_parts/chassis/phazon
|
||||
name = "\improper Phazon chassis"
|
||||
construct_type = /datum/component/construction/unordered/mecha_chassis/phazon
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_torso
|
||||
name="\improper Phazon torso"
|
||||
desc="A Phazon torso part. The socket for the bluespace core that powers the exosuit's unique phase drives is located in the middle."
|
||||
icon_state = "phazon_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_head
|
||||
name="\improper Phazon head"
|
||||
desc="A Phazon head. Its sensors are carefully calibrated to provide vision and data even when the exosuit is phasing."
|
||||
icon_state = "phazon_head"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_left_arm
|
||||
name="\improper Phazon left arm"
|
||||
desc="A Phazon left arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
|
||||
icon_state = "phazon_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_right_arm
|
||||
name="\improper Phazon right arm"
|
||||
desc="A Phazon right arm. Several microtool arrays are located under the armor plating, which can be adjusted to the situation at hand."
|
||||
icon_state = "phazon_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_left_leg
|
||||
name="\improper Phazon left leg"
|
||||
desc="A Phazon left leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
|
||||
icon_state = "phazon_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_right_leg
|
||||
name="\improper Phazon right leg"
|
||||
desc="A Phazon right leg. It contains the unique phase drives that allow the exosuit to phase through solid matter when engaged."
|
||||
icon_state = "phazon_r_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/phazon_armor
|
||||
name="Phazon armor"
|
||||
desc="Phazon armor plates. They are layered with plasma to protect the pilot from the stress of phasing and have unusual properties."
|
||||
icon_state = "phazon_armor"
|
||||
|
||||
|
||||
///////// Circuitboards
|
||||
|
||||
/obj/item/circuitboard/mecha
|
||||
name = "exosuit circuit board"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "std_mod"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
|
||||
/obj/item/circuitboard/mecha/ripley/peripherals
|
||||
name = "Ripley Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/ripley/main
|
||||
name = "Ripley Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
|
||||
/obj/item/circuitboard/mecha/gygax/peripherals
|
||||
name = "Gygax Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/gygax/targeting
|
||||
name = "Gygax Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/gygax/main
|
||||
name = "Gygax Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/durand/peripherals
|
||||
name = "Durand Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/durand/targeting
|
||||
name = "Durand Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/durand/main
|
||||
name = "Durand Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/honker/peripherals
|
||||
name = "H.O.N.K Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/honker/targeting
|
||||
name = "H.O.N.K Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/honker/main
|
||||
name = "H.O.N.K Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/odysseus/peripherals
|
||||
name = "Odysseus Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/odysseus/main
|
||||
name = "Odysseus Central Control module (Exosuit Board)"
|
||||
icon_state = "mainboard"
|
||||
|
||||
/obj/item/circuitboard/mecha/phazon/peripherals
|
||||
name = "Phazon Peripherals Control module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/phazon/targeting
|
||||
name = "Phazon Weapon Control and Targeting module (Exosuit Board)"
|
||||
icon_state = "mcontroller"
|
||||
|
||||
/obj/item/circuitboard/mecha/phazon/main
|
||||
name = "Phazon Central Control module (Exosuit Board)"
|
||||
|
||||
+253
-253
@@ -1,253 +1,253 @@
|
||||
///////////////////////////////////
|
||||
//////// Mecha wreckage ////////
|
||||
///////////////////////////////////
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage
|
||||
name = "exosuit wreckage"
|
||||
desc = "Remains of some unfortunate mecha. Completely irreparable, but perhaps something can be salvaged."
|
||||
icon = 'icons/mecha/mecha.dmi'
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
opacity = 0
|
||||
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/metal, /obj/item/stack/rods)
|
||||
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
|
||||
var/list/crowbar_salvage = list()
|
||||
var/salvage_num = 5
|
||||
var/mob/living/silicon/ai/AI //AIs to be salvaged
|
||||
|
||||
/obj/structure/mecha_wreckage/Initialize(mapload, mob/living/silicon/ai/AI_pilot)
|
||||
. = ..()
|
||||
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/examine(mob/user)
|
||||
. = ..()
|
||||
if(AI)
|
||||
. += "<span class='notice'>The AI recovery beacon is active.</span>"
|
||||
|
||||
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(salvage_num <= 0 || !length(welder_salvage))
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
|
||||
if(!I.use_tool(src, user, 0, volume=50))
|
||||
return
|
||||
|
||||
var/type = prob(70) ? pick(welder_salvage) : null
|
||||
if(type)
|
||||
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/mecha_parts/part))
|
||||
welder_salvage -= type
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wirecutters))
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
else if(wirecutters_salvage && wirecutters_salvage.len)
|
||||
var/type = prob(70) ? pick(wirecutters_salvage) : null
|
||||
if(type)
|
||||
var/N = new type(get_turf(user))
|
||||
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
if(crowbar_salvage && crowbar_salvage.len)
|
||||
var/obj/S = pick(crowbar_salvage)
|
||||
if(S)
|
||||
S.forceMove(user.drop_location())
|
||||
crowbar_salvage -= S
|
||||
user.visible_message("[user] pries [S] from [src].", "<span class='notice'>You pry [S] from [src].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be pried with [I]!</span>")
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/transfer_ai(interaction, mob/user, null, 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.
|
||||
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.
|
||||
card.AI = AI
|
||||
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.")
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/gygax
|
||||
name = "\improper Gygax wreckage"
|
||||
icon_state = "gygax-broken"
|
||||
|
||||
/obj/structure/mecha_wreckage/gygax/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
|
||||
/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/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"
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/Initialize()
|
||||
. = ..()
|
||||
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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/firefighter
|
||||
name = "\improper Firefighter wreckage"
|
||||
icon_state = "firefighter-broken"
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/firefighter/Initialize()
|
||||
. = ..()
|
||||
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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/deathripley
|
||||
name = "\improper Death-Ripley wreckage"
|
||||
icon_state = "deathripley-broken"
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/honker
|
||||
name = "\improper H.O.N.K wreckage"
|
||||
icon_state = "honker-broken"
|
||||
desc = "All is right in the universe."
|
||||
|
||||
/obj/structure/mecha_wreckage/honker/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/durand
|
||||
name = "\improper Durand wreckage"
|
||||
icon_state = "durand-broken"
|
||||
|
||||
/obj/structure/mecha_wreckage/durand/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
/obj/structure/mecha_wreckage/odysseus/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
///////////////////////////////////
|
||||
//////// Mecha wreckage ////////
|
||||
///////////////////////////////////
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage
|
||||
name = "exosuit wreckage"
|
||||
desc = "Remains of some unfortunate mecha. Completely irreparable, but perhaps something can be salvaged."
|
||||
icon = 'icons/mecha/mecha.dmi'
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
opacity = 0
|
||||
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel, /obj/item/stack/sheet/metal, /obj/item/stack/rods)
|
||||
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
|
||||
var/list/crowbar_salvage = list()
|
||||
var/salvage_num = 5
|
||||
var/mob/living/silicon/ai/AI //AIs to be salvaged
|
||||
|
||||
/obj/structure/mecha_wreckage/Initialize(mapload, mob/living/silicon/ai/AI_pilot)
|
||||
. = ..()
|
||||
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/examine(mob/user)
|
||||
. = ..()
|
||||
if(AI)
|
||||
. += "<span class='notice'>The AI recovery beacon is active.</span>"
|
||||
|
||||
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(salvage_num <= 0 || !length(welder_salvage))
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
|
||||
if(!I.use_tool(src, user, 0, volume=50))
|
||||
return
|
||||
|
||||
var/type = prob(70) ? pick(welder_salvage) : null
|
||||
if(type)
|
||||
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/mecha_parts/part))
|
||||
welder_salvage -= type
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/wirecutters))
|
||||
if(salvage_num <= 0)
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
else if(wirecutters_salvage && wirecutters_salvage.len)
|
||||
var/type = prob(70) ? pick(wirecutters_salvage) : null
|
||||
if(type)
|
||||
var/N = new type(get_turf(user))
|
||||
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
|
||||
salvage_num--
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
if(crowbar_salvage && crowbar_salvage.len)
|
||||
var/obj/S = pick(crowbar_salvage)
|
||||
if(S)
|
||||
S.forceMove(user.drop_location())
|
||||
crowbar_salvage -= S
|
||||
user.visible_message("[user] pries [S] from [src].", "<span class='notice'>You pry [S] from [src].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be pried with [I]!</span>")
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/transfer_ai(interaction, mob/user, null, 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.
|
||||
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.
|
||||
card.AI = AI
|
||||
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.")
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/gygax
|
||||
name = "\improper Gygax wreckage"
|
||||
icon_state = "gygax-broken"
|
||||
|
||||
/obj/structure/mecha_wreckage/gygax/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
|
||||
/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/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"
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/Initialize()
|
||||
. = ..()
|
||||
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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/firefighter
|
||||
name = "\improper Firefighter wreckage"
|
||||
icon_state = "firefighter-broken"
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/firefighter/Initialize()
|
||||
. = ..()
|
||||
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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/ripley/deathripley
|
||||
name = "\improper Death-Ripley wreckage"
|
||||
icon_state = "deathripley-broken"
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/honker
|
||||
name = "\improper H.O.N.K wreckage"
|
||||
icon_state = "honker-broken"
|
||||
desc = "All is right in the universe."
|
||||
|
||||
/obj/structure/mecha_wreckage/honker/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/durand
|
||||
name = "\improper Durand wreckage"
|
||||
icon_state = "durand-broken"
|
||||
|
||||
/obj/structure/mecha_wreckage/durand/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
|
||||
/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"
|
||||
|
||||
/obj/structure/mecha_wreckage/odysseus/Initialize()
|
||||
. = ..()
|
||||
var/list/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)
|
||||
for(var/i = 0; i < 2; i++)
|
||||
if(parts.len && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/obj/mecha/medical/odysseus
|
||||
desc = "These exosuits are developed and produced by Vey-Med. (© All rights reserved)."
|
||||
name = "\improper Odysseus"
|
||||
icon_state = "odysseus"
|
||||
step_in = 2
|
||||
max_temperature = 15000
|
||||
max_integrity = 120
|
||||
wreckage = /obj/structure/mecha_wreckage/odysseus
|
||||
internal_damage_threshold = 35
|
||||
deflect_chance = 15
|
||||
step_energy_drain = 6
|
||||
|
||||
/obj/mecha/medical/odysseus/moved_inside(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
hud.add_hud_to(H)
|
||||
|
||||
/obj/mecha/medical/odysseus/go_out()
|
||||
if(isliving(occupant))
|
||||
var/mob/living/carbon/human/L = occupant
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
hud.remove_hud_from(L)
|
||||
..()
|
||||
|
||||
/obj/mecha/medical/odysseus/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
var/mob/living/brain/B = mmi_as_oc.brainmob
|
||||
hud.add_hud_to(B)
|
||||
/obj/mecha/medical/odysseus
|
||||
desc = "These exosuits are developed and produced by Vey-Med. (© All rights reserved)."
|
||||
name = "\improper Odysseus"
|
||||
icon_state = "odysseus"
|
||||
step_in = 2
|
||||
max_temperature = 15000
|
||||
max_integrity = 120
|
||||
wreckage = /obj/structure/mecha_wreckage/odysseus
|
||||
internal_damage_threshold = 35
|
||||
deflect_chance = 15
|
||||
step_energy_drain = 6
|
||||
|
||||
/obj/mecha/medical/odysseus/moved_inside(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
hud.add_hud_to(H)
|
||||
|
||||
/obj/mecha/medical/odysseus/go_out()
|
||||
if(isliving(occupant))
|
||||
var/mob/living/carbon/human/L = occupant
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
hud.remove_hud_from(L)
|
||||
..()
|
||||
|
||||
/obj/mecha/medical/odysseus/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
var/mob/living/brain/B = mmi_as_oc.brainmob
|
||||
hud.add_hud_to(B)
|
||||
|
||||
+198
-198
@@ -1,198 +1,198 @@
|
||||
/obj/mecha/working/ripley
|
||||
desc = "Autonomous Power Loader Unit. This newer model is refitted with powerful armour against the dangers of planetary mining."
|
||||
name = "\improper APLU \"Ripley\""
|
||||
icon_state = "ripley"
|
||||
step_in = 3 //Move speed, lower is faster.
|
||||
var/fast_pressure_step_in = 2
|
||||
var/slow_pressure_step_in = 3
|
||||
max_temperature = 20000
|
||||
max_integrity = 200
|
||||
lights_power = 8
|
||||
deflect_chance = 15
|
||||
armor = list("melee" = 30, "bullet" = 15, "laser" = 10, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_equip = 6
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 15
|
||||
var/hides = 0
|
||||
|
||||
/obj/mecha/working/ripley/Move()
|
||||
. = ..()
|
||||
if(.)
|
||||
collect_ore()
|
||||
update_pressure()
|
||||
|
||||
/obj/mecha/working/ripley/proc/collect_ore()
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/stack/ore/ore in range(1, src))
|
||||
if(ore.Adjacent(src) && ((get_dir(src, ore) & dir) || ore.loc == loc)) //we can reach it and it's in front of us? grab it!
|
||||
ore.forceMove(ore_box)
|
||||
|
||||
/obj/mecha/working/ripley/Destroy()
|
||||
for(var/atom/movable/A in cargo)
|
||||
A.forceMove(drop_location())
|
||||
step_rand(A)
|
||||
cargo.Cut()
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/go_out()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/update_icon()
|
||||
..()
|
||||
var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate)
|
||||
if (C.amount)
|
||||
cut_overlays()
|
||||
if(C.amount < 3)
|
||||
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
|
||||
else
|
||||
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
|
||||
|
||||
/obj/mecha/working/ripley/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/firefighter
|
||||
desc = "Autonomous Power Loader Unit. This model is refitted with additional thermal protection."
|
||||
name = "\improper APLU \"Firefighter\""
|
||||
icon_state = "firefighter"
|
||||
step_in = 4
|
||||
fast_pressure_step_in = 2
|
||||
slow_pressure_step_in = 4
|
||||
max_temperature = 65000
|
||||
max_integrity = 250
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
lights_power = 7
|
||||
armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_equip = 5 // More armor, less tools
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley/firefighter
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/deathripley
|
||||
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
|
||||
name = "\improper DEATH-RIPLEY"
|
||||
icon_state = "deathripley"
|
||||
armor = list("melee" = 40, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
slow_pressure_step_in = 3
|
||||
opacity=0
|
||||
lights_power = 7
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley/deathripley
|
||||
step_energy_drain = 0
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/real
|
||||
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE. FOR REAL"
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/real/Initialize()
|
||||
. = ..()
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
|
||||
E.detach()
|
||||
qdel(E)
|
||||
equipment.Cut()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/mining
|
||||
desc = "An old, dusty mining Ripley."
|
||||
name = "\improper APLU \"Miner\""
|
||||
obj_integrity = 75 //Low starting health
|
||||
|
||||
/obj/mecha/working/ripley/mining/Initialize()
|
||||
. = ..()
|
||||
if(cell)
|
||||
cell.charge = FLOOR(cell.charge * 0.25, 1) //Starts at very low charge
|
||||
if(prob(70)) //Maybe add a drill
|
||||
if(prob(15)) //Possible diamond drill... Feeling lucky?
|
||||
var/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill/D = new
|
||||
D.attach(src)
|
||||
else
|
||||
var/obj/item/mecha_parts/mecha_equipment/drill/D = new
|
||||
D.attach(src)
|
||||
|
||||
else //Add plasma cutter if no drill
|
||||
var/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/P = new
|
||||
P.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)
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)//Deletes the beacon so it can't be found easily
|
||||
qdel(B)
|
||||
|
||||
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
|
||||
scanner.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
occupant_message("<span class='notice'>You unload [O].</span>")
|
||||
O.forceMove(drop_location())
|
||||
cargo -= O
|
||||
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/contents_explosion(severity, target)
|
||||
for(var/X in cargo)
|
||||
var/obj/O = X
|
||||
if(prob(30/severity))
|
||||
cargo -= O
|
||||
O.forceMove(drop_location())
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/working/ripley/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
|
||||
if(cargo.len)
|
||||
for(var/obj/O in cargo)
|
||||
output += "<a href='?src=[REF(src)];drop_from_cargo=[REF(O)]'>Unload</a> : [O]<br>"
|
||||
else
|
||||
output += "Nothing"
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
/obj/mecha/working/ripley/proc/update_pressure()
|
||||
var/turf/T = get_turf(loc)
|
||||
|
||||
if(lavaland_equipment_pressure_check(T))
|
||||
step_in = fast_pressure_step_in
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)/2
|
||||
else
|
||||
step_in = slow_pressure_step_in
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)
|
||||
|
||||
/obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O)
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [O] and start pushing so it falls out of [src].</span>")
|
||||
if(do_after(user, 300, target = O))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You successfully pushed [O] out of [src]!</span>")
|
||||
O.forceMove(drop_location())
|
||||
cargo -= O
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
to_chat(user, "<span class='warning'>You fail to push [O] out of [src]!</span>")
|
||||
/obj/mecha/working/ripley
|
||||
desc = "Autonomous Power Loader Unit. This newer model is refitted with powerful armour against the dangers of planetary mining."
|
||||
name = "\improper APLU \"Ripley\""
|
||||
icon_state = "ripley"
|
||||
step_in = 3 //Move speed, lower is faster.
|
||||
var/fast_pressure_step_in = 2
|
||||
var/slow_pressure_step_in = 3
|
||||
max_temperature = 20000
|
||||
max_integrity = 200
|
||||
lights_power = 8
|
||||
deflect_chance = 15
|
||||
armor = list("melee" = 30, "bullet" = 15, "laser" = 10, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_equip = 6
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 15
|
||||
var/hides = 0
|
||||
|
||||
/obj/mecha/working/ripley/Move()
|
||||
. = ..()
|
||||
if(.)
|
||||
collect_ore()
|
||||
update_pressure()
|
||||
|
||||
/obj/mecha/working/ripley/proc/collect_ore()
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/stack/ore/ore in range(1, src))
|
||||
if(ore.Adjacent(src) && ((get_dir(src, ore) & dir) || ore.loc == loc)) //we can reach it and it's in front of us? grab it!
|
||||
ore.forceMove(ore_box)
|
||||
|
||||
/obj/mecha/working/ripley/Destroy()
|
||||
for(var/atom/movable/A in cargo)
|
||||
A.forceMove(drop_location())
|
||||
step_rand(A)
|
||||
cargo.Cut()
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/go_out()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/update_icon()
|
||||
..()
|
||||
var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate)
|
||||
if (C.amount)
|
||||
cut_overlays()
|
||||
if(C.amount < 3)
|
||||
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
|
||||
else
|
||||
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
|
||||
|
||||
/obj/mecha/working/ripley/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/firefighter
|
||||
desc = "Autonomous Power Loader Unit. This model is refitted with additional thermal protection."
|
||||
name = "\improper APLU \"Firefighter\""
|
||||
icon_state = "firefighter"
|
||||
step_in = 4
|
||||
fast_pressure_step_in = 2
|
||||
slow_pressure_step_in = 4
|
||||
max_temperature = 65000
|
||||
max_integrity = 250
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
lights_power = 7
|
||||
armor = list("melee" = 40, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 60, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_equip = 5 // More armor, less tools
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley/firefighter
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/deathripley
|
||||
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
|
||||
name = "\improper DEATH-RIPLEY"
|
||||
icon_state = "deathripley"
|
||||
armor = list("melee" = 40, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 40, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
slow_pressure_step_in = 3
|
||||
opacity=0
|
||||
lights_power = 7
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley/deathripley
|
||||
step_energy_drain = 0
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/real
|
||||
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE. FOR REAL"
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/real/Initialize()
|
||||
. = ..()
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
|
||||
E.detach()
|
||||
qdel(E)
|
||||
equipment.Cut()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/mining
|
||||
desc = "An old, dusty mining Ripley."
|
||||
name = "\improper APLU \"Miner\""
|
||||
obj_integrity = 75 //Low starting health
|
||||
|
||||
/obj/mecha/working/ripley/mining/Initialize()
|
||||
. = ..()
|
||||
if(cell)
|
||||
cell.charge = FLOOR(cell.charge * 0.25, 1) //Starts at very low charge
|
||||
if(prob(70)) //Maybe add a drill
|
||||
if(prob(15)) //Possible diamond drill... Feeling lucky?
|
||||
var/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill/D = new
|
||||
D.attach(src)
|
||||
else
|
||||
var/obj/item/mecha_parts/mecha_equipment/drill/D = new
|
||||
D.attach(src)
|
||||
|
||||
else //Add plasma cutter if no drill
|
||||
var/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/P = new
|
||||
P.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)
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)//Deletes the beacon so it can't be found easily
|
||||
qdel(B)
|
||||
|
||||
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
|
||||
scanner.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
occupant_message("<span class='notice'>You unload [O].</span>")
|
||||
O.forceMove(drop_location())
|
||||
cargo -= O
|
||||
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/contents_explosion(severity, target)
|
||||
for(var/X in cargo)
|
||||
var/obj/O = X
|
||||
if(prob(30/severity))
|
||||
cargo -= O
|
||||
O.forceMove(drop_location())
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/working/ripley/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
|
||||
if(cargo.len)
|
||||
for(var/obj/O in cargo)
|
||||
output += "<a href='?src=[REF(src)];drop_from_cargo=[REF(O)]'>Unload</a> : [O]<br>"
|
||||
else
|
||||
output += "Nothing"
|
||||
output += "</div>"
|
||||
return output
|
||||
|
||||
/obj/mecha/working/ripley/proc/update_pressure()
|
||||
var/turf/T = get_turf(loc)
|
||||
|
||||
if(lavaland_equipment_pressure_check(T))
|
||||
step_in = fast_pressure_step_in
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)/2
|
||||
else
|
||||
step_in = slow_pressure_step_in
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)
|
||||
|
||||
/obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O)
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [O] and start pushing so it falls out of [src].</span>")
|
||||
if(do_after(user, 300, target = O))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You successfully pushed [O] out of [src]!</span>")
|
||||
O.forceMove(drop_location())
|
||||
cargo -= O
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
to_chat(user, "<span class='warning'>You fail to push [O] out of [src]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user