Files
Polaris/code/game/mecha/combat/durand.dm
panurgomatic 3517810d11 - 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
2011-10-31 22:09:36 +00:00

74 lines
2.1 KiB
Plaintext

/obj/mecha/combat/durand
desc = "An aging combat exosuit utilized by the Nanotrasen corporation. Originally developed to combat hostile alien lifeforms."
name = "Durand"
icon_state = "durand"
step_in = 4
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
/*
/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
*/
/obj/mecha/combat/durand/relaymove(mob/user,direction)
if(defence)
if(world.time - last_message > 20)
src.occupant_message("<font color='red'>Unable to move while in defence mode</font>")
last_message = world.time
return 0
. = ..()
return
/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(usr!=src.occupant)
return
defence = !defence
if(defence)
deflect_chance = defence_deflect
src.occupant_message("<font color='blue'>You enable [src] defence mode.</font>")
else
deflect_chance = initial(deflect_chance)
src.occupant_message("<font color='red'>You disable [src] defence mode.</font>")
src.log_message("Toggled defence mode.")
return
/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
/obj/mecha/combat/durand/Topic(href, href_list)
..()
if (href_list["toggle_defence_mode"])
src.defence_mode()
return