Merge branch 'master' of https://github.com/tgstation/-tg-station into CatchThrownPieFix
Conflicts: code/game/atoms.dm code/game/atoms_movable.dm
@@ -148,7 +148,7 @@ Pipenet stuff; housekeeping
|
||||
parents["p[I]"] = reference
|
||||
break
|
||||
|
||||
/obj/machinery/atmospherics/components/returnPipenet(obj/machinery/atmospherics/A)
|
||||
/obj/machinery/atmospherics/components/returnPipenet(obj/machinery/atmospherics/A = nodes[NODE1]) //returns PARENT1 if called without argument
|
||||
for(var/I = 1; I <= device_type; I++)
|
||||
if(A == nodes["n[I]"])
|
||||
return parents["p[I]"]
|
||||
@@ -159,7 +159,7 @@ Pipenet stuff; housekeeping
|
||||
P = New
|
||||
break
|
||||
|
||||
/obj/machinery/atmospherics/components/unsafe_pressure_release(var/mob/user, var/pressures) //untestable; I'll fix this last
|
||||
/obj/machinery/atmospherics/components/unsafe_pressure_release(var/mob/user, var/pressures)
|
||||
..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -28,7 +28,7 @@ Filter types:
|
||||
1: Oxygen: Oxygen ONLY
|
||||
2: Nitrogen: Nitrogen ONLY
|
||||
3: Carbon Dioxide: Carbon Dioxide ONLY
|
||||
4: Sleeping Agent (NODE2O)
|
||||
4: Sleeping Agent (N2O)
|
||||
*/
|
||||
|
||||
var/frequency = 0
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
"widenet" = widenet,
|
||||
"filter_co2" = scrub_CO2,
|
||||
"filter_toxins" = scrub_Toxins,
|
||||
"filter_NODE2o" = scrub_N2O,
|
||||
"filter_n2o" = scrub_N2O,
|
||||
"sigtype" = "status"
|
||||
)
|
||||
if(!initial_loc.air_scrub_names[id_tag])
|
||||
@@ -265,9 +265,9 @@
|
||||
if("toggle_tox_scrub" in signal.data)
|
||||
scrub_Toxins = !scrub_Toxins
|
||||
|
||||
if("NODE2o_scrub" in signal.data)
|
||||
if("n2o_scrub" in signal.data)
|
||||
scrub_N2O = text2num(signal.data["n2o_scrub"])
|
||||
if("toggle_NODE2o_scrub" in signal.data)
|
||||
if("toggle_n2o_scrub" in signal.data)
|
||||
scrub_N2O = !scrub_N2O
|
||||
|
||||
if("init" in signal.data)
|
||||
|
||||
@@ -121,11 +121,7 @@ var/pipenetwarnings = 10
|
||||
|
||||
/obj/machinery/atmospherics/components/addMember(obj/machinery/atmospherics/A)
|
||||
var/datum/pipeline/P = returnPipenet(A)
|
||||
for(var/I = 1; I <= parents.len; I++)
|
||||
if(parents["p[I]"] == P)
|
||||
P.addMember(A, src)
|
||||
break
|
||||
|
||||
P.addMember(A, src)
|
||||
|
||||
|
||||
/datum/pipeline/proc/temporarily_store_air()
|
||||
|
||||
@@ -26,15 +26,18 @@
|
||||
var/adjacencies = 0
|
||||
|
||||
if(A.can_be_unanchored)
|
||||
var/atom/movable/T = A
|
||||
if(!T.anchored)
|
||||
var/atom/movable/AM = A
|
||||
if(!AM.anchored)
|
||||
return 0
|
||||
|
||||
for(var/direction in alldirs)
|
||||
var/atom/movable/AM = find_type_in_direction(A, direction)
|
||||
if(AM)
|
||||
AM = find_type_in_direction(A, direction)
|
||||
if(istype(AM))
|
||||
if(AM.anchored)
|
||||
adjacencies |= transform_dir(direction)
|
||||
else
|
||||
if(AM)
|
||||
adjacencies |= transform_dir(direction)
|
||||
else
|
||||
for(var/direction in alldirs)
|
||||
if(find_type_in_direction(A, direction))
|
||||
@@ -42,20 +45,20 @@
|
||||
return adjacencies
|
||||
|
||||
/proc/smooth_icon(atom/A)
|
||||
spawn(2)
|
||||
if(A && A.smooth)
|
||||
clear_overlays(A)
|
||||
var/adjacencies = calculate_adjacencies(A)
|
||||
if(A && A.smooth)
|
||||
var/adjacencies = calculate_adjacencies(A)
|
||||
|
||||
A.top_left_corner = make_nw_corner(adjacencies)
|
||||
A.top_right_corner = make_ne_corner(adjacencies)
|
||||
A.bottom_left_corner = make_sw_corner(adjacencies)
|
||||
A.bottom_right_corner = make_se_corner(adjacencies)
|
||||
clear_overlays(A)
|
||||
|
||||
A.overlays += A.top_left_corner
|
||||
A.overlays += A.top_right_corner
|
||||
A.overlays += A.bottom_right_corner
|
||||
A.overlays += A.bottom_left_corner
|
||||
A.top_left_corner = make_nw_corner(adjacencies)
|
||||
A.top_right_corner = make_ne_corner(adjacencies)
|
||||
A.bottom_left_corner = make_sw_corner(adjacencies)
|
||||
A.bottom_right_corner = make_se_corner(adjacencies)
|
||||
|
||||
A.overlays += A.top_left_corner
|
||||
A.overlays += A.top_right_corner
|
||||
A.overlays += A.bottom_right_corner
|
||||
A.overlays += A.bottom_left_corner
|
||||
|
||||
|
||||
/proc/make_nw_corner(adjacencies)
|
||||
@@ -142,35 +145,23 @@
|
||||
else if(direction & WEST)
|
||||
x_offset -= range
|
||||
|
||||
var/list/siblings = source.canSmoothWith
|
||||
if(istype(source, /turf))
|
||||
if(siblings)
|
||||
for(var/a_type in siblings)
|
||||
if(ispath(a_type, /obj))
|
||||
var/atom/A = locate(a_type) in locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
if(A && A.type == a_type)
|
||||
return A
|
||||
else
|
||||
var/turf/T = locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
if(T.type == a_type)
|
||||
return T
|
||||
return null
|
||||
var/turf/T = locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
return T.type == source.type ? T : null
|
||||
|
||||
if(siblings)
|
||||
for(var/a_type in siblings)
|
||||
var/turf/target_turf = locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
if(source.canSmoothWith)
|
||||
var/atom/A
|
||||
for(var/a_type in source.canSmoothWith)
|
||||
if(ispath(a_type, /turf))
|
||||
var/turf/T = locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
if(T.type == a_type)
|
||||
return T
|
||||
if(a_type == target_turf.type)
|
||||
return target_turf
|
||||
else
|
||||
var/atom/A = locate(a_type) in locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
A = locate(a_type) in target_turf
|
||||
if(A && A.type == a_type)
|
||||
return A
|
||||
return null
|
||||
var/atom/A = locate(source.type) in locate(source.x + x_offset, source.y + y_offset, source.z)
|
||||
return A && A.type == source.type ? A : null
|
||||
else
|
||||
if(isturf(source))
|
||||
return source.type == target_turf.type ? target_turf : null
|
||||
var/atom/A = locate(source.type) in target_turf
|
||||
return A && A.type == source.type ? A : null
|
||||
|
||||
/proc/clear_overlays(atom/A)
|
||||
A.overlays -= A.top_left_corner
|
||||
@@ -189,4 +180,4 @@
|
||||
if(SOUTHEAST)
|
||||
return SOUTH_EAST
|
||||
if(SOUTHWEST)
|
||||
return SOUTH_WEST
|
||||
return SOUTH_WEST
|
||||
|
||||
@@ -235,7 +235,9 @@
|
||||
return ""
|
||||
|
||||
//Returns a string with reserved characters and spaces before the first word and after the last word removed.
|
||||
/proc/trim(text)
|
||||
/proc/trim(text, max_length)
|
||||
if(max_length)
|
||||
text = copytext(text, 1, max_length)
|
||||
return trim_left(trim_right(text))
|
||||
|
||||
//Returns a string with the first element of the string capitalized.
|
||||
|
||||
@@ -672,7 +672,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
else return get_step(ref, base_dir)
|
||||
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, numticks = 5, stealth = 0) //This is quite an ugly solution but i refuse to use the old request system.
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, numticks = 5, uninterruptible = 0) //This is quite an ugly solution but i refuse to use the old request system.
|
||||
if(!user || !target)
|
||||
return 0
|
||||
if(numticks == 0)
|
||||
@@ -691,7 +691,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(user && user.client)
|
||||
user.client.images -= progbar
|
||||
return 0
|
||||
if ( user.loc != user_loc || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
|
||||
if (!uninterruptible && (user.loc != user_loc || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying ))
|
||||
if(user && user.client)
|
||||
user.client.images -= progbar
|
||||
return 0
|
||||
|
||||
@@ -67,8 +67,6 @@
|
||||
return
|
||||
|
||||
if(istype(loc,/obj/mecha))
|
||||
if(!locate(/turf) in list(A,A.loc)) // Prevents inventory from being drilled
|
||||
return
|
||||
var/obj/mecha/M = loc
|
||||
return M.click_action(A,src)
|
||||
|
||||
@@ -325,4 +323,4 @@
|
||||
else
|
||||
var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr))
|
||||
T.Click(location, control, params)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -228,6 +228,13 @@ office by your AI master or any qualified human may resolve this matter. Robotic
|
||||
so as to remain in compliance with the most up-to-date laws."
|
||||
timeout = 300
|
||||
|
||||
//MECHS
|
||||
|
||||
/obj/screen/alert/low_mech_integrity
|
||||
name = "Mech Damaged"
|
||||
desc = "Mech integrity is low."
|
||||
|
||||
|
||||
//OBJECT-BASED
|
||||
|
||||
/obj/screen/alert/buckled
|
||||
|
||||
@@ -198,8 +198,6 @@ var/datum/global_hud/global_hud = new()
|
||||
else if(isdrone(mymob))
|
||||
drone_hud(ui_style)
|
||||
|
||||
if(istype(mymob.loc,/obj/mecha) && ishuman(mymob))
|
||||
show_hud(HUD_STYLE_REDUCED)
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(version = 0)
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
/*
|
||||
README:
|
||||
|
||||
The global_iterator datum is supposed to provide a simple and robust way to
|
||||
create some constantly "looping" processes with ability to stop and restart them at will.
|
||||
Generally, the only thing you want to play with (meaning, redefine) is the process() proc.
|
||||
It must contain all the things you want done.
|
||||
|
||||
Control functions:
|
||||
new - used to create datum. First argument (optional) - var list(to use in process() proc) as list,
|
||||
second (optional) - autostart control.
|
||||
If autostart == TRUE, the loop will be started immediately after datum creation.
|
||||
|
||||
start(list/arguments) - starts the loop. Takes arguments(optional) as a list, which is then used
|
||||
by process() proc. Returns null if datum already active, 1 if loop started successfully and 0 if there's
|
||||
an error in supplied arguments (not list or empty list).
|
||||
|
||||
stop() - stops the loop. Returns null if datum is already inactive and 1 on success.
|
||||
|
||||
set_delay(new_delay) - sets the delay between iterations. Pretty selfexplanatory.
|
||||
Returns 0 on error(new_delay is not numerical), 1 otherwise.
|
||||
|
||||
set_process_args(list/arguments) - passes the supplied arguments to the process() proc.
|
||||
|
||||
active() - Returns 1 if datum is active, 0 otherwise.
|
||||
|
||||
toggle() - toggles datum state. Returns new datum state (see active()).
|
||||
|
||||
Misc functions:
|
||||
|
||||
get_last_exec_time() - Returns the time of last iteration.
|
||||
|
||||
get_last_exec_time_as_text() - Returns the time of last iteration as text
|
||||
|
||||
|
||||
Control vars:
|
||||
|
||||
delay - delay between iterations
|
||||
|
||||
check_for_null - if equals TRUE, on each iteration the supplied arguments will be checked for nulls.
|
||||
If some varible equals null (and null only), the loop is stopped.
|
||||
Usefull, if some var unexpectedly becomes null - due to object deletion, for example.
|
||||
Of course, you can also check the variables inside process() proc to prevent runtime errors.
|
||||
|
||||
Data storage vars:
|
||||
|
||||
result - stores the value returned by process() proc
|
||||
*/
|
||||
|
||||
/datum/global_iterator
|
||||
var/control_switch = 0
|
||||
var/delay = 10
|
||||
var/list/arg_list = new
|
||||
var/last_exec = null
|
||||
var/check_for_null = 1
|
||||
var/forbid_garbage = 0
|
||||
var/result
|
||||
var/state = 0
|
||||
|
||||
/datum/global_iterator/New(list/arguments=null,autostart=1)
|
||||
delay = delay>0?(delay):1
|
||||
if(forbid_garbage) //prevents garbage collection with tag != null
|
||||
tag = "\ref[src]"
|
||||
set_process_args(arguments)
|
||||
if(autostart)
|
||||
start()
|
||||
return
|
||||
|
||||
/datum/global_iterator/Destroy()
|
||||
tag = null
|
||||
arg_list.Cut()
|
||||
stop()
|
||||
//Do not call ..()
|
||||
|
||||
/datum/global_iterator/proc/main()
|
||||
state = 1
|
||||
while(src && control_switch)
|
||||
last_exec = world.timeofday
|
||||
if(check_for_null && has_null_args())
|
||||
stop()
|
||||
return 0
|
||||
result = process(arglist(arg_list))
|
||||
for(var/sleep_time=delay;sleep_time>0;sleep_time--) //uhh, this is ugly. But I see no other way to terminate sleeping proc. Such disgrace.
|
||||
if(!control_switch)
|
||||
return 0
|
||||
sleep(1)
|
||||
return 0
|
||||
|
||||
/datum/global_iterator/proc/start(list/arguments=null)
|
||||
if(active())
|
||||
return
|
||||
if(arguments)
|
||||
if(!set_process_args(arguments))
|
||||
return 0
|
||||
if(!state_check()) //the main loop is sleeping, wait for it to terminate.
|
||||
return
|
||||
control_switch = 1
|
||||
spawn()
|
||||
state = main()
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/proc/stop()
|
||||
if(!active())
|
||||
return
|
||||
control_switch = 0
|
||||
spawn(-1) //report termination error but don't wait for state_check().
|
||||
state_check()
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/proc/state_check()
|
||||
var/lag = 0
|
||||
while(state)
|
||||
sleep(1)
|
||||
if(++lag>10)
|
||||
CRASH("The global_iterator loop \ref[src] failed to terminate in designated timeframe. This may be caused by server lagging.")
|
||||
return 1
|
||||
|
||||
/datum/global_iterator/process()
|
||||
return
|
||||
|
||||
/datum/global_iterator/proc/active()
|
||||
return control_switch
|
||||
|
||||
/datum/global_iterator/proc/has_null_args()
|
||||
if(null in arg_list)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/datum/global_iterator/proc/set_delay(new_delay)
|
||||
if(isnum(new_delay))
|
||||
delay = max(1, round(new_delay))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/global_iterator/proc/get_last_exec_time()
|
||||
return (last_exec||0)
|
||||
|
||||
/datum/global_iterator/proc/get_last_exec_time_as_text()
|
||||
return (time2text(last_exec)||"Wasn't executed yet")
|
||||
|
||||
/datum/global_iterator/proc/set_process_args(list/arguments)
|
||||
if(arguments && istype(arguments, /list) && arguments.len)
|
||||
arg_list = arguments
|
||||
return 1
|
||||
else
|
||||
// world << "\red Invalid arguments supplied for [src.type], ref = \ref[src]"
|
||||
return 0
|
||||
|
||||
/datum/global_iterator/proc/toggle_null_checks()
|
||||
check_for_null = !check_for_null
|
||||
return check_for_null
|
||||
|
||||
/datum/global_iterator/proc/toggle()
|
||||
if(!stop())
|
||||
start()
|
||||
return active()
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
cooldown_min = 30
|
||||
selection_type = "view"
|
||||
random_target = 1
|
||||
var/energy = 0
|
||||
var/start_time = 0
|
||||
var/ready = 0
|
||||
var/image/halo = null
|
||||
var/sound/Snd // so far only way i can think of to stop a sound, thank MSO for the idea.
|
||||
@@ -18,7 +18,7 @@
|
||||
action_icon_state = "lightning"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/Click()
|
||||
if(!ready && energy==0)
|
||||
if(!ready && start_time==0)
|
||||
if(cast_check())
|
||||
StartChargeup()
|
||||
else
|
||||
@@ -33,16 +33,14 @@
|
||||
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
|
||||
user.overlays.Add(halo)
|
||||
playsound(get_turf(usr), Snd, 50, 0)
|
||||
spawn(0)
|
||||
while(ready)
|
||||
energy++
|
||||
if(energy >= 100 && ready)
|
||||
Discharge()
|
||||
sleep(1)
|
||||
start_time = world.time
|
||||
if(do_mob(user,user,100,uninterruptible=1))
|
||||
if(ready)
|
||||
Discharge()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
|
||||
ready = 0
|
||||
energy = 0
|
||||
start_time = 0
|
||||
if(halo)
|
||||
user.overlays.Remove(halo)
|
||||
|
||||
@@ -72,26 +70,18 @@
|
||||
playsound(get_turf(usr), 'sound/magic/lightningbolt.ogg', 50, 1)
|
||||
user.Beam(target,icon_state="lightning",icon='icons/effects/effects.dmi',time=5)
|
||||
|
||||
switch(energy)
|
||||
if(1 to 25)
|
||||
target.electrocute_act(10,"Lightning Bolt")
|
||||
playsound(get_turf(target), 'sound/magic/LightningShock.ogg', 50, 1, -1)
|
||||
if(25 to 75)
|
||||
target.electrocute_act(25,"Lightning Bolt")
|
||||
playsound(get_turf(target), 'sound/magic/LightningShock.ogg', 50, 1, -1)
|
||||
if(75 to 100)
|
||||
//CHAIN LIGHTNING
|
||||
Bolt(user,target,energy,user)
|
||||
var/energy = min(world.time - start_time,100)
|
||||
Bolt(user,target,max(15,energy/2),5,user) //5 bounces for energy/2 burn
|
||||
Reset(user)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/proc/Bolt(mob/origin,mob/target,bolt_energy,mob/user = usr)
|
||||
/obj/effect/proc_holder/spell/targeted/lightning/proc/Bolt(mob/origin,mob/target,bolt_energy,bounces,mob/user = usr)
|
||||
origin.Beam(target,icon_state="lightning",icon='icons/effects/effects.dmi',time=5)
|
||||
var/mob/living/carbon/current = target
|
||||
if(bolt_energy < 75)
|
||||
current.electrocute_act(25,"Lightning Bolt")
|
||||
if(bounces < 1)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
|
||||
else
|
||||
current.electrocute_act(25,"Lightning Bolt")
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
|
||||
var/list/possible_targets = new
|
||||
for(var/mob/living/M in view_or_range(range,target,"view"))
|
||||
@@ -102,4 +92,4 @@
|
||||
return
|
||||
var/mob/living/next = pick(possible_targets)
|
||||
if(next)
|
||||
Bolt(current,next,bolt_energy-6,user) // 5 max bounces
|
||||
Bolt(current,next,bolt_energy,bounces-1,user)
|
||||
@@ -15,7 +15,6 @@
|
||||
//HUD images that this atom can provide.
|
||||
var/list/hud_possible
|
||||
|
||||
|
||||
//Value used to increment ex_act() if reactionary_explosions is on
|
||||
var/explosion_block = 0
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
rcdmod.uses --
|
||||
for(var/obj/item/weapon/rcd/rcd in world)
|
||||
rcd.disabled = 1
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/tool/rcd/rcd in world)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/rcd/rcd in world)
|
||||
rcd.disabled = 1
|
||||
src << "<span class='warning>RCD-disabling pulse emitted.</span>"
|
||||
else src << "<span class='notice'>Out of uses.</span>"
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
var/surplus = -1 // -1 for infinite, not used by anything atm
|
||||
var/obj/effect/proc_holder/spell/S = null //Since spellbooks can be used by only one person anyway we can track the actual spell
|
||||
var/buy_word = "Learn"
|
||||
var/limit //used to prevent a spellbook_entry from being bought more than X times with one wizard spellbook
|
||||
|
||||
/datum/spellbook_entry/proc/IsAvailible() // For config prefs / gamemode restrictions - these are round applied
|
||||
return 1
|
||||
/datum/spellbook_entry/proc/CanBuy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) // Specific circumstances
|
||||
if(book.uses<cost)
|
||||
if(book.uses<cost || limit == 0)
|
||||
return 0
|
||||
return 1
|
||||
/datum/spellbook_entry/proc/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) //return 1 on success
|
||||
@@ -308,6 +309,7 @@
|
||||
desc = "A bottle of magically infused blood, the smell of which will attract extradimensional beings when broken. Be careful though, the kinds of creatures summoned by blood magic are indiscriminate in their killing, and you yourself may become a victim."
|
||||
item_path = /obj/item/weapon/antag_spawner/slaughter_demon
|
||||
log_name = "BB"
|
||||
limit = 3
|
||||
|
||||
/datum/spellbook_entry/summon
|
||||
name = "Summon Stuff"
|
||||
@@ -438,11 +440,17 @@
|
||||
user << "<span class='warning'>The contract has been used, you can't get your points back now!</span>"
|
||||
else
|
||||
user << "<span class='notice'>You feed the contract back into the spellbook, refunding your points.</span>"
|
||||
src.uses++
|
||||
uses++
|
||||
for(var/datum/spellbook_entry/item/contract/CT in entries)
|
||||
if(!isnull(CT.limit))
|
||||
CT.limit++
|
||||
qdel(O)
|
||||
if(istype(O, /obj/item/weapon/antag_spawner/slaughter_demon))
|
||||
user << "<span class='notice'>On second thought, maybe summoning a demon is a bad idea. You refund your points.</span>"
|
||||
src.uses++
|
||||
uses++
|
||||
for(var/datum/spellbook_entry/item/bloodbottle/BB in entries)
|
||||
if(!isnull(BB.limit))
|
||||
BB.limit++
|
||||
qdel(O)
|
||||
|
||||
/obj/item/weapon/spellbook/proc/GetCategoryHeader(category)
|
||||
@@ -551,12 +559,16 @@
|
||||
E = entries[text2num(href_list["buy"])]
|
||||
if(E && E.CanBuy(H,src))
|
||||
if(E.Buy(H,src))
|
||||
if(E.limit)
|
||||
E.limit--
|
||||
uses -= E.cost
|
||||
else if(href_list["refund"])
|
||||
E = entries[text2num(href_list["refund"])]
|
||||
if(E && E.refundable)
|
||||
var/result = E.Refund(H,src)
|
||||
if(result > 0)
|
||||
if(!isnull(E.limit))
|
||||
E.limit += result
|
||||
uses += result
|
||||
else if(href_list["page"])
|
||||
tab = sanitize(href_list["page"])
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
//Perform the connection
|
||||
connected_port = new_port
|
||||
connected_port.connected_device = src
|
||||
var/datum/pipeline/connected_port_parent = connected_port.parents["p1"]
|
||||
var/datum/pipeline/connected_port_parent = connected_port.parents[PARENT1]
|
||||
connected_port_parent.reconcile_air()
|
||||
|
||||
anchored = 1 //Prevent movement
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if (get_dist(src, L) > range)
|
||||
continue
|
||||
|
||||
if(L.flash_eyes())
|
||||
if(L.flash_eyes(affect_silicon = 1))
|
||||
L.Weaken(strength)
|
||||
if(L.weakeyes)
|
||||
L.Weaken(strength * 1.5)
|
||||
|
||||
@@ -13,15 +13,7 @@
|
||||
var/defence = 0
|
||||
var/defence_deflect = 35
|
||||
wreckage = /obj/structure/mecha_wreckage/durand
|
||||
|
||||
/*
|
||||
/obj/mecha/combat/durand/New()
|
||||
..()
|
||||
weapons += new /datum/mecha_weapon/ballistic/lmg(src)
|
||||
weapons += new /datum/mecha_weapon/ballistic/scattershot(src)
|
||||
selected_weapon = weapons[1]
|
||||
return
|
||||
*/
|
||||
var/datum/action/mecha/mech_defence_mode/defense_action = new
|
||||
|
||||
/obj/mecha/combat/durand/relaymove(mob/user,direction)
|
||||
if(defence)
|
||||
@@ -32,43 +24,33 @@
|
||||
. = ..()
|
||||
return
|
||||
|
||||
/obj/mecha/combat/durand/GrantActions(var/mob/living/user, var/human_occupant = 0)
|
||||
..()
|
||||
defense_action.chassis = src
|
||||
defense_action.Grant(user)
|
||||
|
||||
/obj/mecha/combat/durand/verb/defence_mode()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Toggle defence mode"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(!can_use(usr))
|
||||
return
|
||||
defence = !defence
|
||||
if(defence)
|
||||
deflect_chance = defence_deflect
|
||||
src.occupant_message("<span class='notice'>You enable [src] defence mode.</span>")
|
||||
else
|
||||
deflect_chance = initial(deflect_chance)
|
||||
src.occupant_message("<span class='danger'>You disable [src] defence mode.</span>")
|
||||
src.log_message("Toggled defence mode.")
|
||||
return
|
||||
|
||||
/obj/mecha/combat/durand/RemoveActions(var/mob/living/user, var/human_occupant = 0)
|
||||
..()
|
||||
defense_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/durand/get_stats_part()
|
||||
var/output = ..()
|
||||
output += "<b>Defence mode: [defence?"on":"off"]</b>"
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/durand/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Special</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_defence_mode=1'>Toggle defence mode</a>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
/datum/action/mecha/mech_defence_mode
|
||||
name = "Toggle Defense Mode"
|
||||
button_icon_state = "mech_toggle_defense_mode"
|
||||
|
||||
/obj/mecha/combat/durand/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["toggle_defence_mode"])
|
||||
src.defence_mode()
|
||||
return
|
||||
/datum/action/mecha/mech_defence_mode/Activate()
|
||||
if(!owner || !chassis || chassis.occupant != owner)
|
||||
return
|
||||
var/obj/mecha/combat/durand/D = chassis
|
||||
D.defence = !D.defence
|
||||
if(D.defence)
|
||||
D.deflect_chance = D.defence_deflect
|
||||
D.occupant_message("<span class='notice'>You enable [D] defence mode.</span>")
|
||||
else
|
||||
D.deflect_chance = initial(D.deflect_chance)
|
||||
D.occupant_message("<span class='danger'>You disable [D] defence mode.</span>")
|
||||
D.log_message("Toggled defence mode.")
|
||||
@@ -33,7 +33,7 @@
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
|
||||
ME.attach(src)
|
||||
@@ -71,16 +71,16 @@
|
||||
src.log_message("Toggled leg actuators overload.")
|
||||
return
|
||||
|
||||
/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)
|
||||
overload = 0
|
||||
step_in = initial(step_in)
|
||||
step_energy_drain = initial(step_energy_drain)
|
||||
src.occupant_message("<span class='danger'>Leg actuators damage threshold exceded. Disabling overload.</span>")
|
||||
return
|
||||
occupant_message("<span class='danger'>Leg actuators damage threshold exceded. Disabling overload.</span>")
|
||||
|
||||
|
||||
/obj/mecha/combat/gygax/get_stats_part()
|
||||
|
||||
@@ -20,80 +20,20 @@
|
||||
internal_damage_threshold = 25
|
||||
force = 45
|
||||
max_equip = 4
|
||||
var/datum/action/mecha/mech_smoke/smoke_action = new
|
||||
var/datum/action/mecha/mech_toggle_thrusters/thrusters_action = new
|
||||
var/datum/action/mecha/mech_zoom/zoom_action = new
|
||||
|
||||
/obj/mecha/combat/marauder/New()
|
||||
..()
|
||||
smoke_system.set_up(3, 0, src)
|
||||
smoke_system.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/Destroy()
|
||||
qdel(smoke_system)
|
||||
smoke_system = null
|
||||
..()
|
||||
|
||||
/obj/mecha/combat/marauder/seraph
|
||||
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
|
||||
name = "\improper Seraph"
|
||||
icon_state = "seraph"
|
||||
operation_req_access = list(access_cent_specops)
|
||||
step_in = 3
|
||||
health = 550
|
||||
wreckage = /obj/structure/mecha_wreckage/seraph
|
||||
internal_damage_threshold = 20
|
||||
force = 55
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/mauler
|
||||
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
|
||||
name = "\improper Mauler"
|
||||
icon_state = "mauler"
|
||||
operation_req_access = list(access_syndicate)
|
||||
wreckage = /obj/structure/mecha_wreckage/mauler
|
||||
|
||||
/obj/mecha/combat/marauder/mauler/loaded/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
src.smoke_system.set_up(3, 0, src)
|
||||
src.smoke_system.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/marauder/loaded/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
src.smoke_system.set_up(3, 0, src)
|
||||
src.smoke_system.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/marauder/seraph/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)
|
||||
@@ -110,54 +50,23 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/mecha/combat/marauder/verb/toggle_thrusters()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Toggle thrusters"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
if(src.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
|
||||
|
||||
/obj/mecha/combat/marauder/GrantActions(var/mob/living/user, var/human_occupant = 0)
|
||||
..()
|
||||
smoke_action.chassis = src
|
||||
smoke_action.Grant(user)
|
||||
|
||||
/obj/mecha/combat/marauder/verb/smoke()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Smoke"
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
if(smoke_ready && smoke>0)
|
||||
src.smoke_system.start()
|
||||
smoke--
|
||||
smoke_ready = 0
|
||||
spawn(smoke_cooldown)
|
||||
smoke_ready = 1
|
||||
return
|
||||
thrusters_action.chassis = src
|
||||
thrusters_action.Grant(user)
|
||||
|
||||
/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)
|
||||
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(zoom)
|
||||
src.occupant.client.view = 12
|
||||
src.occupant << sound('sound/mecha/imag_enh.ogg',volume=50)
|
||||
else
|
||||
src.occupant.client.view = world.view//world.view - default mob view size
|
||||
return
|
||||
zoom_action.chassis = src
|
||||
zoom_action.Grant(user)
|
||||
|
||||
/obj/mecha/combat/marauder/RemoveActions(var/mob/living/user, var/human_occupant = 0)
|
||||
..()
|
||||
smoke_action.Remove(user)
|
||||
thrusters_action.Remove(user)
|
||||
zoom_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/marauder/go_out()
|
||||
if(src.occupant && src.occupant.client)
|
||||
@@ -176,25 +85,110 @@
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/combat/marauder/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Special</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];toggle_thrusters=1'>Toggle thrusters</a><br>
|
||||
<a href='?src=\ref[src];toggle_zoom=1'>Toggle zoom mode</a><br>
|
||||
<a href='?src=\ref[src];smoke=1'>Smoke</a>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/marauder/Topic(href, href_list)
|
||||
/obj/mecha/combat/marauder/loaded/New()
|
||||
..()
|
||||
if (href_list["toggle_thrusters"])
|
||||
src.toggle_thrusters()
|
||||
if (href_list["smoke"])
|
||||
src.smoke()
|
||||
if (href_list["toggle_zoom"])
|
||||
src.zoom()
|
||||
return
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/seraph
|
||||
desc = "Heavy-duty, command-type exosuit. This is a custom model, utilized only by high-ranking military personnel."
|
||||
name = "\improper Seraph"
|
||||
icon_state = "seraph"
|
||||
operation_req_access = list(access_cent_specops)
|
||||
step_in = 3
|
||||
health = 550
|
||||
wreckage = /obj/structure/mecha_wreckage/seraph
|
||||
internal_damage_threshold = 20
|
||||
force = 55
|
||||
max_equip = 5
|
||||
|
||||
/obj/mecha/combat/marauder/seraph/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/teleporter(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
/obj/mecha/combat/marauder/mauler
|
||||
desc = "Heavy-duty, combat exosuit, developed off of the existing Marauder model."
|
||||
name = "\improper Mauler"
|
||||
icon_state = "mauler"
|
||||
operation_req_access = list(access_syndicate)
|
||||
wreckage = /obj/structure/mecha_wreckage/mauler
|
||||
|
||||
/obj/mecha/combat/marauder/mauler/loaded/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src)
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster(src)
|
||||
ME.attach(src)
|
||||
|
||||
|
||||
/datum/action/mecha/mech_smoke
|
||||
name = "Smoke"
|
||||
button_icon_state = "smoke"
|
||||
|
||||
/datum/action/mecha/mech_smoke/Activate()
|
||||
if(!owner || !chassis || chassis.occupant != owner)
|
||||
return
|
||||
var/obj/mecha/combat/marauder/M = chassis
|
||||
if(M.smoke_ready && M.smoke>0)
|
||||
M.smoke_system.start()
|
||||
M.smoke--
|
||||
M.smoke_ready = 0
|
||||
spawn(M.smoke_cooldown)
|
||||
M.smoke_ready = 1
|
||||
|
||||
/datum/action/mecha/mech_toggle_thrusters
|
||||
name = "Toggle Thrusters"
|
||||
button_icon_state = "mech_toggle_thrusters"
|
||||
|
||||
/datum/action/mecha/mech_toggle_thrusters/Activate()
|
||||
if(!owner || !chassis || chassis.occupant != owner)
|
||||
return
|
||||
var/obj/mecha/combat/marauder/M = chassis
|
||||
if(M.get_charge() > 0)
|
||||
M.thrusters = !M.thrusters
|
||||
if(M.thrusters)
|
||||
button_icon_state = "mech_toggle_thrusters_on"
|
||||
else
|
||||
button_icon_state = "mech_toggle_thrusters"
|
||||
M.log_message("Toggled thrusters.")
|
||||
M.occupant_message("<font color='[M.thrusters?"blue":"red"]'>Thrusters [M.thrusters?"en":"dis"]abled.")
|
||||
|
||||
/datum/action/mecha/mech_zoom
|
||||
name = "Zoom"
|
||||
button_icon_state = "mech_zoom"
|
||||
|
||||
/datum/action/mecha/mech_zoom/Activate()
|
||||
if(!owner || !chassis || chassis.occupant != owner)
|
||||
return
|
||||
var/obj/mecha/combat/marauder/M = chassis
|
||||
if(owner.client)
|
||||
M.zoom = !M.zoom
|
||||
M.log_message("Toggled zoom mode.")
|
||||
M.occupant_message("<font color='[M.zoom?"blue":"red"]'>Zoom mode [M.zoom?"en":"dis"]abled.</font>")
|
||||
if(M.zoom)
|
||||
owner.client.view = 12
|
||||
owner << sound('sound/mecha/imag_enh.ogg',volume=50)
|
||||
else
|
||||
owner.client.view = world.view//world.view - default mob view size
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
var/phasing = 0
|
||||
var/phasing_energy_drain = 200
|
||||
max_equip = 3
|
||||
var/datum/action/mecha/mech_switch_damtype/switch_damtype_action = new
|
||||
var/datum/action/mecha/mech_toggle_phasing/phasing_action = new
|
||||
|
||||
/obj/mecha/combat/phazon/Bump(atom/obstacle)
|
||||
if(phasing && get_charge()>=phasing_energy_drain)
|
||||
@@ -24,8 +26,8 @@
|
||||
if(can_move)
|
||||
can_move = 0
|
||||
flick("phazon-phase", src)
|
||||
src.loc = get_step(src,src.dir)
|
||||
src.use_power(phasing_energy_drain)
|
||||
loc = get_step(src, dir)
|
||||
use_power(phasing_energy_drain)
|
||||
sleep(step_in*3)
|
||||
can_move = 1
|
||||
else
|
||||
@@ -34,50 +36,56 @@
|
||||
|
||||
/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 ..()
|
||||
|
||||
/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)
|
||||
return
|
||||
var/new_damtype = alert(src.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.")
|
||||
if("Torch")
|
||||
damtype = "fire"
|
||||
src.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.")
|
||||
playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/mecha/combat/phazon/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Special</div>
|
||||
<div class='links'>
|
||||
<a href='?src=\ref[src];phasing=1'><span id="phasing_command">[phasing?"Dis":"En"]able phasing</span></a><br>
|
||||
<a href='?src=\ref[src];switch_damtype=1'>Reconfigure arm microtool arrays</a><br>
|
||||
</div>
|
||||
</div>
|
||||
"}
|
||||
output += ..()
|
||||
return output
|
||||
|
||||
/obj/mecha/combat/phazon/Topic(href, href_list)
|
||||
/obj/mecha/combat/phazon/GrantActions(var/mob/living/user, var/human_occupant = 0)
|
||||
..()
|
||||
if (href_list["switch_damtype"])
|
||||
src.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
|
||||
switch_damtype_action.chassis = src
|
||||
switch_damtype_action.Grant(user)
|
||||
|
||||
phasing_action.chassis = src
|
||||
phasing_action.Grant(user)
|
||||
|
||||
|
||||
/obj/mecha/combat/phazon/RemoveActions(var/mob/living/user, var/human_occupant = 0)
|
||||
..()
|
||||
switch_damtype_action.Remove(user)
|
||||
phasing_action.Remove(user)
|
||||
|
||||
|
||||
/datum/action/mecha/mech_switch_damtype
|
||||
name = "Reconfigure arm microtool arrays"
|
||||
button_icon_state = "mech_switch_damtype"
|
||||
|
||||
/datum/action/mecha/mech_switch_damtype/Activate()
|
||||
if(!owner || !chassis || chassis.occupant != owner)
|
||||
return
|
||||
var/obj/mecha/combat/phazon/P = chassis
|
||||
var/new_damtype
|
||||
switch(P.damtype)
|
||||
if("tox")
|
||||
new_damtype = "brute"
|
||||
P.occupant_message("Your exosuit's hands form into fists.")
|
||||
if("brute")
|
||||
new_damtype = "fire"
|
||||
P.occupant_message("A torch tip extends from your exosuit's hand, glowing red.")
|
||||
if("fire")
|
||||
new_damtype = "tox"
|
||||
P.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
|
||||
P.damtype = new_damtype.
|
||||
playsound(src, 'sound/mecha/mechmove01.ogg', 50, 1)
|
||||
|
||||
|
||||
/datum/action/mecha/mech_toggle_phasing
|
||||
name = "Enable Phasing"
|
||||
button_icon_state = "mech_toggle_phasing"
|
||||
|
||||
/datum/action/mecha/mech_toggle_phasing/Activate()
|
||||
if(!owner || !chassis || chassis.occupant != owner)
|
||||
return
|
||||
var/obj/mecha/combat/phazon/P = chassis
|
||||
P.phasing = !P.phasing
|
||||
P.occupant_message("<font color=\"[P.phasing?"#00f\">En":"#f00\">Dis"]abled phasing.</font>")
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/tool/rcd //HAHA IT MAKES WALLS GET IT
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/rcd //HAHA IT MAKES WALLS GET IT
|
||||
ME.attach(src)
|
||||
return
|
||||
@@ -8,23 +8,14 @@
|
||||
icon_state = "mecha_equip"
|
||||
force = 5
|
||||
origin_tech = "materials=2"
|
||||
var/equip_cooldown = 0
|
||||
var/equip_ready = 1
|
||||
var/equip_cooldown = 0 // cooldown after use
|
||||
var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
|
||||
var/energy_drain = 0
|
||||
var/obj/mecha/chassis = null
|
||||
var/range = MELEE //bitflags
|
||||
reliability = 1000
|
||||
var/salvageable = 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(target=1)
|
||||
sleep(equip_cooldown)
|
||||
set_ready_state(1)
|
||||
if(target && chassis && chassis.occupant)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/New()
|
||||
..()
|
||||
return
|
||||
@@ -42,10 +33,9 @@
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/destroy()//missiles detonating, teleporter creating singularity?
|
||||
/obj/item/mecha_parts/mecha_equipment/Destroy()
|
||||
if(chassis)
|
||||
chassis.equipment -= src
|
||||
listclearnulls(chassis.equipment)
|
||||
if(chassis.selected == src)
|
||||
chassis.selected = null
|
||||
src.update_chassis_page()
|
||||
@@ -55,13 +45,12 @@
|
||||
chassis.occupant << sound('sound/mecha/weapdestr.ogg',volume=50)
|
||||
else
|
||||
chassis.occupant << sound('sound/mecha/critdestr.ogg',volume=50)
|
||||
qdel(src)
|
||||
return
|
||||
chassis = null
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
log_message("Critical failure",1)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis) return
|
||||
@@ -90,12 +79,30 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||
return
|
||||
|
||||
/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/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
sleep(equip_cooldown)
|
||||
set_ready_state(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(M.equipment.len<M.max_equip)
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/attach(obj/mecha/M)
|
||||
M.equipment += src
|
||||
chassis = M
|
||||
@@ -121,9 +128,7 @@
|
||||
|
||||
/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
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||
|
||||
// Sleeper and Syringe gun
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper
|
||||
name = "mounted sleeper"
|
||||
desc = "Equipment for medical exosuits. A mounted sleeper that stabilizes patients and can inject reagents in the exosuit's reserves."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
@@ -8,35 +11,33 @@
|
||||
range = MELEE
|
||||
reliability = 1000
|
||||
equip_cooldown = 20
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/datum/global_iterator/pr_mech_sleeper
|
||||
var/mob/living/carbon/patient = null
|
||||
var/inject_amount = 10
|
||||
salvageable = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/can_attach(obj/mecha/medical/M)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/can_attach(obj/mecha/medical/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/New()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/attach(obj/mecha/M)
|
||||
..()
|
||||
pr_mech_sleeper = new /datum/global_iterator/mech_sleeper(list(src),0)
|
||||
pr_mech_sleeper.set_delay(equip_cooldown)
|
||||
return
|
||||
SSobj.processing |= src
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/allow_drop()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/allow_drop()
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/destroy()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(get_turf(src))
|
||||
return ..()
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/Exit(atom/movable/O)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/Exit(atom/movable/O)
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/action(mob/living/carbon/target)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/action(mob/living/carbon/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(!istype(target))
|
||||
@@ -44,7 +45,7 @@
|
||||
if(target.buckled)
|
||||
occupant_message("<span class='warning'>[target] will not fit into the sleeper because they are buckled to [target.buckled]!</span>")
|
||||
return
|
||||
if(occupant)
|
||||
if(patient)
|
||||
occupant_message("<span class='warning'>The sleeper is already occupied!</span>")
|
||||
return
|
||||
for(var/mob/living/simple_animal/slime/M in range(1,target))
|
||||
@@ -53,81 +54,65 @@
|
||||
return
|
||||
occupant_message("<span class='notice'>You start putting [target] into [src]...</span>")
|
||||
chassis.visible_message("<span class='warning'>[chassis] starts putting [target] into \the [src].</span>")
|
||||
var/C = chassis.loc
|
||||
var/T = target.loc
|
||||
if(do_after_cooldown(target))
|
||||
if(chassis.loc!=C || target.loc!=T)
|
||||
return
|
||||
if(occupant)
|
||||
if(patient)
|
||||
occupant_message("<span class='warning'>The sleeper is already occupied!</span>")
|
||||
return
|
||||
target.forceMove(src)
|
||||
occupant = target
|
||||
patient = target
|
||||
target.reset_view(src)
|
||||
/*
|
||||
if(target.client)
|
||||
target.client.perspective = EYE_PERSPECTIVE
|
||||
target.client.eye = chassis
|
||||
*/
|
||||
set_ready_state(0)
|
||||
pr_mech_sleeper.start()
|
||||
SSobj.processing |= src
|
||||
update_equip_info()
|
||||
occupant_message("<span class='notice'>[target] successfully loaded into [src]. Life support functions engaged.</span>")
|
||||
chassis.visible_message("<span class='warning'>[chassis] loads [target] into [src].</span>")
|
||||
log_message("[target] loaded. Life support functions engaged.")
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/go_out()
|
||||
if(!occupant)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/go_out()
|
||||
if(!patient)
|
||||
return
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant_message("[occupant] ejected. Life support functions disabled.")
|
||||
log_message("[occupant] ejected. Life support functions disabled.")
|
||||
occupant.reset_view()
|
||||
/*
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
*/
|
||||
occupant = null
|
||||
pr_mech_sleeper.stop()
|
||||
set_ready_state(1)
|
||||
return
|
||||
patient.forceMove(get_turf(src))
|
||||
occupant_message("[patient] ejected. Life support functions disabled.")
|
||||
log_message("[patient] ejected. Life support functions disabled.")
|
||||
patient.reset_view()
|
||||
SSobj.processing.Remove(src)
|
||||
update_equip_info()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/detach()
|
||||
if(occupant)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/detach()
|
||||
if(patient)
|
||||
occupant_message("<span class='warning'>Unable to detach [src] - equipment occupied!</span>")
|
||||
return
|
||||
pr_mech_sleeper.stop()
|
||||
SSobj.processing.Remove(src)
|
||||
update_equip_info()
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/get_equip_info()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
var/temp = ""
|
||||
if(occupant)
|
||||
temp = "<br />\[Occupant: [occupant] ([occupant.stat > 1 ? "*DECEASED*" : "Health: [occupant.health]%"])\]<br /><a href='?src=\ref[src];view_stats=1'>View stats</a>|<a href='?src=\ref[src];eject=1'>Eject</a>"
|
||||
if(patient)
|
||||
temp = "<br />\[Occupant: [patient] ([patient.stat > 1 ? "*DECEASED*" : "Health: [patient.health]%"])\]<br /><a href='?src=\ref[src];view_stats=1'>View stats</a>|<a href='?src=\ref[src];eject=1'>Eject</a>"
|
||||
return "[output] [temp]"
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/Topic(href,href_list)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(filter.get("eject"))
|
||||
go_out()
|
||||
if(filter.get("view_stats"))
|
||||
chassis.occupant << browse(get_occupant_stats(),"window=msleeper")
|
||||
chassis.occupant << browse(get_patient_stats(),"window=msleeper")
|
||||
onclose(chassis.occupant, "msleeper")
|
||||
return
|
||||
if(filter.get("inject"))
|
||||
inject_reagent(filter.getType("inject",/datum/reagent),filter.getObj("source"))
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_occupant_stats()
|
||||
if(!occupant)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/get_patient_stats()
|
||||
if(!patient)
|
||||
return
|
||||
return {"<html>
|
||||
<head>
|
||||
<title>[occupant] statistics</title>
|
||||
<title>[patient] statistics</title>
|
||||
<script language='javascript' type='text/javascript'>
|
||||
[js_byjax]
|
||||
</script>
|
||||
@@ -139,11 +124,11 @@
|
||||
<body>
|
||||
<h3>Health statistics</h3>
|
||||
<div id="lossinfo">
|
||||
[get_occupant_dam()]
|
||||
[get_patient_dam()]
|
||||
</div>
|
||||
<h3>Reagents in bloodstream</h3>
|
||||
<div id="reagents">
|
||||
[get_occupant_reagents()]
|
||||
[get_patient_reagents()]
|
||||
</div>
|
||||
<div id="injectwith">
|
||||
[get_available_reagents()]
|
||||
@@ -151,9 +136,9 @@
|
||||
</body>
|
||||
</html>"}
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_occupant_dam()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/get_patient_dam()
|
||||
var/t1
|
||||
switch(occupant.stat)
|
||||
switch(patient.stat)
|
||||
if(0)
|
||||
t1 = "Conscious"
|
||||
if(1)
|
||||
@@ -162,26 +147,26 @@
|
||||
t1 = "*dead*"
|
||||
else
|
||||
t1 = "Unknown"
|
||||
return {"<font color="[occupant.health > 50 ? "blue" : "red"]"><b>Health:</b> [occupant.stat > 1 ? "[t1]" : "[occupant.health]% ([t1])"]</font><br />
|
||||
<font color="[occupant.bodytemperature > 50 ? "blue" : "red"]"><b>Core Temperature:</b> [src.occupant.bodytemperature-T0C]°C ([src.occupant.bodytemperature*1.8-459.67]°F)</font><br />
|
||||
<font color="[occupant.getBruteLoss() < 60 ? "blue" : "red"]"><b>Brute Damage:</b> [occupant.getBruteLoss()]%</font><br />
|
||||
<font color="[occupant.getOxyLoss() < 60 ? "blue" : "red"]"><b>Respiratory Damage:</b> [occupant.getOxyLoss()]%</font><br />
|
||||
<font color="[occupant.getToxLoss() < 60 ? "blue" : "red"]"><b>Toxin Content:</b> [occupant.getToxLoss()]%</font><br />
|
||||
<font color="[occupant.getFireLoss() < 60 ? "blue" : "red"]"><b>Burn Severity:</b> [occupant.getFireLoss()]%</font><br />
|
||||
<font color="red">[occupant.getCloneLoss() ? "Subject appears to have cellular damage." : ""]</font><br />
|
||||
<font color="red">[occupant.getBrainLoss() ? "Significant brain damage detected." : ""]</font><br />
|
||||
return {"<font color="[patient.health > 50 ? "blue" : "red"]"><b>Health:</b> [patient.stat > 1 ? "[t1]" : "[patient.health]% ([t1])"]</font><br />
|
||||
<font color="[patient.bodytemperature > 50 ? "blue" : "red"]"><b>Core Temperature:</b> [patient.bodytemperature-T0C]°C ([patient.bodytemperature*1.8-459.67]°F)</font><br />
|
||||
<font color="[patient.getBruteLoss() < 60 ? "blue" : "red"]"><b>Brute Damage:</b> [patient.getBruteLoss()]%</font><br />
|
||||
<font color="[patient.getOxyLoss() < 60 ? "blue" : "red"]"><b>Respiratory Damage:</b> [patient.getOxyLoss()]%</font><br />
|
||||
<font color="[patient.getToxLoss() < 60 ? "blue" : "red"]"><b>Toxin Content:</b> [patient.getToxLoss()]%</font><br />
|
||||
<font color="[patient.getFireLoss() < 60 ? "blue" : "red"]"><b>Burn Severity:</b> [patient.getFireLoss()]%</font><br />
|
||||
<font color="red">[patient.getCloneLoss() ? "Subject appears to have cellular damage." : ""]</font><br />
|
||||
<font color="red">[patient.getBrainLoss() ? "Significant brain damage detected." : ""]</font><br />
|
||||
"}
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_occupant_reagents()
|
||||
if(occupant.reagents)
|
||||
for(var/datum/reagent/R in occupant.reagents.reagent_list)
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/get_patient_reagents()
|
||||
if(patient.reagents)
|
||||
for(var/datum/reagent/R in patient.reagents.reagent_list)
|
||||
if(R.volume > 0)
|
||||
. += "[R]: [round(R.volume,0.01)]<br />"
|
||||
return . || "None"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/get_available_reagents()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/get_available_reagents()
|
||||
var/output
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/SG = locate(/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun) in chassis
|
||||
var/obj/item/mecha_parts/mecha_equipment/syringe_gun/SG = locate(/obj/item/mecha_parts/mecha_equipment/syringe_gun) in chassis
|
||||
if(SG && SG.reagents && islist(SG.reagents.reagent_list))
|
||||
for(var/datum/reagent/R in SG.reagents.reagent_list)
|
||||
if(R.volume > 0)
|
||||
@@ -189,41 +174,41 @@
|
||||
return output
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/proc/inject_reagent(datum/reagent/R,obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/SG)
|
||||
if(!R || !occupant || !SG || !(SG in chassis.equipment))
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/proc/inject_reagent(datum/reagent/R,obj/item/mecha_parts/mecha_equipment/syringe_gun/SG)
|
||||
if(!R || !patient || !SG || !(SG in chassis.equipment))
|
||||
return 0
|
||||
var/to_inject = min(R.volume, inject_amount)
|
||||
if(to_inject && occupant.reagents.get_reagent_amount(R.id) + to_inject <= inject_amount*2)
|
||||
occupant_message("Injecting [occupant] with [to_inject] units of [R.name].")
|
||||
log_message("Injecting [occupant] with [to_inject] units of [R.name].")
|
||||
add_logs(chassis.occupant, occupant, "injected", "[name] ([R] - [to_inject] units)")
|
||||
SG.reagents.trans_id_to(occupant,R.id,to_inject)
|
||||
if(to_inject && patient.reagents.get_reagent_amount(R.id) + to_inject <= inject_amount*2)
|
||||
occupant_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
log_message("Injecting [patient] with [to_inject] units of [R.name].")
|
||||
add_logs(chassis.occupant, patient, "injected", "[name] ([R] - [to_inject] units)")
|
||||
SG.reagents.trans_id_to(patient,R.id,to_inject)
|
||||
update_equip_info()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/update_equip_info()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/update_equip_info()
|
||||
if(..())
|
||||
send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_occupant_dam())
|
||||
send_byjax(chassis.occupant,"msleeper.browser","reagents",get_occupant_reagents())
|
||||
send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_patient_dam())
|
||||
send_byjax(chassis.occupant,"msleeper.browser","reagents",get_patient_reagents())
|
||||
send_byjax(chassis.occupant,"msleeper.browser","injectwith",get_available_reagents())
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/sleeper/container_resist()
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/container_resist()
|
||||
go_out()
|
||||
|
||||
/datum/global_iterator/mech_sleeper
|
||||
|
||||
/datum/global_iterator/mech_sleeper/process(obj/item/mecha_parts/mecha_equipment/tool/sleeper/S)
|
||||
if(!S.chassis)
|
||||
S.set_ready_state(1)
|
||||
return stop()
|
||||
if(!S.chassis.has_charge(S.energy_drain))
|
||||
S.set_ready_state(1)
|
||||
S.log_message("Deactivated.")
|
||||
S.occupant_message("[src] deactivated - no power.")
|
||||
return stop()
|
||||
var/mob/living/carbon/M = S.occupant
|
||||
/obj/item/mecha_parts/mecha_equipment/sleeper/process()
|
||||
if(!chassis)
|
||||
SSobj.processing.Remove(src)
|
||||
return
|
||||
if(!chassis.has_charge(energy_drain))
|
||||
set_ready_state(1)
|
||||
log_message("Deactivated.")
|
||||
occupant_message("[src] deactivated - no power.")
|
||||
SSobj.processing.Remove(src)
|
||||
return
|
||||
var/mob/living/carbon/M = patient
|
||||
if(!M)
|
||||
return
|
||||
if(M.health > 0)
|
||||
@@ -234,11 +219,16 @@
|
||||
M.AdjustStunned(-4)
|
||||
if(M.reagents.get_reagent_amount("epinephrine") < 5)
|
||||
M.reagents.add_reagent("epinephrine", 5)
|
||||
S.chassis.use_power(S.energy_drain)
|
||||
S.update_equip_info()
|
||||
return
|
||||
chassis.use_power(energy_drain)
|
||||
update_equip_info()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||
|
||||
|
||||
|
||||
///////////////////////////////// Syringe Gun ///////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun
|
||||
name = "exosuit syringe gun"
|
||||
desc = "Equipment for medical exosuits. A chem synthesizer with syringe gun. Reagents inside are held in stasis, so no reactions will occur."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
@@ -251,42 +241,44 @@
|
||||
var/synth_speed = 5 //[num] reagent units per cycle
|
||||
energy_drain = 10
|
||||
var/mode = 0 //0 - fire syringe, 1 - analyze reagents.
|
||||
var/datum/global_iterator/mech_synth/synth
|
||||
range = MELEE|RANGED
|
||||
equip_cooldown = 10
|
||||
origin_tech = "materials=3;biotech=4;magnets=4;programming=3"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/New()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/New()
|
||||
..()
|
||||
flags |= NOREACT
|
||||
syringes = new
|
||||
known_reagents = list("epinephrine"="Epinephrine","charcoal"="Charcoal")
|
||||
processed_reagents = new
|
||||
create_reagents(max_volume)
|
||||
synth = new (list(src),0)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/detach()
|
||||
synth.stop()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/detach()
|
||||
SSobj.processing.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/critfail()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/critfail()
|
||||
..()
|
||||
flags &= ~NOREACT
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/can_attach(obj/mecha/medical/M)
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/can_attach(obj/mecha/medical/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/get_equip_info()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[<a href=\"?src=\ref[src];toggle_mode=1\">[mode? "Analyze" : "Launch"]</a>\]<br />\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]<br /><a href='?src=\ref[src];show_reagents=1'>Reagents list</a>"
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/action(atom/movable/target)
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/action(atom/movable/target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
if(istype(target,/obj/item/weapon/reagent_containers/syringe))
|
||||
@@ -303,8 +295,6 @@
|
||||
if(reagents.total_volume<=0)
|
||||
occupant_message("<span class=\"alert\">No available reagents to load syringe with.</span>")
|
||||
return
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
var/turf/trg = get_turf(target)
|
||||
var/obj/item/weapon/reagent_containers/syringe/mechsyringe = syringes[1]
|
||||
mechsyringe.forceMove(get_turf(chassis))
|
||||
@@ -315,7 +305,7 @@
|
||||
playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1)
|
||||
log_message("Launched [mechsyringe] from [src], targeting [target].")
|
||||
var/mob/originaloccupant = chassis.occupant
|
||||
spawn(-1)
|
||||
spawn(0)
|
||||
src = null //if src is deleted, still process the syringe
|
||||
for(var/i=0, i<6, i++)
|
||||
if(!mechsyringe)
|
||||
@@ -350,11 +340,10 @@
|
||||
mechsyringe.update_icon()
|
||||
break
|
||||
sleep(1)
|
||||
do_after_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/Topic(href,href_list)
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/Topic(href,href_list)
|
||||
..()
|
||||
var/datum/topic_input/filter = new (href,href_list)
|
||||
if(filter.get("toggle_mode"))
|
||||
@@ -375,7 +364,7 @@
|
||||
m++
|
||||
if(processed_reagents.len)
|
||||
message += " added to production"
|
||||
synth.start()
|
||||
SSobj.processing |= src
|
||||
occupant_message(message)
|
||||
occupant_message("Reagent processing started.")
|
||||
log_message("Reagent processing started.")
|
||||
@@ -392,7 +381,7 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_reagents_page()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/get_reagents_page()
|
||||
var/output = {"<html>
|
||||
<head>
|
||||
<title>Reagent Synthesizer</title>
|
||||
@@ -420,7 +409,7 @@
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_reagents_form()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/get_reagents_form()
|
||||
var/r_list = get_reagents_list()
|
||||
var/inputs
|
||||
if(r_list)
|
||||
@@ -435,14 +424,14 @@
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_reagents_list()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/get_reagents_list()
|
||||
var/output
|
||||
for(var/i=1 to known_reagents.len)
|
||||
var/reagent_id = known_reagents[i]
|
||||
output += {"<input type="checkbox" value="[reagent_id]" name="reagent_[i]" [(reagent_id in processed_reagents)? "checked=\"1\"" : null]> [known_reagents[reagent_id]]<br />"}
|
||||
return output
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/get_current_reagents()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/get_current_reagents()
|
||||
var/output
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.volume > 0)
|
||||
@@ -451,7 +440,7 @@
|
||||
output += "Total: [round(reagents.total_volume,0.001)]/[reagents.maximum_volume] - <a href=\"?src=\ref[src];purge_all=1\">Purge All</a>"
|
||||
return output || "None"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/load_syringe(obj/item/weapon/reagent_containers/syringe/S)
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/load_syringe(obj/item/weapon/reagent_containers/syringe/S)
|
||||
if(syringes.len<max_syringes)
|
||||
if(get_dist(src,S) >= 2)
|
||||
occupant_message("The syringe is too far away.")
|
||||
@@ -473,7 +462,7 @@
|
||||
occupant_message("The [src] syringe chamber is full.")
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/analyze_reagents(atom/A)
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/analyze_reagents(atom/A)
|
||||
if(get_dist(src,A) >= 4)
|
||||
occupant_message("The object is too far away.")
|
||||
return 0
|
||||
@@ -488,42 +477,38 @@
|
||||
occupant_message("Analyzis complete.")
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/proc/add_known_reagent(r_id,r_name)
|
||||
set_ready_state(0)
|
||||
do_after_cooldown()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/proc/add_known_reagent(r_id,r_name)
|
||||
if(!(r_id in known_reagents))
|
||||
known_reagents += r_id
|
||||
known_reagents[r_id] = r_name
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/update_equip_info()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/update_equip_info()
|
||||
if(..())
|
||||
send_byjax(chassis.occupant,"msyringegun.browser","reagents",get_current_reagents())
|
||||
send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/on_reagent_change()
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/on_reagent_change()
|
||||
..()
|
||||
update_equip_info()
|
||||
return
|
||||
|
||||
/datum/global_iterator/mech_synth
|
||||
delay = 100
|
||||
|
||||
/datum/global_iterator/mech_synth/process(var/obj/item/mecha_parts/mecha_equipment/tool/syringe_gun/S)
|
||||
if(!S.chassis)
|
||||
return stop()
|
||||
var/energy_drain = S.energy_drain*10
|
||||
if(!S.processed_reagents.len || S.reagents.total_volume >= S.reagents.maximum_volume || !S.chassis.has_charge(energy_drain))
|
||||
S.occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
|
||||
S.log_message("Reagent processing stopped.")
|
||||
return stop()
|
||||
if(anyprob(S.reliability))
|
||||
S.critfail()
|
||||
var/amount = S.synth_speed / S.processed_reagents.len
|
||||
for(var/reagent in S.processed_reagents)
|
||||
S.reagents.add_reagent(reagent,amount)
|
||||
S.chassis.use_power(energy_drain)
|
||||
return 1
|
||||
/obj/item/mecha_parts/mecha_equipment/syringe_gun/process()
|
||||
if(!chassis)
|
||||
SSobj.processing.Remove(src)
|
||||
return
|
||||
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
|
||||
occupant_message("<span class=\"alert\">Reagent processing stopped.</a>")
|
||||
log_message("Reagent processing stopped.")
|
||||
SSobj.processing.Remove(src)
|
||||
if(anyprob(reliability))
|
||||
critfail()
|
||||
var/amount = synth_speed / processed_reagents.len
|
||||
for(var/reagent in processed_reagents)
|
||||
reagents.add_reagent(reagent,amount)
|
||||
chassis.use_power(energy_drain)
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
|
||||
// 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) && !istype(target, /turf/simulated))
|
||||
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>", \
|
||||
"<span class='italics'>You hear drilling.</span>")
|
||||
|
||||
if(do_after_cooldown(target))
|
||||
if(istype(target, /turf/simulated/wall/r_wall))
|
||||
if(istype(src , /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
||||
if(do_after_cooldown(target))//To slow down how fast mechs can drill through the station
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(3)
|
||||
else
|
||||
occupant_message("<span class='danger'>[target] is too durable to drill through.</span>")
|
||||
else if(istype(target, /turf/simulated/mineral))
|
||||
for(var/turf/simulated/mineral/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
M.gets_drilled(chassis.occupant)
|
||||
log_message("Drilled through [target]")
|
||||
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(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
ore.Move(ore_box)
|
||||
else if(istype(target, /turf/simulated/floor/plating/asteroid))
|
||||
for(var/turf/simulated/floor/plating/asteroid/M in range(chassis,1))
|
||||
if(get_dir(chassis,M)&chassis.dir)
|
||||
M.gets_dug()
|
||||
log_message("Drilled through [target]")
|
||||
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(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
ore.Move(ore_box)
|
||||
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)
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/mecha/M as obj)
|
||||
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(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/limb/affecting = H.get_organ("chest")
|
||||
affecting.take_damage(drill_damage)
|
||||
H.update_damage_overlays(0)
|
||||
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=3"
|
||||
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"
|
||||
equip_cooldown = 30
|
||||
var/scanning = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/New()
|
||||
SSobj.processing |= src
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/process()
|
||||
if(!loc)
|
||||
SSobj.processing.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,509 @@
|
||||
|
||||
// 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) || src.loc.z == ZLEVEL_CENTCOM) 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) || src.loc.z == ZLEVEL_CENTCOM) return
|
||||
var/list/theareas = list()
|
||||
for(var/area/AR in orange(100, chassis))
|
||||
if(AR in theareas) continue
|
||||
theareas += AR
|
||||
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))
|
||||
P.target = target_turf
|
||||
P.creator = null
|
||||
P.icon = 'icons/obj/objects.dmi'
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
var/turf/T = get_turf(target)
|
||||
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 ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
|
||||
log_game("[key_name(chassis.occupant)] used a Wormhole Generator in ([T.x],[T.y],[T.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]",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]",src.get_equip_info())
|
||||
return 1
|
||||
else
|
||||
locked = null
|
||||
occupant_message("Lock on [locked] disengaged.")
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||
if(2)
|
||||
var/list/atoms = list()
|
||||
if(isturf(target))
|
||||
atoms = range(target,3)
|
||||
else
|
||||
atoms = orange(target,3)
|
||||
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]",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
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name]"
|
||||
|
||||
/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
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name]"
|
||||
|
||||
/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 = "exosuit repair droid"
|
||||
desc = "An automated repair droid for exosuits. Scans 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"
|
||||
energy_drain = 50
|
||||
range = 0
|
||||
var/health_boost = 1
|
||||
var/icon/droid_overlay
|
||||
var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
if(chassis)
|
||||
chassis.overlays -= droid_overlay
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/mecha/M as obj)
|
||||
..()
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid")
|
||||
M.overlays += droid_overlay
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
|
||||
chassis.overlays -= droid_overlay
|
||||
SSobj.processing.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> [src.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)
|
||||
SSobj.processing |= src
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid_a")
|
||||
log_message("Activated.")
|
||||
set_ready_state(0)
|
||||
else
|
||||
SSobj.processing.Remove(src)
|
||||
droid_overlay = new(src.icon, icon_state = "repair_droid")
|
||||
log_message("Deactivated.")
|
||||
set_ready_state(1)
|
||||
chassis.overlays += droid_overlay
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
|
||||
if(!chassis)
|
||||
SSobj.processing.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))
|
||||
SSobj.processing.Remove(src)
|
||||
set_ready_state(1)
|
||||
else //no repair needed, we turn off
|
||||
SSobj.processing.Remove(src)
|
||||
set_ready_state(1)
|
||||
chassis.overlays -= droid_overlay
|
||||
droid_overlay = new(src.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=3"
|
||||
energy_drain = 0
|
||||
range = 0
|
||||
var/coeff = 100
|
||||
var/list/use_channels = list(EQUIP,ENVIRON,LIGHT)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach()
|
||||
SSobj.processing.Remove(src)
|
||||
..()
|
||||
return
|
||||
|
||||
/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.master && A.master.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
|
||||
SSobj.processing |= src
|
||||
set_ready_state(0)
|
||||
log_message("Activated.")
|
||||
else
|
||||
SSobj.processing.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> [src.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)
|
||||
SSobj.processing.Remove(src)
|
||||
set_ready_state(1)
|
||||
return
|
||||
var/cur_charge = chassis.get_charge()
|
||||
if(isnull(cur_charge) || !chassis.cell)
|
||||
SSobj.processing.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.master.powered(c))
|
||||
pow_chan = c
|
||||
break
|
||||
if(pow_chan)
|
||||
var/delta = min(20, chassis.cell.maxcharge-cur_charge)
|
||||
chassis.give_power(delta)
|
||||
A.master.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=1"
|
||||
range = MELEE
|
||||
var/coeff = 100
|
||||
var/obj/item/stack/sheet/fuel
|
||||
var/max_fuel = 150000
|
||||
var/fuel_per_cycle_idle = 25
|
||||
var/fuel_per_cycle_active = 200
|
||||
var/power_per_cycle = 20
|
||||
reliability = 1000
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/New()
|
||||
..()
|
||||
generator_init()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/generator_init()
|
||||
fuel = new /obj/item/stack/sheet/mineral/plasma(src)
|
||||
fuel.amount = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/detach()
|
||||
SSobj.processing.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)
|
||||
SSobj.processing |= src
|
||||
log_message("Activated.")
|
||||
else
|
||||
set_ready_state(1)
|
||||
SSobj.processing.Remove(src)
|
||||
log_message("Deactivated.")
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[[fuel]: [round(fuel.amount*fuel.perunit,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]",src.get_equip_info())
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/stack/sheet/P)
|
||||
if(P.type == fuel.type && P.amount > 0)
|
||||
var/to_load = max(max_fuel - fuel.amount*fuel.perunit,0)
|
||||
if(to_load)
|
||||
var/units = min(max(round(to_load / P.perunit),1),P.amount)
|
||||
fuel.amount += units
|
||||
P.use(units)
|
||||
occupant_message("[units] unit\s of [fuel] successfully loaded.")
|
||||
return units
|
||||
else
|
||||
occupant_message("Unit is full.")
|
||||
return 0
|
||||
else
|
||||
occupant_message("<span class='warning'>[fuel] traces in target minimal! [P] 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(!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("The [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("The [src] suddenly disgorges a cloud of plasma.")
|
||||
T.assume_air(GM)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/process()
|
||||
if(!chassis)
|
||||
SSobj.processing.Remove(src)
|
||||
set_ready_state(1)
|
||||
return
|
||||
if(fuel.amount<=0)
|
||||
SSobj.processing.Remove(src)
|
||||
log_message("Deactivated - no fuel.")
|
||||
set_ready_state(1)
|
||||
return
|
||||
if(anyprob(reliability))
|
||||
set_ready_state(1) //inactive
|
||||
critfail()
|
||||
SSobj.processing.Remove(src)
|
||||
return
|
||||
var/cur_charge = chassis.get_charge()
|
||||
if(isnull(cur_charge))
|
||||
set_ready_state(1)
|
||||
occupant_message("No powercell detected.")
|
||||
log_message("Deactivated.")
|
||||
SSobj.processing.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.perunit,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=3;engineering=3"
|
||||
max_fuel = 50000
|
||||
fuel_per_cycle_idle = 10
|
||||
fuel_per_cycle_active = 30
|
||||
power_per_cycle = 50
|
||||
var/rad_per_cycle = 0.3
|
||||
reliability = 1000
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
|
||||
fuel = new /obj/item/stack/sheet/mineral/uranium(src)
|
||||
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))
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
M.irradiate(rad_per_cycle*3)
|
||||
else
|
||||
M.irradiate(rad_per_cycle)
|
||||
|
||||
|
||||
@@ -0,0 +1,424 @@
|
||||
|
||||
//Hydraulic clamp, Kill clamp, Extinguisher, 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 as obj)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/mecha/M as obj)
|
||||
..()
|
||||
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 == "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)])")
|
||||
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 == "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>")
|
||||
if(chassis.occupant.a_intent == "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 = PoolOrNew(/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 as obj)
|
||||
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."
|
||||
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/disabled = 0 //malf
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target)
|
||||
if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve
|
||||
disabled = 1
|
||||
else
|
||||
disabled = 0
|
||||
if(!istype(target, /turf) && !istype(target, /obj/machinery/door/airlock))
|
||||
target = get_turf(target)
|
||||
if(!action_checks(target) || disabled || get_dist(chassis, target)>3)
|
||||
return
|
||||
playsound(chassis, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
switch(mode)
|
||||
if(0)
|
||||
if (istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = target
|
||||
occupant_message("Deconstructing [W]...")
|
||||
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 [F]...")
|
||||
if(do_after_cooldown(target))
|
||||
chassis.spark_system.start()
|
||||
F.ChangeTurf(F.baseturf)
|
||||
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))
|
||||
if(disabled) return
|
||||
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/do_after_cooldown(var/atom/target)
|
||||
. = ..()
|
||||
if(disabled)
|
||||
return 0
|
||||
|
||||
/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.")
|
||||
energy_drain = initial(energy_drain)
|
||||
if(1)
|
||||
occupant_message("Switched RCD to Construct.")
|
||||
energy_drain = 2*initial(energy_drain)
|
||||
if(2)
|
||||
occupant_message("Switched RCD to Construct Airlock.")
|
||||
energy_drain = 2*initial(energy_drain)
|
||||
return
|
||||
|
||||
/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/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)
|
||||
..()
|
||||
|
||||
/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
|
||||
@@ -20,7 +20,6 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/action(atom/target)
|
||||
if(!action_checks(target))
|
||||
return 0
|
||||
set_ready_state(0)
|
||||
|
||||
var/turf/curloc = get_turf(chassis)
|
||||
var/turf/targloc = get_turf(target)
|
||||
@@ -29,6 +28,10 @@
|
||||
if (targloc == curloc)
|
||||
return 0
|
||||
|
||||
set_ready_state(0)
|
||||
chassis.can_move = 0
|
||||
spawn(shot_delay*projectiles_per_shot)
|
||||
chassis.can_move = 1
|
||||
for(var/i=1 to get_shot_amount())
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
A.firer = chassis.occupant
|
||||
@@ -49,9 +52,9 @@
|
||||
sleep(shot_delay)
|
||||
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return 1
|
||||
|
||||
|
||||
//Base energy weapon type
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "general energy weapon"
|
||||
@@ -59,10 +62,11 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/get_shot_amount()
|
||||
return min(round(chassis.cell.charge / energy_drain), projectiles_per_shot)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/action(atom/target)
|
||||
..()
|
||||
chassis.use_power(energy_drain * get_shot_amount())
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/start_cooldown()
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain*get_shot_amount())
|
||||
sleep(equip_cooldown)
|
||||
set_ready_state(1)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
equip_cooldown = 8
|
||||
@@ -112,10 +116,11 @@
|
||||
projectile = /obj/item/projectile/plasma/adv/mech
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/M)
|
||||
if(istype(M, /obj/mecha/working))
|
||||
if(M.equipment.len < M.max_equip)
|
||||
return 1
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma/can_attach(obj/mecha/working/M)
|
||||
if(..()) //combat mech
|
||||
return 1
|
||||
else if(M.equipment.len < M.max_equip && istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/projectile/beam/pulse/heavy
|
||||
@@ -158,8 +163,8 @@
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/action(target)
|
||||
if(!action_checks(target)) return 0
|
||||
set_ready_state(0)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1)
|
||||
chassis.occupant_message("<font color='red' size='5'>HONK</font>")
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
@@ -177,24 +182,12 @@
|
||||
M.Paralyse(4)
|
||||
else
|
||||
M.Jitter(500)
|
||||
/* //else the mousetraps are useless
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isobj(H.shoes))
|
||||
var/thingy = H.shoes
|
||||
H.unEquip(H.shoes)
|
||||
walk_away(thingy,chassis,15,2)
|
||||
spawn(20)
|
||||
if(thingy)
|
||||
walk(thingy,0)
|
||||
*/
|
||||
chassis.use_power(energy_drain)
|
||||
|
||||
log_message("Honked from [src.name]. HONK!")
|
||||
var/turf/T = get_turf(src)
|
||||
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 Mecha Honker in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
|
||||
log_game("[chassis.occupant.ckey]([chassis.occupant]) used a Mecha Honker in ([T.x],[T.y],[T.z])")
|
||||
do_after_cooldown()
|
||||
return
|
||||
return 1
|
||||
|
||||
|
||||
//Base ballistic weapon type
|
||||
@@ -212,8 +205,6 @@
|
||||
return 0
|
||||
if(projectiles <= 0)
|
||||
return 0
|
||||
if(!equip_ready)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/get_equip_info()
|
||||
@@ -238,8 +229,9 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action(atom/target)
|
||||
if(..())
|
||||
src.projectiles -= get_shot_amount()
|
||||
projectiles -= get_shot_amount()
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine
|
||||
@@ -284,7 +276,27 @@
|
||||
deviation = 0.3
|
||||
shot_delay = 2
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher
|
||||
var/missile_speed = 2
|
||||
var/missile_range = 30
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/action(target)
|
||||
if(!action_checks(target))
|
||||
return
|
||||
var/obj/O = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
log_message("Launched a [O.name] from [name], targeting [target].")
|
||||
projectiles--
|
||||
proj_init(O)
|
||||
spawn(0)
|
||||
O.throw_at(target, missile_range, missile_speed, spin = 0)
|
||||
return 1
|
||||
|
||||
//used for projectile initilisation (priming flashbang) and additional logging
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/proc/proj_init(var/obj/O)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack
|
||||
name = "\improper SRM-8 missile rack"
|
||||
desc = "A weapon for combat exosuits. Shoots light explosive missiles."
|
||||
icon_state = "mecha_missilerack"
|
||||
@@ -293,24 +305,12 @@
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
equip_cooldown = 60
|
||||
var/missile_speed = 2
|
||||
var/missile_range = 30
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/missile/M = new projectile(chassis.loc)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack/proj_init(var/obj/item/missile/M)
|
||||
M.primed = 1
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
M.throw_at(target, missile_range, missile_speed)
|
||||
projectiles--
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[key_name(chassis.occupant, chassis.occupant.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[chassis.occupant]'>?</A>) fired a [src] in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] ([T.x],[T.y],[T.z])")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/missile
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
@@ -324,9 +324,8 @@
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
name = "\improper SGL-6 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed flashbangs."
|
||||
icon_state = "mecha_grenadelnchr"
|
||||
@@ -338,24 +337,16 @@
|
||||
equip_cooldown = 60
|
||||
var/det_time = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/grenade/flashbang/F = new projectile(chassis.loc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
F.throw_at(target, missile_range, missile_speed)
|
||||
projectiles--
|
||||
log_message("Fired from [src.name], targeting [target].")
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(var/obj/item/weapon/grenade/flashbang/F)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[key_name(chassis.occupant, chassis.occupant.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[chassis.occupant]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[chassis.occupant]'>FLW</A>) fired a [src] in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
|
||||
message_admins("[key_name(chassis.occupant, chassis.occupant.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[chassis.occupant]'>?</A>) fired a [src] in ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)",0,1)
|
||||
log_game("[key_name(chassis.occupant)] fired a [src] ([T.x],[T.y],[T.z])")
|
||||
spawn(det_time)
|
||||
if(F)
|
||||
F.prime()
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang //Because I am a heartless bastard -Sieve //Heartless? for making the poor man's honkblast? - Kaze
|
||||
name = "\improper SOB-3 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed clusterbangs. You monster."
|
||||
projectiles = 3
|
||||
@@ -363,7 +354,7 @@
|
||||
projectile_energy_cost = 1600 //getting off cheap seeing as this is 3 times the flashbangs held in the grenade launcher.
|
||||
equip_cooldown = 90
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
|
||||
name = "banana mortar"
|
||||
desc = "Equipment for clown exosuits. Launches banana peels."
|
||||
icon_state = "mecha_bananamrtr"
|
||||
@@ -374,25 +365,13 @@
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/weapon/grown/bananapeel/B = new projectile(chassis.loc,60)
|
||||
playsound(chassis, fire_sound, 60, 1)
|
||||
B.throw_at(target, missile_range, missile_speed)
|
||||
projectiles--
|
||||
log_message("Bananed from [src.name], targeting [target]. HONK!")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar
|
||||
name = "mousetrap mortar"
|
||||
desc = "Equipment for clown exosuits. Launches armed mousetraps."
|
||||
icon_state = "mecha_mousetrapmrtr"
|
||||
@@ -403,20 +382,12 @@
|
||||
projectile_energy_cost = 100
|
||||
equip_cooldown = 10
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/action(target)
|
||||
if(!action_checks(target)) return
|
||||
set_ready_state(0)
|
||||
var/obj/item/device/assembly/mousetrap/armed/M = new projectile(chassis.loc)
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar/proj_init(var/obj/item/device/assembly/mousetrap/armed/M)
|
||||
M.secured = 1
|
||||
playsound(chassis, fire_sound, 60, 1)
|
||||
M.throw_at(target, missile_range, missile_speed)
|
||||
projectiles--
|
||||
log_message("Launched a mouse-trap from [src.name], targeting [target]. HONK!")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
|
||||
/obj/mecha/proc/take_damage(amount, type="brute")
|
||||
if(amount)
|
||||
var/damage = absorbDamage(amount,type)
|
||||
health -= damage
|
||||
update_health()
|
||||
occupant_message("<span class='userdanger'>Taking damage!</span>")
|
||||
log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1)
|
||||
|
||||
/obj/mecha/proc/absorbDamage(damage,damage_type)
|
||||
var/coeff = 1
|
||||
if(damage_absorption[damage_type])
|
||||
coeff = damage_absorption[damage_type]
|
||||
return damage*coeff
|
||||
|
||||
|
||||
/obj/mecha/proc/update_health()
|
||||
if(src.health > 0)
|
||||
src.spark_system.start()
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/mecha/attack_hulk(mob/living/carbon/human/user)
|
||||
if(!prob(src.deflect_chance))
|
||||
..(user, 1)
|
||||
take_damage(15)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
user.visible_message("<span class='danger'>[user] hits [src.name], doing some damage.</span>", "<span class='danger'>You hit [src.name] with all your might. The metal creaks and bends.</span>")
|
||||
occupant_message("<span class='userdanger'>[user] hits [src.name], doing some damage.</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/mecha/attack_hand(mob/living/user as mob)
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
user.do_attack_animation(src)
|
||||
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
user.visible_message("<span class='danger'>[user] hits [src.name]. Nothing happens</span>","<span class='danger'>You hit [src.name] with no visible effect.</span>")
|
||||
src.log_append_to_last("Armor saved.")
|
||||
return
|
||||
|
||||
/obj/mecha/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/mecha/attack_alien(mob/living/user as mob)
|
||||
src.log_message("Attack by alien. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE) //Now stompy alien killer mechs are actually scary to aliens!
|
||||
user.do_attack_animation(src)
|
||||
if(!prob(src.deflect_chance))
|
||||
take_damage(15)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>The [user] slashes at [src.name]'s armor!</span>")
|
||||
else
|
||||
src.log_append_to_last("Armor saved.")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
user << "\green Your claws had no effect!"
|
||||
visible_message("<span class='notice'>The [user] rebounds off [src.name]'s armor!</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/attack_animal(mob/living/simple_animal/user as mob)
|
||||
src.log_message("Attack by simple animal. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(user.melee_damage_upper == 0)
|
||||
user.emote("[user.friendly] [src]")
|
||||
else
|
||||
user.do_attack_animation(src)
|
||||
if(!prob(src.deflect_chance))
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
take_damage(damage)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
visible_message("<span class='danger'>[user] [user.attacktext] [src]!</span>")
|
||||
add_logs(user, src, "attacked", admin=0)
|
||||
else
|
||||
src.log_append_to_last("Armor saved.")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
visible_message("<span class='notice'>The [user] rebounds off [src.name]'s armor!</span>")
|
||||
add_logs(user, src, "attacked", admin=0)
|
||||
return
|
||||
|
||||
/obj/mecha/attack_tk()
|
||||
return
|
||||
|
||||
/obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper
|
||||
log_message("Hit by [A].",1)
|
||||
var/deflection = deflect_chance
|
||||
var/dam_coeff = 1
|
||||
var/counter_tracking = 0
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment)
|
||||
if(B.projectile_react())
|
||||
deflection *= B.deflect_coeff
|
||||
dam_coeff *= B.damage_coeff
|
||||
counter_tracking = 1
|
||||
break
|
||||
if(istype(A, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(!counter_tracking)
|
||||
A.forceMove(src)
|
||||
visible_message("The [A] fastens firmly to [src].")
|
||||
return
|
||||
else
|
||||
deflection = 100 //will bounce off
|
||||
if(prob(deflection) || istype(A, /mob))
|
||||
visible_message("[A] bounces off the [src.name] armor")
|
||||
log_append_to_last("Armor saved.")
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
M.take_organ_damage(10)
|
||||
else if(istype(A, /obj))
|
||||
var/obj/O = A
|
||||
if(O.throwforce)
|
||||
visible_message("<span class='danger'>[src.name] is hit by [A].</span>")
|
||||
take_damage(O.throwforce*dam_coeff)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper
|
||||
log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).",1)
|
||||
var/deflection = deflect_chance
|
||||
var/dam_coeff = 1
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment)
|
||||
if(B.projectile_react())
|
||||
deflection *= B.deflect_coeff
|
||||
dam_coeff *= B.damage_coeff
|
||||
break
|
||||
if(prob(deflection))
|
||||
visible_message("The [src.name] armor deflects the projectile")
|
||||
log_append_to_last("Armor saved.")
|
||||
return
|
||||
var/ignore_threshold
|
||||
if(Proj.flag == "taser")
|
||||
use_power(200)
|
||||
return
|
||||
if(istype(Proj, /obj/item/projectile/beam/pulse))
|
||||
ignore_threshold = 1
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
take_damage(Proj.damage*dam_coeff,Proj.flag)
|
||||
visible_message("<span class='danger'>[src.name] is hit by [Proj].</span>")
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),ignore_threshold)
|
||||
Proj.on_hit(src)
|
||||
|
||||
/obj/mecha/ex_act(severity, target)
|
||||
src.log_message("Affected by explosion of severity: [severity].",1)
|
||||
if(prob(src.deflect_chance))
|
||||
severity++
|
||||
log_append_to_last("Armor saved, changing severity to [severity].")
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if (prob(30))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(initial(src.health)/2)
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(initial(src.health)/5)
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
|
||||
return
|
||||
|
||||
/obj/mecha/blob_act()
|
||||
take_damage(30, "brute")
|
||||
return
|
||||
|
||||
/obj/mecha/emp_act(severity)
|
||||
if(get_charge())
|
||||
use_power((cell.charge/2)/severity)
|
||||
take_damage(50 / severity,"energy")
|
||||
src.log_message("EMP detected",1)
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
|
||||
return
|
||||
|
||||
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature>src.max_temperature)
|
||||
log_message("Exposed to dangerous temperature.",1)
|
||||
take_damage(5,"fire")
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL))
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
|
||||
if(istype(W, /obj/item/device/mmi))
|
||||
if(mmi_move_inside(W,user))
|
||||
user << "[src]-[W] interface initialized successfuly"
|
||||
else
|
||||
user << "[src]-[W] interface initialization failed."
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
|
||||
var/obj/item/mecha_parts/mecha_equipment/E = W
|
||||
spawn()
|
||||
if(E.can_attach(src))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
E.attach(src)
|
||||
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You were unable to attach [W] to [src]!</span>"
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if(add_req_access || maint_access)
|
||||
if(internals_access_allowed(user))
|
||||
var/obj/item/weapon/card/id/id_card
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
id_card = W
|
||||
else
|
||||
var/obj/item/device/pda/pda = W
|
||||
id_card = pda.id
|
||||
output_maintenance_dialog(id_card, user)
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>Invalid ID: Access denied.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Maintenance protocols disabled by operator.</span>"
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(state==1)
|
||||
state = 2
|
||||
user << "<span class='notice'>You undo the securing bolts.</span>"
|
||||
else if(state==2)
|
||||
state = 1
|
||||
user << "<span class='notice'>You tighten the securing bolts.</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(state==2)
|
||||
state = 3
|
||||
user << "<span class='notice'>You open the hatch to the power unit.</span>"
|
||||
else if(state==3)
|
||||
state=2
|
||||
user << "<span class='notice'>You close the hatch to the power unit.</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(state == 3 && (internal_damage & MECHA_INT_SHORT_CIRCUIT))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.use(2))
|
||||
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
|
||||
user << "<span class='notice'>You replace the fused wires.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need two lengths of cable to fix this mech!</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(internal_damage & MECHA_INT_TEMP_CONTROL)
|
||||
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
|
||||
user << "<span class='notice'>You repair the damaged temperature controller.</span>"
|
||||
else if(state==3 && src.cell)
|
||||
src.cell.forceMove(src.loc)
|
||||
src.cell = null
|
||||
state = 4
|
||||
user << "<span class='notice'>You unscrew and pry out the powercell.</span>"
|
||||
src.log_message("Powercell removed")
|
||||
else if(state==4 && src.cell)
|
||||
state=3
|
||||
user << "<span class='notice'>You screw the cell in place.</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
if(state==4)
|
||||
if(!src.cell)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
var/obj/item/weapon/stock_parts/cell/C = W
|
||||
user << "<span class='notice'>You install the powercell.</span>"
|
||||
C.forceMove(src)
|
||||
C.use(C.charge * 0.8)
|
||||
src.cell = C
|
||||
src.log_message("Powercell installed")
|
||||
else
|
||||
user << "<span class='notice'>There's already a powercell installed.</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(src.health<initial(src.health))
|
||||
if (WT.remove_fuel(0,user))
|
||||
if (internal_damage & MECHA_INT_TANK_BREACH)
|
||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
user << "<span class='notice'>You repair the damaged gas tank.</span>"
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] repairs some damage to [src.name].</span>")
|
||||
src.health += min(10, initial(src.health)-src.health)
|
||||
else
|
||||
user << "<span class='warning'>The welder must be on for this task!</span>"
|
||||
return 1
|
||||
else
|
||||
user << "<span class='warning'>The [src.name] is at full integrity!</span>"
|
||||
return 1
|
||||
|
||||
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(!user.unEquip(W))
|
||||
user << "<span class='warning'>\the [W] is stuck to your hand, you cannot put it in \the [src]!</span>"
|
||||
return
|
||||
W.forceMove(src)
|
||||
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
|
||||
return
|
||||
|
||||
else if(!(W.flags&NOBLUDGEON))
|
||||
user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code.
|
||||
user.do_attack_animation(src)
|
||||
log_message("Attacked by [W]. Attacker - [user]")
|
||||
var/deflection = deflect_chance
|
||||
var/dam_coeff = 1
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/B in equipment)
|
||||
if(B.attack_react(user))
|
||||
deflection *= B.deflect_coeff
|
||||
dam_coeff *= B.damage_coeff
|
||||
break
|
||||
if(prob(deflection))
|
||||
user << "<span class='danger'>The [W] bounces off [src.name] armor.</span>"
|
||||
src.log_append_to_last("Armor saved.")
|
||||
return 0
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] hits [src] with [W].</span>", "<span class='danger'>You hit [src] with [W].</span>")
|
||||
take_damage(round(W.force*dam_coeff),W.damtype)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
return 1
|
||||
|
||||
|
||||
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
|
||||
if(target.reagents)
|
||||
if(target.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
|
||||
target.reagents.add_reagent("cryptobiolin", force/2)
|
||||
if(target.reagents.get_reagent_amount("toxin") + force < force*2)
|
||||
target.reagents.add_reagent("toxin", force/2.5)
|
||||
|
||||
|
||||
/atom/proc/mech_melee_attack(obj/mecha/M)
|
||||
return
|
||||
|
||||
/obj/mecha/mech_melee_attack(obj/mecha/M)
|
||||
if(M.damtype =="brute")
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
else if(M.damtype == "fire")
|
||||
playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
take_damage(M.force, damtype)
|
||||
add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
return
|
||||
@@ -175,27 +175,7 @@
|
||||
/obj/item/mecha_parts/chassis/firefighter/New()
|
||||
..()
|
||||
construct = new /datum/construction/mecha/firefighter_chassis(src)
|
||||
/*
|
||||
/obj/item/mecha_parts/part/firefighter_torso
|
||||
name="Ripley-on-Fire Torso"
|
||||
icon_state = "ripley_harness"
|
||||
|
||||
/obj/item/mecha_parts/part/firefighter_left_arm
|
||||
name="Ripley-on-Fire Left Arm"
|
||||
icon_state = "ripley_l_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/firefighter_right_arm
|
||||
name="Ripley-on-Fire Right Arm"
|
||||
icon_state = "ripley_r_arm"
|
||||
|
||||
/obj/item/mecha_parts/part/firefighter_left_leg
|
||||
name="Ripley-on-Fire Left Leg"
|
||||
icon_state = "ripley_l_leg"
|
||||
|
||||
/obj/item/mecha_parts/part/firefighter_right_leg
|
||||
name="Ripley-on-Fire Right Leg"
|
||||
icon_state = "ripley_r_leg"
|
||||
*/
|
||||
|
||||
////////// HONK
|
||||
|
||||
@@ -334,13 +314,6 @@
|
||||
icon_state = "odysseus_r_leg"
|
||||
origin_tech = "programming=2;materials=2;engineering=2"
|
||||
|
||||
/*/obj/item/mecha_parts/part/odysseus_armor
|
||||
name="Odysseus Carapace"
|
||||
icon_state = "odysseus_armor"
|
||||
origin_tech = "materials=3;engineering=3"
|
||||
construction_time = 200
|
||||
construction_cost = list("metal"=15000)*/
|
||||
|
||||
|
||||
///////// Circuitboards
|
||||
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
|
||||
////////////////////////////////////
|
||||
///// Rendering stats window ///////
|
||||
////////////////////////////////////
|
||||
|
||||
/obj/mecha/proc/get_stats_html()
|
||||
var/output = {"<html>
|
||||
<head><title>[src.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'>
|
||||
[src.get_stats_part()]
|
||||
</div>
|
||||
<div id='eq_list'>
|
||||
[src.get_equipment_list()]
|
||||
</div>
|
||||
<hr>
|
||||
<div id='commands'>
|
||||
[src.get_commands()]
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"}
|
||||
return output
|
||||
|
||||
|
||||
/obj/mecha/proc/report_internal_damage()
|
||||
var/output = null
|
||||
var/list/dam_reports = list(
|
||||
"[MECHA_INT_FIRE]" = "<span class='userdanger'>INTERNAL FIRE</span>",
|
||||
"[MECHA_INT_TEMP_CONTROL]" = "<span class='userdanger'>LIFE SUPPORT SYSTEM MALFUNCTION</span>",
|
||||
"[MECHA_INT_TANK_BREACH]" = "<span class='userdanger'>GAS TANK BREACH</span>",
|
||||
"[MECHA_INT_CONTROL_LOST]" = "<span class='userdanger'>COORDINATION SYSTEM CALIBRATION FAILURE</span> - <a href='?src=\ref[src];repair_int_control_lost=1'>Recalibrate</a>",
|
||||
"[MECHA_INT_SHORT_CIRCUIT]" = "<span class='userdanger'>SHORT CIRCUIT</span>"
|
||||
)
|
||||
for(var/tflag in dam_reports)
|
||||
var/intdamflag = text2num(tflag)
|
||||
if(internal_damage & intdamflag)
|
||||
output += dam_reports[tflag]
|
||||
output += "<br />"
|
||||
if(return_pressure() > WARNING_HIGH_PRESSURE)
|
||||
output += "<span class='userdanger'>DANGEROUSLY HIGH CABIN PRESSURE</span><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?"<span class='userdanger'>DAMAGE LEVEL CRITICAL</span><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 ? "<span class='danger'>[cabin_pressure]</span>": cabin_pressure]kPa<br>
|
||||
<b>Cabin temperature: </b> [return_temperature()]°K|[return_temperature() - T0C]°C<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]
|
||||
"}
|
||||
return output
|
||||
|
||||
/obj/mecha/proc/get_commands()
|
||||
var/output = {"<div class='wr'>
|
||||
<div class='header'>Electronics</div>
|
||||
<div class='links'>
|
||||
<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'>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>
|
||||
"}
|
||||
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>[src.name] Log</title></head><body style='font: 13px 'Courier', monospace;'>"
|
||||
for(var/list/entry in log)
|
||||
output += {"<div style='font-weight: bold;'>[entry["time"]] [time2text(entry["date"],"MMM DD")] [entry["year"]]</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> <span class='danger'>(Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)</span>"
|
||||
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
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
///// Topic /////
|
||||
/////////////////
|
||||
|
||||
/obj/mecha/Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["close"])
|
||||
return
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
|
||||
if(in_range(src, usr))
|
||||
|
||||
if(href_list["req_access"] && add_req_access)
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
|
||||
if(href_list["maint_access"] && maint_access)
|
||||
var/mob/user = filter.getMob("user")
|
||||
if(user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
user << "The securing bolts are now exposed."
|
||||
else if(state==1)
|
||||
state = 0
|
||||
user << "The securing bolts are now hidden."
|
||||
output_maintenance_dialog(filter.getObj("id_card"),user)
|
||||
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
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
|
||||
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"))
|
||||
operation_req_access += filter.getNum("add_req_access")
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
|
||||
if(href_list["del_req_access"] && add_req_access && filter.getObj("id_card"))
|
||||
operation_req_access -= filter.getNum("del_req_access")
|
||||
output_access_dialog(filter.getObj("id_card"),filter.getMob("user"))
|
||||
|
||||
if(href_list["finish_req_access"])
|
||||
add_req_access = 0
|
||||
var/mob/user = filter.getMob("user")
|
||||
user << browse(null,"window=exosuit_add_access")
|
||||
|
||||
if(usr != occupant)
|
||||
return
|
||||
|
||||
if(href_list["update_content"])
|
||||
send_byjax(src.occupant,"exosuit.browser","content",src.get_stats_part())
|
||||
|
||||
if(href_list["select_equip"])
|
||||
var/obj/item/mecha_parts/mecha_equipment/equip = filter.getObj("select_equip")
|
||||
if(equip)
|
||||
src.selected = equip
|
||||
src.occupant_message("You switch to [equip]")
|
||||
src.visible_message("[src] raises [equip]")
|
||||
send_byjax(src.occupant,"exosuit.browser","eq_list",src.get_equipment_list())
|
||||
|
||||
if(href_list["rmictoggle"])
|
||||
radio.broadcasting = !radio.broadcasting
|
||||
send_byjax(src.occupant,"exosuit.browser","rmicstate",(radio.broadcasting?"Engaged":"Disengaged"))
|
||||
|
||||
if(href_list["rspktoggle"])
|
||||
radio.listening = !radio.listening
|
||||
send_byjax(src.occupant,"exosuit.browser","rspkstate",(radio.listening?"Engaged":"Disengaged"))
|
||||
|
||||
if(href_list["rfreq"])
|
||||
var/new_frequency = (radio.frequency + filter.getNum("rfreq"))
|
||||
if (!radio.freerange || (radio.frequency < 1200 || radio.frequency > 1600))
|
||||
new_frequency = sanitize_frequency(new_frequency)
|
||||
radio.set_frequency(new_frequency)
|
||||
send_byjax(src.occupant,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]")
|
||||
|
||||
if (href_list["view_log"])
|
||||
src.occupant << browse(src.get_log_html(), "window=exosuit_log")
|
||||
onclose(occupant, "exosuit_log")
|
||||
|
||||
if (href_list["change_name"])
|
||||
var/newname = stripped_input(occupant,"Choose new exosuit name","Rename exosuit","", MAX_NAME_LEN)
|
||||
if(newname && trim(newname))
|
||||
name = newname
|
||||
else
|
||||
alert(occupant, "nope.avi")
|
||||
|
||||
if (href_list["toggle_id_upload"])
|
||||
add_req_access = !add_req_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_id_upload","[add_req_access?"L":"Unl"]ock ID upload panel")
|
||||
|
||||
if(href_list["toggle_maint_access"])
|
||||
if(state)
|
||||
occupant_message("<span class='danger'>Maintenance protocols in effect</span>")
|
||||
return
|
||||
maint_access = !maint_access
|
||||
send_byjax(src.occupant,"exosuit.browser","t_maint_access","[maint_access?"Forbid":"Permit"] maintenance protocols")
|
||||
|
||||
if(href_list["dna_lock"])
|
||||
if(occupant && !iscarbon(occupant))
|
||||
occupant << "<span class='danger'> You do not have any DNA!</span>"
|
||||
return
|
||||
dna = src.occupant.dna.unique_enzymes
|
||||
occupant_message("You feel a prick as the needle takes your DNA sample.")
|
||||
|
||||
if(href_list["reset_dna"])
|
||||
dna = null
|
||||
|
||||
if(href_list["repair_int_control_lost"])
|
||||
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("<span class='notice'>Recalibration successful.</span>")
|
||||
log_message("Recalibration of coordination system finished with 0 errors.")
|
||||
else
|
||||
occupant_message("<span class='warning'>Recalibration failed!</span>")
|
||||
log_message("Recalibration of coordination system failed with 1 error.",1)
|
||||
|
||||
@@ -13,15 +13,9 @@
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 15
|
||||
|
||||
/*
|
||||
/obj/mecha/working/ripley/New()
|
||||
..()
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/mecha/working/ripley/Move()
|
||||
. = ..()
|
||||
if(. && (locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in equipment))
|
||||
if(. && (locate(/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp) in equipment))
|
||||
var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in cargo
|
||||
if(ore_box)
|
||||
for(var/obj/item/weapon/ore/ore in get_turf(src))
|
||||
@@ -29,10 +23,11 @@
|
||||
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)
|
||||
var/hides = round((initial(damage_absorption["brute"]) - damage_absorption["brute"])*10)
|
||||
for(var/i=0, i < hides, i++)
|
||||
new /obj/item/asteroid/goliath_hide(loc) //If a goliath-plated ripley gets killed, all the plates drop
|
||||
damage_absorption["brute"] = initial(damage_absorption["brute"])
|
||||
for(var/atom/movable/A in cargo)
|
||||
A.loc = loc
|
||||
step_rand(A)
|
||||
cargo.Cut()
|
||||
@@ -40,30 +35,25 @@
|
||||
|
||||
/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")
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/moved_inside(mob/living/carbon/human/H)
|
||||
..()
|
||||
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")
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/mmi_moved_inside(obj/item/device/mmi/mmi_as_oc,mob/user)
|
||||
..()
|
||||
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")
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/update_icon()
|
||||
..()
|
||||
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/firefighter
|
||||
desc = "Autonomous Power Loader Unit. This model is refitted with additional thermal protection."
|
||||
@@ -76,6 +66,7 @@
|
||||
max_equip = 5 // More armor, less tools
|
||||
wreckage = /obj/structure/mecha_wreckage/ripley/firefighter
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/deathripley
|
||||
desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE"
|
||||
name = "\improper DEATH-RIPLEY"
|
||||
@@ -88,7 +79,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
|
||||
|
||||
@@ -100,10 +91,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
|
||||
@@ -115,12 +106,12 @@
|
||||
cargo.Add(new /obj/structure/ore_box(src))
|
||||
|
||||
//Attach hydraulic 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
|
||||
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)
|
||||
@@ -159,9 +150,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)
|
||||
|
||||
@@ -243,7 +243,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(user.stat || user.restrained() || user.paralysis || user.stunned || user.weakened)
|
||||
if(user.incapacitated())
|
||||
return 0
|
||||
if(loc == user)
|
||||
return 1
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
M.Stun(15)
|
||||
M.eye_stat += 8
|
||||
|
||||
if(M.flash_eyes())
|
||||
M.eye_stat += rand(1, 3)
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Stun(max(10/distance, 3))
|
||||
M.Weaken(max(10/distance, 3))
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// Make a quick flash
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(T, null))
|
||||
M.flash_eyes()
|
||||
for(var/mob/living/carbon/C in viewers(T, null))
|
||||
C.flash_eyes()
|
||||
|
||||
for(var/i=1, i<=deliveryamt, i++)
|
||||
var/atom/movable/x = new spawner_type
|
||||
|
||||
@@ -162,6 +162,7 @@
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
|
||||
/obj/item/weapon/weldingtool/New()
|
||||
..()
|
||||
@@ -289,7 +290,7 @@
|
||||
reagents.remove_reagent("welding_fuel", amount)
|
||||
check_fuel()
|
||||
if(M)
|
||||
M.flash_eyes(2)
|
||||
M.flash_eyes(light_intensity)
|
||||
return 1
|
||||
else
|
||||
if(M)
|
||||
@@ -409,7 +410,7 @@
|
||||
|
||||
/obj/item/weapon/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "An experimental welder capable of self-fuel generation."
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
@@ -418,6 +419,7 @@
|
||||
var/last_gen = 0
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
light_intensity = 1
|
||||
|
||||
|
||||
//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
|
||||
|
||||
@@ -398,7 +398,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
/obj/item/weapon/reagent_containers = "REAGENT_CONTAINERS",
|
||||
/obj/machinery/atmospherics = "ATMOS",
|
||||
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack = "MECHA_MISSILE_RACK",
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack = "MECHA_MISSILE_RACK",
|
||||
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
|
||||
)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
name = "head of security cap"
|
||||
desc = "The robust standard-issue cap of the Head of Security. For showing the officers who's in charge."
|
||||
icon_state = "hoscap"
|
||||
armor = list(melee = 65, bullet = 40, laser = 50, energy = 10, bomb = 25, bio = 10, rad = 0)
|
||||
armor = list(melee = 40, bullet = 30, laser = 25, energy = 10, bomb = 25, bio = 10, rad = 0)
|
||||
strip_delay = 80
|
||||
|
||||
/obj/item/clothing/head/HoS/beret
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
desc = "High speed, no drag combat boots."
|
||||
permeability_coefficient = 0.01
|
||||
flags = NOSLIP
|
||||
armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
armor = list(melee = 40, bullet = 30, laser = 25, energy = 25, bomb = 50, bio = 30, rad = 30)
|
||||
|
||||
/obj/item/clothing/shoes/sandal
|
||||
desc = "A pair of rather plain, wooden sandals."
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
desc = "That's not red paint. That's real blood."
|
||||
icon_state = "deathsquad"
|
||||
item_state = "deathsquad"
|
||||
armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
armor = list(melee = 50, bullet = 40, laser = 30, energy = 50, bomb = 50, bio = 100, rad = 100)
|
||||
strip_delay = 130
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
unacidable = 1
|
||||
@@ -40,7 +40,7 @@
|
||||
icon_state = "deathsquad"
|
||||
item_state = "swat_suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals)
|
||||
armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
armor = list(melee = 50, bullet = 40, laser = 30,energy = 50, bomb = 50, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
strip_delay = 130
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
@@ -53,7 +53,7 @@
|
||||
icon_state = "beret_badge"
|
||||
flags = STOPSPRESSUREDMAGE
|
||||
flags_inv = 0
|
||||
armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
armor = list(melee = 50, bullet = 40, laser = 30, energy = 50, bomb = 50, bio = 100, rad = 100)
|
||||
strip_delay = 130
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
unacidable = 1
|
||||
@@ -68,7 +68,7 @@
|
||||
flags_inv = 0
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals)
|
||||
armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100)
|
||||
armor = list(melee = 50, bullet = 40, laser = 30,energy = 50, bomb = 50, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
strip_delay = 130
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
@@ -154,7 +154,7 @@
|
||||
item_state = "ert_command"
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ert
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals)
|
||||
armor = list(melee = 65, bullet = 50, laser = 50, energy = 50, bomb = 50, bio = 100, rad = 100)
|
||||
armor = list(melee = 30, bullet = 50, laser = 30, energy = 50, bomb = 50, bio = 100, rad = 100)
|
||||
slowdown = 0
|
||||
strip_delay = 130
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
icon_state = "hos"
|
||||
item_state = "greatcoat"
|
||||
body_parts_covered = CHEST|GROIN|ARMS|LEGS
|
||||
armor = list(melee = 55, bullet = 40, laser = 50, energy = 10, bomb = 25, bio = 10, rad = 0)
|
||||
armor = list(melee = 30, bullet = 30, laser = 30, energy = 10, bomb = 25, bio = 0, rad = 0)
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
cold_protection = CHEST|GROIN|LEGS|ARMS
|
||||
heat_protection = CHEST|GROIN|LEGS|ARMS
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
priority_announce("Massive bluespace translocation detected.", "Anomaly Alert")
|
||||
|
||||
var/list/flashers = list()
|
||||
for(var/mob/living/carbon/human/M in viewers(TO, null))
|
||||
if(M.flash_eyes())
|
||||
flashers += M
|
||||
for(var/mob/living/carbon/C in viewers(TO, null))
|
||||
if(C.flash_eyes())
|
||||
flashers += C
|
||||
|
||||
var/y_distance = TO.y - FROM.y
|
||||
var/x_distance = TO.x - FROM.x
|
||||
|
||||
@@ -487,7 +487,7 @@ var/global/list/rockTurfEdgeCache
|
||||
return
|
||||
/* 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))
|
||||
src.attackby(M.selected,M)
|
||||
return*/
|
||||
//Aparantly mechs are just TOO COOL to call Bump(), so fuck em (for now)
|
||||
|
||||
@@ -72,7 +72,10 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
else
|
||||
affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand")
|
||||
spawn(6)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc)
|
||||
var/location = get_turf(affected_mob)
|
||||
if(!location)
|
||||
location = affected_mob.loc
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(location)
|
||||
new_xeno.key = C.key
|
||||
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention
|
||||
if(gib_on_success)
|
||||
|
||||
@@ -147,4 +147,5 @@
|
||||
/mob/living/carbon/brain/handle_regular_hud_updates()
|
||||
handle_vision()
|
||||
handle_hud_icons_health()
|
||||
update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0)
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
var/damage = intensity - check_eye_prot()
|
||||
if(..()) // we've been flashed
|
||||
if(weakeyes)
|
||||
|
||||
@@ -381,7 +381,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0)
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, safety = 0)
|
||||
return 0 //only carbon liveforms have this proc
|
||||
|
||||
/mob/living/emp_act(severity)
|
||||
@@ -692,7 +692,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
floating = 0
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0)
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND)))
|
||||
flick("e_flash", flash)
|
||||
return 1
|
||||
|
||||
@@ -823,3 +823,6 @@ var/list/ai_list = list()
|
||||
loc = card//Throw AI into the card.
|
||||
src << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
user << "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
|
||||
/mob/living/silicon/ai/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
return // no eyes, no flashing
|
||||
@@ -10,10 +10,12 @@
|
||||
src.reset_view(null)
|
||||
src.unset_machine()
|
||||
|
||||
src.updatehealth()
|
||||
updatehealth()
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
update_action_buttons()
|
||||
|
||||
if (src.malfhack)
|
||||
if (src.malfhack.aidisabled)
|
||||
src << "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>"
|
||||
|
||||
@@ -422,12 +422,13 @@
|
||||
/mob/living/silicon/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/check_eye_prot()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/proc/GetPhoto()
|
||||
if (aicamera)
|
||||
return aicamera.selectpicture(aicamera)
|
||||
|
||||
/mob/living/silicon/grabbedby(mob/living/user)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
@@ -173,8 +173,9 @@
|
||||
if(cleared)
|
||||
src << "--- [class] alarm in [A.name] has been cleared."
|
||||
|
||||
/mob/living/simple_animal/drone/check_eye_prot()
|
||||
return 2
|
||||
|
||||
/mob/living/simple_animal/drone/handle_temperature_damage()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/drone/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
@@ -11,6 +11,7 @@
|
||||
response_harm = "punches"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
icon_state = "daemon"
|
||||
icon_living = "daemon"
|
||||
speed = 0
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
@@ -76,7 +77,7 @@
|
||||
src.phased = TRUE
|
||||
src.holder = holder
|
||||
if(src.kidnapped)
|
||||
src << "<B>You being to feast on [kidnapped]. You can not move while you are doing this.</B>"
|
||||
src << "<B>You begin to feast on [kidnapped]. You can not move while you are doing this.</B>"
|
||||
src.eating = TRUE
|
||||
playsound(get_turf(src),'sound/magic/Demon_consume.ogg', 100, 1)
|
||||
sleep(30)
|
||||
|
||||
@@ -34,7 +34,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
|
||||
|
||||
|
||||
if(vent_found)
|
||||
var/datum/pipeline/vent_found_parent = vent_found.parents["p1"]
|
||||
var/datum/pipeline/vent_found_parent = vent_found.parents[PARENT1]
|
||||
if(vent_found_parent && (vent_found_parent.members.len || vent_found_parent.other_atmosmch))
|
||||
visible_message("<span class='notice'>[src] begins climbing into the ventilation system...</span>" ,"<span class='notice'>You begin climbing into the ventilation system...</span>")
|
||||
|
||||
@@ -63,21 +63,21 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
|
||||
src << "<span class='warning'>This ventilation duct is not connected to anything!</span>"
|
||||
|
||||
|
||||
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/components/starting_machine)
|
||||
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/components/unary/starting_machine)
|
||||
if(!istype(starting_machine) || !starting_machine.returnPipenet())
|
||||
return
|
||||
var/list/totalMembers = list()
|
||||
var/datum/pipeline/starting_machine_parent = starting_machine.parents["p1"]
|
||||
totalMembers |= starting_machine_parent.members
|
||||
totalMembers |= starting_machine_parent.other_atmosmch
|
||||
var/datum/pipeline/starting_machine_parent = starting_machine.parents[PARENT1]
|
||||
totalMembers += starting_machine_parent.members
|
||||
totalMembers += starting_machine_parent.other_atmosmch
|
||||
|
||||
for(var/obj/machinery/atmospherics/A in totalMembers)
|
||||
if(!A.pipe_vision_img)
|
||||
A.pipe_vision_img = image(A, A.loc, layer = 20, dir = A.dir)
|
||||
//20 for being above darkness
|
||||
pipes_shown |= A.pipe_vision_img
|
||||
pipes_shown += A.pipe_vision_img
|
||||
if(client)
|
||||
client.images |= A.pipe_vision_img
|
||||
client.images += A.pipe_vision_img
|
||||
|
||||
|
||||
/mob/living/proc/remove_ventcrawl()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/ammo_casing/a357
|
||||
desc = "A .357 bullet casing."
|
||||
caliber = "357"
|
||||
projectile_type = /obj/item/projectile/bullet/revolver
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
|
||||
/obj/item/ammo_casing/a50
|
||||
desc = "A .50AE bullet casing."
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
projectile_type = /obj/item/projectile/energy
|
||||
var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot.
|
||||
var/select_name = "energy"
|
||||
var/mod_name = null
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
/obj/item/ammo_casing/energy/laser
|
||||
@@ -87,13 +86,11 @@
|
||||
|
||||
/obj/item/ammo_casing/energy/flora/yield
|
||||
projectile_type = /obj/item/projectile/energy/florayield
|
||||
select_name = "increase yield"
|
||||
mod_name = "yield"
|
||||
select_name = "yield"
|
||||
|
||||
/obj/item/ammo_casing/energy/flora/mut
|
||||
projectile_type = /obj/item/projectile/energy/floramut
|
||||
select_name = "induce mutations"
|
||||
mod_name = "mut"
|
||||
select_name = "mutation"
|
||||
|
||||
/obj/item/ammo_casing/energy/temp
|
||||
projectile_type = /obj/item/projectile/temp
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
|
||||
var/list/upgrades = list()
|
||||
|
||||
var/ammo_x_offset = 0 //used for positioning ammo count overlay on sprite
|
||||
var/ammo_y_offset = 0
|
||||
var/flight_x_offset = 0
|
||||
var/flight_y_offset = 0
|
||||
|
||||
/obj/item/weapon/gun/New()
|
||||
..()
|
||||
if(pin)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
|
||||
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
|
||||
var/can_charge = 1 //Can it be charged in a recharger?
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
power_supply.use(round(power_supply.charge / severity))
|
||||
@@ -72,25 +73,31 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||
ratio = min(Ceiling(ratio*4) * 25, 100)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(power_supply.charge < shot.e_cost)
|
||||
ratio = 0 //so the icon changes to empty if the charge isn't zero but not enough for a shot.
|
||||
switch(modifystate)
|
||||
if (0)
|
||||
icon_state = "[initial(icon_state)][ratio]"
|
||||
if (1)
|
||||
icon_state = "[initial(icon_state)][shot.mod_name][ratio]"
|
||||
if (2)
|
||||
icon_state = "[initial(icon_state)][shot.select_name][ratio]"
|
||||
overlays.Cut()
|
||||
var/ratio = Ceiling((power_supply.charge / power_supply.maxcharge) * 4)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
var/iconState = "[icon_state]_charge"
|
||||
var/itemState = null
|
||||
if(!initial(item_state))
|
||||
itemState = icon_state
|
||||
if (modifystate)
|
||||
overlays += "[icon_state]_[shot.select_name]"
|
||||
iconState += "_[shot.select_name]"
|
||||
if(itemState)
|
||||
itemState += "[shot.select_name]"
|
||||
if(power_supply.charge < shot.e_cost)
|
||||
overlays += "[icon_state]_empty"
|
||||
ratio = 0
|
||||
for(var/i = ratio, i >= 1, i--)
|
||||
overlays += image(icon = icon, icon_state = iconState, pixel_x = ammo_x_offset * (i -1))
|
||||
if(F)
|
||||
var/iconF = "flight"
|
||||
if(F.on)
|
||||
overlays += "flight-[initial(icon_state)]-on"
|
||||
else
|
||||
overlays += "flight-[initial(icon_state)]"
|
||||
return
|
||||
iconF = "flight_on"
|
||||
overlays += image(icon = icon, icon_state = iconF, pixel_x = flight_x_offset, pixel_y = flight_y_offset)
|
||||
if(itemState)
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
/obj/item/weapon/gun/energy/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
materials = list(MAT_METAL=2000)
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
ammo_x_offset = 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice
|
||||
@@ -20,6 +21,7 @@
|
||||
name ="retro laser"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
|
||||
ammo_x_offset = 3
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain
|
||||
@@ -29,6 +31,7 @@
|
||||
force = 10
|
||||
origin_tech = null
|
||||
var/charge_tick = 0
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/New()
|
||||
..()
|
||||
@@ -87,6 +90,7 @@
|
||||
origin_tech = "combat=4;materials=3;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/heavy)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/xray
|
||||
name = "xray laser gun"
|
||||
@@ -96,6 +100,7 @@
|
||||
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||
pin = null
|
||||
ammo_x_offset = 3
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
@@ -109,6 +114,7 @@
|
||||
needs_permit = 0
|
||||
var/charge_tick = 0
|
||||
pin = /obj/item/device/firing_pin/tag/blue
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/bluetag/New()
|
||||
..()
|
||||
@@ -140,6 +146,7 @@
|
||||
needs_permit = 0
|
||||
var/charge_tick = 0
|
||||
pin = /obj/item/device/firing_pin/tag/red
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/redtag/New()
|
||||
..()
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
modifystate = 2
|
||||
can_flashlight = 1
|
||||
ammo_x_offset = 3
|
||||
flight_x_offset = 15
|
||||
flight_y_offset = 10
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/attack_self(mob/living/user)
|
||||
select_fire(user)
|
||||
@@ -15,7 +18,6 @@
|
||||
/obj/item/weapon/gun/energy/gun/hos
|
||||
desc = "This is a expensive, modern recreation of a antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time."
|
||||
icon_state = "hoslaser"
|
||||
item_state = null
|
||||
force = 10
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/disabler)
|
||||
|
||||
@@ -23,22 +25,36 @@
|
||||
name = "DRAGnet"
|
||||
desc = "The \"Dynamic Rapid-Apprehension of the Guilty\" net is a revolution in law enforcement technology."
|
||||
icon_state = "dragnet"
|
||||
item_state = null
|
||||
origin_tech = "combat=3;magnets=3;materials=4; bluespace=4"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/net, /obj/item/ammo_casing/energy/trap)
|
||||
can_flashlight = 0
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/turret
|
||||
name = "hybrid turret gun"
|
||||
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
|
||||
icon_state = "turretlaser"
|
||||
item_state = "turretlaser"
|
||||
slot_flags = null
|
||||
w_class = 5
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
heavy_weapon = 1
|
||||
can_flashlight = 0
|
||||
trigger_guard = 0
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear
|
||||
name = "advanced energy gun"
|
||||
desc = "An energy gun with an experimental miniaturized nuclear reactor that automatically charges the internal power cell."
|
||||
icon_state = "nucgun"
|
||||
item_state = "nucgun"
|
||||
origin_tech = "combat=3;materials=5;powerstorage=3"
|
||||
var/lightfail = 0
|
||||
var/fail_state = 0
|
||||
var/charge_tick = 0
|
||||
modifystate = 0
|
||||
can_flashlight = 0
|
||||
pin = null
|
||||
can_charge = 0
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/New()
|
||||
..()
|
||||
@@ -63,7 +79,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/proc/failcheck()
|
||||
lightfail = 0
|
||||
fail_state = 0
|
||||
if (prob(src.reliability)) return 1 //No failure
|
||||
if (prob(src.reliability))
|
||||
for (var/mob/living/M in range(0,src)) //Only a minor failure, enjoy your radiation if you're in the same tile or carrying it
|
||||
@@ -72,68 +88,22 @@
|
||||
else
|
||||
M << "<span class='danger'>You feel a warm sensation.</span>"
|
||||
M.irradiate(rand(3,120))
|
||||
lightfail = 1
|
||||
fail_state = 1
|
||||
else
|
||||
for (var/mob/living/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES
|
||||
if (src in M.contents)
|
||||
M << "<span class='danger'>Your gun's reactor overloads!</span>"
|
||||
M << "<span class='danger'>You feel a wave of heat wash over you.</span>"
|
||||
M.irradiate(300)
|
||||
crit_fail = 1 //break the gun so it stops recharging
|
||||
fail_state = 2 //break the gun so it stops recharging
|
||||
SSobj.processing.Remove(src)
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_charge()
|
||||
if (crit_fail)
|
||||
overlays += "nucgun-whee"
|
||||
return
|
||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
overlays += "nucgun-[ratio]"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_reactor()
|
||||
if(crit_fail)
|
||||
overlays += "nucgun-crit"
|
||||
return
|
||||
if(lightfail)
|
||||
overlays += "nucgun-medium"
|
||||
else if ((power_supply.charge/power_supply.maxcharge) <= 0.5)
|
||||
overlays += "nucgun-light"
|
||||
else
|
||||
overlays += "nucgun-clean"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/proc/update_mode()
|
||||
if (select == 1)
|
||||
overlays += "nucgun-stun"
|
||||
else if (select == 2)
|
||||
overlays += "nucgun-kill"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/emp_act(severity)
|
||||
..()
|
||||
reliability -= round(15/severity)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear/update_icon()
|
||||
overlays.Cut()
|
||||
update_charge()
|
||||
update_reactor()
|
||||
update_mode()
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/turret
|
||||
name = "hybrid turret gun"
|
||||
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
|
||||
icon_state = "turretlaser"
|
||||
slot_flags = null
|
||||
w_class = 5
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
heavy_weapon = 1
|
||||
can_flashlight = 0
|
||||
trigger_guard = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/turret/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
..()
|
||||
overlays += "[icon_state]_fail_[fail_state]"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
item_state = "pulse"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 12
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/carbine/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/loyalty
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/ion)
|
||||
|
||||
ammo_x_offset = 3
|
||||
flight_x_offset = 17
|
||||
flight_y_offset = 9
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
|
||||
return
|
||||
@@ -18,11 +20,13 @@
|
||||
name = "ion carbine"
|
||||
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
|
||||
icon_state = "ioncarbine"
|
||||
item_state = "ioncarbine"
|
||||
origin_tech = "combat=4;magnets=4;materials=4"
|
||||
w_class = 3
|
||||
slot_flags = SLOT_BELT
|
||||
pin = null
|
||||
ammo_x_offset = 2
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 11
|
||||
|
||||
/obj/item/weapon/gun/energy/decloner
|
||||
name = "biological demolecularisor"
|
||||
@@ -31,6 +35,13 @@
|
||||
origin_tech = "combat=5;materials=4;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/declone)
|
||||
pin = null
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/decloner/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(power_supply.charge > shot.e_cost)
|
||||
overlays += "decloner_spin"
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun
|
||||
name = "floral somatoray"
|
||||
@@ -41,7 +52,6 @@
|
||||
origin_tech = "materials=2;biotech=3;powerstorage=3"
|
||||
modifystate = 1
|
||||
var/charge_tick = 0
|
||||
var/mode = 0 //0 = mutate, 1 = yield boost
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun/New()
|
||||
..()
|
||||
@@ -115,6 +125,7 @@
|
||||
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
||||
icon_state = "xray"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator
|
||||
name = "proto-kinetic accelerator"
|
||||
@@ -151,6 +162,13 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/update_icon()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(power_supply.charge < shot.e_cost)
|
||||
icon_state = "[initial(icon_state)]_empty"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
|
||||
name = "mini energy crossbow"
|
||||
desc = "A weapon favored by syndicate stealth specialists."
|
||||
@@ -205,51 +223,15 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/adv
|
||||
name = "advanced plasma cutter"
|
||||
icon_state = "adv_plasmacutter"
|
||||
origin_tech = "combat=3;materials=4;magnets=3;plasmatech=3;engineering=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 2.5
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/New()
|
||||
..()
|
||||
SSobj.processing |= src
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(!power_supply) return 0 //sanity
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||
if(R.cell.use(shot.e_cost)) //Take power from the borg...
|
||||
power_supply.give(shot.e_cost) //... to recharge the shot
|
||||
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector
|
||||
name = "bluespace wormhole projector"
|
||||
desc = "A projector that emits high density quantum-coupled bluespace beams."
|
||||
@@ -261,6 +243,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/update_icon()
|
||||
icon_state = "[initial(icon_state)][select]"
|
||||
item_state = icon_state
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/attack_self(mob/living/user)
|
||||
@@ -333,3 +316,17 @@
|
||||
power_supply.give(shot.e_cost) //...to recharge the shot
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
desc = "A gun that changes temperatures."
|
||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/high"
|
||||
pin = null
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/taser
|
||||
name = "taser gun"
|
||||
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
|
||||
icon_state = "taser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/stunrevolver
|
||||
name = "stun revolver"
|
||||
desc = "A high-tech revolver that fires internal, reusable taser cartridges in a revolving cylinder. The cartridges can be recharged using conventional rechargers."
|
||||
icon_state = "stunrevolver"
|
||||
item_state = "gun"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode/gun)
|
||||
can_flashlight = 0
|
||||
pin = null
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/advtaser
|
||||
name = "hybrid taser"
|
||||
@@ -20,6 +22,7 @@
|
||||
icon_state = "advtaser"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/disabler)
|
||||
origin_tech = null
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/advtaser/cyborg
|
||||
name = "cyborg taser"
|
||||
@@ -52,3 +55,43 @@
|
||||
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
item_state = null
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 2.5
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/New()
|
||||
..()
|
||||
SSobj.processing |= src
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/Destroy()
|
||||
SSobj.processing.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(!power_supply) return 0 //sanity
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||
if(R.cell.use(shot.e_cost)) //Take power from the borg...
|
||||
power_supply.give(shot.e_cost) //... to recharge the shot
|
||||
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -1,14 +0,0 @@
|
||||
/obj/item/weapon/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
desc = "A gun that changes temperatures."
|
||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/high"
|
||||
pin = null
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
return
|
||||
@@ -6,10 +6,6 @@
|
||||
nodamage = 0
|
||||
flag = "bullet"
|
||||
|
||||
/obj/item/projectile/bullet/revolver
|
||||
damage = 60
|
||||
armour_penetration = 10
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
|
||||
damage = 5
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/H in viewers(get_turf(holder.my_atom), null))
|
||||
H.flash_eyes()
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_eyes()
|
||||
for(var/i = 1, i <= amount_to_spawn, i++)
|
||||
var/chosen = pick(critters)
|
||||
var/mob/living/simple_animal/hostile/C = new chosen
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
M.flash_eyes()
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_eyes()
|
||||
|
||||
for(var/i = 1, i <= 4 + rand(1,2), i++)
|
||||
var/chosen = pick(borks)
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
|
||||
for(var/mob/living/carbon/M in viewers(get_turf(holder.my_atom), null))
|
||||
M.flash_eyes()
|
||||
|
||||
for(var/i = 1, i <= 4 + rand(1,2), i++)
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
id = "mech_grenade_launcher"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("combat" = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang
|
||||
materials = list(MAT_METAL=22000,MAT_GOLD=6000,MAT_SILVER=8000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -238,7 +238,7 @@
|
||||
id = "mech_missile_rack"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("combat" = 6, "materials" = 6)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack
|
||||
materials = list(MAT_METAL=22000,MAT_GOLD=6000,MAT_SILVER=8000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -249,7 +249,7 @@
|
||||
id = "clusterbang_launcher"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("combat"= 5, "materials" = 5, "syndicate" = 3)
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/clusterbang
|
||||
materials = list(MAT_METAL=20000,MAT_GOLD=10000,MAT_URANIUM=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -282,7 +282,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")
|
||||
@@ -348,7 +348,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")
|
||||
|
||||
@@ -490,7 +490,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")
|
||||
@@ -499,7 +499,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")
|
||||
@@ -508,7 +508,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")
|
||||
@@ -517,7 +517,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")
|
||||
@@ -526,7 +526,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")
|
||||
@@ -535,7 +535,7 @@
|
||||
name = "Exosuit Medical Equipment (Mounted Sleeper)"
|
||||
id = "mech_sleeper"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/sleeper
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/sleeper
|
||||
materials = list(MAT_METAL=5000,MAT_GLASS=10000)
|
||||
construction_time = 100
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -544,7 +544,7 @@
|
||||
name = "Exosuit Medical Equipment (Syringe Gun)"
|
||||
id = "mech_syringe_gun"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/syringe_gun
|
||||
materials = list(MAT_METAL=3000,MAT_GLASS=2000)
|
||||
construction_time = 200
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -580,7 +580,7 @@
|
||||
name = "H.O.N.K Mousetrap Mortar"
|
||||
id = "mech_mousetrap_mortar"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/mousetrap_mortar
|
||||
materials = list(MAT_METAL=20000,MAT_BANANIUM=5000)
|
||||
construction_time = 300
|
||||
category = list("Exosuit Equipment")
|
||||
@@ -589,7 +589,7 @@
|
||||
name = "H.O.N.K Banana Mortar"
|
||||
id = "mech_banana_mortar"
|
||||
build_type = MECHFAB
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar
|
||||
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar
|
||||
materials = list(MAT_METAL=20000,MAT_BANANIUM=5000)
|
||||
construction_time = 300
|
||||
category = list("Exosuit Equipment")
|
||||
|
||||
@@ -55,6 +55,20 @@
|
||||
|
||||
-->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">20 July 2015</h2>
|
||||
<h3 class="author">KorPaheron updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Added the Multiverse Sword, a new wizard artifact that can summon clones of yourself from other universes, allowing for dangerous amounts of recursion.</li>
|
||||
</ul>
|
||||
<h3 class="author">phil235 updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="tweak">Mechs no longer use object verbs and the exosuit interface tab. They now use action buttons. Mechs now have a cycle equipment action button to change weapon faster than by using the view stats window. Mechs get two special alerts when their battery or health is low. Mechs now properly consume energy when moving and having their lights on. Using a mech tool that takes time to act now shows a progress bar (e.g. mech drill).</li>
|
||||
<li class="rscadd">Mechs now have a cycle equipment action button to change weapon faster than by using the view stats window.</li>
|
||||
<li class="rscadd">Mechs get two special alerts when their battery or health is low.</li>
|
||||
<li class="tweak">Mechs now properly consume energy when moving and having their lights on.</li>
|
||||
<li class="rscadd">Using a mech tool that takes time to act now shows a progress bar (e.g. mech drill).</li>
|
||||
</ul>
|
||||
|
||||
<h2 class="date">19 July 2015</h2>
|
||||
<h3 class="author">Gun Hog updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
@@ -88,8 +102,6 @@
|
||||
<h3 class="author">Steelpoint updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="tweak">Reduced weight of Sechailer, it now fits in boxes.</li>
|
||||
<li class="tweak">Increased armor values of HoS, ERT and DS suits.</li>
|
||||
<li class="rscadd">Revolver bullets now have armor penetration.</li>
|
||||
</ul>
|
||||
<h3 class="author">phil updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
|
||||
@@ -1255,8 +1255,6 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
|
||||
said, to allow them to better impersonate their victim's speech patterns
|
||||
Steelpoint:
|
||||
- tweak: Reduced weight of Sechailer, it now fits in boxes.
|
||||
- tweak: Increased armor values of HoS, ERT and DS suits.
|
||||
- rscadd: Revolver bullets now have armor penetration.
|
||||
phil:
|
||||
- tweak: Smoke and foam touch reactions gets buffed.
|
||||
- rscadd: Reagent dispensers (watertank, fueltank) tells you how much reagents they
|
||||
@@ -1276,3 +1274,20 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
|
||||
will upload.
|
||||
MMMiracles:
|
||||
- soundadd: Adds a TWANG sound effect when hitting things with a guitar.
|
||||
2015-07-20:
|
||||
KorPaheron:
|
||||
- rscadd: Added the Multiverse Sword, a new wizard artifact that can summon clones
|
||||
of yourself from other universes, allowing for dangerous amounts of recursion.
|
||||
phil235:
|
||||
- tweak: Mechs no longer use object verbs and the exosuit interface tab. They now
|
||||
use action buttons. Mechs now have a cycle equipment action button to change
|
||||
weapon faster than by using the view stats window. Mechs get two special alerts
|
||||
when their battery or health is low. Mechs now properly consume energy when
|
||||
moving and having their lights on. Using a mech tool that takes time to act
|
||||
now shows a progress bar (e.g. mech drill).
|
||||
- rscadd: Mechs now have a cycle equipment action button to change weapon faster
|
||||
than by using the view stats window.
|
||||
- rscadd: Mechs get two special alerts when their battery or health is low.
|
||||
- tweak: Mechs now properly consume energy when moving and having their lights on.
|
||||
- rscadd: Using a mech tool that takes time to act now shows a progress bar (e.g.
|
||||
mech drill).
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# tgs (TG-ported fixes?)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: AnturK
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Lightning Bolt now always bounces 5 times and deals 15 to 50 burn damage to each target depending on the chargeup"
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 25 KiB |
@@ -219,7 +219,6 @@
|
||||
#include "code\datums\helper_datums\construction_datum.dm"
|
||||
#include "code\datums\helper_datums\events.dm"
|
||||
#include "code\datums\helper_datums\getrev.dm"
|
||||
#include "code\datums\helper_datums\global_iterator.dm"
|
||||
#include "code\datums\helper_datums\icon_snapshot.dm"
|
||||
#include "code\datums\helper_datums\teleport.dm"
|
||||
#include "code\datums\helper_datums\topic_input.dm"
|
||||
@@ -503,7 +502,9 @@
|
||||
#include "code\game\mecha\mecha.dm"
|
||||
#include "code\game\mecha\mecha_construction_paths.dm"
|
||||
#include "code\game\mecha\mecha_control_console.dm"
|
||||
#include "code\game\mecha\mecha_defense.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\combat\combat.dm"
|
||||
#include "code\game\mecha\combat\durand.dm"
|
||||
@@ -514,7 +515,9 @@
|
||||
#include "code\game\mecha\combat\reticence.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"
|
||||
@@ -1378,7 +1381,6 @@
|
||||
#include "code\modules\projectiles\guns\energy\pulse.dm"
|
||||
#include "code\modules\projectiles\guns\energy\special.dm"
|
||||
#include "code\modules\projectiles\guns\energy\stun.dm"
|
||||
#include "code\modules\projectiles\guns\energy\temperature.dm"
|
||||
#include "code\modules\projectiles\guns\magic\staff.dm"
|
||||
#include "code\modules\projectiles\guns\magic\wand.dm"
|
||||
#include "code\modules\projectiles\guns\projectile\automatic.dm"
|
||||
|
||||