From dea8d4d3803c1e2de98c73be9fbd21ff434db34a Mon Sep 17 00:00:00 2001 From: panurgomatic Date: Fri, 7 Jan 2011 02:53:21 +0000 Subject: [PATCH] - I'm stupid. Kill me. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@795 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/mecha/combat/honker.dm | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 code/game/mecha/combat/honker.dm diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm new file mode 100644 index 00000000000..0b2e26aef08 --- /dev/null +++ b/code/game/mecha/combat/honker.dm @@ -0,0 +1,79 @@ +/obj/mecha/combat/honker + desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. Used to spread the fun and joy of life. HONK!" + name = "H.O.N.K" + icon_state = "honker" + step_in = 6 + health = 100 + deflect_chance = 80 + internal_damage_threshold = 30 + max_temperature = 3500 + operation_req_access = list(access_clown) + +/obj/mecha/combat/honker/New() + ..() + weapons += new /datum/mecha_weapon/honker(src) + weapons += new /datum/mecha_weapon/missile_rack/banana_mortar(src) + weapons += new /datum/mecha_weapon/missile_rack/mousetrap_mortar(src) + selected_weapon = weapons[1] + return + + +/obj/mecha/combat/honker/melee_action(target) + if(internal_damage&MECHA_INT_CONTROL_LOST) + target = pick(oview(1,src)) + if(!melee_can_hit || !istype(target, /atom)) + return + if(istype(selected_weapon, /datum/mecha_weapon/honker)) + selected_weapon.fire(target) + else if(istype(target, /mob)) + step_away(target,src,15) + return + +/obj/mecha/combat/honker/get_stats_part() + var/output = {"[internal_damage&MECHA_INT_FIRE?"INTERNAL FIRE
":null] + [internal_damage&MECHA_INT_TEMP_CONTROL?"CLOWN SUPPORT SYSTEM MALFUNCTION
":null] + [internal_damage&MECHA_INT_TANK_BREACH?"GAS TANK HONK
":null] + [internal_damage&MECHA_INT_CONTROL_LOST?"HONK-A-DOODLE - Recalibrate
":null] + IntegriHONK: [health/initial(health)*100] %)
+ PowerHONK charge: [cell.charge/cell.maxcharge*100] %)
+ AirHONK pressure: [src.return_pressure()]HoNKs
+ Internal HONKature: [src.air_contents.temperature]°honK|[src.air_contents.temperature - T0C]°honCk
+ Lights: [lights?"on":"off"]
+ "} + output += "HONKon systems:
" + if(weapons.len) + for(var/datum/mecha_weapon/W in weapons) + output += "[selected_weapon==W?"":""][W.get_weapon_info()][selected_weapon==W?"":""]
" + else + output += "None. HONK!" + output += "
" + return output + + +/obj/mecha/combat/honker/get_stats_html() + var/output = {" + [src.name] data + + [src.get_stats_part()] +
+ [src.get_commands()] + + + "} + return output + + +/obj/mecha/combat/honker/relaymove(mob/user,direction) + var/result = ..(user,direction) + if(result) + playsound(src, "clownstep", 70, 1) + return result + +proc/rand_hex_color() + var/list/colors = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f") + var/color="" + for (var/i=0;i<6;i++) + color = color+pick(colors) + return color + +