mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
- Added atom/proc/search_contents_for. Recursively searches through all contents of all atoms inside specified one for matches, returns a list of found atoms.
- Added teleporter datum. do_teleport proc is now just a wrapper for it. - Added damage absorption to mechs. - Added mecha step and turn sounds. - Cleaned effects code a bit. - Metal foam should now block air movement. - Since sd_ lightning library chops areas into pieces, turrets now work with master area. - Tried to optimize DesignHasReqs proc. - Added plasma converter and laser cannon mecha equipment. - Other cosmetic changes. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2463 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type.
|
||||
var/list/L = steps[steps.len]
|
||||
if(istype(used_atom, text2path(L["key"])))
|
||||
if(istype(used_atom, L["key"]))
|
||||
return steps.len
|
||||
return 0
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one.
|
||||
for(var/i=1;i<=steps.len;i++)
|
||||
var/list/L = steps[i];
|
||||
if(istype(used_atom, text2path(L["key"])))
|
||||
if(istype(used_atom, L["key"]))
|
||||
if(custom_action(i, used_atom, user))
|
||||
steps[i]=null;//stupid byond list from list removal...
|
||||
listclearnulls(steps);
|
||||
|
||||
@@ -27,7 +27,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
|
||||
diary << "Unable to get [filename] contents, aborting"
|
||||
return abort()
|
||||
|
||||
var/list/CL = dd_text2list(text, "\n")
|
||||
var/list/CL = tg_text2list(text, "\n")
|
||||
for (var/t in CL)
|
||||
if (!t)
|
||||
continue
|
||||
|
||||
170
code/datums/helper_datums/teleport.dm
Normal file
170
code/datums/helper_datums/teleport.dm
Normal file
@@ -0,0 +1,170 @@
|
||||
//wrapper
|
||||
/proc/do_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
new /datum/teleport/instant/science(arglist(args))
|
||||
return
|
||||
|
||||
/datum/teleport
|
||||
var/atom/movable/teleatom //atom to teleport
|
||||
var/atom/destination //destination to teleport to
|
||||
var/precision = 0 //teleport precision
|
||||
var/datum/effect/effect/system/effectin //effect to show right before teleportation
|
||||
var/datum/effect/effect/system/effectout //effect to show right after teleportation
|
||||
var/soundin //soundfile to play before teleportation
|
||||
var/soundout //soundfile to play after teleportation
|
||||
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
|
||||
|
||||
|
||||
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
..()
|
||||
if(!Init(arglist(args)))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
proc/Init(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
|
||||
if(!setTeleatom(ateleatom))
|
||||
return 0
|
||||
if(!setDestination(adestination))
|
||||
return 0
|
||||
if(!setPrecision(aprecision))
|
||||
return 0
|
||||
setEffects(aeffectin,aeffectout)
|
||||
setForceTeleport(afteleport)
|
||||
setSounds(asoundin)
|
||||
return 1
|
||||
|
||||
//must succeed
|
||||
proc/setPrecision(aprecision)
|
||||
if(isnum(aprecision))
|
||||
precision = aprecision
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//must succeed
|
||||
proc/setDestination(atom/adestination)
|
||||
if(istype(adestination))
|
||||
destination = adestination
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//must succeed in most cases
|
||||
proc/setTeleatom(atom/movable/ateleatom)
|
||||
if(istype(ateleatom, /obj/effect))
|
||||
del(ateleatom)
|
||||
return 0
|
||||
if(istype(ateleatom))
|
||||
teleatom = ateleatom
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//custom effects must be properly set up first for instant-type teleports
|
||||
//optional
|
||||
proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
|
||||
effectin = istype(aeffectin) ? aeffectin : null
|
||||
effectout = istype(aeffectout) ? aeffectout : null
|
||||
return 1
|
||||
|
||||
//optional
|
||||
proc/setForceTeleport(afteleport)
|
||||
force_teleport = afteleport
|
||||
return 1
|
||||
|
||||
//optional
|
||||
proc/setSounds(asoundin=null,asoundout=null)
|
||||
soundin = isfile(asoundin) ? asoundin : null
|
||||
soundout = isfile(asoundout) ? asoundout : null
|
||||
return 1
|
||||
|
||||
//placeholder
|
||||
proc/teleportChecks()
|
||||
return 1
|
||||
|
||||
proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
|
||||
if(location)
|
||||
if(effect)
|
||||
spawn(-1)
|
||||
src = null
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
if(sound)
|
||||
spawn(-1)
|
||||
src = null
|
||||
playsound(location,sound,60,1)
|
||||
return
|
||||
|
||||
//do the monkey dance
|
||||
proc/doTeleport()
|
||||
|
||||
var/turf/destturf
|
||||
var/turf/curturf = get_turf(teleatom)
|
||||
if(precision)
|
||||
var/list/posturfs = circlerangeturfs(destination,precision)
|
||||
destturf = safepick(posturfs)
|
||||
else
|
||||
destturf = get_turf(destination)
|
||||
|
||||
if(!destturf || !curturf)
|
||||
return 0
|
||||
|
||||
playSpecials(curturf,effectin,soundin)
|
||||
|
||||
if(force_teleport)
|
||||
teleatom.loc.Exited(teleatom)
|
||||
teleatom.loc = destturf
|
||||
teleatom.loc.Entered(teleatom)
|
||||
playSpecials(destturf,effectout,soundout)
|
||||
else
|
||||
if(teleatom.Move(destturf))
|
||||
playSpecials(destturf,effectout,soundout)
|
||||
|
||||
return 1
|
||||
|
||||
proc/teleport()
|
||||
if(teleportChecks())
|
||||
return doTeleport()
|
||||
return 0
|
||||
|
||||
/datum/teleport/instant //teleports when datum is created
|
||||
|
||||
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
if(..())
|
||||
teleport()
|
||||
return
|
||||
|
||||
|
||||
/datum/teleport/instant/science
|
||||
|
||||
setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
|
||||
if(!aeffectin || !aeffectout)
|
||||
var/datum/effect/effect/system/spark_spread/aeffect = new
|
||||
aeffect.set_up(5, 1, teleatom)
|
||||
effectin = effectin || aeffect
|
||||
effectout = effectout || aeffect
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
setPrecision(aprecision)
|
||||
..()
|
||||
if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
|
||||
var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)
|
||||
if(bagholding.len)
|
||||
precision = max(rand(1,100)*bagholding.len,100)
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
|
||||
return 1
|
||||
|
||||
teleportChecks()
|
||||
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
MM.visible_message("\red <B>The [MM] bounces off of the portal!</B>","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
|
||||
else
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
return 0
|
||||
return 1
|
||||
@@ -91,6 +91,31 @@ obj
|
||||
return 1
|
||||
return
|
||||
|
||||
/*
|
||||
* atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
* Recursevly searches all atom contens (including contents contents and so on).
|
||||
*
|
||||
* ARGS: path - search atom contents for atoms of this type
|
||||
* list/filter_path - if set, contents of atoms not of types in this list are excluded from search.
|
||||
*
|
||||
* RETURNS: list of found atoms
|
||||
*/
|
||||
|
||||
/atom/proc/search_contents_for(path,list/filter_path=null)
|
||||
var/list/found = list()
|
||||
for(var/atom/A in src)
|
||||
if(istype(A, path))
|
||||
found += A
|
||||
if(filter_path)
|
||||
var/pass = 0
|
||||
for(var/type in filter_path)
|
||||
pass |= istype(A, type)
|
||||
if(!pass)
|
||||
continue
|
||||
if(A.contents.len)
|
||||
found += A.search_contents_for(path,filter_path)
|
||||
return found
|
||||
|
||||
/atom/movable/overlay/attackby(a, b)
|
||||
if (src.master)
|
||||
return src.master.attackby(a, b)
|
||||
|
||||
@@ -111,11 +111,10 @@
|
||||
return T
|
||||
|
||||
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
|
||||
spawn( 0 )
|
||||
spawn()
|
||||
if (src.icon_state == "tele1")
|
||||
teleport(M)
|
||||
use_power(5000)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/hub/proc/teleport(atom/movable/M as mob|obj)
|
||||
@@ -131,7 +130,7 @@
|
||||
if(prob(5) && !accurate) //oh dear a problem, put em in deep space
|
||||
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy - 5), 3), 2)
|
||||
else
|
||||
do_teleport(M, com.locked, 0) //dead-on precision
|
||||
do_teleport(M, com.locked) //dead-on precision
|
||||
else
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
@@ -139,7 +138,7 @@
|
||||
for(var/mob/B in hearers(src, null))
|
||||
B.show_message("\blue Test fire completed.")
|
||||
return
|
||||
|
||||
/*
|
||||
/proc/do_teleport(atom/movable/M as mob|obj, atom/destination, precision)
|
||||
if(istype(M, /obj/effect))
|
||||
del(M)
|
||||
@@ -224,7 +223,7 @@
|
||||
s.set_up(5, 1, M)
|
||||
s.start()
|
||||
return
|
||||
|
||||
*/
|
||||
/obj/machinery/teleport/station/attackby(var/obj/item/weapon/W)
|
||||
src.attack_hand()
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
|
||||
/area/turret_protected/Entered(O)
|
||||
..()
|
||||
if(master && master != src)
|
||||
return master.Entered(O)
|
||||
// world << "[O] entered[src.x],[src.y],[src.z]"
|
||||
|
||||
if (istype(O, /mob/living/carbon))
|
||||
if (!(O in turretTargets))
|
||||
turretTargets += O
|
||||
@@ -24,6 +27,8 @@
|
||||
return 1
|
||||
|
||||
/area/turret_protected/Exited(O)
|
||||
if(master && master != src)
|
||||
return master.Exited(O)
|
||||
// world << "[O] exited [src.x],[src.y],[src.z]"
|
||||
if (istype(O, /mob))
|
||||
if (!istype(O, /mob/living/silicon))
|
||||
@@ -113,6 +118,8 @@
|
||||
/obj/machinery/turret/proc/get_protected_area()
|
||||
var/area/turret_protected/TP = get_area(src)
|
||||
if(istype(TP))
|
||||
if(TP.master && TP.master != TP)
|
||||
TP = TP.master
|
||||
return TP
|
||||
return
|
||||
|
||||
@@ -189,7 +196,7 @@
|
||||
/obj/machinery/turret/proc/shootAt(var/atom/movable/target)
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = get_turf(target)
|
||||
if (!istype(T) || !istype(U))
|
||||
if (!T || !U)
|
||||
return
|
||||
var/obj/item/projectile/A
|
||||
if (src.lasers)
|
||||
@@ -287,7 +294,11 @@
|
||||
/obj/machinery/turretid/New()
|
||||
..()
|
||||
if(!control_area)
|
||||
control_area = get_area(src)
|
||||
var/area/CA = get_area(src)
|
||||
if(CA.master && CA.master != CA)
|
||||
control_area = CA.master
|
||||
else
|
||||
control_area = CA
|
||||
else if(istext(control_area))
|
||||
for(var/area/A in world)
|
||||
if(A.name && A.name==control_area)
|
||||
@@ -395,7 +406,7 @@
|
||||
var/projectiles = 100
|
||||
var/projectiles_per_shot = 2
|
||||
var/deviation = 0.3
|
||||
var/list/snapshot = list()
|
||||
var/list/exclude = list()
|
||||
var/atom/cur_target
|
||||
var/scan_range = 7
|
||||
var/health = 40
|
||||
@@ -430,8 +441,7 @@
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
var/damage = Proj.damage
|
||||
src.take_damage(damage)
|
||||
src.take_damage(Proj.damage)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -468,7 +478,8 @@
|
||||
src.on = !src.on
|
||||
if(src.on)
|
||||
spawn(50)
|
||||
src.process()
|
||||
if(src)
|
||||
src.process()
|
||||
if(href_list["scan_range"])
|
||||
src.scan_range = between(1,src.scan_range+text2num(href_list["scan_range"]),8)
|
||||
if(href_list["scan_for"])
|
||||
@@ -508,19 +519,24 @@
|
||||
var/target = null
|
||||
if(scan_for["human"])
|
||||
for(var/mob/living/carbon/human/M in oview(scan_range,src))
|
||||
if(!M.stat && !M.lying)
|
||||
pos_targets += M
|
||||
if(M.stat || M.lying || M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(scan_for["cyborg"])
|
||||
for(var/mob/living/silicon/M in oview(scan_range,src))
|
||||
if(!M.stat && !M.lying)
|
||||
pos_targets += M
|
||||
if(M.stat || M.lying || M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(scan_for["mecha"])
|
||||
for(var/obj/mecha/M in oview(scan_range, src))
|
||||
if(M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(scan_for["alien"])
|
||||
for(var/mob/living/carbon/alien/M in oview(scan_range,src))
|
||||
if(!M.stat && !M.lying)
|
||||
pos_targets += M
|
||||
if(M.stat || M.lying || M in exclude)
|
||||
continue
|
||||
pos_targets += M
|
||||
if(pos_targets.len)
|
||||
target = pick(pos_targets)
|
||||
return target
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
var/list/destroyable_obj = list(/obj/mecha, /obj/structure/window, /obj/structure/grille, /turf/simulated/wall)
|
||||
internal_damage_threshold = 50
|
||||
maint_access = 0
|
||||
damage_absorption = list("brute"=0.7,"fire"=1,"bullet"=0.7,"laser"=0.85,"energy"=1,"bomb"=0.8)
|
||||
|
||||
/*
|
||||
/obj/mecha/combat/verb/switch_weapon()
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
dir_in = 1 //Facing North.
|
||||
health = 400
|
||||
deflect_chance = 20
|
||||
damage_absorption = list("brute"=0.4,"fire"=1.1,"bullet"=0.6,"laser"=0.85,"energy"=0.9,"bomb"=0.8)
|
||||
max_temperature = 3000
|
||||
infra_luminosity = 8
|
||||
force = 40
|
||||
var/defence = 0
|
||||
var/defence_deflect = 35
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/durand"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/durand
|
||||
|
||||
/*
|
||||
/obj/mecha/combat/durand/New()
|
||||
@@ -35,7 +36,7 @@
|
||||
/obj/mecha/combat/durand/verb/defence_mode()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Toggle defence mode"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
dir_in = 1 //Facing North.
|
||||
health = 300
|
||||
deflect_chance = 15
|
||||
damage_absorption = list("brute"=0.6,"fire"=1,"bullet"=0.8,"laser"=0.6,"energy"=0.7,"bomb"=1)
|
||||
max_temperature = 3500
|
||||
infra_luminosity = 6
|
||||
var/overload = 0
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/gygax"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/gygax
|
||||
internal_damage_threshold = 35
|
||||
max_equip = 4
|
||||
|
||||
@@ -27,7 +28,7 @@
|
||||
/obj/mecha/combat/gygax/verb/overload()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Toggle leg actuators overload"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
health = 140
|
||||
deflect_chance = 60
|
||||
internal_damage_threshold = 60
|
||||
damage_absorption = list("brute"=1.2,"fire"=1.5,"bullet"=1,"laser"=1,"energy"=1,"bomb"=1)
|
||||
max_temperature = 3500
|
||||
infra_luminosity = 5
|
||||
operation_req_access = list(access_clown)
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/honker"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/honker
|
||||
add_req_access = 0
|
||||
max_equip = 3
|
||||
var/squeak = 0
|
||||
@@ -123,8 +124,8 @@
|
||||
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/relaymove(mob/user,direction)
|
||||
var/result = ..()
|
||||
/obj/mecha/combat/honker/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
if(!squeak)
|
||||
playsound(src, "clownstep", 70, 1)
|
||||
@@ -133,7 +134,6 @@
|
||||
squeak = 0
|
||||
return result
|
||||
|
||||
|
||||
obj/mecha/combat/honker/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["play_sound"])
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
step_in = 5
|
||||
health = 500
|
||||
deflect_chance = 25
|
||||
damage_absorption = list("brute"=0.4,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7)
|
||||
max_temperature = 5000
|
||||
infra_luminosity = 3
|
||||
var/zoom = 0
|
||||
@@ -14,7 +15,7 @@
|
||||
var/smoke_cooldown = 100
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke_system = new
|
||||
operation_req_access = list(access_cent_specops)
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/marauder"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/marauder
|
||||
add_req_access = 0
|
||||
internal_damage_threshold = 25
|
||||
force = 45
|
||||
@@ -27,7 +28,7 @@
|
||||
operation_req_access = list(access_cent_creed)
|
||||
step_in = 3
|
||||
health = 550
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/seraph"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/seraph
|
||||
internal_damage_threshold = 20
|
||||
force = 55
|
||||
max_equip = 5
|
||||
@@ -37,11 +38,11 @@
|
||||
name = "Mauler"
|
||||
icon_state = "mauler"
|
||||
operation_req_access = list(access_syndicate)
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/mauler"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/mauler
|
||||
|
||||
/obj/mecha/combat/marauder/New()
|
||||
..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/pulse
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack
|
||||
ME.attach(src)
|
||||
@@ -97,12 +98,11 @@
|
||||
var/tmp_step_energy_drain = step_energy_drain
|
||||
var/move_result = 0
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
move_result = step_rand(src)
|
||||
move_result = mechsteprand()
|
||||
else if(src.dir!=direction)
|
||||
src.dir=direction
|
||||
move_result = 1
|
||||
move_result = mechturn(direction)
|
||||
else
|
||||
move_result = step(src,direction)
|
||||
move_result = mechstep(direction)
|
||||
if(move_result)
|
||||
if(istype(src.loc, /turf/space))
|
||||
if(!src.check_for_support())
|
||||
@@ -121,7 +121,7 @@
|
||||
/obj/mecha/combat/marauder/verb/toggle_thrusters()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Toggle thrusters"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
@@ -136,7 +136,7 @@
|
||||
/obj/mecha/combat/marauder/verb/smoke()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Smoke"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
@@ -151,7 +151,7 @@
|
||||
/obj/mecha/combat/marauder/verb/zoom()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Zoom"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
step_energy_drain = 3
|
||||
health = 200
|
||||
deflect_chance = 30
|
||||
damage_absorption = list("brute"=0.7,"fire"=0.7,"bullet"=0.7,"laser"=0.7,"energy"=0.7,"bomb"=0.7)
|
||||
max_temperature = 1000
|
||||
infra_luminosity = 3
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/phazon"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/phazon
|
||||
add_req_access = 1
|
||||
internal_damage_threshold = 25
|
||||
force = 15
|
||||
@@ -50,7 +51,7 @@
|
||||
/obj/mecha/combat/phazon/verb/switch_damtype()
|
||||
set category = "Exosuit Interface"
|
||||
set name = "Change melee damage type"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
del src
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/critfail()
|
||||
if(chassis)
|
||||
chassis.log_message("Critical failure of component: [src]",1)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [chassis.selected==src?"<b>":"<a href='?src=\ref[chassis];select_equip=\ref[src]'>"][src.name][chassis.selected==src?"</b>":"</a>"]"
|
||||
@@ -70,6 +75,8 @@
|
||||
return 0
|
||||
if(!equip_ready)
|
||||
return 0
|
||||
if(crit_fail)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action(atom/target)
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
|
||||
/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."
|
||||
desc = "Boosts exosuit armor against armed melee attacks. Requires energy to operate."
|
||||
icon_state = "mecha_abooster_ccw"
|
||||
origin_tech = "materials=3"
|
||||
equip_cooldown = 10
|
||||
@@ -452,7 +452,7 @@
|
||||
|
||||
/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."
|
||||
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
|
||||
@@ -493,7 +493,7 @@
|
||||
chassis.visible_message("The [chassis.name] armor deflects the projectile")
|
||||
chassis.log_append_to_last("Armor saved.")
|
||||
else
|
||||
chassis.take_damage(round(Proj.damage*src.damage_coeff))
|
||||
chassis.take_damage(round(Proj.damage*src.damage_coeff),Proj.flag)
|
||||
chassis.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
@@ -558,9 +558,9 @@
|
||||
return
|
||||
|
||||
get_equip_info()
|
||||
var/output = ..()
|
||||
output += " - <a href='?src=\ref[src];toggle_repairs=1'>[pr_repair_droid.active()?"Dea":"A"]ctivate</a>"
|
||||
return output
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[pr_repair_droid.active()?"Dea":"A"]ctivate</a>"
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
@@ -656,9 +656,8 @@
|
||||
return
|
||||
|
||||
get_equip_info()
|
||||
var/output = ..()
|
||||
output += " - <a href='?src=\ref[src];toggle_relay=1'>[pr_energy_relay.active()?"Dea":"A"]ctivate</a>"
|
||||
return output
|
||||
if(!chassis) return
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=\ref[src];toggle_relay=1'>[pr_energy_relay.active()?"Dea":"A"]ctivate</a>"
|
||||
|
||||
proc/dynusepower(amount)
|
||||
if(!equip_ready) //enabled
|
||||
@@ -700,6 +699,139 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/plasma_generator
|
||||
name = "Plasma Converter"
|
||||
desc = "Generates power using solid plasma as fuel. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
origin_tech = "plasmatech=2;powerstorage=2;engineering"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 0
|
||||
range = MELEE
|
||||
construction_cost = list("metal"=10000,"silver"=500,"glass"=1000)
|
||||
var/datum/global_iterator/pr_mech_plasma_generator
|
||||
var/coeff = 100
|
||||
var/fuel = 0
|
||||
var/max_fuel = 150000
|
||||
var/fuel_per_cycle_idle = 100
|
||||
var/fuel_per_cycle_active = 500
|
||||
var/power_per_cycle = 10
|
||||
reliability = 999
|
||||
|
||||
New()
|
||||
..()
|
||||
pr_mech_plasma_generator = new /datum/global_iterator/mecha_plasma_generator(list(src),0)
|
||||
pr_mech_plasma_generator.set_delay(equip_cooldown)
|
||||
return
|
||||
|
||||
detach()
|
||||
pr_mech_plasma_generator.stop()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(href_list["toggle"])
|
||||
if(pr_mech_plasma_generator.toggle())
|
||||
set_ready_state(0)
|
||||
chassis.log_message("[src] activated.")
|
||||
else
|
||||
set_ready_state(1)
|
||||
chassis.log_message("[src] deactivated.")
|
||||
return
|
||||
|
||||
get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[Plasma: [fuel] cm<sup>3</sup>\] - <a href='?src=\ref[src];toggle=1'>[pr_mech_plasma_generator.active()?"Dea":"A"]ctivate</a>"
|
||||
return
|
||||
|
||||
action(target)
|
||||
if(chassis)
|
||||
var/result = load_fuel(target)
|
||||
var/message
|
||||
if(isnull(result))
|
||||
message = "<font color='red'>Plasma traces in target minimal. [target] cannot be used as fuel.</font>"
|
||||
else if(!result)
|
||||
message = "Unit is full."
|
||||
else
|
||||
message = "[result] units of plasma successfully loaded."
|
||||
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
|
||||
chassis.occupant_message(message)
|
||||
return
|
||||
|
||||
proc/load_fuel(var/obj/item/stack/sheet/plasma/P)
|
||||
if(istype(P) && P.amount)
|
||||
var/to_load = max(max_fuel - fuel,0)
|
||||
if(to_load)
|
||||
var/units = min(max(round(to_load / P.perunit),1),P.amount)
|
||||
if(units)
|
||||
fuel += units * P.perunit
|
||||
P.use(units)
|
||||
return units
|
||||
else
|
||||
return 0
|
||||
return
|
||||
|
||||
attackby(weapon,mob/user)
|
||||
var/result = load_fuel(weapon)
|
||||
if(isnull(result))
|
||||
user.visible_message("[user] tries to shove [weapon] into [src]. What a dumb-ass.","<font color='red'>Plasma traces minimal. [weapon] cannot be used as fuel.</font>")
|
||||
else if(!result)
|
||||
user << "Unit is full."
|
||||
else
|
||||
user.visible_message("[user] loads [src] with plasma.","[result] units of plasma successfully loaded.")
|
||||
return
|
||||
|
||||
critfail()
|
||||
..()
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
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.")
|
||||
destroy()
|
||||
else
|
||||
GM.toxins += 5
|
||||
GM.temperature = istype(T) ? T.air.return_temperature() : T20C
|
||||
T.assume_air(GM)
|
||||
T.visible_message("The [src] suddenly disgorges a cloud of plasma.")
|
||||
T.assume_air(GM)
|
||||
return
|
||||
|
||||
/datum/global_iterator/mecha_plasma_generator
|
||||
|
||||
process(var/obj/item/mecha_parts/mecha_equipment/plasma_generator/EG)
|
||||
if(!EG.chassis)
|
||||
EG.set_ready_state(1)
|
||||
return stop()
|
||||
if(EG.fuel<=0)
|
||||
EG.set_ready_state(1)
|
||||
stop()
|
||||
EG.chassis.log_message("[src] deactivated.")
|
||||
send_byjax(EG.chassis.occupant,"exosuit.browser","\ref[EG]",EG.get_equip_info())
|
||||
return
|
||||
if(rand(0,1000)>EG.reliability)
|
||||
EG.critfail()
|
||||
return stop()
|
||||
var/cur_charge = EG.chassis.get_charge()
|
||||
if(isnull(cur_charge))
|
||||
EG.set_ready_state(1)
|
||||
EG.chassis.occupant_message("No powercell detected.")
|
||||
EG.chassis.log_message("[src] deactivated.")
|
||||
return stop()
|
||||
var/use_fuel = EG.fuel_per_cycle_idle
|
||||
if(cur_charge<EG.chassis.cell.maxcharge)
|
||||
use_fuel = EG.fuel_per_cycle_active
|
||||
EG.chassis.give_power(EG.power_per_cycle)
|
||||
send_byjax(EG.chassis.occupant,"exosuit.browser","\ref[EG]",EG.get_equip_info())
|
||||
EG.fuel -= use_fuel
|
||||
return
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/obj/item/mecha_parts/mecha_equipment/defence_shocker
|
||||
name = "Exosuit Defence Shocker"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
name = "mecha weapon"
|
||||
range = RANGED
|
||||
origin_tech = "materials=3;combat=3"
|
||||
var/projectile
|
||||
var/fire_sound
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(var/obj/mecha/combat/M as obj)
|
||||
@@ -10,11 +12,9 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/laser
|
||||
equip_cooldown = 7
|
||||
name = "CH-PS \"Immolator\" Laser"
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 30
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy
|
||||
name = "General Energy Weapon"
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
@@ -25,8 +25,8 @@
|
||||
if (targloc == curloc)
|
||||
return
|
||||
set_ready_state(0)
|
||||
playsound(chassis, 'Laser.ogg', 50, 1)
|
||||
var/obj/item/projectile/beam/A = new /obj/item/projectile/beam(curloc)
|
||||
playsound(chassis, fire_sound, 50, 1)
|
||||
var/obj/item/projectile/A = new projectile(curloc)
|
||||
A.original = targloc
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
@@ -37,62 +37,40 @@
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ion
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
|
||||
equip_cooldown = 5
|
||||
name = "CH-PS \"Immolator\" Laser"
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 30
|
||||
projectile = /obj/item/projectile/beam
|
||||
fire_sound = 'Laser.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy
|
||||
equip_cooldown = 10
|
||||
name = "CH-LC \"Solaris\" Laser Cannon"
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 60
|
||||
projectile = /obj/item/projectile/beam/heavylaser
|
||||
fire_sound = 'lasercannonfire.ogg'
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/ion
|
||||
equip_cooldown = 7
|
||||
name = "mkIV Ion Heavy Repeater"
|
||||
icon_state = "mecha_laser"
|
||||
energy_drain = 120
|
||||
projectile = /obj/item/projectile/ion
|
||||
fire_sound = 'Laser.ogg'
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
var/turf/curloc = chassis.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
set_ready_state(0)
|
||||
playsound(chassis, 'Laser.ogg', 50, 1)
|
||||
var/obj/item/projectile/beam/A = new /obj/item/projectile/ion(curloc)
|
||||
A.original = targloc
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
chassis.use_power(energy_drain)
|
||||
A.process()
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/pulse
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse
|
||||
equip_cooldown = 30
|
||||
name = "eZ-13 mk2 Heavy pulse rifle"
|
||||
icon_state = "mecha_pulse"
|
||||
energy_drain = 120
|
||||
origin_tech = "materials=3;combat=6;powerstorage=4"
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
|
||||
var/turf/curloc = chassis.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
|
||||
playsound(chassis, 'marauder.ogg', 50, 1)
|
||||
var/obj/item/projectile/beam/pulse/A = new /obj/item/projectile/beam/pulse/heavy(curloc)
|
||||
A.original = targloc
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
A.process()
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
projectile = /obj/item/projectile/beam/pulse/heavy
|
||||
fire_sound = 'marauder.ogg'
|
||||
|
||||
|
||||
/obj/item/projectile/beam/pulse/heavy
|
||||
@@ -107,35 +85,14 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/taser
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser
|
||||
name = "PBT \"Pacifier\" Mounted Taser"
|
||||
icon_state = "mecha_taser"
|
||||
energy_drain = 20
|
||||
equip_cooldown = 6
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
fire_sound = 'Laser.ogg'
|
||||
|
||||
action(target)
|
||||
if(!action_checks(target)) return
|
||||
|
||||
var/turf/curloc = chassis.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
|
||||
playsound(chassis, 'Laser.ogg', 50, 1)
|
||||
var/obj/item/projectile/energy/electrode/A = new /obj/item/projectile/energy/electrode(curloc)
|
||||
A.original = targloc
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
set_ready_state(0)
|
||||
chassis.use_power(energy_drain)
|
||||
spawn()
|
||||
A.process()
|
||||
chassis.log_message("Fired from [src.name], targeting [target].")
|
||||
do_after_cooldown()
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker
|
||||
name = "HoNkER BlAsT 5000"
|
||||
@@ -229,7 +186,7 @@
|
||||
name = "LBX AC 10 \"Scattershot\""
|
||||
icon_state = "mecha_scatter"
|
||||
equip_cooldown = 20
|
||||
projectiles = 100
|
||||
projectiles = 40
|
||||
projectile_energy_cost = 25
|
||||
var/projectiles_per_shot = 4
|
||||
var/deviation = 0.7
|
||||
@@ -247,9 +204,8 @@
|
||||
targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
|
||||
if(!targloc || targloc == curloc)
|
||||
break
|
||||
|
||||
playsound(chassis, 'Gunshot.ogg', 80, 1)
|
||||
var/obj/item/projectile/A = new /obj/item/projectile(curloc)
|
||||
var/obj/item/projectile/bullet/A = new /obj/item/projectile/bullet(curloc)
|
||||
src.projectiles--
|
||||
A.original = targloc
|
||||
A.current = curloc
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill,
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/extinguisher,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/taser,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/energy/taser,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar,
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar,
|
||||
@@ -93,7 +93,8 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster,
|
||||
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster,
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid,
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay,
|
||||
/obj/item/mecha_parts/mecha_equipment/plasma_generator
|
||||
),
|
||||
|
||||
"Misc"=list(/obj/item/mecha_tracking)
|
||||
@@ -287,14 +288,14 @@
|
||||
if(stat&(NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!check_resources(part))
|
||||
src.visible_message("<b>[src]</b> beeps, \"Not enough resources. Queue processing stopped\".")
|
||||
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Not enough resources. Queue processing stopped\".")
|
||||
temp = {"<font color='red'>Not enough resources to build next part.</font><br>
|
||||
<a href='?src=\ref[src];process_queue=1'>Try again</a> | <a href='?src=\ref[src];clear_temp=1'>Return</a><a>"}
|
||||
return 0
|
||||
remove_from_queue(1)
|
||||
build_part(part)
|
||||
part = listgetindex(src.queue, 1)
|
||||
src.visible_message("<b>[src]</b> beeps, \"Queue processing finished successfully\".")
|
||||
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Queue processing finished successfully\".")
|
||||
return 1
|
||||
|
||||
proc/list_queue()
|
||||
@@ -361,7 +362,7 @@
|
||||
temp += "<a href='?src=\ref[src];clear_temp=1'>Return</a>"
|
||||
src.updateUsrDialog()
|
||||
if(i || tech_output)
|
||||
src.visible_message("<b>[src]</b> beeps, \"Succesfully synchronized with R&D server. New data processed.\"")
|
||||
src.visible_message("\icon[src] <b>[src]</b> beeps, \"Succesfully synchronized with R&D server. New data processed.\"")
|
||||
return
|
||||
|
||||
proc/get_resource_cost_w_coeff(var/obj/item/mecha_parts/part as obj,var/resource as text, var/roundto=1)
|
||||
@@ -434,11 +435,13 @@
|
||||
..()
|
||||
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
|
||||
if(href_list["part_set"])
|
||||
if(href_list["part_set"]=="clear")
|
||||
src.part_set = null
|
||||
else
|
||||
src.part_set = href_list["part_set"]
|
||||
screen = "parts"
|
||||
var/tpart_set = filter.getStr("part_set")
|
||||
if(tpart_set)
|
||||
if(tpart_set=="clear")
|
||||
src.part_set = null
|
||||
else
|
||||
src.part_set = tpart_set
|
||||
screen = "parts"
|
||||
if(href_list["part"])
|
||||
var/list/part = filter.getObj("part")
|
||||
if(!processing_queue)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
var/step_energy_drain = 10
|
||||
var/health = 300 //health is health
|
||||
var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act.
|
||||
var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1)
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/state = 0
|
||||
var/list/log = new
|
||||
@@ -151,6 +152,7 @@
|
||||
|
||||
/obj/mecha/proc/range_action(atom/target)
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/mecha/verb/test_int_damage()
|
||||
set name = "Test internal damage"
|
||||
@@ -196,12 +198,11 @@
|
||||
return 0
|
||||
var/move_result = 0
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
move_result = step_rand(src)
|
||||
move_result = mechsteprand()
|
||||
else if(src.dir!=direction)
|
||||
src.dir=direction
|
||||
move_result = 1
|
||||
move_result = mechturn(direction)
|
||||
else
|
||||
move_result = step(src,direction)
|
||||
move_result = mechstep(direction)
|
||||
if(occupant)
|
||||
for(var/obj/effect/speech_bubble/B in range(1, src))
|
||||
if(B.parent == occupant)
|
||||
@@ -219,6 +220,24 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/mecha/proc/mechturn(direction)
|
||||
dir = direction
|
||||
playsound(src,'mechturn.ogg',40,1)
|
||||
return 1
|
||||
|
||||
/obj/mecha/proc/mechstep(direction)
|
||||
var/result = step(src,direction)
|
||||
if(result)
|
||||
playsound(src,'mechstep.ogg',40,1)
|
||||
return result
|
||||
|
||||
/obj/mecha/proc/mechsteprand()
|
||||
var/result = step_rand(src)
|
||||
if(result)
|
||||
playsound(src,'mechstep.ogg',40,1)
|
||||
return result
|
||||
|
||||
|
||||
/*
|
||||
/obj/mecha/proc/inertial_movement(direction)
|
||||
src.inertia_dir = direction
|
||||
@@ -271,16 +290,15 @@
|
||||
|
||||
/obj/mecha/proc/take_damage(amount, type="brute")
|
||||
if(amount)
|
||||
switch(type)
|
||||
if("brute")
|
||||
src.health -= amount
|
||||
if("fire")
|
||||
amount *= 1.2
|
||||
src.health -= amount
|
||||
var/damage = absorbDamage(amount,type)
|
||||
src.health -= damage
|
||||
src.update_health()
|
||||
src.log_append_to_last("Took [amount] points of damage. Damage type: \"[type]\".",1)
|
||||
src.log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1)
|
||||
return
|
||||
|
||||
/obj/mecha/proc/absorbDamage(damage,damage_type)
|
||||
return damage*(listgetindex(damage_absorption,damage_type) || 1)
|
||||
|
||||
/obj/mecha/proc/check_for_internal_damage(var/list/possible_int_damage,var/ignore_threshold=null)
|
||||
if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) return
|
||||
if(prob(20))
|
||||
@@ -288,13 +306,12 @@
|
||||
for(var/T in possible_int_damage)
|
||||
if(internal_damage & T)
|
||||
possible_int_damage -= T
|
||||
if(possible_int_damage)
|
||||
var/int_dam_flag = pick(possible_int_damage)
|
||||
if(int_dam_flag)
|
||||
src.internal_damage |= int_dam_flag
|
||||
src.pr_internal_damage.start()
|
||||
src.log_append_to_last("Internal damage of type [int_dam_flag].[ignore_threshold?"Ignoring damage threshold.":null]",1)
|
||||
src.occupant << sound('warning-buzzer.ogg',wait=0)
|
||||
var/int_dam_flag = safepick(possible_int_damage)
|
||||
if(int_dam_flag)
|
||||
src.internal_damage |= int_dam_flag
|
||||
src.pr_internal_damage.start()
|
||||
src.log_append_to_last("Internal damage of type [int_dam_flag].[ignore_threshold?"Ignoring damage threshold.":null]",1)
|
||||
src.occupant << sound('warning-buzzer.ogg',wait=0)
|
||||
if(prob(5))
|
||||
if(ignore_threshold || src.health*100/initial(src.health)<src.internal_damage_threshold)
|
||||
var/obj/item/mecha_parts/mecha_equipment/destr = safepick(equipment)
|
||||
@@ -395,11 +412,10 @@
|
||||
return
|
||||
if(istype(Proj, /obj/item/projectile/beam/pulse))
|
||||
ignore_threshold = 1
|
||||
src.take_damage(Proj.damage)
|
||||
src.take_damage(Proj.damage,Proj.flag)
|
||||
src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST),ignore_threshold)
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/proc/destroy()
|
||||
spawn()
|
||||
go_out()
|
||||
@@ -408,27 +424,29 @@
|
||||
loc.Exited(src)
|
||||
loc = null
|
||||
if(T)
|
||||
if(prob(40))
|
||||
if(prob(30))
|
||||
explosion(T, 0, 0, 1, 3)
|
||||
if(wreckage)
|
||||
var/obj/effect/decal/mecha_wreckage/WR = new wreckage(T)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
|
||||
if(prob(30))
|
||||
WR.crowbar_salvage += E
|
||||
E.loc = WR
|
||||
E.equip_ready = 1
|
||||
E.reliability = rand(30,100)
|
||||
else
|
||||
E.loc = T
|
||||
E.destroy()
|
||||
if(cell)
|
||||
WR.crowbar_salvage += cell
|
||||
cell.loc = WR
|
||||
cell.charge = rand(0, cell.charge)
|
||||
if(internal_tank)
|
||||
WR.crowbar_salvage += internal_tank
|
||||
internal_tank.loc = WR
|
||||
del(src)
|
||||
spawn(0)
|
||||
if(wreckage)
|
||||
var/obj/effect/decal/mecha_wreckage/WR = new wreckage(T)
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/E in equipment)
|
||||
if(prob(30))
|
||||
WR.crowbar_salvage += E
|
||||
E.loc = WR
|
||||
E.equip_ready = 1
|
||||
E.reliability = rand(30,100)
|
||||
else
|
||||
E.loc = T
|
||||
E.destroy()
|
||||
if(cell)
|
||||
WR.crowbar_salvage += cell
|
||||
cell.loc = WR
|
||||
cell.charge = rand(0, cell.charge)
|
||||
if(internal_tank)
|
||||
WR.crowbar_salvage += internal_tank
|
||||
internal_tank.loc = WR
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/mecha/ex_act(severity)
|
||||
@@ -565,7 +583,7 @@
|
||||
/obj/mecha/verb/connect_to_port()
|
||||
set name = "Connect to port"
|
||||
set category = "Exosuit Interface"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(!src.occupant) return
|
||||
if(usr!=src.occupant)
|
||||
@@ -587,7 +605,7 @@
|
||||
/obj/mecha/verb/disconnect_from_port()
|
||||
set name = "Disconnect from port"
|
||||
set category = "Exosuit Interface"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(!src.occupant) return
|
||||
if(usr!=src.occupant)
|
||||
@@ -599,11 +617,10 @@
|
||||
else
|
||||
src.occupant_message("\red [name] is not connected to the port at the moment.")
|
||||
|
||||
|
||||
/obj/mecha/verb/toggle_lights()
|
||||
set name = "Toggle Lights"
|
||||
set category = "Exosuit Interface"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
@@ -619,7 +636,7 @@
|
||||
/obj/mecha/verb/toggle_internal_tank()
|
||||
set name = "Toggle internal airtank usage."
|
||||
set category = "Exosuit Interface"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
@@ -741,7 +758,7 @@
|
||||
/obj/mecha/verb/view_stats()
|
||||
set name = "View Stats"
|
||||
set category = "Exosuit Interface"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
@@ -761,7 +778,7 @@
|
||||
/obj/mecha/verb/eject()
|
||||
set name = "Eject"
|
||||
set category = "Exosuit Interface"
|
||||
set src in view(0)
|
||||
set src = usr.loc
|
||||
set popup_menu = 0
|
||||
if(usr!=src.occupant)
|
||||
return
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
|
||||
|
||||
/datum/construction/mecha/ripley_chassis
|
||||
steps = list(list("key"="/obj/item/mecha_parts/part/ripley_torso"),//1
|
||||
list("key"="/obj/item/mecha_parts/part/ripley_left_arm"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/ripley_right_arm"),//3
|
||||
list("key"="/obj/item/mecha_parts/part/ripley_left_leg"),//4
|
||||
list("key"="/obj/item/mecha_parts/part/ripley_right_leg")//5
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/ripley_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/ripley_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/ripley_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/ripley_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/ripley_right_leg)//5
|
||||
)
|
||||
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
@@ -238,12 +238,12 @@
|
||||
|
||||
|
||||
/datum/construction/mecha/gygax_chassis
|
||||
steps = list(list("key"="/obj/item/mecha_parts/part/gygax_torso"),//1
|
||||
list("key"="/obj/item/mecha_parts/part/gygax_left_arm"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/gygax_right_arm"),//3
|
||||
list("key"="/obj/item/mecha_parts/part/gygax_left_leg"),//4
|
||||
list("key"="/obj/item/mecha_parts/part/gygax_right_leg"),//5
|
||||
list("key"="/obj/item/mecha_parts/part/gygax_head")
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/gygax_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/gygax_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/gygax_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/gygax_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/gygax_right_leg),//5
|
||||
list("key"=/obj/item/mecha_parts/part/gygax_head)
|
||||
)
|
||||
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
@@ -475,11 +475,11 @@
|
||||
|
||||
|
||||
/datum/construction/mecha/firefighter_chassis
|
||||
steps = list(list("key"="/obj/item/mecha_parts/part/firefighter_torso"),//1
|
||||
list("key"="/obj/item/mecha_parts/part/firefighter_left_arm"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/firefighter_right_arm"),//3
|
||||
list("key"="/obj/item/mecha_parts/part/firefighter_left_leg"),//4
|
||||
list("key"="/obj/item/mecha_parts/part/firefighter_right_leg")//5
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/firefighter_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/firefighter_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/firefighter_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/firefighter_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/firefighter_right_leg)//5
|
||||
)
|
||||
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
@@ -502,20 +502,20 @@
|
||||
|
||||
/datum/construction/mecha/firefighter
|
||||
result = "/obj/mecha/working/firefighter"
|
||||
steps = list(list("key"="/obj/item/weapon/weldingtool"),//1
|
||||
list("key"="/obj/item/weapon/wrench"),//2
|
||||
list("key"="/obj/item/stack/sheet/r_metal"),//3
|
||||
list("key"="/obj/item/weapon/weldingtool"),//4
|
||||
list("key"="/obj/item/weapon/wrench"),//5
|
||||
list("key"="/obj/item/stack/sheet/metal"),//6
|
||||
list("key"="/obj/item/weapon/screwdriver"),//7
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/firefighter/peripherals"),//8
|
||||
list("key"="/obj/item/weapon/screwdriver"),//9
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/ripley/main"),//10
|
||||
list("key"="/obj/item/weapon/wirecutters"),//11
|
||||
list("key"="/obj/item/weapon/cable_coil"),//12
|
||||
list("key"="/obj/item/weapon/screwdriver"),//13
|
||||
list("key"="/obj/item/weapon/wrench")//14
|
||||
steps = list(list("key"=/obj/item/weapon/weldingtool),//1
|
||||
list("key"=/obj/item/weapon/wrench),//2
|
||||
list("key"=/obj/item/stack/sheet/r_metal),//3
|
||||
list("key"=/obj/item/weapon/weldingtool),//4
|
||||
list("key"=/obj/item/weapon/wrench),//5
|
||||
list("key"=/obj/item/stack/sheet/metal),//6
|
||||
list("key"=/obj/item/weapon/screwdriver),//7
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/firefighter/peripherals),//8
|
||||
list("key"=/obj/item/weapon/screwdriver),//9
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/ripley/main),//10
|
||||
list("key"=/obj/item/weapon/wirecutters),//11
|
||||
list("key"=/obj/item/weapon/cable_coil),//12
|
||||
list("key"=/obj/item/weapon/screwdriver),//13
|
||||
list("key"=/obj/item/weapon/wrench)//14
|
||||
)
|
||||
|
||||
action(atom/used_atom,mob/user as mob)
|
||||
@@ -563,12 +563,12 @@
|
||||
|
||||
|
||||
/datum/construction/mecha/honker_chassis
|
||||
steps = list(list("key"="/obj/item/mecha_parts/part/honker_torso"),//1
|
||||
list("key"="/obj/item/mecha_parts/part/honker_left_arm"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/honker_right_arm"),//3
|
||||
list("key"="/obj/item/mecha_parts/part/honker_left_leg"),//4
|
||||
list("key"="/obj/item/mecha_parts/part/honker_right_leg"),//5
|
||||
list("key"="/obj/item/mecha_parts/part/honker_head")
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/honker_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/honker_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/honker_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/honker_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/honker_right_leg),//5
|
||||
list("key"=/obj/item/mecha_parts/part/honker_head)
|
||||
)
|
||||
|
||||
action(atom/used_atom,mob/user as mob)
|
||||
@@ -591,17 +591,17 @@
|
||||
|
||||
/datum/construction/mecha/honker
|
||||
result = "/obj/mecha/combat/honker"
|
||||
steps = list(list("key"="/obj/item/weapon/bikehorn"),//1
|
||||
list("key"="/obj/item/clothing/shoes/clown_shoes"),//2
|
||||
list("key"="/obj/item/weapon/bikehorn"),//3
|
||||
list("key"="/obj/item/clothing/mask/gas/clown_hat"),//4
|
||||
list("key"="/obj/item/weapon/bikehorn"),//5
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/honker/targeting"),//6
|
||||
list("key"="/obj/item/weapon/bikehorn"),//7
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/honker/peripherals"),//8
|
||||
list("key"="/obj/item/weapon/bikehorn"),//9
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/honker/main"),//10
|
||||
list("key"="/obj/item/weapon/bikehorn"),//11
|
||||
steps = list(list("key"=/obj/item/weapon/bikehorn),//1
|
||||
list("key"=/obj/item/clothing/shoes/clown_shoes),//2
|
||||
list("key"=/obj/item/weapon/bikehorn),//3
|
||||
list("key"=/obj/item/clothing/mask/gas/clown_hat),//4
|
||||
list("key"=/obj/item/weapon/bikehorn),//5
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/honker/targeting),//6
|
||||
list("key"=/obj/item/weapon/bikehorn),//7
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/honker/peripherals),//8
|
||||
list("key"=/obj/item/weapon/bikehorn),//9
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/honker/main),//10
|
||||
list("key"=/obj/item/weapon/bikehorn),//11
|
||||
)
|
||||
|
||||
action(atom/used_atom,mob/user as mob)
|
||||
@@ -638,12 +638,12 @@
|
||||
|
||||
|
||||
/datum/construction/mecha/durand_chassis
|
||||
steps = list(list("key"="/obj/item/mecha_parts/part/durand_torso"),//1
|
||||
list("key"="/obj/item/mecha_parts/part/durand_left_arm"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/durand_right_arm"),//3
|
||||
list("key"="/obj/item/mecha_parts/part/durand_left_leg"),//4
|
||||
list("key"="/obj/item/mecha_parts/part/durand_right_leg"),//5
|
||||
list("key"="/obj/item/mecha_parts/part/durand_head")
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/durand_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/durand_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/durand_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/durand_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/durand_right_leg),//5
|
||||
list("key"=/obj/item/mecha_parts/part/durand_head)
|
||||
)
|
||||
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
@@ -665,26 +665,26 @@
|
||||
|
||||
/datum/construction/mecha/durand
|
||||
result = "/obj/mecha/combat/durand"
|
||||
steps = list(list("key"="/obj/item/weapon/weldingtool"),//1
|
||||
list("key"="/obj/item/weapon/wrench"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/durand_armour"),//3
|
||||
list("key"="/obj/item/weapon/weldingtool"),//4
|
||||
list("key"="/obj/item/weapon/wrench"),//5
|
||||
list("key"="/obj/item/stack/sheet/metal"),//6
|
||||
list("key"="/obj/item/weapon/screwdriver"),//7
|
||||
list("key"="/obj/item/weapon/stock_parts/capacitor/adv"),//8
|
||||
list("key"="/obj/item/weapon/screwdriver"),//9
|
||||
list("key"="/obj/item/weapon/stock_parts/scanning_module/adv"),//10
|
||||
list("key"="/obj/item/weapon/screwdriver"),//11
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/durand/targeting"),//12
|
||||
list("key"="/obj/item/weapon/screwdriver"),//13
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/durand/peripherals"),//14
|
||||
list("key"="/obj/item/weapon/screwdriver"),//15
|
||||
list("key"="/obj/item/mecha_parts/circuitboard/durand/main"),//16
|
||||
list("key"="/obj/item/weapon/wirecutters"),//17
|
||||
list("key"="/obj/item/weapon/cable_coil"),//18
|
||||
list("key"="/obj/item/weapon/screwdriver"),//19
|
||||
list("key"="/obj/item/weapon/wrench")//20
|
||||
steps = list(list("key"=/obj/item/weapon/weldingtool),//1
|
||||
list("key"=/obj/item/weapon/wrench),//2
|
||||
list("key"=/obj/item/mecha_parts/part/durand_armour),//3
|
||||
list("key"=/obj/item/weapon/weldingtool),//4
|
||||
list("key"=/obj/item/weapon/wrench),//5
|
||||
list("key"=/obj/item/stack/sheet/metal),//6
|
||||
list("key"=/obj/item/weapon/screwdriver),//7
|
||||
list("key"=/obj/item/weapon/stock_parts/capacitor/adv),//8
|
||||
list("key"=/obj/item/weapon/screwdriver),//9
|
||||
list("key"=/obj/item/weapon/stock_parts/scanning_module/adv),//10
|
||||
list("key"=/obj/item/weapon/screwdriver),//11
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/durand/targeting),//12
|
||||
list("key"=/obj/item/weapon/screwdriver),//13
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/durand/peripherals),//14
|
||||
list("key"=/obj/item/weapon/screwdriver),//15
|
||||
list("key"=/obj/item/mecha_parts/circuitboard/durand/main),//16
|
||||
list("key"=/obj/item/weapon/wirecutters),//17
|
||||
list("key"=/obj/item/weapon/cable_coil),//18
|
||||
list("key"=/obj/item/weapon/screwdriver),//19
|
||||
list("key"=/obj/item/weapon/wrench)//20
|
||||
)
|
||||
|
||||
action(atom/used_atom,mob/user as mob)
|
||||
@@ -748,12 +748,12 @@
|
||||
|
||||
/datum/construction/mecha/phazon_chassis
|
||||
result = "/obj/mecha/combat/phazon"
|
||||
steps = list(list("key"="/obj/item/mecha_parts/part/phazon_torso"),//1
|
||||
list("key"="/obj/item/mecha_parts/part/phazon_left_arm"),//2
|
||||
list("key"="/obj/item/mecha_parts/part/phazon_right_arm"),//3
|
||||
list("key"="/obj/item/mecha_parts/part/phazon_left_leg"),//4
|
||||
list("key"="/obj/item/mecha_parts/part/phazon_right_leg"),//5
|
||||
list("key"="/obj/item/mecha_parts/part/phazon_head")
|
||||
steps = list(list("key"=/obj/item/mecha_parts/part/phazon_torso),//1
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_left_arm),//2
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_right_arm),//3
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_left_leg),//4
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_right_leg),//5
|
||||
list("key"=/obj/item/mecha_parts/part/phazon_head)
|
||||
)
|
||||
|
||||
custom_action(step, atom/used_atom, mob/user)
|
||||
|
||||
@@ -21,11 +21,15 @@
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/ex_act(severity)
|
||||
if(severity < 3)
|
||||
if(severity < 2)
|
||||
spawn
|
||||
del src
|
||||
return
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/bullet_act(var/obj/item/projectile/Proj)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/decal/mecha_wreckage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if(salvage_num <= 0)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
max_temperature = 6000
|
||||
health = 250
|
||||
internal_damage_threshold = 40
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/ripley"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/ripley
|
||||
infra_luminosity = 5
|
||||
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
step_in = 6
|
||||
max_temperature = 1000
|
||||
health = 200
|
||||
wreckage = "/obj/effect/decal/mecha_wreckage/ripley"
|
||||
wreckage = /obj/effect/decal/mecha_wreckage/ripley
|
||||
var/list/cargo = new
|
||||
var/cargo_capacity = 15
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -604,7 +604,15 @@ datum
|
||||
id = "mech_laser"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("combat" = 3, "magnets" = 3)
|
||||
build_path = "/obj/item/mecha_parts/mecha_equipment/weapon/laser"
|
||||
build_path = "/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser"
|
||||
|
||||
mech_laser_heavy
|
||||
name = "Exosuit Weapon Design (CH-LC \"Solaris\" Laser Cannon)"
|
||||
desc = "Allows for the construction of CH-LC Laser Cannon."
|
||||
id = "mech_laser_heavy"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("combat" = 4, "magnets" = 4)
|
||||
build_path = "/obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy"
|
||||
|
||||
mech_grenade_launcher
|
||||
name = "Exosuit Weapon Design (SGL-6 Grenade Launcher)"
|
||||
@@ -654,6 +662,14 @@ datum
|
||||
req_tech = list("magnets" = 3, "programming" = 3, "engineering" = 3)
|
||||
build_path = "/obj/item/mecha_parts/mecha_equipment/repair_droid"
|
||||
|
||||
mech_plasma_generator
|
||||
name = "Exosuit Module Design (Plasma Converter Module)"
|
||||
desc = "Exosuit-mounted plasma converter."
|
||||
id = "mech_plasma_generator"
|
||||
build_type = MECHFAB
|
||||
req_tech = list("plasmatech" = 2, "powerstorage"= 2, "engineering" = 2)
|
||||
build_path = "/obj/item/mecha_parts/mecha_equipment/plasma_generator"
|
||||
|
||||
////////////////////////////////////////
|
||||
//////////Disk Construction Disks///////
|
||||
////////////////////////////////////////
|
||||
|
||||
@@ -77,6 +77,23 @@ research holder datum.
|
||||
else
|
||||
return 0
|
||||
|
||||
//Checks to see if design has all the required pre-reqs.
|
||||
//Input: datum/design; Output: 0/1 (false/true)
|
||||
DesignHasReqs(var/datum/design/D)
|
||||
if(D.req_tech.len == 0)
|
||||
return 1
|
||||
var/matches = 0
|
||||
var/list/k_tech = list()
|
||||
for(var/datum/tech/known in known_tech)
|
||||
k_tech[known.id] = known.level
|
||||
for(var/req in D.req_tech)
|
||||
if(!isnull(k_tech[req]) && k_tech[req] >= D.req_tech[req])
|
||||
matches++
|
||||
if(matches == D.req_tech.len)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
/*
|
||||
//Checks to see if design has all the required pre-reqs.
|
||||
//Input: datum/design; Output: 0/1 (false/true)
|
||||
DesignHasReqs(var/datum/design/D)
|
||||
@@ -92,7 +109,7 @@ research holder datum.
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
*/
|
||||
//Adds a tech to known_tech list. Checks to make sure there aren't duplicates and updates existing tech's levels if needed.
|
||||
//Input: datum/tech; Output: Null
|
||||
AddTech2Known(var/datum/tech/T)
|
||||
|
||||
@@ -54,6 +54,19 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
(ie. code improvements for expandability, etc.) should not be listed here. They
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<b><font color='blue'>29 October 2011</font><b>
|
||||
<ul>
|
||||
<li><b>ConstantA updated:</b>
|
||||
<ul>
|
||||
<li>Added step and turn sounds for mechs</li>
|
||||
<li>Added another mecha equipment - plasma converter. Works similar to portable generator. Uses solid plasma as fuel. Can be refueled either by clicking on it with plasma in hand, or directly from mecha - selecting it and clicking on plasma.</li>
|
||||
<li>Added mecha laser cannon.</li>
|
||||
<li>Added damage absorption for mechs. Different mechs have different absorption for different types of damage.</li>
|
||||
<li>Metal foam now blocks air movement.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<b><font color='blue'>29 October 2011</font><b>
|
||||
<ul>
|
||||
<li><b>Petethegoat updated:</b>
|
||||
|
||||
BIN
sound/mecha/mechmove01.ogg
Normal file
BIN
sound/mecha/mechmove01.ogg
Normal file
Binary file not shown.
BIN
sound/mecha/mechmove03.ogg
Normal file
BIN
sound/mecha/mechmove03.ogg
Normal file
Binary file not shown.
BIN
sound/mecha/mechmove04.ogg
Normal file
BIN
sound/mecha/mechmove04.ogg
Normal file
Binary file not shown.
BIN
sound/mecha/mechstep.ogg
Normal file
BIN
sound/mecha/mechstep.ogg
Normal file
Binary file not shown.
BIN
sound/mecha/mechturn.ogg
Normal file
BIN
sound/mecha/mechturn.ogg
Normal file
Binary file not shown.
@@ -164,6 +164,7 @@
|
||||
#define FILE_DIR "sound/effects"
|
||||
#define FILE_DIR "sound/items"
|
||||
#define FILE_DIR "sound/machines"
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#define FILE_DIR "sound/spells"
|
||||
@@ -239,6 +240,7 @@
|
||||
#include "code\datums\helper_datums\construction_datum.dm"
|
||||
#include "code\datums\helper_datums\getrev.dm"
|
||||
#include "code\datums\helper_datums\global_iterator.dm"
|
||||
#include "code\datums\helper_datums\teleport.dm"
|
||||
#include "code\datums\helper_datums\tension.dm"
|
||||
#include "code\datums\helper_datums\topic_input.dm"
|
||||
#include "code\datums\spells\area_teleport.dm"
|
||||
|
||||
Reference in New Issue
Block a user