mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
/tg/ mecha - Part 1
Start of porting the /tg/station mecha update.
This commit only cleans up the code and adds the proper dependencies for
the mecha.
- Removes relative pathing from /datum/events
- Updated Process_Spacemove() to use
atom/movable/proc/get_spacemove_backup()
- Basically just makes launching off of unanchored objects in space an
OOP behaviour
- Removed styling atrocities and relative pathing from most of the mecha files.
- Notable exceptions:
- code/game/mecha/mech_bay.dm
- code/game/mecha/mech_fabricator.dm
- code/game/mecha/mecha_construction_paths.dm
- code/game/mecha/mecha_parts.dm
- code/game/mecha/mecha_wreckage.dm
- code/game/mecha/paintkits.dm
- Removed dyndomove/dyndoattackby/dyndobulletact. No more icky dynamic
calls. Replaced by specific code for the 3 modules that used it.
- Refactored module cooldown. It now uses addtimer, and power usage is
hooked directly into the cooldown calls.
- Added atom/movable/proc/has_buckled_mobs(). Currently not that useful,
but, necessary for porting the multi-buckling system from /tg/.
- Split code/game/mecha/equipment/tools/tools.dm into multiple files.
- Removed snowflake behaviour from exosuit drill. It now calls
turf.drill_act(src).
- Different from /tg/: Allows you to drill any wall/floor normally.
- Drill no longer gibs mobs. It deals 80 organ damage instead.
- Drill can be used to harvest dead mobs.
- Removed all global_iterator systems from mecha and mecha equipment.
Everything now uses object processing.
- Mecha now have a turn sound variable and step sound variable. Updated
all subtypes to use these instead of snowflake domove procs.
- Removed mecha_do_after, mecha now uses the normal do_after.
- Removed enter_after, same as above.
- /obj/mecha/Process_Spacemove no longer strangely calls the user's
spacemove.
- /obj/mecha/return_pressure now uses return_air instead of copypasted
cabin air detection.
- Same for /obj/mecha/return_temperature
- Added /obj/mecha/Exited. Basically, properly clears occupant refs,
even if they teleport out/otherwise exit improperly.
- Added hooks for mecha action buttons; Didn't implement them yet.
- Moved mecha UI to code/game/mecha/mecha_topic.dm
- Fixed turfs not updating atmos when ChangeTurf(/turf/space) is used.
- Updated visible_message and audible_message. Both now use
get_mobs_in_view() to ensure that mobs inside containers can see
messages.
- Removed /obj/item/mecha_parts/mecha_equipment/tool subtype. It had no
use. Any subtypes are now just subtypes of
/obj/item/mecha_parts/mecha_equipment.
This commit is contained in:
@@ -190,8 +190,8 @@
|
||||
"dH" = (/obj/item/stack/rods,/turf/simulated/floor/plasteel,/area/awaymission/spacebattle/cruiser)
|
||||
"dI" = (/obj/mecha/medical/odysseus,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dJ" = (/obj/mecha/working/ripley/firefighter,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dK" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dL" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/tool/drill,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dK" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dL" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/drill,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dM" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dN" = (/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"dO" = (/obj/structure/stool/bed/chair{dir = 4},/turf/simulated/floor/plasteel{icon_state = "bar"},/area/awaymission/spacebattle/cruiser)
|
||||
@@ -209,7 +209,7 @@
|
||||
"ea" = (/obj/machinery/gateway{dir = 9},/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"eb" = (/obj/machinery/gateway{dir = 1},/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"ec" = (/obj/machinery/gateway{dir = 5},/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"ed" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"ed" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/syringe_gun,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"ee" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/mecha_parts/mecha_equipment/repair_droid,/turf/simulated/floor/plating,/area/awaymission/spacebattle/cruiser)
|
||||
"ef" = (/mob/living/simple_animal/hostile/syndicate/melee,/turf/simulated/floor/plasteel{icon_state = "bar"},/area/awaymission/spacebattle/cruiser)
|
||||
"eg" = (/obj/structure/closet/l3closet/security,/turf/simulated/floor/plasteel{icon_state = "red"; dir = 4},/area/awaymission/spacebattle/cruiser)
|
||||
|
||||
@@ -1127,7 +1127,7 @@
|
||||
"Eb" = (/obj/structure/rack,/obj/item/clothing/shoes/magboots/syndie{pixel_x = -3; pixel_y = 3},/obj/item/clothing/shoes/magboots/advance,/obj/item/clothing/shoes/magboots{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
"Ec" = (/obj/structure/rack,/obj/item/clothing/shoes/green{pixel_x = -3; pixel_y = 3},/obj/item/clothing/shoes/centcom,/obj/item/clothing/shoes/syndigaloshes{pixel_x = 3; pixel_y = -3},/obj/item/clothing/shoes/rainbow{pixel_x = -3; pixel_y = 3},/obj/item/clothing/shoes/combat/swat,/obj/item/clothing/shoes/combat{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
"Ed" = (/obj/structure/rack,/obj/item/clothing/suit/pirate_black{pixel_x = -3; pixel_y = 3},/obj/item/clothing/suit/blacktrenchcoat,/obj/item/clothing/suit/jacket{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
"Ee" = (/obj/item/mecha_parts/mecha_equipment/tool/cable_layer,/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill,/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp,/obj/item/mecha_parts/mecha_equipment/tool/rcd,/obj/item/mecha_parts/mecha_equipment/tool/extinguisher,/obj/structure/closet/crate,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
"Ee" = (/obj/item/mecha_parts/mecha_equipment/cable_layer,/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill,/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp,/obj/item/mecha_parts/mecha_equipment/rcd,/obj/item/mecha_parts/mecha_equipment/extinguisher,/obj/structure/closet/crate,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
"Ef" = (/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/turf/unsimulated/wall{desc = "This window appears to be reinforced, it looks nearly impossible to break."; dir = 4; icon = 'icons/turf/shuttle.dmi'; icon_state = "window5_end"; name = "window"; opacity = 0; tag = "icon-window5 (EAST)"},/area/admin)
|
||||
"Eg" = (/obj/structure/rack,/obj/item/clothing/under/syndicate{pixel_x = -3; pixel_y = 3},/obj/item/clothing/under/syndicate/combat,/obj/item/clothing/under/acj{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
"Eh" = (/obj/structure/mirror{pixel_y = -30},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
|
||||
|
||||
@@ -6,62 +6,63 @@
|
||||
/datum/events
|
||||
var/list/events
|
||||
|
||||
New()
|
||||
..()
|
||||
events = new
|
||||
/datum/events/New()
|
||||
..()
|
||||
events = new
|
||||
|
||||
proc/addEventType(event_type as text)
|
||||
if(!(event_type in events) || !islist(events[event_type]))
|
||||
events[event_type] = list()
|
||||
return 1
|
||||
return
|
||||
|
||||
|
||||
// Arguments: event_type as text, proc_holder as datum, proc_name as text
|
||||
// Returns: New event, null on error.
|
||||
proc/addEvent(event_type as text, proc_holder, proc_name as text)
|
||||
if(!event_type || !proc_holder || !proc_name)
|
||||
return
|
||||
addEventType(event_type)
|
||||
var/list/event = events[event_type]
|
||||
var/datum/events_event/E = new /datum/events_event(proc_holder,proc_name)
|
||||
event += E
|
||||
return E
|
||||
|
||||
// Arguments: event_type as text, any number of additional arguments to pass to event handler
|
||||
// Returns: null
|
||||
proc/fireEvent()
|
||||
// to_chat(world, "Events in [args[1]] called")
|
||||
var/list/event = listgetindex(events,args[1])
|
||||
if(istype(event))
|
||||
spawn(-1)
|
||||
for(var/datum/events_event/E in event)
|
||||
if(!E.Fire(arglist(args.Copy(2))))
|
||||
clearEvent(args[1],E)
|
||||
return
|
||||
|
||||
// Arguments: event_type as text, E as /datum/events_event
|
||||
// Returns: 1 if event cleared, null on error
|
||||
proc/clearEvent(event_type as text, datum/events_event/E)
|
||||
if(!event_type || !E)
|
||||
return
|
||||
var/list/event = listgetindex(events,event_type)
|
||||
event -= E
|
||||
/datum/events/proc/addEventType(event_type as text)
|
||||
if(!(event_type in events) || !islist(events[event_type]))
|
||||
events[event_type] = list()
|
||||
return 1
|
||||
return
|
||||
|
||||
|
||||
/datum/events_event
|
||||
// Arguments: event_type as text, proc_holder as datum, proc_name as text
|
||||
// Returns: New event, null on error.
|
||||
/datum/events/proc/addEvent(event_type as text, proc_holder, proc_name as text)
|
||||
if(!event_type || !proc_holder || !proc_name)
|
||||
return
|
||||
addEventType(event_type)
|
||||
var/list/event = events[event_type]
|
||||
var/datum/event/E = new /datum/event(proc_holder,proc_name)
|
||||
event += E
|
||||
return E
|
||||
|
||||
// Arguments: event_type as text, any number of additional arguments to pass to event handler
|
||||
// Returns: null
|
||||
/datum/events/proc/fireEvent()
|
||||
//world << "Events in [args[1]] called"
|
||||
var/list/event = listgetindex(events,args[1])
|
||||
if(istype(event))
|
||||
spawn(0)
|
||||
for(var/datum/event/E in event)
|
||||
if(!E.Fire(arglist(args.Copy(2))))
|
||||
clearEvent(args[1],E)
|
||||
return
|
||||
|
||||
// Arguments: event_type as text, E as /datum/event
|
||||
// Returns: 1 if event cleared, null on error
|
||||
|
||||
/datum/events/proc/clearEvent(event_type as text, datum/event/E)
|
||||
if(!event_type || !E)
|
||||
return
|
||||
var/list/event = listgetindex(events,event_type)
|
||||
event -= E
|
||||
return 1
|
||||
|
||||
|
||||
/datum/event
|
||||
var/listener
|
||||
var/proc_name
|
||||
|
||||
New(tlistener,tprocname)
|
||||
listener = tlistener
|
||||
proc_name = tprocname
|
||||
return ..()
|
||||
/datum/event/New(tlistener,tprocname)
|
||||
listener = tlistener
|
||||
proc_name = tprocname
|
||||
return ..()
|
||||
|
||||
proc/Fire()
|
||||
// to_chat(world, "Event fired")
|
||||
if(listener)
|
||||
call(listener,proc_name)(arglist(args))
|
||||
return 1
|
||||
return
|
||||
/datum/event/proc/Fire()
|
||||
//world << "Event fired"
|
||||
if(listener)
|
||||
call(listener,proc_name)(arglist(args))
|
||||
return 1
|
||||
return
|
||||
|
||||
@@ -345,3 +345,22 @@
|
||||
if(buckled_mob == mover)
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/atom/movable/proc/get_spacemove_backup()
|
||||
var/atom/movable/dense_object_backup
|
||||
for(var/A in orange(1, get_turf(src)))
|
||||
if(isarea(A))
|
||||
continue
|
||||
else if(isturf(A))
|
||||
var/turf/turf = A
|
||||
if(!turf.density)
|
||||
continue
|
||||
return turf
|
||||
else
|
||||
var/atom/movable/AM = A
|
||||
if(!AM.CanPass(src) || AM.density)
|
||||
if(AM.anchored)
|
||||
return AM
|
||||
dense_object_backup = AM
|
||||
break
|
||||
. = dense_object_backup
|
||||
|
||||
@@ -1001,7 +1001,7 @@ About the new airlock wires panel:
|
||||
to_chat(user, "The hatch is coated with a product that prevents the shaped charge from sticking!")
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/mecha_parts/mecha_equipment/tool/rcd) || istype(C, /obj/item/weapon/rcd))
|
||||
if(istype(C, /obj/item/mecha_parts/mecha_equipment/rcd) || istype(C, /obj/item/weapon/rcd))
|
||||
to_chat(user, "The hatch is made of an advanced compound that cannot be deconstructed using an RCD.")
|
||||
return
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
var/maxsize = 2
|
||||
internal_damage_threshold = 50
|
||||
maint_access = 0
|
||||
//add_req_access = 0
|
||||
//operation_req_access = list(access_hos)
|
||||
damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8)
|
||||
var/am = "d3c2fbcadca903a41161ccc9df9cf948"
|
||||
|
||||
@@ -26,21 +24,13 @@
|
||||
|
||||
|
||||
/obj/mecha/combat/go_out()
|
||||
if(src.occupant && src.occupant.client)
|
||||
src.occupant.client.mouse_pointer_icon = initial(src.occupant.client.mouse_pointer_icon)
|
||||
if(occupant && occupant.client)
|
||||
occupant.client.mouse_pointer_icon = initial(occupant.client.mouse_pointer_icon)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/mecha/combat/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/filter = new (href,href_list)
|
||||
var/datum/topic_input/filter = new(href, href_list)
|
||||
if(filter.get("close"))
|
||||
am = null
|
||||
return
|
||||
/*
|
||||
if(filter.get("saminput"))
|
||||
if(md5(filter.get("saminput")) == am)
|
||||
occupant_message("From the lies of the Antipath, Circuit preserve us.")
|
||||
am = null
|
||||
return
|
||||
*/
|
||||
return
|
||||
@@ -22,17 +22,15 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/combat/durand/relaymove(mob/user,direction)
|
||||
if(defence)
|
||||
if(world.time - last_message > 20)
|
||||
src.occupant_message("<font color='red'>Unable to move while in defence mode</font>")
|
||||
occupant_message("<font color='red'>Unable to move while in defence mode</font>")
|
||||
last_message = world.time
|
||||
return 0
|
||||
. = ..()
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/combat/durand/verb/defence_mode()
|
||||
@@ -40,17 +38,16 @@
|
||||
set name = "Toggle defence mode"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
if(usr != occupant)
|
||||
return
|
||||
defence = !defence
|
||||
if(defence)
|
||||
deflect_chance = defence_deflect
|
||||
src.occupant_message("<font color='blue'>You enable [src] defence mode.</font>")
|
||||
occupant_message("<font color='blue'>You enable [src] defence mode.</font>")
|
||||
else
|
||||
deflect_chance = initial(deflect_chance)
|
||||
src.occupant_message("<font color='red'>You disable [src] defence mode.</font>")
|
||||
src.log_message("Toggled defence mode.")
|
||||
return
|
||||
occupant_message("<font color='red'>You disable [src] defence mode.</font>")
|
||||
log_message("Toggled defence mode.")
|
||||
|
||||
|
||||
/obj/mecha/combat/durand/get_stats_part()
|
||||
@@ -72,8 +69,7 @@
|
||||
/obj/mecha/combat/durand/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_defence_mode"])
|
||||
src.defence_mode()
|
||||
return
|
||||
defence_mode()
|
||||
|
||||
/obj/mecha/combat/durand/old
|
||||
desc = "A retired, third-generation combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/gygax/dark
|
||||
desc = "A lightweight exosuit, painted in a dark scheme. This model appears to have some modifications."
|
||||
@@ -51,7 +50,6 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/gygax/dark/add_cell(var/obj/item/weapon/stock_parts/cell/C=null)
|
||||
if(C)
|
||||
@@ -68,31 +66,30 @@
|
||||
set name = "Toggle leg actuators overload"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
if(usr != occupant)
|
||||
return
|
||||
if(overload)
|
||||
overload = 0
|
||||
step_in = initial(step_in)
|
||||
step_energy_drain = initial(step_energy_drain)
|
||||
src.occupant_message("<font color='blue'>You disable leg actuators overload.</font>")
|
||||
occupant_message("<font color='blue'>You disable leg actuators overload.</font>")
|
||||
else
|
||||
overload = 1
|
||||
step_in = min(1, round(step_in/2))
|
||||
step_energy_drain = step_energy_drain*overload_coeff
|
||||
src.occupant_message("<font color='red'>You enable leg actuators overload.</font>")
|
||||
src.log_message("Toggled leg actuators overload.")
|
||||
return
|
||||
occupant_message("<font color='red'>You enable leg actuators overload.</font>")
|
||||
log_message("Toggled leg actuators overload.")
|
||||
|
||||
/obj/mecha/combat/gygax/dyndomove(direction)
|
||||
if(!..()) return
|
||||
/obj/mecha/combat/gygax/domove(direction)
|
||||
if(!..())
|
||||
return
|
||||
if(overload)
|
||||
health--
|
||||
if(health < initial(health) - initial(health)/3)
|
||||
if(health < initial(health) - initial(health) / 3)
|
||||
overload = 0
|
||||
step_in = initial(step_in)
|
||||
step_energy_drain = initial(step_energy_drain)
|
||||
src.occupant_message("<font color='red'>Leg actuators damage threshold exceded. Disabling overload.</font>")
|
||||
return
|
||||
occupant_message("<font color='red'>Leg actuators damage threshold exceded. Disabling overload.</font>")
|
||||
|
||||
|
||||
/obj/mecha/combat/gygax/get_stats_part()
|
||||
@@ -114,5 +111,4 @@
|
||||
/obj/mecha/combat/gygax/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_leg_overload"])
|
||||
src.overload()
|
||||
return
|
||||
overload()
|
||||
@@ -24,7 +24,6 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/honker/get_stats_part()
|
||||
var/integrity = health/initial(health)*100
|
||||
@@ -45,13 +44,13 @@
|
||||
<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>
|
||||
[src.dna?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[src.dna]</span> \[<a href='?src=\ref[src];reset_dna=1'>Reset</a>\]<br>":null]
|
||||
[dna?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna]</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>
|
||||
<head><title>[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;}
|
||||
@@ -90,14 +89,14 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id='content'>
|
||||
[src.get_stats_part()]
|
||||
[get_stats_part()]
|
||||
</div>
|
||||
<div id='eq_list'>
|
||||
[src.get_equipment_list()]
|
||||
[get_equipment_list()]
|
||||
</div>
|
||||
<hr>
|
||||
<div id='commands'>
|
||||
[src.get_commands()]
|
||||
[get_commands()]
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -23,6 +23,20 @@
|
||||
force = 45
|
||||
max_equip = 4
|
||||
|
||||
|
||||
/obj/mecha/combat/marauder/loaded/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
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)
|
||||
smoke_system.set_up(3, 0, src)
|
||||
smoke_system.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 = "Seraph"
|
||||
@@ -36,6 +50,24 @@
|
||||
force = 55
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/seraph/loaded/New()
|
||||
..()//Let it equip whatever is needed.
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
if(equipment.len)//Now to remove it and equip anew.
|
||||
for(ME in equipment)
|
||||
equipment -= ME
|
||||
qdel(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 = "Mauler"
|
||||
@@ -56,47 +88,14 @@
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
src.smoke_system.set_up(3, 0, src)
|
||||
src.smoke_system.attach(src)
|
||||
return
|
||||
smoke_system.set_up(3, 0, src)
|
||||
smoke_system.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/loaded/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
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)
|
||||
src.smoke_system.set_up(3, 0, src)
|
||||
src.smoke_system.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/marauder/seraph/loaded/New()
|
||||
..()//Let it equip whatever is needed.
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
if(equipment.len)//Now to remove it and equip anew.
|
||||
for(ME in equipment)
|
||||
equipment -= ME
|
||||
qdel(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)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/marauder/relaymove(mob/user,direction)
|
||||
if(zoom)
|
||||
if(world.time - last_message > 20)
|
||||
src.occupant_message("Unable to move while in zoom mode.")
|
||||
occupant_message("Unable to move while in zoom mode.")
|
||||
last_message = world.time
|
||||
return 0
|
||||
return ..()
|
||||
@@ -113,14 +112,13 @@
|
||||
set name = "Toggle thrusters"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
if(usr != occupant)
|
||||
return
|
||||
if(src.occupant)
|
||||
if(occupant)
|
||||
if(get_charge() > 0)
|
||||
thrusters = !thrusters
|
||||
src.log_message("Toggled thrusters.")
|
||||
src.occupant_message("<font color='[src.thrusters?"blue":"red"]'>Thrusters [thrusters?"en":"dis"]abled.")
|
||||
return
|
||||
log_message("Toggled thrusters.")
|
||||
occupant_message("<font color='[thrusters?"blue":"red"]'>Thrusters [thrusters?"en":"dis"]abled.")
|
||||
|
||||
|
||||
/obj/mecha/combat/marauder/verb/smoke()
|
||||
@@ -128,42 +126,33 @@
|
||||
set name = "Smoke"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
if(usr != occupant)
|
||||
return
|
||||
if(smoke_ready && smoke>0)
|
||||
src.smoke_system.start()
|
||||
smoke_system.start()
|
||||
smoke--
|
||||
smoke_ready = 0
|
||||
spawn(smoke_cooldown)
|
||||
smoke_ready = 1
|
||||
return
|
||||
|
||||
/obj/mecha/combat/marauder/verb/zoom()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Zoom"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
if(usr != occupant)
|
||||
return
|
||||
if(src.occupant.client)
|
||||
src.zoom = !src.zoom
|
||||
src.log_message("Toggled zoom mode.")
|
||||
src.occupant_message("<font color='[src.zoom?"blue":"red"]'>Zoom mode [zoom?"en":"dis"]abled.</font>")
|
||||
if(occupant.client)
|
||||
zoom = !zoom
|
||||
log_message("Toggled zoom mode.")
|
||||
occupant_message("<font color='[zoom?"blue":"red"]'>Zoom mode [zoom?"en":"dis"]abled.</font>")
|
||||
if(zoom)
|
||||
src.occupant.client.view = 12
|
||||
to_chat(src.occupant, sound('sound/mecha/imag_enh.ogg',volume=50))
|
||||
occupant.client.view = 12
|
||||
to_chat(occupant, sound('sound/mecha/imag_enh.ogg',volume=50))
|
||||
else
|
||||
src.occupant.client.view = world.view//world.view - default mob view size
|
||||
return
|
||||
occupant.client.view = initial(occupant.client.view)
|
||||
|
||||
|
||||
/obj/mecha/combat/marauder/go_out()
|
||||
if(src.occupant && src.occupant.client)
|
||||
src.occupant.client.view = world.view
|
||||
src.zoom = 0
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/combat/marauder/get_stats_part()
|
||||
var/output = ..()
|
||||
@@ -190,9 +179,8 @@
|
||||
/obj/mecha/combat/marauder/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_thrusters"])
|
||||
src.toggle_thrusters()
|
||||
toggle_thrusters()
|
||||
if(href_list["smoke"])
|
||||
src.smoke()
|
||||
smoke()
|
||||
if(href_list["toggle_zoom"])
|
||||
src.zoom()
|
||||
return
|
||||
zoom()
|
||||
@@ -23,53 +23,49 @@
|
||||
|
||||
/obj/mecha/combat/phazon/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/rcd
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/rcd
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/gravcatapult
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/phazon/Bump(var/atom/obstacle)
|
||||
if(phasing && get_charge()>=phasing_energy_drain)
|
||||
if(phasing && get_charge() >= phasing_energy_drain)
|
||||
spawn()
|
||||
if(can_move)
|
||||
can_move = 0
|
||||
flick("phazon-phase", src)
|
||||
src.loc = get_step(src,src.dir)
|
||||
src.use_power(phasing_energy_drain)
|
||||
sleep(step_in*3)
|
||||
forceMove(get_step(src, dir))
|
||||
use_power(phasing_energy_drain)
|
||||
sleep(step_in * 3)
|
||||
can_move = 1
|
||||
else
|
||||
. = ..()
|
||||
return
|
||||
|
||||
/obj/mecha/combat/phazon/click_action(atom/target,mob/user)
|
||||
if(phasing)
|
||||
src.occupant_message("Unable to interact with objects while phasing")
|
||||
occupant_message("Unable to interact with objects while phasing")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/obj/mecha/combat/phazon/verb/switch_damtype()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Reconfigure arm microtool arrays"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
if(usr != occupant)
|
||||
return
|
||||
var/new_damtype = alert(src.occupant,"Arm Tool Selection",null,"Fists","Torch","Toxic Injector")
|
||||
var/new_damtype = alert(occupant, "Arm Tool Selection", null, "Fists", "Torch", "Toxic Injector")
|
||||
switch(new_damtype)
|
||||
if("Fists")
|
||||
damtype = "brute"
|
||||
src.occupant_message("Your exosuit's hands form into fists.")
|
||||
occupant_message("Your exosuit's hands form into fists.")
|
||||
if("Torch")
|
||||
damtype = "fire"
|
||||
src.occupant_message("A torch tip extends from your exosuit's hand, glowing red.")
|
||||
occupant_message("A torch tip extends from your exosuit's hand, glowing red.")
|
||||
if("Toxic injector")
|
||||
damtype = "tox"
|
||||
src.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
|
||||
occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
|
||||
playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/phazon/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
@@ -86,9 +82,8 @@
|
||||
/obj/mecha/combat/phazon/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["switch_damtype"])
|
||||
src.switch_damtype()
|
||||
switch_damtype()
|
||||
if(href_list["phasing"])
|
||||
phasing = !phasing
|
||||
send_byjax(src.occupant,"exosuit.browser","phasing_command","[phasing?"Dis":"En"]able phasing")
|
||||
src.occupant_message("<font color=\"[phasing?"#00f\">En":"#f00\">Dis"]abled phasing.</font>")
|
||||
return
|
||||
send_byjax(occupant,"exosuit.browser","phasing_command","[phasing?"Dis":"En"]able phasing")
|
||||
occupant_message("<font color=\"[phasing?"#00f\">En":"#f00\">Dis"]abled phasing.</font>")
|
||||
@@ -21,5 +21,5 @@
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine/silenced
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/mimercd //HAHA IT MAKES WALLS GET IT
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/mimercd //HAHA IT MAKES WALLS GET IT
|
||||
ME.attach(src)
|
||||
@@ -15,20 +15,9 @@
|
||||
var/range = MELEE //bitflags
|
||||
reliability = 1000
|
||||
var/salvageable = 1
|
||||
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(target=1)
|
||||
sleep(equip_cooldown)
|
||||
set_ready_state(1)
|
||||
if(target && chassis)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/New()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/update_chassis_page()
|
||||
if(chassis)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list())
|
||||
@@ -49,23 +38,32 @@
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
src.update_chassis_page()
|
||||
chassis.occupant_message("<font color='red'>The [src] is destroyed!</font>")
|
||||
chassis.occupant_message("<span class='danger'>The [src] is destroyed!</span>")
|
||||
chassis.log_append_to_last("[src] is destroyed.",1)
|
||||
if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon))
|
||||
to_chat(chassis.occupant, sound('sound/mecha/weapdestr.ogg',volume=50))
|
||||
chassis.occupant << sound('sound/mecha/weapdestr.ogg', volume = 50)
|
||||
else
|
||||
to_chat(chassis.occupant, sound('sound/mecha/critdestr.ogg',volume=50))
|
||||
chassis.occupant << sound('sound/mecha/critdestr.ogg', volume = 50)
|
||||
chassis = null
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
log_message("Critical failure",1)
|
||||
log_message("Critical failure", 1)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [chassis.selected==src?"<b>":"<a href='?src=\ref[chassis];select_equip=\ref[src]'>"][src.name][chassis.selected==src?"</b>":"</a>"]"
|
||||
if(!chassis)
|
||||
return
|
||||
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> "
|
||||
if(chassis.selected == src)
|
||||
txt += "<b>[name]</b>"
|
||||
else if(selectable)
|
||||
txt += "<a href='?src=\ref[chassis];select_equip=\ref[src]'>[name]</a>"
|
||||
else
|
||||
txt += "[name]"
|
||||
|
||||
return txt
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
|
||||
return range&RANGED
|
||||
@@ -73,7 +71,6 @@
|
||||
/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
|
||||
@@ -88,27 +85,42 @@
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||
return
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M as obj)
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
addtimer(src, "set_ready_state", equip_cooldown, FALSE, 1)
|
||||
|
||||
/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)
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M)
|
||||
if(istype(M))
|
||||
if(M.equipment.len<M.max_equip)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M as obj)
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
|
||||
M.equipment += src
|
||||
chassis = M
|
||||
src.loc = M
|
||||
loc = M
|
||||
M.log_message("[src] initialized.")
|
||||
if(!M.selected)
|
||||
M.selected = src
|
||||
src.update_chassis_page()
|
||||
return
|
||||
update_chassis_page()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/detach(atom/moveto=null)
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/detach(atom/moveto = null)
|
||||
moveto = moveto || get_turf(chassis)
|
||||
if(src.Move(moveto))
|
||||
if(Move(moveto))
|
||||
chassis.equipment -= src
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
@@ -116,27 +128,22 @@
|
||||
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"])
|
||||
src.detach()
|
||||
return
|
||||
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("[bicon(src)] [message]")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/log_message(message)
|
||||
if(chassis)
|
||||
chassis.log_message("<i>[src]:</i> [message]")
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,136 @@
|
||||
// Drill, Diamond drill, Mining scanner
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill
|
||||
name = "exosuit drill"
|
||||
desc = "Equipment for engineering and combat exosuits. This is the drill that'll pierce the heavens!"
|
||||
icon_state = "mecha_drill"
|
||||
equip_cooldown = 30
|
||||
energy_drain = 10
|
||||
force = 15
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/action(atom/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(istype(target, /turf/space))
|
||||
return
|
||||
if(isobj(target))
|
||||
var/obj/target_obj = target
|
||||
if(target_obj.unacidable)
|
||||
return
|
||||
target.visible_message("<span class='warning'>[chassis] starts to drill [target].</span>",
|
||||
"<span class='userdanger'>[chassis] starts to drill [target]...</span>",
|
||||
blind_message = "<span class='italics'>You hear drilling.</span>")
|
||||
if(do_after_cooldown(target))
|
||||
if(isturf(target))
|
||||
var/turf/T = target
|
||||
T.drill_act(src)
|
||||
else
|
||||
log_message("Drilled through [target]")
|
||||
if(isliving(target))
|
||||
if(istype(src , /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
||||
drill_mob(target, chassis.occupant, 120)
|
||||
else
|
||||
drill_mob(target, chassis.occupant)
|
||||
else
|
||||
target.ex_act(2)
|
||||
|
||||
/turf/proc/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
return
|
||||
|
||||
/turf/simulated/floor/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
ex_act(1)
|
||||
|
||||
/turf/simulated/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
ex_act(2)
|
||||
|
||||
/turf/simulated/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(istype(drill, /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
||||
if(drill.do_after_cooldown(src))//To slow down how fast mechs can drill through the station
|
||||
drill.log_message("Drilled through [src]")
|
||||
ex_act(3)
|
||||
else
|
||||
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")
|
||||
|
||||
/turf/simulated/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
for(var/turf/simulated/mineral/M in range(drill.chassis, 1))
|
||||
if(get_dir(drill.chassis, M) & drill.chassis.dir)
|
||||
M.gets_drilled()
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.move_ores()
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(istype(drill, /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
||||
for(var/turf/simulated/floor/plating/airless/asteroid/M in range(1, src))
|
||||
M.gets_drilled()
|
||||
else
|
||||
for(var/turf/simulated/floor/plating/airless/asteroid/M in range(1, drill.chassis))
|
||||
if(get_dir(drill.chassis, M) & drill.chassis.dir)
|
||||
M.gets_drilled()
|
||||
drill.log_message("Drilled through [src]")
|
||||
drill.move_ores()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/proc/move_ores()
|
||||
if(locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in chassis.equipment)
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/weapon/ore/ore in range(1, chassis))
|
||||
if(get_dir(chassis, ore) & chassis.dir)
|
||||
ore.Move(ore_box)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/mecha/M)
|
||||
if(..())
|
||||
if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user, var/drill_damage=80)
|
||||
target.visible_message("<span class='danger'>[chassis] drills [target] with [src].</span>", \
|
||||
"<span class='userdanger'>[chassis] drills [target] with [src].</span>")
|
||||
add_logs(user, target, "attacked", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
if(target.stat == DEAD && target.butcher_results)
|
||||
target.harvest(chassis) // Butcher the mob with our drill.
|
||||
else
|
||||
target.take_organ_damage(drill_damage)
|
||||
|
||||
if(target)
|
||||
target.Paralyse(10)
|
||||
target.updatehealth()
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
|
||||
name = "diamond-tipped exosuit drill"
|
||||
desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!"
|
||||
icon_state = "mecha_diamond_drill"
|
||||
origin_tech = "materials=4;engineering=4"
|
||||
equip_cooldown = 20
|
||||
force = 15
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner
|
||||
name = "exosuit mining scanner"
|
||||
desc = "Equipment for engineering and combat exosuits. It will automatically check surrounding rock for useful minerals."
|
||||
icon_state = "mecha_analyzer"
|
||||
origin_tech = "materials=3;engineering=2"
|
||||
selectable = 0
|
||||
equip_cooldown = 30
|
||||
var/scanning = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/New()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/process()
|
||||
if(!loc)
|
||||
processing_objects.Remove(src)
|
||||
qdel(src)
|
||||
if(scanning)
|
||||
return
|
||||
if(istype(loc,/obj/mecha/working))
|
||||
var/obj/mecha/working/mecha = loc
|
||||
if(!mecha.occupant)
|
||||
return
|
||||
var/list/occupant = list()
|
||||
occupant |= mecha.occupant
|
||||
scanning = 1
|
||||
mineral_scan_pulse(occupant,get_turf(loc))
|
||||
spawn(equip_cooldown)
|
||||
scanning = 0
|
||||
@@ -0,0 +1,494 @@
|
||||
// Teleporter, Wormhole generator, Gravitational catapult, Armor booster modules,
|
||||
// Repair droid, Tesla Energy relay, Generators
|
||||
|
||||
////////////////////////////////////////////// TELEPORTER ///////////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
name = "mounted teleporter"
|
||||
desc = "An exosuit module that allows exosuits to teleport to any position in view."
|
||||
icon_state = "mecha_teleport"
|
||||
origin_tech = "bluespace=10"
|
||||
equip_cooldown = 150
|
||||
energy_drain = 1000
|
||||
range = RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
||||
if(!action_checks(target) || !is_teleport_allowed(loc.z))
|
||||
return
|
||||
var/turf/T = get_turf(target)
|
||||
if(T)
|
||||
do_teleport(chassis, T, 4)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////// WORMHOLE GENERATOR //////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/wormhole_generator
|
||||
name = "mounted wormhole generator"
|
||||
desc = "An exosuit module that allows generating of small quasi-stable wormholes."
|
||||
icon_state = "mecha_wholegen"
|
||||
origin_tech = "bluespace=3"
|
||||
equip_cooldown = 50
|
||||
energy_drain = 300
|
||||
range = RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
|
||||
if(!action_checks(target) || !is_teleport_allowed(loc.z))
|
||||
return
|
||||
var/list/theareas = get_areas_in_range(100, chassis)
|
||||
if(!theareas.len)
|
||||
return
|
||||
var/area/thearea = pick(theareas)
|
||||
var/list/L = list()
|
||||
var/turf/pos = get_turf(src)
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.density && pos.z == T.z)
|
||||
var/clear = 1
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
clear = 0
|
||||
break
|
||||
if(clear)
|
||||
L+=T
|
||||
if(!L.len)
|
||||
return
|
||||
var/turf/target_turf = pick(L)
|
||||
if(!target_turf)
|
||||
return
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(target), target_turf)
|
||||
P.icon = 'icons/obj/objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[chassis.occupant]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[chassis.occupant]'>FLW</A>) used a Wormhole Generator in ([loc.x],[loc.y],[loc.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>)",0,1)
|
||||
log_game("[key_name(chassis.occupant)] used a Wormhole Generator in ([loc.x],[loc.y],[loc.z])")
|
||||
src = null
|
||||
spawn(rand(150,300))
|
||||
qdel(P)
|
||||
return 1
|
||||
|
||||
/////////////////////////////////////// GRAVITATIONAL CATAPULT ///////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/gravcatapult
|
||||
name = "mounted gravitational catapult"
|
||||
desc = "An exosuit mounted Gravitational Catapult."
|
||||
icon_state = "mecha_teleport"
|
||||
origin_tech = "bluespace=2;magnets=3"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 100
|
||||
range = MELEE|RANGED
|
||||
var/atom/movable/locked
|
||||
var/mode = 1 //1 - gravsling 2 - gravpush
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/gravcatapult/action(atom/movable/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
switch(mode)
|
||||
if(1)
|
||||
if(!locked)
|
||||
if(!istype(target) || target.anchored)
|
||||
occupant_message("Unable to lock on [target]")
|
||||
return
|
||||
locked = target
|
||||
occupant_message("Locked on [target]")
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
else if(target!=locked)
|
||||
if(locked in view(chassis))
|
||||
locked.throw_at(target, 14, 1.5)
|
||||
locked = null
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
return 1
|
||||
else
|
||||
locked = null
|
||||
occupant_message("Lock on [locked] disengaged.")
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
if(2)
|
||||
var/list/atoms = list()
|
||||
if(isturf(target))
|
||||
atoms = range(3, target)
|
||||
else
|
||||
atoms = orange(3, target)
|
||||
for(var/atom/movable/A in atoms)
|
||||
if(A.anchored) continue
|
||||
spawn(0)
|
||||
var/iter = 5-get_dist(A,target)
|
||||
for(var/i=0 to iter)
|
||||
step_away(A,target)
|
||||
sleep(2)
|
||||
var/turf/T = get_turf(target)
|
||||
log_game("[chassis.occupant.ckey]([chassis.occupant]) used a Gravitational Catapult in ([T.x],[T.y],[T.z])")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/gravcatapult/get_equip_info()
|
||||
return "[..()] [mode==1?"([locked||"Nothing"])":null] \[<a href='?src=\ref[src];mode=1'>S</a>|<a href='?src=\ref[src];mode=2'>P</a>\]"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/gravcatapult/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["mode"])
|
||||
mode = text2num(href_list["mode"])
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
return
|
||||
|
||||
//////////////////////////// ARMOR BOOSTER MODULES //////////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster //what is that noise? A BAWWW from TK mutants.
|
||||
name = "Armor Booster Module (Close Combat Weaponry)"
|
||||
desc = "Boosts exosuit armor against armed melee attacks. Requires energy to operate."
|
||||
icon_state = "mecha_abooster_ccw"
|
||||
origin_tech = "materials=3"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 50
|
||||
range = 0
|
||||
var/deflect_coeff = 1.15
|
||||
var/damage_coeff = 0.8
|
||||
selectable = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/proc/attack_react(mob/user as mob)
|
||||
if(action_checks(user))
|
||||
start_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster
|
||||
name = "Armor Booster Module (Ranged Weaponry)"
|
||||
desc = "Boosts exosuit armor against ranged attacks. Completely blocks taser shots. Requires energy to operate."
|
||||
icon_state = "mecha_abooster_proj"
|
||||
origin_tech = "materials=4"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 50
|
||||
range = 0
|
||||
var/deflect_coeff = 1.15
|
||||
var/damage_coeff = 0.8
|
||||
selectable = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/projectile_react()
|
||||
if(action_checks(src))
|
||||
start_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
////////////////////////////////// REPAIR DROID //////////////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid
|
||||
name = "Repair Droid"
|
||||
desc = "Automated repair droid. Scans exosuit for damage and repairs it. Can fix almost all types of external or internal damage."
|
||||
icon_state = "repair_droid"
|
||||
origin_tech = "magnets=3;programming=3"
|
||||
equip_cooldown = 20
|
||||
energy_drain = 100
|
||||
range = 0
|
||||
var/health_boost = 1
|
||||
var/icon/droid_overlay
|
||||
var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH)
|
||||
selectable = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
if(chassis)
|
||||
chassis.overlays -= droid_overlay
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/mecha/M)
|
||||
..()
|
||||
droid_overlay = new(icon, icon_state = "repair_droid")
|
||||
M.overlays += droid_overlay
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
|
||||
chassis.overlays -= droid_overlay
|
||||
processing_objects.Remove(src)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [name] - <a href='?src=\ref[src];toggle_repairs=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_repairs"])
|
||||
chassis.overlays -= droid_overlay
|
||||
if(equip_ready)
|
||||
processing_objects.Add(src)
|
||||
droid_overlay = new(icon, icon_state = "repair_droid_a")
|
||||
log_message("Activated.")
|
||||
set_ready_state(0)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
droid_overlay = new(icon, icon_state = "repair_droid")
|
||||
log_message("Deactivated.")
|
||||
set_ready_state(1)
|
||||
chassis.overlays += droid_overlay
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
|
||||
if(!chassis)
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
return
|
||||
var/h_boost = health_boost
|
||||
var/repaired = 0
|
||||
if(chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
|
||||
h_boost *= -2
|
||||
else if(chassis.internal_damage && prob(15))
|
||||
for(var/int_dam_flag in repairable_damage)
|
||||
if(chassis.internal_damage & int_dam_flag)
|
||||
chassis.clearInternalDamage(int_dam_flag)
|
||||
repaired = 1
|
||||
break
|
||||
if(health_boost<0 || chassis.health < initial(chassis.health))
|
||||
chassis.health += min(health_boost, initial(chassis.health)-chassis.health)
|
||||
repaired = 1
|
||||
if(repaired)
|
||||
if(!chassis.use_power(energy_drain))
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
else //no repair needed, we turn off
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
chassis.overlays -= droid_overlay
|
||||
droid_overlay = new(icon, icon_state = "repair_droid")
|
||||
chassis.overlays += droid_overlay
|
||||
|
||||
/////////////////////////////////// TESLA ENERGY RELAY ////////////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
name = "exosuit energy relay"
|
||||
desc = "An exosuit module that wirelessly drains energy from any available power channel in area. The performance index is quite low."
|
||||
icon_state = "tesla"
|
||||
origin_tech = "magnets=4;powerstorage=4;engineering=4"
|
||||
energy_drain = 0
|
||||
range = 0
|
||||
var/coeff = 100
|
||||
var/list/use_channels = list(EQUIP,ENVIRON,LIGHT)
|
||||
selectable = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
|
||||
if(equip_ready) //disabled
|
||||
return
|
||||
var/area/A = get_area(chassis)
|
||||
var/pow_chan = get_power_channel(A)
|
||||
if(pow_chan)
|
||||
return 1000 //making magic
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(var/area/A)
|
||||
var/pow_chan
|
||||
if(A)
|
||||
for(var/c in use_channels)
|
||||
if(A.powered(c))
|
||||
pow_chan = c
|
||||
break
|
||||
return pow_chan
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle_relay"])
|
||||
if(equip_ready) //inactive
|
||||
processing_objects.Add(src)
|
||||
set_ready_state(0)
|
||||
log_message("Activated.")
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [name] - <a href='?src=\ref[src];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
|
||||
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
return
|
||||
var/cur_charge = chassis.get_charge()
|
||||
if(isnull(cur_charge) || !chassis.cell)
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
occupant_message("No powercell detected.")
|
||||
return
|
||||
if(cur_charge < chassis.cell.maxcharge)
|
||||
var/area/A = get_area(chassis)
|
||||
if(A)
|
||||
var/pow_chan
|
||||
for(var/c in list(EQUIP,ENVIRON,LIGHT))
|
||||
if(A.powered(c))
|
||||
pow_chan = c
|
||||
break
|
||||
if(pow_chan)
|
||||
var/delta = min(20, chassis.cell.maxcharge-cur_charge)
|
||||
chassis.give_power(delta)
|
||||
A.use_power(delta*coeff, pow_chan)
|
||||
|
||||
/////////////////////////////////////////// GENERATOR /////////////////////////////////////////////
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator
|
||||
name = "exosuit plasma converter"
|
||||
desc = "An exosuit module that generates power using solid plasma as fuel. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
origin_tech = "plasmatech=2;powerstorage=2;engineering=2"
|
||||
range = MELEE
|
||||
var/coeff = 100
|
||||
var/fuel_type = MAT_PLASMA
|
||||
var/max_fuel = 150000
|
||||
var/fuel_name = "plasma" // Our fuel name as a string
|
||||
var/fuel_amount = 0
|
||||
var/fuel_per_cycle_idle = 10
|
||||
var/fuel_per_cycle_active = 100
|
||||
var/power_per_cycle = 30
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/New()
|
||||
..()
|
||||
generator_init()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/generator_init()
|
||||
fuel_amount = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/detach()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle"])
|
||||
if(equip_ready) //inactive
|
||||
set_ready_state(0)
|
||||
processing_objects.Add(src)
|
||||
log_message("Activated.")
|
||||
else
|
||||
set_ready_state(1)
|
||||
processing_objects.Remove(src)
|
||||
log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[[fuel_name]: [round(fuel_amount,0.1)] cm<sup>3</sup>\] - <a href='?src=\ref[src];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/action(target)
|
||||
if(chassis)
|
||||
var/result = load_fuel(target)
|
||||
if(result)
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/I)
|
||||
if(istype(I) && (fuel_type in I.materials))
|
||||
if(istype(I, /obj/item/stack/sheet))
|
||||
var/obj/item/stack/sheet/P = I
|
||||
var/to_load = max(max_fuel - P.amount*P.perunit,0)
|
||||
if(to_load)
|
||||
var/units = min(max(round(to_load / P.perunit),1),P.amount)
|
||||
if(units)
|
||||
var/added_fuel = units * P.perunit
|
||||
fuel_amount += added_fuel
|
||||
P.use(units)
|
||||
occupant_message("[units] unit\s of [fuel_name] successfully loaded.")
|
||||
return added_fuel
|
||||
else
|
||||
occupant_message("Unit is full.")
|
||||
return 0
|
||||
else // Some other object containing our fuel's type, so we just eat it (ores mainly)
|
||||
var/to_load = max(min(I.materials[fuel_type], max_fuel - fuel_amount),0)
|
||||
if(to_load == 0)
|
||||
return 0
|
||||
fuel_amount += to_load
|
||||
qdel(I)
|
||||
return to_load
|
||||
|
||||
else if(istype(I, /obj/structure/ore_box))
|
||||
var/fuel_added = 0
|
||||
for(var/baz in I.contents)
|
||||
var/obj/item/O = baz
|
||||
if(fuel_type in O.materials)
|
||||
fuel_added = load_fuel(O)
|
||||
break
|
||||
return fuel_added
|
||||
|
||||
else
|
||||
occupant_message("<span class='warning'>[fuel_name] traces in target minimal! [I] cannot be used as fuel.</span>")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params)
|
||||
load_fuel(weapon)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/critfail()
|
||||
..()
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
var/datum/gas_mixture/GM = new
|
||||
if(prob(10))
|
||||
GM.toxins += 100
|
||||
GM.temperature = 1500+T0C //should be enough to start a fire
|
||||
T.visible_message("[src] suddenly disgorges a cloud of heated plasma.")
|
||||
qdel(src)
|
||||
else
|
||||
GM.toxins += 5
|
||||
GM.temperature = istype(T) ? T.air.return_temperature() : T20C
|
||||
T.visible_message("[src] suddenly disgorges a cloud of plasma.")
|
||||
T.assume_air(GM)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/process()
|
||||
if(!chassis)
|
||||
processing_objects.Remove(src)
|
||||
set_ready_state(1)
|
||||
return
|
||||
if(fuel_amount<=0)
|
||||
processing_objects.Remove(src)
|
||||
log_message("Deactivated - no fuel.")
|
||||
set_ready_state(1)
|
||||
return
|
||||
var/cur_charge = chassis.get_charge()
|
||||
if(isnull(cur_charge))
|
||||
set_ready_state(1)
|
||||
occupant_message("No powercell detected.")
|
||||
log_message("Deactivated.")
|
||||
processing_objects.Remove(src)
|
||||
return
|
||||
var/use_fuel = fuel_per_cycle_idle
|
||||
if(cur_charge < chassis.cell.maxcharge)
|
||||
use_fuel = fuel_per_cycle_active
|
||||
chassis.give_power(power_per_cycle)
|
||||
fuel_amount -= min(use_fuel, fuel_amount)
|
||||
update_equip_info()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear
|
||||
name = "exonuclear reactor"
|
||||
desc = "An exosuit module that generates power using uranium as fuel. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
origin_tech = "powerstorage=4;engineering=4"
|
||||
fuel_name = "uranium" // Our fuel name as a string
|
||||
fuel_type = MAT_URANIUM
|
||||
max_fuel = 50000
|
||||
fuel_per_cycle_idle = 10
|
||||
fuel_per_cycle_active = 30
|
||||
power_per_cycle = 50
|
||||
var/rad_per_cycle = 0.3
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
|
||||
fuel_amount = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/critfail()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/process()
|
||||
if(..())
|
||||
for(var/mob/living/carbon/M in view(chassis))
|
||||
M.apply_effect((rad_per_cycle * 3),IRRADIATE,0)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,452 @@
|
||||
//Hydraulic clamp, Kill clamp, Extinguisher, RCD, Mime RCD, Cable layer.
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp
|
||||
name = "hydraulic clamp"
|
||||
desc = "Equipment for engineering exosuits. Lifts objects and loads them into cargo."
|
||||
icon_state = "mecha_clamp"
|
||||
equip_cooldown = 15
|
||||
energy_drain = 10
|
||||
var/dam_force = 20
|
||||
var/obj/mecha/working/ripley/cargo_holder
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/can_attach(obj/mecha/working/ripley/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/mecha/M)
|
||||
..()
|
||||
cargo_holder = M
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/detach(atom/moveto = null)
|
||||
..()
|
||||
cargo_holder = null
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(atom/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(!cargo_holder)
|
||||
return
|
||||
if(istype(target,/obj))
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
|
||||
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
|
||||
O.anchored = 1
|
||||
if(do_after_cooldown(target))
|
||||
cargo_holder.cargo += O
|
||||
O.loc = chassis
|
||||
O.anchored = 0
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
occupant_message("<span class='warning'>Not enough room in cargo compartment!</span>")
|
||||
else
|
||||
occupant_message("<span class='warning'>[target] is firmly secured!</span>")
|
||||
|
||||
else if(istype(target,/mob/living))
|
||||
var/mob/living/M = target
|
||||
if(M.stat == DEAD) return
|
||||
if(chassis.occupant.a_intent == I_HARM)
|
||||
M.take_overall_damage(dam_force)
|
||||
if(!M)
|
||||
return
|
||||
M.adjustOxyLoss(round(dam_force/2))
|
||||
M.updatehealth()
|
||||
target.visible_message("<span class='danger'>[chassis] squeezes [target].</span>", \
|
||||
"<span class='userdanger'>[chassis] squeezes [target].</span>",\
|
||||
"<span class='italics'>You hear something crack.</span>")
|
||||
add_logs(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])")
|
||||
start_cooldown()
|
||||
else
|
||||
step_away(M,chassis)
|
||||
occupant_message("You push [target] out of the way.")
|
||||
chassis.visible_message("[chassis] pushes [target] out of the way.")
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
//This is pretty much just for the death-ripley
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
|
||||
name = "\improper KILL CLAMP"
|
||||
desc = "They won't know what clamped them!"
|
||||
energy_drain = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target)
|
||||
if(!action_checks(target)) return
|
||||
if(!cargo_holder) return
|
||||
if(istype(target,/obj))
|
||||
var/obj/O = target
|
||||
if(!O.anchored)
|
||||
if(cargo_holder.cargo.len < cargo_holder.cargo_capacity)
|
||||
chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.")
|
||||
O.anchored = 1
|
||||
if(do_after_cooldown(target))
|
||||
cargo_holder.cargo += O
|
||||
O.loc = chassis
|
||||
O.anchored = 0
|
||||
occupant_message("<span class='notice'>[target] successfully loaded.</span>")
|
||||
log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]")
|
||||
else
|
||||
O.anchored = initial(O.anchored)
|
||||
else
|
||||
occupant_message("<span class='warning'>Not enough room in cargo compartment!</span>")
|
||||
else
|
||||
occupant_message("<span class='warning'>[target] is firmly secured!</span>")
|
||||
|
||||
else if(istype(target,/mob/living))
|
||||
var/mob/living/M = target
|
||||
if(M.stat == DEAD) return
|
||||
if(chassis.occupant.a_intent == I_HARM)
|
||||
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>",
|
||||
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
|
||||
M.gib()
|
||||
/*if(chassis.occupant.a_intent == I_DISARM)
|
||||
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>",
|
||||
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")*/
|
||||
else
|
||||
step_away(M,chassis)
|
||||
target.visible_message("[chassis] tosses [target] like a piece of paper.")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher
|
||||
name = "exosuit extinguisher"
|
||||
desc = "Equipment for engineering exosuits. A rapid-firing high capacity fire extinguisher."
|
||||
icon_state = "mecha_exting"
|
||||
equip_cooldown = 5
|
||||
energy_drain = 0
|
||||
range = MELEE|RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/New()
|
||||
create_reagents(1000)
|
||||
reagents.add_reagent("water", 1000)
|
||||
..()
|
||||
return
|
||||
|
||||
/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)
|
||||
return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
|
||||
var/obj/structure/reagent_dispensers/watertank/WT = target
|
||||
WT.reagents.trans_to(src, 1000)
|
||||
occupant_message("<span class='notice'>Extinguisher refilled.</span>")
|
||||
playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
else
|
||||
if(reagents.total_volume > 0)
|
||||
playsound(chassis, 'sound/effects/extinguish.ogg', 75, 1, -3)
|
||||
var/direction = get_dir(chassis,target)
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
spawn(0)
|
||||
for(var/a=0, a<5, a++)
|
||||
var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(chassis))
|
||||
if(!W)
|
||||
return
|
||||
var/turf/my_target = pick(the_targets)
|
||||
var/datum/reagents/R = new/datum/reagents(5)
|
||||
W.reagents = R
|
||||
R.my_atom = W
|
||||
reagents.trans_to(W,1)
|
||||
for(var/b=0, b<4, b++)
|
||||
if(!W)
|
||||
return
|
||||
step_towards(W,my_target)
|
||||
if(!W)
|
||||
return
|
||||
var/turf/W_turf = get_turf(W)
|
||||
W.reagents.reaction(W_turf)
|
||||
for(var/atom/atm in W_turf)
|
||||
W.reagents.reaction(atm)
|
||||
if(W.loc == my_target)
|
||||
break
|
||||
sleep(2)
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/get_equip_info()
|
||||
return "[..()] \[[src.reagents.total_volume]\]"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/on_reagent_change()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/can_attach(obj/mecha/working/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd
|
||||
name = "Mounted RCD"
|
||||
desc = "An exosuit-mounted Rapid Construction Device. (Can be attached to: Any exosuit)"
|
||||
icon_state = "mecha_rcd"
|
||||
origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 250
|
||||
range = MELEE|RANGED
|
||||
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
|
||||
var/canRwall = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/New()
|
||||
rcd_list += src
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/Destroy()
|
||||
rcd_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target)
|
||||
if(istype(target, /turf/space/transit))//>implying these are ever made -Sieve
|
||||
return
|
||||
|
||||
if(!istype(target, /turf) && !istype(target, /obj/machinery/door/airlock))
|
||||
target = get_turf(target)
|
||||
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3)
|
||||
return
|
||||
playsound(chassis, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
switch(mode)
|
||||
if(0)
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
if(istype(target, /turf/simulated/wall/r_wall) && !canRwall)
|
||||
return 0
|
||||
var/turf/simulated/wall/W = target
|
||||
occupant_message("Deconstructing [target]...")
|
||||
if(do_after_cooldown(W))
|
||||
chassis.spark_system.start()
|
||||
W.ChangeTurf(/turf/simulated/floor/plating)
|
||||
playsound(W, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else if(istype(target, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = target
|
||||
occupant_message("Deconstructing [target]...")
|
||||
if(do_after_cooldown(F))
|
||||
chassis.spark_system.start()
|
||||
F.ChangeTurf(/turf/space)
|
||||
F.air_update_turf()
|
||||
playsound(F, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else if(istype(target, /obj/machinery/door/airlock))
|
||||
occupant_message("Deconstructing [target]...")
|
||||
if(do_after_cooldown(target))
|
||||
chassis.spark_system.start()
|
||||
qdel(target)
|
||||
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(1)
|
||||
if(istype(target, /turf/space))
|
||||
var/turf/space/S = target
|
||||
occupant_message("Building Floor...")
|
||||
if(do_after_cooldown(S))
|
||||
S.ChangeTurf(/turf/simulated/floor/plating)
|
||||
playsound(S, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
chassis.spark_system.start()
|
||||
else if(istype(target, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = target
|
||||
occupant_message("Building Wall...")
|
||||
if(do_after_cooldown(F))
|
||||
F.ChangeTurf(/turf/simulated/wall)
|
||||
playsound(F, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
chassis.spark_system.start()
|
||||
if(2)
|
||||
if(istype(target, /turf/simulated/floor))
|
||||
occupant_message("Building Airlock...")
|
||||
if(do_after_cooldown(target))
|
||||
chassis.spark_system.start()
|
||||
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock(target)
|
||||
T.autoclose = 1
|
||||
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(target, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/Topic(href,href_list)
|
||||
..()
|
||||
if(href_list["mode"])
|
||||
mode = text2num(href_list["mode"])
|
||||
switch(mode)
|
||||
if(0)
|
||||
occupant_message("Switched RCD to Deconstruct.")
|
||||
if(1)
|
||||
occupant_message("Switched RCD to Construct.")
|
||||
if(2)
|
||||
occupant_message("Switched RCD to Construct Airlock.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/get_equip_info()
|
||||
return "[..()] \[<a href='?src=\ref[src];mode=0'>D</a>|<a href='?src=\ref[src];mode=1'>C</a>|<a href='?src=\ref[src];mode=2'>A</a>\]"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mimercd
|
||||
name = "mounted MRCD"
|
||||
desc = "An exosuit-mounted Mime Rapid Construction Device. (Can be attached to: Recitence)"
|
||||
icon_state = "mecha_rcd"
|
||||
origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 250
|
||||
range = MELEE|RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mimercd/can_attach(obj/mecha/combat/recitence/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mimercd/action(atom/target)
|
||||
if(istype(target, /turf/space/transit))//>implying these are ever made -Sieve
|
||||
return
|
||||
if(!istype(target, /turf))
|
||||
target = get_turf(target)
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3)
|
||||
return
|
||||
|
||||
if(istype(target, /turf/simulated/floor))
|
||||
occupant_message("Building Wall...")
|
||||
if(do_after_cooldown(target))
|
||||
new /obj/structure/barricade/mime/mrcd(target)
|
||||
chassis.spark_system.start()
|
||||
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer
|
||||
name = "cable layer"
|
||||
desc = "Equipment for engineering exosuits. Lays cable along the exosuit's path."
|
||||
icon_state = "mecha_wire"
|
||||
var/datum/event/event
|
||||
var/turf/old_turf
|
||||
var/obj/structure/cable/last_piece
|
||||
var/obj/item/stack/cable_coil/cable
|
||||
var/max_cable = 1000
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/New()
|
||||
cable = new(src)
|
||||
cable.amount = 0
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/can_attach(obj/mecha/working/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/attach()
|
||||
..()
|
||||
event = chassis.events.addEvent("onMove",src,"layCable")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/detach()
|
||||
chassis.events.clearEvent("onMove",event)
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/Destroy()
|
||||
chassis.events.clearEvent("onMove",event)
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/action(var/obj/item/stack/cable_coil/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(istype(target) && target.amount)
|
||||
var/cur_amount = cable? cable.amount : 0
|
||||
var/to_load = max(max_cable - cur_amount,0)
|
||||
if(to_load)
|
||||
to_load = min(target.amount, to_load)
|
||||
if(!cable)
|
||||
cable = new(src)
|
||||
cable.amount = 0
|
||||
cable.amount += to_load
|
||||
target.use(to_load)
|
||||
occupant_message("<span class='notice'>[to_load] meters of cable successfully loaded.</span>")
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||
else
|
||||
occupant_message("<span class='warning'>Reel is full.</span>")
|
||||
else
|
||||
occupant_message("<span class='warning'>Unable to load [target] - no cable found.</span>")
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/Topic(href,href_list)
|
||||
..()
|
||||
if(href_list["toggle"])
|
||||
set_ready_state(!equip_ready)
|
||||
occupant_message("[src] [equip_ready?"dea":"a"]ctivated.")
|
||||
log_message("[equip_ready?"Dea":"A"]ctivated.")
|
||||
return
|
||||
if(href_list["cut"])
|
||||
if(cable && cable.amount)
|
||||
var/m = round(input(chassis.occupant,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
|
||||
m = min(m, cable.amount)
|
||||
if(m)
|
||||
use_cable(m)
|
||||
var/obj/item/stack/cable_coil/CC = new (get_turf(chassis))
|
||||
CC.amount = m
|
||||
else
|
||||
occupant_message("There's no more cable on the reel.")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[Cable: [cable ? cable.amount : 0] m\][(cable && cable.amount) ? "- <a href='?src=\ref[src];toggle=1'>[!equip_ready?"Dea":"A"]ctivate</a>|<a href='?src=\ref[src];cut=1'>Cut</a>" : null]"
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/use_cable(amount)
|
||||
if(!cable || cable.amount<1)
|
||||
set_ready_state(1)
|
||||
occupant_message("Cable depleted, [src] deactivated.")
|
||||
log_message("Cable depleted, [src] deactivated.")
|
||||
return
|
||||
if(cable.amount < amount)
|
||||
occupant_message("No enough cable to finish the task.")
|
||||
return
|
||||
cable.use(amount)
|
||||
update_equip_info()
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/reset()
|
||||
last_piece = null
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(var/turf/new_turf)
|
||||
if(istype(new_turf, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/T = new_turf
|
||||
if(!istype(T, /turf/simulated/floor/plating))
|
||||
if(!T.broken && !T.burnt)
|
||||
new T.floor_tile(T)
|
||||
T.make_plating()
|
||||
return !new_turf.intact
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/layCable(var/turf/new_turf)
|
||||
if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf))
|
||||
return reset()
|
||||
var/fdirn = turn(chassis.dir,180)
|
||||
for(var/obj/structure/cable/LC in new_turf) // check to make sure there's not a cable there already
|
||||
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
||||
return reset()
|
||||
if(!use_cable(1))
|
||||
return reset()
|
||||
var/obj/structure/cable/NC = new(new_turf)
|
||||
NC.cableColor("red")
|
||||
NC.d1 = 0
|
||||
NC.d2 = fdirn
|
||||
NC.updateicon()
|
||||
|
||||
var/datum/powernet/PN
|
||||
if(last_piece && last_piece.d2 != chassis.dir)
|
||||
last_piece.d1 = min(last_piece.d2, chassis.dir)
|
||||
last_piece.d2 = max(last_piece.d2, chassis.dir)
|
||||
last_piece.updateicon()
|
||||
PN = last_piece.powernet
|
||||
|
||||
if(!PN)
|
||||
PN = new()
|
||||
powernets += PN
|
||||
NC.powernet = PN
|
||||
PN.cables += NC
|
||||
NC.mergeConnectedNetworks(NC.d2)
|
||||
|
||||
//NC.mergeConnectedNetworksOnTurf()
|
||||
last_piece = NC
|
||||
return 1
|
||||
|
||||
+433
-978
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,393 @@
|
||||
|
||||
////////////////////////////////////
|
||||
///// Rendering stats window ///////
|
||||
////////////////////////////////////
|
||||
|
||||
/obj/mecha/proc/get_stats_html()
|
||||
var/output = {"<html>
|
||||
<head><title>[name] data</title>
|
||||
<style>
|
||||
body {color: #00ff00; background: #000000; font-family:"Lucida Console",monospace; font-size: 12px;}
|
||||
hr {border: 1px solid #0f0; color: #0f0; background-color: #0f0;}
|
||||
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 ticker() {
|
||||
setInterval(function(){
|
||||
window.location='byond://?src=\ref[src]&update_content=1';
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
dropdowns();
|
||||
ticker();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='content'>
|
||||
[get_stats_part()]
|
||||
</div>
|
||||
<div id='eq_list'>
|
||||
[get_equipment_list()]
|
||||
</div>
|
||||
<hr>
|
||||
<div id='commands'>
|
||||
[get_commands()]
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/proc/report_internal_damage()
|
||||
var/output = null
|
||||
var/list/dam_reports = list(
|
||||
"[MECHA_INT_FIRE]" = "<font color='red'><b>INTERNAL FIRE</b></font>",
|
||||
"[MECHA_INT_TEMP_CONTROL]" = "<font color='red'><b>LIFE SUPPORT SYSTEM MALFUNCTION</b></font>",
|
||||
"[MECHA_INT_TANK_BREACH]" = "<font color='red'><b>GAS TANK BREACH</b></font>",
|
||||
"[MECHA_INT_CONTROL_LOST]" = "<font color='red'><b>COORDINATION SYSTEM CALIBRATION FAILURE</b></font> - <a href='?src=\ref[src];repair_int_control_lost=1'>Recalibrate</a>",
|
||||
"[MECHA_INT_SHORT_CIRCUIT]" = "<font color='red'><b>SHORT CIRCUIT</b></font>"
|
||||
)
|
||||
for(var/tflag in dam_reports)
|
||||
var/intdamflag = text2num(tflag)
|
||||
if(hasInternalDamage(intdamflag))
|
||||
output += dam_reports[tflag]
|
||||
output += "<br />"
|
||||
if(return_pressure() > WARNING_HIGH_PRESSURE)
|
||||
output += "<font color='red'><b>DANGEROUSLY HIGH CABIN PRESSURE</b></font><br />"
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/proc/get_stats_part()
|
||||
var/integrity = health/initial(health)*100
|
||||
var/cell_charge = get_charge()
|
||||
var/tank_pressure = internal_tank ? round(internal_tank.return_pressure(),0.01) : "None"
|
||||
var/tank_temperature = internal_tank ? internal_tank.return_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]
|
||||
<b>Integrity: </b> [integrity]%<br>
|
||||
<b>Powercell charge: </b>[isnull(cell_charge)?"No powercell installed":"[cell.percent()]%"]<br>
|
||||
<b>Air source: </b>[use_internal_tank?"Internal Airtank":"Environment"]<br>
|
||||
<b>Airtank pressure: </b>[tank_pressure]kPa<br>
|
||||
<b>Airtank temperature: </b>[tank_temperature]°K|[tank_temperature - T0C]°C<br>
|
||||
<b>Cabin pressure: </b>[cabin_pressure>WARNING_HIGH_PRESSURE ? "<font color='red'>[cabin_pressure]</font>": cabin_pressure]kPa<br>
|
||||
<b>Cabin temperature: </b> [return_temperature()]°K|[return_temperature() - T0C]°C<br>
|
||||
<b>Lights: </b>[lights?"on":"off"]<br>
|
||||
[dna?"<b>DNA-locked:</b><br> <span style='font-size:10px;letter-spacing:-1px;'>[dna]</span> \[<a href='?src=\ref[src];reset_dna=1'>Reset</a>\]<br>":null]
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/proc/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Electronics</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_lights=1'>Toggle Lights</a><br>
|
||||
<b>Radio settings:</b><br>
|
||||
Microphone: <a href='?src=\ref[src];rmictoggle=1'><span id="rmicstate">[radio.broadcasting?"Engaged":"Disengaged"]</span></a><br>
|
||||
Speaker: <a href='?src=\ref[src];rspktoggle=1'><span id="rspkstate">[radio.listening?"Engaged":"Disengaged"]</span></a><br>
|
||||
Frequency:
|
||||
<a href='?src=\ref[src];rfreq=-10'>-</a>
|
||||
<a href='?src=\ref[src];rfreq=-2'>-</a>
|
||||
<span id="rfreq">[format_frequency(radio.frequency)]</span>
|
||||
<a href='?src=\ref[src];rfreq=2'>+</a>
|
||||
<a href='?src=\ref[src];rfreq=10'>+</a><br>
|
||||
</div>
|
||||
</div>
|
||||
<div class='wr'>
|
||||
<div class='header'>Airtank</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_airtank=1'>Toggle Internal Airtank Usage</a><br>
|
||||
[(/obj/mecha/verb/disconnect_from_port in verbs)?"<a href='?src=\ref[src];port_disconnect=1'>Disconnect from port</a><br>":null]
|
||||
[(/obj/mecha/verb/connect_to_port in verbs)?"<a href='?src=\ref[src];port_connect=1'>Connect to port</a><br>":null]
|
||||
</div>
|
||||
</div>
|
||||
<div class='wr'>
|
||||
<div class='header'>Permissions & Logging</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_id_upload=1'><span id='t_id_upload'>[add_req_access?"L":"Unl"]ock ID upload panel</span></a><br>
|
||||
<a href='?src=\ref[src];toggle_maint_access=1'><span id='t_maint_access'>[maint_access?"Forbid":"Permit"] maintenance protocols</span></a><br>
|
||||
<a href='?src=\ref[src];dna_lock=1'>DNA-lock</a><br>
|
||||
<a href='?src=\ref[src];view_log=1'>View internal log</a><br>
|
||||
<a href='?src=\ref[src];change_name=1'>Change exosuit name</a><br>
|
||||
</div>
|
||||
</div>
|
||||
<div id='equipment_menu'>[get_equipment_menu()]</div>
|
||||
<hr>
|
||||
[(/obj/mecha/verb/eject in verbs)?"<a href='?src=\ref[src];eject=1'>Eject</a><br>":null]
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/proc/get_equipment_menu() //outputs mecha html equipment menu
|
||||
var/output
|
||||
if(equipment.len)
|
||||
output += {"<div class='wr'>
|
||||
<div class='header'>Equipment</div>
|
||||
<div class='links'>"}
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/W in equipment)
|
||||
output += "[W.name] <a href='?src=\ref[W];detach=1'>Detach</a><br>"
|
||||
output += "<b>Available equipment slots:</b> [max_equip-equipment.len]"
|
||||
output += "</div></div>"
|
||||
return output
|
||||
|
||||
/obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html
|
||||
if(!equipment.len)
|
||||
return
|
||||
var/output = "<b>Equipment:</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/proc/get_log_html()
|
||||
var/output = "<html><head><title>[name] Log</title></head><body style='font: 13px 'Courier', monospace;'>"
|
||||
for(var/list/entry in log)
|
||||
output += {"<div style='font-weight: bold;'>[time2text(entry["time"],"DDD MMM DD hh:mm:ss")] 2555</div>
|
||||
<div style='margin-left:15px; margin-bottom:10px;'>[entry["message"]]</div>
|
||||
"}
|
||||
output += "</body></html>"
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/proc/output_access_dialog(obj/item/weapon/card/id/id_card, mob/user)
|
||||
if(!id_card || !user) return
|
||||
var/output = {"<html>
|
||||
<head><style>
|
||||
h1 {font-size:15px;margin-bottom:4px;}
|
||||
body {color: #00ff00; background: #000000; font-family:"Courier New", Courier, monospace; font-size: 12px;}
|
||||
a {color:#0f0;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Following keycodes are present in this system:</h1>"}
|
||||
for(var/a in operation_req_access)
|
||||
output += "[get_access_desc(a)] - <a href='?src=\ref[src];del_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Delete</a><br>"
|
||||
output += "<hr><h1>Following keycodes were detected on portable device:</h1>"
|
||||
for(var/a in id_card.access)
|
||||
if(a in operation_req_access) continue
|
||||
var/a_name = get_access_desc(a)
|
||||
if(!a_name) continue //there's some strange access without a name
|
||||
output += "[a_name] - <a href='?src=\ref[src];add_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Add</a><br>"
|
||||
output += "<hr><a href='?src=\ref[src];finish_req_access=1;user=\ref[user]'>Finish</a> <font color='red'>(Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)</font>"
|
||||
output += "</body></html>"
|
||||
user << browse(output, "window=exosuit_add_access")
|
||||
onclose(user, "exosuit_add_access")
|
||||
return
|
||||
|
||||
/obj/mecha/proc/output_maintenance_dialog(obj/item/weapon/card/id/id_card,mob/user)
|
||||
if(!id_card || !user) return
|
||||
var/output = {"<html>
|
||||
<head>
|
||||
<style>
|
||||
body {color: #00ff00; background: #000000; font-family:"Courier New", Courier, monospace; font-size: 12px;}
|
||||
a {padding:2px 5px; background:#32CD32;color:#000;display:block;margin:2px;text-align:center;text-decoration:none;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
[add_req_access?"<a href='?src=\ref[src];req_access=1;id_card=\ref[id_card];user=\ref[user]'>Edit operation keycodes</a>":null]
|
||||
[maint_access?"<a href='?src=\ref[src];maint_access=1;id_card=\ref[id_card];user=\ref[user]'>Initiate maintenance protocol</a>":null]
|
||||
[(state>0) ?"<a href='?src=\ref[src];set_internal_tank_valve=1;user=\ref[user]'>Set Cabin Air Pressure</a>":null]
|
||||
</body>
|
||||
</html>"}
|
||||
user << browse(output, "window=exosuit_maint_console")
|
||||
onclose(user, "exosuit_maint_console")
|
||||
return
|
||||
|
||||
|
||||
////////////////////////////////
|
||||
/////// Messages and Log ///////
|
||||
////////////////////////////////
|
||||
|
||||
/obj/mecha/proc/occupant_message(message as text)
|
||||
if(message)
|
||||
if(occupant && occupant.client)
|
||||
to_chat(occupant, "[bicon(src)] [message]")
|
||||
return
|
||||
|
||||
/obj/mecha/proc/log_message(message as text,red=null)
|
||||
log.len++
|
||||
log[log.len] = list("time"=world.timeofday,"message"="[red?"<font color='red'>":null][message][red?"</font>":null]")
|
||||
return log.len
|
||||
|
||||
/obj/mecha/proc/log_append_to_last(message as text,red=null)
|
||||
var/list/last_entry = log[log.len]
|
||||
last_entry["message"] += "<br>[red?"<font color='red'>":null][message][red?"</font>":null]"
|
||||
return
|
||||
|
||||
|
||||
/////////////////
|
||||
///// Topic /////
|
||||
/////////////////
|
||||
|
||||
/obj/mecha/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["update_content"])
|
||||
if(usr != occupant) return
|
||||
send_byjax(occupant,"exosuit.browser","content",get_stats_part())
|
||||
return
|
||||
if(href_list["close"])
|
||||
return
|
||||
if(usr.stat > 0)
|
||||
return
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["select_equip"])
|
||||
if(usr != occupant) return
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = filter.getObj("select_equip")
|
||||
if(equip)
|
||||
selected = equip
|
||||
occupant_message("You switch to [equip]")
|
||||
visible_message("[src] raises [equip]")
|
||||
send_byjax(occupant,"exosuit.browser","eq_list",get_equipment_list())
|
||||
return
|
||||
if(href_list["eject"])
|
||||
if(usr != occupant) return
|
||||
eject()
|
||||
return
|
||||
if(href_list["toggle_lights"])
|
||||
if(usr != occupant) return
|
||||
toggle_lights()
|
||||
return
|
||||
if(href_list["toggle_airtank"])
|
||||
if(usr != occupant) return
|
||||
toggle_internal_tank()
|
||||
return
|
||||
if(href_list["rmictoggle"])
|
||||
if(usr != occupant) return
|
||||
radio.broadcasting = !radio.broadcasting
|
||||
send_byjax(occupant,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
return
|
||||
if(href_list["rspktoggle"])
|
||||
if(usr != occupant) return
|
||||
radio.listening = !radio.listening
|
||||
send_byjax(occupant,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
return
|
||||
if(href_list["rfreq"])
|
||||
if(usr != occupant) return
|
||||
var/new_frequency = (radio.frequency + filter.getNum("rfreq"))
|
||||
if((radio.frequency < PUBLIC_LOW_FREQ || radio.frequency > PUBLIC_HIGH_FREQ))
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
radio.set_frequency(new_frequency)
|
||||
send_byjax(occupant,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
return
|
||||
if(href_list["port_disconnect"])
|
||||
if(usr != occupant) return
|
||||
disconnect_from_port()
|
||||
return
|
||||
if(href_list["port_connect"])
|
||||
if(usr != occupant) return
|
||||
connect_to_port()
|
||||
return
|
||||
if(href_list["view_log"])
|
||||
if(usr != occupant) return
|
||||
occupant << browse(get_log_html(), "window=exosuit_log")
|
||||
onclose(occupant, "exosuit_log")
|
||||
return
|
||||
if(href_list["change_name"])
|
||||
if(usr != occupant) return
|
||||
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
|
||||
if(newname && trim(newname))
|
||||
name = newname
|
||||
else
|
||||
alert(occupant, "nope.avi")
|
||||
return
|
||||
if(href_list["toggle_id_upload"])
|
||||
if(usr != occupant) return
|
||||
add_req_access = !add_req_access
|
||||
send_byjax(occupant,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
return
|
||||
if(href_list["toggle_maint_access"])
|
||||
if(usr != occupant) return
|
||||
if(state)
|
||||
occupant_message("<font color='red'>Maintenance protocols in effect</font>")
|
||||
return
|
||||
maint_access = !maint_access
|
||||
send_byjax(occupant,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
return
|
||||
if(href_list["req_access"] && add_req_access)
|
||||
if(!in_range(src, usr)) return
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
return
|
||||
if(href_list["maint_access"] && maint_access)
|
||||
if(!in_range(src, usr)) return
|
||||
var/mob/user = filter.getMob("user")
|
||||
if(user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
to_chat(user, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
to_chat(user, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(filter.getObj("id_card"),user)
|
||||
return
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
if(!in_range(src, usr)) return
|
||||
var/mob/user = filter.getMob("user")
|
||||
if(user)
|
||||
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
to_chat(user, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
|
||||
if(href_list["add_req_access"] && add_req_access && filter.getObj("id_card"))
|
||||
if(!in_range(src, usr)) return
|
||||
operation_req_access += filter.getNum("add_req_access")
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
return
|
||||
if(href_list["del_req_access"] && add_req_access && filter.getObj("id_card"))
|
||||
if(!in_range(src, usr)) return
|
||||
operation_req_access -= filter.getNum("del_req_access")
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
return
|
||||
if(href_list["finish_req_access"])
|
||||
if(!in_range(src, usr)) return
|
||||
add_req_access = 0
|
||||
var/mob/user = filter.getMob("user")
|
||||
user << browse(null,"window=exosuit_add_access")
|
||||
return
|
||||
if(href_list["dna_lock"])
|
||||
if(usr != occupant)
|
||||
return
|
||||
if(occupant && !iscarbon(occupant))
|
||||
to_chat(occupant, "<span class='danger'>You do not have any DNA!</span>")
|
||||
return
|
||||
dna = occupant.dna.unique_enzymes
|
||||
occupant_message("You feel a prick as the needle takes your DNA sample.")
|
||||
return
|
||||
if(href_list["reset_dna"])
|
||||
if(usr != occupant) return
|
||||
dna = null
|
||||
if(href_list["repair_int_control_lost"])
|
||||
if(usr != occupant) return
|
||||
occupant_message("Recalibrating coordination system.")
|
||||
log_message("Recalibration of coordination system started.")
|
||||
var/T = loc
|
||||
spawn(100)
|
||||
if(T == loc)
|
||||
clearInternalDamage(MECHA_INT_CONTROL_LOST)
|
||||
occupant_message("<font color='blue'>Recalibration successful.</font>")
|
||||
log_message("Recalibration of coordination system finished with 0 errors.")
|
||||
else
|
||||
occupant_message("<font color='red'>Recalibration failed.</font>")
|
||||
log_message("Recalibration of coordination system failed with 1 error.",1)
|
||||
|
||||
//debug
|
||||
/*
|
||||
if(href_list["debug"])
|
||||
if(href_list["set_i_dam"])
|
||||
setInternalDamage(filter.getNum("set_i_dam"))
|
||||
if(href_list["clear_i_dam"])
|
||||
clearInternalDamage(filter.getNum("clear_i_dam"))
|
||||
return
|
||||
*/
|
||||
|
||||
return
|
||||
@@ -1,22 +1,7 @@
|
||||
/obj/mecha/medical
|
||||
turnsound = 'sound/mecha/mechmove01.ogg'
|
||||
stepsound = 'sound/mecha/mechstep.ogg'
|
||||
|
||||
/obj/mecha/medical/New()
|
||||
..()
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/medical/mechturn(direction)
|
||||
dir = direction
|
||||
playsound(src,'sound/mecha/mechmove01.ogg',40,1)
|
||||
return 1
|
||||
|
||||
/obj/mecha/medical/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
playsound(src,'sound/mecha/mechstep.ogg',25,1)
|
||||
return result
|
||||
|
||||
/obj/mecha/medical/mechsteprand()
|
||||
var/result = step_rand(src)
|
||||
if(result)
|
||||
playsound(src,'sound/mecha/mechstep.ogg',25,1)
|
||||
return result
|
||||
@@ -12,44 +12,35 @@
|
||||
step_energy_drain = 6
|
||||
var/builtin_hud_user = 0
|
||||
|
||||
moved_inside(var/mob/living/carbon/human/H as mob)
|
||||
if(..())
|
||||
if(H.glasses && istype(H.glasses, /obj/item/clothing/glasses/hud))
|
||||
occupant_message("<span class='warning'>Your [H.glasses] prevent you from using the built-in medical hud.</span>")
|
||||
else
|
||||
var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
A.add_hud_to(H)
|
||||
builtin_hud_user = 1
|
||||
return 1
|
||||
/obj/mecha/medical/odysseus/moved_inside(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(. && ishuman(H))
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses/hud))
|
||||
occupant_message("<span class='warning'>[H.glasses] prevent you from using the built-in medical hud.</span>")
|
||||
else
|
||||
return 0
|
||||
|
||||
mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
|
||||
if(..())
|
||||
if(occupant.client)
|
||||
var/datum/atom_hud/A = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
A.add_hud_to(occupant)
|
||||
builtin_hud_user = 1
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
go_out()
|
||||
if(istype(occupant,/mob/living/carbon/human) && builtin_hud_user)
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
A.remove_hud_from(H)
|
||||
builtin_hud_user = 0
|
||||
else if((istype(occupant, /mob/living/carbon/brain) || pilot_is_mmi()) && builtin_hud_user )
|
||||
var/mob/living/carbon/brain/H = occupant
|
||||
A.add_hud_to(H)
|
||||
builtin_hud_user = 1
|
||||
|
||||
/obj/mecha/medical/odysseus/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(occupant.client)
|
||||
var/datum/atom_hud/A = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
A.remove_hud_from(H)
|
||||
builtin_hud_user = 0
|
||||
A.add_hud_to(occupant)
|
||||
builtin_hud_user = 1
|
||||
|
||||
..()
|
||||
return
|
||||
/obj/mecha/medical/odysseus/go_out()
|
||||
if(ishuman(occupant) && builtin_hud_user)
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
A.remove_hud_from(H)
|
||||
builtin_hud_user = 0
|
||||
else if((isbrain(occupant) || pilot_is_mmi()) && builtin_hud_user)
|
||||
var/mob/living/carbon/brain/H = occupant
|
||||
var/datum/atom_hud/A = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
A.remove_hud_from(H)
|
||||
builtin_hud_user = 0
|
||||
|
||||
. = ..()
|
||||
|
||||
//TODO - Check documentation for client.eye and client.perspective...
|
||||
/obj/item/clothing/glasses/hud/health/mech
|
||||
name = "Integrated Medical Hud"
|
||||
HUDType = DATA_HUD_MEDICAL_ADVANCED
|
||||
|
||||
@@ -14,52 +14,46 @@
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 15
|
||||
|
||||
/*
|
||||
/obj/mecha/working/ripley/New()
|
||||
..()
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/mecha/working/ripley/Move()
|
||||
. = ..()
|
||||
update_pressure()
|
||||
|
||||
/obj/mecha/working/ripley/Destroy()
|
||||
while(src.damage_absorption.["brute"] < 0.6)
|
||||
new /obj/item/asteroid/goliath_hide(src.loc)
|
||||
src.damage_absorption.["brute"] = src.damage_absorption.["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop
|
||||
for(var/atom/movable/A in src.cargo)
|
||||
A.loc = loc
|
||||
while(damage_absorption.["brute"] < 0.6)
|
||||
new /obj/item/asteroid/goliath_hide(loc)
|
||||
damage_absorption.["brute"] = damage_absorption.["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop
|
||||
for(var/atom/movable/A in cargo)
|
||||
A.forceMove(loc)
|
||||
step_rand(A)
|
||||
cargo.Cut()
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/go_out()
|
||||
..()
|
||||
if(src.damage_absorption.["brute"] < 0.6 && src.damage_absorption.["brute"] > 0.3)
|
||||
src.overlays = null
|
||||
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-open")
|
||||
else if(src.damage_absorption.["brute"] == 0.3)
|
||||
src.overlays = null
|
||||
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full-open")
|
||||
if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-open")
|
||||
else if(damage_absorption.["brute"] == 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full-open")
|
||||
|
||||
/obj/mecha/working/ripley/moved_inside(var/mob/living/carbon/human/H as mob)
|
||||
..()
|
||||
if(src.damage_absorption.["brute"] < 0.6 && src.damage_absorption.["brute"] > 0.3)
|
||||
src.overlays = null
|
||||
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
|
||||
else if(src.damage_absorption.["brute"] == 0.3)
|
||||
src.overlays = null
|
||||
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
|
||||
if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
|
||||
else if(damage_absorption.["brute"] == 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
|
||||
|
||||
/obj/mecha/working/ripley/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
|
||||
..()
|
||||
if(src.damage_absorption.["brute"] < 0.6 && src.damage_absorption.["brute"] > 0.3)
|
||||
src.overlays = null
|
||||
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
|
||||
else if(src.damage_absorption.["brute"] == 0.3)
|
||||
src.overlays = null
|
||||
src.overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
|
||||
if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g")
|
||||
else if(damage_absorption.["brute"] == 0.3)
|
||||
overlays = null
|
||||
overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full")
|
||||
|
||||
/obj/mecha/working/ripley/firefighter
|
||||
desc = "Standart APLU chassis was refitted with additional thermal protection and cistern."
|
||||
@@ -90,7 +84,7 @@
|
||||
|
||||
/obj/mecha/working/ripley/deathripley/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/safety_clamp
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
@@ -102,10 +96,10 @@
|
||||
..()
|
||||
//Attach drill
|
||||
if(prob(25)) //Possible diamond drill... Feeling lucky?
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
var/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
|
||||
D.attach(src)
|
||||
else
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/drill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill
|
||||
var/obj/item/mecha_parts/mecha_equipment/drill/D = new /obj/item/mecha_parts/mecha_equipment/drill
|
||||
D.attach(src)
|
||||
|
||||
//Add possible plasma cutter
|
||||
@@ -117,12 +111,12 @@
|
||||
cargo.Add(new /obj/structure/ore_box(src))
|
||||
|
||||
//Attach hydrolic clamp
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||
var/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp
|
||||
HC.attach(src)
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in src.contents)//Deletes the beacon so it can't be found easily
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in contents)//Deletes the beacon so it can't be found easily
|
||||
qdel(B)
|
||||
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/mining_scanner/scanner = new /obj/item/mecha_parts/mecha_equipment/tool/mining_scanner
|
||||
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new /obj/item/mecha_parts/mecha_equipment/mining_scanner
|
||||
scanner.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/Exit(atom/movable/O)
|
||||
@@ -134,14 +128,14 @@
|
||||
..()
|
||||
if(href_list["drop_from_cargo"])
|
||||
var/obj/O = locate(href_list["drop_from_cargo"])
|
||||
if(O && O in src.cargo)
|
||||
src.occupant_message("\blue You unload [O].")
|
||||
if(O && O in cargo)
|
||||
occupant_message("\blue You unload [O].")
|
||||
O.loc = get_turf(src)
|
||||
src.cargo -= O
|
||||
cargo -= O
|
||||
var/turf/T = get_turf(O)
|
||||
if(T)
|
||||
T.Entered(O)
|
||||
src.log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - src.cargo.len]")
|
||||
log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - cargo.len]")
|
||||
return
|
||||
|
||||
|
||||
@@ -149,8 +143,8 @@
|
||||
/obj/mecha/working/ripley/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>Cargo Compartment Contents:</b><div style=\"margin-left: 15px;\">"
|
||||
if(src.cargo.len)
|
||||
for(var/obj/O in src.cargo)
|
||||
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"
|
||||
@@ -159,12 +153,12 @@
|
||||
|
||||
/obj/mecha/working/ripley/Destroy()
|
||||
for(var/mob/M in src)
|
||||
if(M==src.occupant)
|
||||
if(M == occupant)
|
||||
continue
|
||||
M.loc = get_turf(src)
|
||||
M.loc.Entered(M)
|
||||
step_rand(M)
|
||||
for(var/atom/movable/A in src.cargo)
|
||||
for(var/atom/movable/A in cargo)
|
||||
A.loc = get_turf(src)
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
@@ -179,9 +173,9 @@
|
||||
|
||||
if(pressure < 20)
|
||||
step_in = 3
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/tool/drill/drill in equipment)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)/2
|
||||
else
|
||||
step_in = 5
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/tool/drill/drill in equipment)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)
|
||||
@@ -4,29 +4,3 @@
|
||||
/obj/mecha/working/New()
|
||||
..()
|
||||
new /obj/item/mecha_parts/mecha_tracking(src)
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/mecha/working/melee_action(atom/target as obj|mob|turf)
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = pick(oview(1,src))
|
||||
if(selected_tool)
|
||||
selected_tool.action(target)
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/mecha/working/range_action(atom/target as obj|mob|turf)
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/mecha/working/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>[src.name] Tools:</b><div style=\"margin-left: 15px;\">"
|
||||
if(equipment.len)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/MT in equipment)
|
||||
output += "[selected==MT?"<b>":"<a href='?src=\ref[src];select_equip=\ref[MT]'>"][MT.get_equip_info()][selected==MT?"</b>":"</a>"]<br>"
|
||||
else
|
||||
output += "None"
|
||||
output += "</div>"
|
||||
return output
|
||||
*/
|
||||
@@ -29,6 +29,11 @@
|
||||
. = ..()
|
||||
unbuckle_mob()
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(buckled_mob)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//procs that handle the actual buckling and unbuckling
|
||||
/atom/movable/proc/buckle_mob(mob/living/M)
|
||||
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.buckled_mob || buckled_mob || (buckle_requires_restraints && !M.restrained()) || M == src)
|
||||
|
||||
@@ -200,6 +200,9 @@
|
||||
levelupdate()
|
||||
CalculateAdjacentTurfs()
|
||||
|
||||
if(air_master && !ignore_air)
|
||||
air_master.add_to_active(src)
|
||||
|
||||
if(!keep_cabling && !can_have_cabling())
|
||||
for(var/obj/structure/cable/C in contents)
|
||||
qdel(C)
|
||||
|
||||
@@ -436,10 +436,9 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
else if(istype(AM,/obj/mecha))
|
||||
var/obj/mecha/M = AM
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/drill))
|
||||
M.selected.action(src)
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/**********************Asteroid**************************/
|
||||
|
||||
|
||||
@@ -90,21 +90,23 @@
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/mob/visible_message(var/message, var/self_message, var/blind_message)
|
||||
for(var/mob/M in viewers(src))
|
||||
for(var/mob/M in get_mobs_in_view(7, src))
|
||||
if(M.see_invisible < invisibility)
|
||||
continue //can't view the invisible
|
||||
var/msg = message
|
||||
if(self_message && M==src)
|
||||
if(self_message && M == src)
|
||||
msg = self_message
|
||||
M.show_message( msg, 1, blind_message, 2)
|
||||
M.show_message(msg, 1, blind_message, 2)
|
||||
|
||||
// Show a message to all mobs in sight of this atom
|
||||
// Use for objects performing visible actions
|
||||
// message is output to anyone who can see, e.g. "The [src] does something!"
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
/atom/proc/visible_message(var/message, var/blind_message)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message( message, 1, blind_message, 2)
|
||||
for(var/mob/M in get_mobs_in_view(7, src))
|
||||
if(!M.client)
|
||||
continue
|
||||
M.show_message(message, 1, blind_message, 2)
|
||||
|
||||
// Show a message to all mobs in earshot of this one
|
||||
// This would be for audible actions by the src mob
|
||||
@@ -118,7 +120,7 @@
|
||||
range = hearing_distance
|
||||
var/msg = message
|
||||
for(var/mob/M in get_mobs_in_view(range, src))
|
||||
if(self_message && M==src)
|
||||
if(self_message && M == src)
|
||||
msg = self_message
|
||||
M.show_message(msg, 2, deaf_message, 1)
|
||||
|
||||
|
||||
@@ -408,44 +408,42 @@
|
||||
///Called by /client/Move()
|
||||
///For moving in space
|
||||
///Return 1 for movement 0 for none
|
||||
/mob/Process_Spacemove(var/movement_dir = 0)
|
||||
|
||||
/mob/Process_Spacemove(movement_dir = 0)
|
||||
if(..())
|
||||
return 1
|
||||
var/atom/movable/backup = get_spacemove_backup()
|
||||
if(backup)
|
||||
if(istype(backup) && movement_dir && !backup.anchored)
|
||||
if(backup.newtonian_move(turn(movement_dir, 180))) //You're pushing off something movable, so it moves
|
||||
src << "<span class='info'>You push off of [backup] to propel yourself.</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/get_spacemove_backup()
|
||||
var/atom/movable/dense_object_backup
|
||||
for(var/atom/A in orange(1, get_turf(src)))
|
||||
for(var/A in orange(1, get_turf(src)))
|
||||
if(isarea(A))
|
||||
continue
|
||||
|
||||
else if(isturf(A))
|
||||
var/turf/turf = A
|
||||
if(istype(turf,/turf/space))
|
||||
if(istype(turf, /turf/space))
|
||||
continue
|
||||
|
||||
if(!turf.density && !mob_negates_gravity())
|
||||
continue
|
||||
|
||||
return 1
|
||||
|
||||
return A
|
||||
else
|
||||
var/atom/movable/AM = A
|
||||
if(AM == buckled) //Kind of unnecessary but let's just be sure
|
||||
continue
|
||||
if(AM.density)
|
||||
if(!AM.CanPass(src) || AM.density)
|
||||
if(AM.anchored)
|
||||
return 1
|
||||
return AM
|
||||
if(pulling == AM)
|
||||
continue
|
||||
dense_object_backup = AM
|
||||
break
|
||||
. = dense_object_backup
|
||||
|
||||
if(movement_dir && dense_object_backup)
|
||||
if(dense_object_backup.newtonian_move(turn(movement_dir, 180))) //You're pushing off something movable, so it moves
|
||||
to_chat(src, "<span class='info'>You push off of [dense_object_backup] to propel yourself.</span>")
|
||||
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/proc/mob_has_gravity(turf/T)
|
||||
return has_gravity(src, T)
|
||||
|
||||
@@ -601,7 +601,7 @@
|
||||
name = "Exosuit Engineering Equipment (Cable Layer)"
|
||||
id = "mech_cable_layer"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/cable_layer
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/cable_layer
|
||||
materials = list(MAT_METAL=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -610,7 +610,7 @@
|
||||
name = "Exosuit Engineering Equipment (Drill)"
|
||||
id = "mech_drill"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/drill
|
||||
materials = list(MAT_METAL=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -619,7 +619,7 @@
|
||||
name = "Exosuit Engineering Equipment (Extinguisher)"
|
||||
id = "mech_extinguisher"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/extinguisher
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/extinguisher
|
||||
materials = list(MAT_METAL=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -628,7 +628,7 @@
|
||||
name = "Exosuit Engineering Equipment (Hydraulic Clamp)"
|
||||
id = "mech_hydraulic_clamp"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp
|
||||
materials = list(MAT_METAL=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -638,7 +638,7 @@
|
||||
id = "mech_sleeper"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("biotech" = 2)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/medical/sleeper
|
||||
materials = list(MAT_METAL=5000,MAT_GLASS=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -648,7 +648,7 @@
|
||||
id = "mech_syringe_gun"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("magnets" = 3,"biotech" = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun
|
||||
materials = list(MAT_METAL=3000,MAT_GLASS=2000)
|
||||
construction_time = 200
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -723,7 +723,7 @@
|
||||
desc = "An exosuit-mounted Mime Rapid Construction Device."
|
||||
id = "mech_mrcd"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/mimercd
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/mimercd
|
||||
materials = list(MAT_METAL=30000,MAT_TRANQUILLITE=10000)
|
||||
construction_time = 700
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -735,7 +735,7 @@
|
||||
id = "mech_diamond_drill"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("materials" = 4, "engineering" = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
|
||||
materials = list(MAT_METAL=10000,MAT_DIAMOND=6500)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -744,7 +744,7 @@
|
||||
name = "Exosuit Engineering Equipement (Mining Scanner)"
|
||||
id = "mech_mscanner"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/mining_scanner
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/mining_scanner
|
||||
materials = list(MAT_METAL=5000,MAT_GLASS=2500)
|
||||
construction_time = 50
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -788,7 +788,7 @@
|
||||
id = "mech_rcd"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("materials" = 4, "bluespace" = 3, "magnets" = 4, "powerstorage"=4, "engineering" = 4)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/rcd
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/rcd
|
||||
materials = list(MAT_METAL=30000,MAT_GOLD=20000,MAT_PLASMA=25000,MAT_SILVER=20000)
|
||||
construction_time = 1200
|
||||
category = list("Exosuit Equipment")
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
else if(istype(AM,/obj/mecha))
|
||||
var/obj/mecha/M = AM
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/drill))
|
||||
M.selected.action(src)
|
||||
|
||||
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
|
||||
@@ -3,40 +3,11 @@
|
||||
icon_state = "engineering_pod"
|
||||
desc = "Stubby and round, it has a human sized access hatch on the top."
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/hoverpod
|
||||
stepsound = 'sound/machines/hiss.ogg'
|
||||
|
||||
/obj/mecha/working/hoverpod/Process_Spacemove(var/movement_dir = 0)
|
||||
return 1 // puts the hover in hoverpod
|
||||
|
||||
//these three procs overriden to play different sounds
|
||||
/obj/mecha/working/hoverpod/mechturn(direction)
|
||||
dir = direction
|
||||
//playsound(src,'sound/machines/hiss.ogg',40,1)
|
||||
return 1
|
||||
|
||||
/obj/mecha/working/hoverpod/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
playsound(src,'sound/machines/hiss.ogg',40,1)
|
||||
return result
|
||||
|
||||
|
||||
/obj/mecha/working/hoverpod/mechsteprand()
|
||||
var/result = step_rand(src)
|
||||
if(result)
|
||||
playsound(src,'sound/machines/hiss.ogg',40,1)
|
||||
return result
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/hoverpod
|
||||
name = "Hover pod wreckage"
|
||||
icon_state = "engineering_pod-broken"
|
||||
|
||||
/*New()
|
||||
..()
|
||||
var/list/parts = list(
|
||||
|
||||
for(var/i=0;i<2;i++)
|
||||
if(!isemptylist(parts) && prob(40))
|
||||
var/part = pick(parts)
|
||||
welder_salvage += part
|
||||
parts -= part
|
||||
return*/
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
//drill bone
|
||||
/datum/surgery_step/generic/drill
|
||||
name = "drill bone"
|
||||
allowed_tools = list(/obj/item/weapon/surgicaldrill = 100, /obj/item/weapon/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/tool/drill = 60, /obj/item/weapon/screwdriver = 20)
|
||||
allowed_tools = list(/obj/item/weapon/surgicaldrill = 100, /obj/item/weapon/pickaxe/drill = 60, /obj/item/mecha_parts/mecha_equipment/drill = 60, /obj/item/weapon/screwdriver = 20)
|
||||
time = 30
|
||||
|
||||
/datum/surgery_step/generic/drill/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
|
||||
+4
-1
@@ -639,6 +639,7 @@
|
||||
#include "code\game\mecha\mecha_construction_paths.dm"
|
||||
#include "code\game\mecha\mecha_control_console.dm"
|
||||
#include "code\game\mecha\mecha_parts.dm"
|
||||
#include "code\game\mecha\mecha_topic.dm"
|
||||
#include "code\game\mecha\mecha_wreckage.dm"
|
||||
#include "code\game\mecha\paintkits.dm"
|
||||
#include "code\game\mecha\combat\combat.dm"
|
||||
@@ -650,7 +651,9 @@
|
||||
#include "code\game\mecha\combat\recitence.dm"
|
||||
#include "code\game\mecha\equipment\mecha_equipment.dm"
|
||||
#include "code\game\mecha\equipment\tools\medical_tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\mining_tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\other_tools.dm"
|
||||
#include "code\game\mecha\equipment\tools\work_tools.dm"
|
||||
#include "code\game\mecha\equipment\weapons\weapons.dm"
|
||||
#include "code\game\mecha\medical\medical.dm"
|
||||
#include "code\game\mecha\medical\odysseus.dm"
|
||||
|
||||
Reference in New Issue
Block a user