diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm index 617034696b1..6d0d108bb86 100644 --- a/code/game/mecha/micro/micro.dm +++ b/code/game/mecha/micro/micro.dm @@ -3,6 +3,7 @@ force = 10 //still a robot anchored = 0 //light enough to push and pull, but you still can't just walk past them. Like people on non-help. opacity = 0 //small enough to see around, like people. + step_energy_drain = 2 // They're light and small. A compact is gonna get better MPG than a truck. var/melee_cooldown = 10 var/melee_can_hit = 1 var/list/destroyable_obj = list(/obj/mecha, /obj/structure/window, /obj/structure/grille, /turf/simulated/wall) @@ -239,19 +240,6 @@ onclose(occupant, "sam", src) return */ -/obj/mecha/micro/moved_inside(var/mob/living/carbon/human/H as mob) - if(..()) - if(H.client) - H.client.mouse_pointer_icon = file("icons/mecha/mecha_mouse.dmi") - return 1 - else - return 0 - -/obj/mecha/micro/go_out() - if(src.occupant && src.occupant.client) - src.occupant.client.mouse_pointer_icon = initial(src.occupant.client.mouse_pointer_icon) - ..() - return /obj/mecha/micro/Topic(href,href_list) ..() @@ -298,5 +286,12 @@ playsound(src,'sound/mecha/mechmove04.ogg',40,1) return result +/obj/mecha/micro/mechsteprand() + var/result = step_rand(src) + if(result) + playsound(src,'sound/mecha/mechmove04.ogg',40,1) + return result + /obj/effect/decal/mecha_wreckage/micro - icon = 'icons/mecha/micro.dmi' \ No newline at end of file + icon = 'icons/mecha/micro.dmi' + diff --git a/code/game/mecha/micro/micro_equipment.dm b/code/game/mecha/micro/micro_equipment.dm index c855e94031e..19aebfca18f 100644 --- a/code/game/mecha/micro/micro_equipment.dm +++ b/code/game/mecha/micro/micro_equipment.dm @@ -1,7 +1,12 @@ //DO NOT ADD MECHA PARTS TO THE GAME WITH THE DEFAULT "SPRITE ME" SPRITE! //I'm annoyed I even have to tell you this! SPRITE FIRST, then commit. +///////////////////////////// +//// WEAPONS BELOW //// +///////////////////////////// + /obj/item/mecha_parts/mecha_equipment/weapon/energy/microlaser + w_class = ITEMSIZE_LARGE desc = "A mounted laser-carbine for light exosuits." equip_cooldown = 10 // same as the laser carbine name = "\improper WS-19 \"Torch\" laser carbine" @@ -10,9 +15,10 @@ energy_drain = 50 projectile = /obj/item/projectile/beam fire_sound = 'sound/weapons/Laser.ogg' - required_type = list(/obj/mecha/micro) + required_type = list(/obj/mecha/micro/sec) /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/microheavy + w_class = ITEMSIZE_LARGE desc = "A mounted laser cannon for light exosuits." equip_cooldown = 30 // same as portable name = "\improper PC-20 \"Lance\" light laser cannon" @@ -21,9 +27,10 @@ energy_drain = 120 projectile = /obj/item/projectile/beam/heavylaser fire_sound = 'sound/weapons/lasercannonfire.ogg' - required_type = list(/obj/mecha/micro) + required_type = list(/obj/mecha/micro/sec) /obj/item/mecha_parts/mecha_equipment/weapon/energy/microtaser + w_class = ITEMSIZE_LARGE desc = "A mounted taser for light exosuits." name = "\improper TS-12 \"Suppressor\" integrated taser" icon = 'icons/mecha/mecha_equipment_vr.dmi' @@ -32,9 +39,10 @@ equip_cooldown = 10 projectile = /obj/item/projectile/beam/stun fire_sound = 'sound/weapons/Taser.ogg' - required_type = list(/obj/mecha/micro) + required_type = list(/obj/mecha/micro/sec) /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/microshotgun + w_class = ITEMSIZE_LARGE desc = "A mounted combat shotgun with integrated ammo-lathe." name = "\improper Remington C-12 \"Boomstick\"" icon = 'icons/mecha/mecha_equipment_vr.dmi' @@ -47,8 +55,8 @@ projectiles = 6 projectiles_per_shot = 1 deviation = 0.7 - projectile_energy_cost = 25 - required_type = list(/obj/mecha/micro) + projectile_energy_cost = 100 + required_type = list(/obj/mecha/micro/sec) Topic(href,href_list) ..() @@ -72,6 +80,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/microflashbang + w_class = ITEMSIZE_LARGE desc = "A mounted grenade launcher for smaller mechs." name = "\improper FP-20 mounted grenade launcher" icon = 'icons/mecha/mecha_equipment_vr.dmi' @@ -81,4 +90,133 @@ projectile_energy_cost = 800 equip_cooldown = 30 det_time = 15 - required_type = list(/obj/mecha/micro) \ No newline at end of file + required_type = list(/obj/mecha/micro/sec) + + +///////////////////////////// +//// UTILITY TOOLS BELOW //// +///////////////////////////// + +/obj/item/mecha_parts/mecha_equipment/tool/drill/micro + w_class = ITEMSIZE_LARGE + name = "drill" + desc = "This is the drill that'll sorta poke holes in the heavens!" + icon = 'icons/mecha/mecha_equipment_vr.dmi' + icon_state = "microdrill" + equip_cooldown = 30 + energy_drain = 10 + force = 15 + required_type = list(/obj/mecha/micro/utility) + + action(atom/target) + if(!action_checks(target)) return + if(isobj(target)) + var/obj/target_obj = target + if(!target_obj.vars.Find("unacidable") || target_obj.unacidable) return + set_ready_state(0) + chassis.use_power(energy_drain) + chassis.visible_message("[chassis] starts to drill [target]", "You hear the drill.") + occupant_message("You start to drill [target]") + var/T = chassis.loc + var/C = target.loc //why are these backwards? we may never know -Pete + if(do_after_cooldown(target)) + if(T == chassis.loc && src == chassis.selected) + if(istype(target, /turf/simulated/wall)) + var/turf/simulated/wall/W = target + if(W.reinf_material) + occupant_message("[target] is too durable to drill through.") + else + log_message("Drilled through [target]") + target.ex_act(2) + 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.GetDrilled() + log_message("Drilled through [target]") + var/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop/ore_box = (locate(/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop) in chassis.equipment) + if(ore_box) + for(var/obj/item/weapon/ore/ore in range(chassis,1)) + if(get_dir(chassis,ore)&chassis.dir) + if (ore_box.contents.len >= ore_box.orecapacity) + occupant_message("The ore compartment is full.") + return 1 + else + ore.Move(ore_box) + else if(target.loc == C) + log_message("Drilled through [target]") + target.ex_act(2) + return 1 + + +/obj/item/mecha_parts/mecha_equipment/tool/micro/orescoop + w_class = ITEMSIZE_LARGE + name = "Mounted ore box" + desc = "A mounted ore scoop and hopper, for gathering ores." + icon = 'icons/mecha/mecha_equipment_vr.dmi' + icon_state = "microscoop" + equip_cooldown = 5 + energy_drain = 0 + required_type = list(/obj/mecha/micro/utility) + var/orecapacity = 500 + + action(atom/target) + if(!action_checks(target)) return + set_ready_state(0) + chassis.use_power(energy_drain) + chassis.visible_message("[chassis] sweeps around with its ore scoop.") + occupant_message("You sweep around the area with the scoop.") + var/T = chassis.loc + //var/C = target.loc //why are these backwards? we may never know -Pete + if(do_after_cooldown(target)) + if(T == chassis.loc && src == chassis.selected) + for(var/obj/item/weapon/ore/ore in range(chassis,1)) + if(get_dir(chassis,ore)&chassis.dir) + if (contents.len >= orecapacity) + occupant_message("The ore compartment is full.") + return 1 + else + ore.Move(src) + return 1 + + Topic(href,href_list) + ..() + if (href_list["empty_box"]) + if(contents.len < 1) + occupant_message("The ore compartment is empty.") + return + for (var/obj/item/weapon/ore/O in contents) + contents -= O + O.loc = chassis.loc + occupant_message("Ore compartment emptied.") + + get_equip_info() + return "[..()]
Empty ore compartment" + +/obj/item/mecha_parts/mecha_equipment/tool/orescoop/verb/empty_box() //so you can still get the ore out if someone detaches it from the mech + set name = "Empty Ore compartment" + set category = "Object" + set src in view(1) + + if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes. + usr << "\red You are physically incapable of emptying the ore box." + return + + if( usr.stat || usr.restrained() ) + return + + if(!Adjacent(usr)) //You can only empty the box if you can physically reach it + usr << "You cannot reach the ore box." + return + + add_fingerprint(usr) + + if(contents.len < 1) + usr << "\red The ore box is empty" + return + + for (var/obj/item/weapon/ore/O in contents) + contents -= O + O.loc = src.loc + usr << "\blue You empty the ore box" + + return diff --git a/code/game/mecha/micro/security.dm b/code/game/mecha/micro/security.dm index 9f7a8ff8966..e3b43846d28 100644 --- a/code/game/mecha/micro/security.dm +++ b/code/game/mecha/micro/security.dm @@ -1,32 +1,47 @@ -/obj/mecha/micro/polecat //figured give 'em the names of small predatory critters +/obj/mecha/micro/sec/moved_inside(var/mob/living/carbon/human/H as mob) + if(..()) + if(H.client) + H.client.mouse_pointer_icon = file("icons/mecha/mecha_mouse.dmi") + return 1 + else + return 0 + +/obj/mecha/micro/sec/go_out() + if(src.occupant && src.occupant.client) + src.occupant.client.mouse_pointer_icon = initial(src.occupant.client.mouse_pointer_icon) + ..() + return + +/obj/mecha/micro/sec/polecat //figured give 'em the names of small predatory critters desc = "A hardened security vehicle for micro crewmembers. To them, it's a superheavy tank. To everyone else, it's kinda cute." name = "Polecat" icon_state = "polecat" initial_icon = "polecat" step_in = 2 // human running speed - dir_in = 1 //Facing North. + dir_in = 2 //Facing south. health = 150 + step_energy_drain = 4 // less efficient than base micromech, but still a micromech. deflect_chance = 10 damage_absorption = list("brute"=0.75,"fire"=1,"bullet"=0.8,"laser"=0.7,"energy"=0.85,"bomb"=1) max_temperature = 15000 infra_luminosity = 6 var/overload = 0 var/overload_coeff = 2 - wreckage = /obj/effect/decal/mecha_wreckage/micro/polecat + wreckage = /obj/effect/decal/mecha_wreckage/micro/sec/polecat internal_damage_threshold = 35 max_equip = 3 -/obj/effect/decal/mecha_wreckage/micro/polecat +/obj/effect/decal/mecha_wreckage/micro/sec/polecat name = "Polecat wreckage" icon_state = "polecat-broken" -/obj/mecha/micro/weasel - desc = "A light scout exosuit for micro crewmembers, built for fast reconnaisance. Yes, it IS a miner borg chassis with wheels attached to the legs. ." +/obj/mecha/micro/sec/weasel + desc = "A light scout exosuit for micro crewmembers, built for fast reconnaisance." name = "Weasel" icon_state = "weasel" initial_icon = "weasel" step_in = 1 // zoom zoom - dir_in = 1 //Facing North. + dir_in = 2 //Facing south. health = 100 deflect_chance = 5 damage_absorption = list("brute"=1,"fire"=1,"bullet"=0.9,"laser"=0.8,"energy"=0.85,"bomb"=1) @@ -34,10 +49,10 @@ infra_luminosity = 6 var/overload = 0 var/overload_coeff = 2 - wreckage = /obj/effect/decal/mecha_wreckage/micro/weasel + wreckage = /obj/effect/decal/mecha_wreckage/micro/sec/weasel internal_damage_threshold = 20 max_equip = 2 -/obj/effect/decal/mecha_wreckage/micro/weasel +/obj/effect/decal/mecha_wreckage/micro/sec/weasel name = "Weasel wreckage" icon_state = "weasel-broken" diff --git a/code/game/mecha/micro/utility.dm b/code/game/mecha/micro/utility.dm new file mode 100644 index 00000000000..6f5fd6616f7 --- /dev/null +++ b/code/game/mecha/micro/utility.dm @@ -0,0 +1,24 @@ + + +/obj/mecha/micro/utility/gopher //figured give 'em the names of small predatory critters + desc = "A tough little utility mech for micro crewmembers, based on a miner borg chassis." + name = "Gopher" + icon_state = "gopher" + initial_icon = "gopher" + step_in = 3 + dir_in = 2 //Facing south. + health = 100 + deflect_chance = 10 + damage_absorption = list("brute"=0.9,"fire"=1,"bullet"=1,"laser"=1,"energy"=1,"bomb"=1) + max_temperature = 15000 + infra_luminosity = 6 + var/overload = 0 + var/overload_coeff = 2 + wreckage = /obj/effect/decal/mecha_wreckage/micro/utility/gopher + internal_damage_threshold = 35 + max_equip = 2 + +/obj/effect/decal/mecha_wreckage/micro/utility/gopher + name = "Gopher wreckage" + icon_state = "gopher-broken" + diff --git a/icons/mecha/mecha_equipment_vr.dmi b/icons/mecha/mecha_equipment_vr.dmi index 74873476b5c..7bb519d706b 100644 Binary files a/icons/mecha/mecha_equipment_vr.dmi and b/icons/mecha/mecha_equipment_vr.dmi differ diff --git a/icons/mecha/micro.dmi b/icons/mecha/micro.dmi index 90011b87756..91984e132a3 100644 Binary files a/icons/mecha/micro.dmi and b/icons/mecha/micro.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 2d102904522..b4887f2124a 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -728,6 +728,7 @@ #include "code\game\mecha\micro\micro.dm" #include "code\game\mecha\micro\micro_equipment.dm" #include "code\game\mecha\micro\security.dm" +#include "code\game\mecha\micro\utility.dm" #include "code\game\mecha\working\hoverpod.dm" #include "code\game\mecha\working\ripley.dm" #include "code\game\mecha\working\working.dm"