diff --git a/code/WorkInProgress/mining.dm b/code/WorkInProgress/mining.dm index dda03101e86..d424a97fd19 100644 --- a/code/WorkInProgress/mining.dm +++ b/code/WorkInProgress/mining.dm @@ -1342,7 +1342,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( var/dat = "Smelter control console

" //iron - if(machine.ore_iron || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown) + if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown) if(machine.ore_iron) if (machine.selected_iron==1) dat += text("Smelting ") diff --git a/code/defines/atom.dm b/code/defines/atom.dm index 418a3cad36c..069096cb48f 100644 --- a/code/defines/atom.dm +++ b/code/defines/atom.dm @@ -79,6 +79,14 @@ obj /atom/proc/emp_act(var/severity) return +/atom/proc/in_contents_of(container)//can take class or object instance as argument + if(ispath(container)) + if(istype(src.loc, container)) + return 1 + else if(src in container) + return 1 + return + /atom/movable/overlay/attackby(a, b) if (src.master) return src.master.attackby(a, b) @@ -127,5 +135,6 @@ obj src.last_move = get_dir(A, src.loc) src.moved_recently = 1 return + //////////// diff --git a/code/game/asteroid/asteroid.dm b/code/game/asteroid/asteroid.dm index e120ab6e8a5..6e95a36df10 100644 --- a/code/game/asteroid/asteroid.dm +++ b/code/game/asteroid/asteroid.dm @@ -31,8 +31,9 @@ proc/spawn_asteroid(var/atom/start_loc,var/type,var/size,var/richness)//type: 0 var/x_len = rand(4,size) var/y_len = pick(4,size) var/st_l = locate(start_loc.x-round(x_len/2),start_loc.y-round(y_len/2),start_loc.z) - spawn_room(st_l,x_len,y_len) - max_secret_rooms-- + if(st_l) + spawn_room(st_l,x_len,y_len) + max_secret_rooms-- return 1 diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index a2cb685ba09..a834bee88de 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -1,8 +1,4 @@ /obj/mecha/combat - deflect_chance = 10 - health = 500 - operation_req_access = list(access_security) - internals_req_access = list(access_engine,access_robotics) var/force = 25 var/damtype = "brute" var/melee_cooldown = 10 @@ -52,7 +48,7 @@ if(M.stat>1) M.gib() melee_can_hit = 0 - spawn(melee_cooldown) + if(do_after(melee_cooldown)) melee_can_hit = 1 return if(istype(target, /mob/living/carbon/human)) @@ -87,19 +83,15 @@ else return M.updatehealth() - - src.occupant.show_message("[src.name] hits [target].", 1) - for (var/mob/V in viewers(src)) - if(V.client && !(V.blinded)) - V.show_message("[src.name] hits [target].", 1) - + src.occupant_message("You hit [target].") + src.visible_message("[src.name] hits [target].") else step_away(M,src) src.occupant_message("You push [target] out of the way.") src.visible_message("[src] pushes [target] out of the way.") melee_can_hit = 0 - spawn(melee_cooldown) + if(do_after(melee_cooldown)) melee_can_hit = 1 return @@ -114,13 +106,13 @@ V.show_message("[src.name] hits [target].", 1) if(!istype(target, /turf/simulated/wall)) target:attackby(src,src.occupant) - else if(prob(20)) + else if(prob(5)) target:dismantle_wall(1) src.occupant_message("\blue You smash through the wall.") src.visible_message("[src.name] smashes through the wall") playsound(src, 'smash.ogg', 50, 1) melee_can_hit = 0 - spawn(melee_cooldown) + if(do_after(melee_cooldown)) melee_can_hit = 1 break return diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index 9df6bc6d9e1..5f85fb1e94c 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -4,13 +4,12 @@ icon_state = "durand" step_in = 6 health = 350 - deflect_chance = 15 + deflect_chance = 20 max_temperature = 3000 infra_luminosity = 8 - operation_req_access = list(access_security) force = 35 var/defence = 0 - var/defence_deflect = 30 + var/defence_deflect = 35 wreckage = "/obj/decal/mecha_wreckage/durand" /* diff --git a/code/game/mecha/combat/gygax.dm b/code/game/mecha/combat/gygax.dm index 6c20420f385..8279b660732 100644 --- a/code/game/mecha/combat/gygax.dm +++ b/code/game/mecha/combat/gygax.dm @@ -4,12 +4,13 @@ icon_state = "gygax" step_in = 5 health = 300 - deflect_chance = 10 + deflect_chance = 15 max_temperature = 3500 infra_luminosity = 6 var/overload = 0 - operation_req_access = list(access_security) wreckage = "/obj/decal/mecha_wreckage/gygax" + internal_damage_threshold = 35 + /* /obj/mecha/combat/gygax/New() diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index 142dfe715c4..15a92366c65 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -15,6 +15,8 @@ var/datum/effects/system/harmless_smoke_spread/smoke_system = new operation_req_access = list(access_heads) wreckage = "/obj/decal/mecha_wreckage/marauder" + add_req_access = 0 + internal_damage_threshold = 25 /obj/mecha/combat/marauder/New() diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 4ca32a898c0..625de351c51 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -35,10 +35,6 @@ cargo_holder.cargo += O O.loc = chassis O.anchored = 0 - /* - if(istype(O, /obj/machinery/bot))// That's shit-code right here, folks. - O:on = 0 - */ chassis.occupant_message("[target] succesfully loaded.") chassis.log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]") else @@ -66,7 +62,7 @@ chassis.visible_message("[chassis] pushes [target] out of the way.") equip_ready = 0 chassis.cell.use(energy_drain) - spawn(equip_cooldown) + if(do_after_cooldown()) equip_ready = 1 return 1 @@ -89,12 +85,10 @@ if(istype(target, /turf/simulated/wall/r_wall)) chassis.occupant_message("[target] is too durable to drill through.") else if(istype(target, /turf/simulated/mineral)) - var/turf/simulated/mineral/M = target + for(var/turf/simulated/mineral/M in range(chassis,1)) + if(get_dir(chassis,M)&chassis.dir) + M.gets_drilled() chassis.log_message("Drilled through [target]") - M.gets_drilled() - for(var/turf/simulated/mineral/N in range(chassis,1)) - if(get_dir(chassis,N)&chassis.dir) - N.gets_drilled() else chassis.log_message("Drilled through [target]") target.ex_act(2) @@ -107,6 +101,7 @@ icon_state = "mecha_exting" equip_cooldown = 5 energy_drain = 0 + range = MELEE|RANGED New() reagents = new/datum/reagents(200) @@ -116,7 +111,7 @@ return action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch. - if(!action_checks(target)) return + if(!action_checks(target) || get_dist(chassis, target)>3) return if(get_dist(chassis, target)>2) return equip_ready = 0 if(do_after_cooldown()) @@ -145,7 +140,7 @@ W.reagents = R R.my_atom = W src.reagents.trans_to(W,1) - for(var/b=0, b<5, b++) + for(var/b=0, b<4, b++) if(!W) return step_towards(W,my_target) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index af9b5af84d2..5a89eadae6b 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -43,6 +43,7 @@ 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 @@ -70,7 +71,8 @@ /obj/beam/a_laser/pulse_laser/heavy_pulse name = "heavy pulse laser" - icon_state = "u_laser" + icon = 'xcomalien.dmi' + icon_state = "plasma" life = 20 Bump(atom/A) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index f1795e72c19..cc9b277d359 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -53,7 +53,16 @@ /obj/item/mecha_parts/part/gygax_right_leg, /obj/item/mecha_parts/part/gygax_armour ), - + "Durand"=list( + /obj/item/mecha_parts/chassis/durand, + /obj/item/mecha_parts/part/durand_torso, + /obj/item/mecha_parts/part/durand_head, + /obj/item/mecha_parts/part/durand_left_arm, + /obj/item/mecha_parts/part/durand_right_arm, + /obj/item/mecha_parts/part/durand_left_leg, + /obj/item/mecha_parts/part/durand_right_leg, + /obj/item/mecha_parts/part/durand_armour + ), "H.O.N.K"=list( /obj/item/mecha_parts/chassis/honker, /obj/item/mecha_parts/part/honker_torso, @@ -170,7 +179,7 @@ return output proc/output_part_info(var/obj/item/mecha_parts/part) - var/output = "[part.name] (Cost: [output_part_cost(part)]) [round(part.construction_time*time_coeff,0.1)/10]sec" + var/output = "[part.name] (Cost: [output_part_cost(part)]) [get_construction_time_w_coeff(part,0.1)/10]sec" return output proc/output_part_cost(var/obj/item/mecha_parts/part) @@ -178,7 +187,7 @@ var/output for(var/p in part.construction_cost) if(p in resources) - output += "[i?" | ":null][round(part.construction_cost[p]*resource_coeff,1)] [p]" + output += "[i?" | ":null][get_resource_cost_w_coeff(part,p,1)] [p]" i++ return output @@ -191,13 +200,13 @@ proc/remove_resources(var/obj/item/mecha_parts/part as obj) for(var/resource in part.construction_cost) if(resource in src.resources) - src.resources[resource] -= round(part.construction_cost[resource]*resource_coeff,1) + src.resources[resource] -= get_resource_cost_w_coeff(part,resource,1) return proc/check_resources(var/obj/item/mecha_parts/part as obj) for(var/resource in part.construction_cost) if(resource in src.resources) - if(src.resources[resource] < round(part.construction_cost[resource]*resource_coeff,1)) + if(src.resources[resource] < get_resource_cost_w_coeff(part,resource,1)) return 0 return 1 @@ -319,6 +328,13 @@ src.updateUsrDialog() return + proc/get_resource_cost_w_coeff(var/obj/item/mecha_parts/part as obj,var/resource as text, var/roundto=null) + roundto = roundto || 0.01 + return round(part.construction_cost[resource]*resource_coeff, roundto) + + proc/get_construction_time_w_coeff(var/obj/item/mecha_parts/part as obj, var/roundto=null) + roundto = roundto || 0.01 + return round(part.construction_time*time_coeff, roundto) attack_hand(mob/user as mob) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 6a71a0246d3..416d1d574d7 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -23,11 +23,12 @@ var/step_in = 10 //make a step in step_in/10 sec. var/step_energy_drain = 10 var/health = 300 //health is health - var/deflect_chance = 2 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. + var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. var/obj/item/weapon/cell/cell = new var/state = 0 var/list/log = new var/last_message = 0 + var/add_req_access = 1 var/datum/effects/system/spark_spread/spark_system = new var/lights = 0 @@ -45,13 +46,13 @@ var/internal_damage_threshold = 50 //health percentage below which internal damage is possible var/internal_damage = 0 //contains bitflags - var/list/operation_req_access = list(access_engine)//required access level for mecha operation - var/list/internals_req_access = list(access_engine)//required access level to open cell compartment + var/list/operation_req_access = list()//required access level for mecha operation + var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature var/datum/global_iterator/pr_update_stats //used to auto-update stats window var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss - var/datum/global_iterator/pr_location_temp_check //processes location temperature damage +// var/datum/global_iterator/pr_location_temp_check //processes location temperature damage var/datum/global_iterator/pr_internal_damage //processes internal damage var/wreckage @@ -76,7 +77,7 @@ pr_int_temp_processor = new /datum/global_iterator/mecha_preserve_temp(list(src)) pr_update_stats = new /datum/global_iterator/mecha_view_stats(list(src),0) pr_inertial_movement = new /datum/global_iterator/mecha_intertial_movement(null,0) - pr_location_temp_check = new /datum/global_iterator/mecha_location_temp_check(list(src)) +// pr_location_temp_check = new /datum/global_iterator/mecha_location_temp_check(list(src)) pr_internal_damage = new /datum/global_iterator/mecha_internal_damage(list(src),0) src.verbs -= /obj/mecha/verb/disconnect_from_port @@ -86,6 +87,7 @@ /obj/mecha/Del() src.go_out() + src.loc.Exited(src) ..() return @@ -93,7 +95,7 @@ /client/Click(object,location,control,params) var/mob/M = src.mob - if(M && istype(M.loc, /obj/mecha)) + if(M && M.in_contents_of(/obj/mecha)) /* if(mech_click == world.time) return mech_click = world.time @@ -258,7 +260,7 @@ /obj/mecha/proc/check_for_internal_damage(var/list/possible_int_damage,var/ignore_threshold=null) if(!src) return - if(prob(25)) + if(prob(15)) if(ignore_threshold || src.health*100/initial(src.health)src.max_temperature) + src.take_damage(5,"fire") + src.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL)) + return + ///////////////////////////////////// //////// Atmospheric stuff //////// ///////////////////////////////////// @@ -776,6 +784,15 @@ if(src.occupant) user << "Unable to initiate maintenance protocol." return + if(add_req_access) + 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_access_dialog(id_card, user) + return if(src.internals_access_allowed(usr)) if(state==0) state = 1 @@ -901,6 +918,7 @@ Toggle Internal Airtank Usage
[(/obj/mecha/verb/disconnect_from_port in src.verbs)?"Disconnect from port
":null] [(/obj/mecha/verb/connect_to_port in src.verbs)?"Connect to port
":null] + Unlock ID upload panel
View internal log
Eject
"} @@ -948,6 +966,20 @@ src.selected = equip src.occupant_message("You switch to [equip]") src.visible_message("[src] raises [equip]") + if (href_list["unlock_id_upload"]) + add_req_access = 1 + if (href_list["add_req_access"]) + if(!add_req_access) return + var/access = text2num(href_list["add_req_access"]) + operation_req_access += access + output_access_dialog(locate(href_list["id_card"]),locate(href_list["user"])) + if (href_list["del_req_access"]) + operation_req_access -= text2num(href_list["del_req_access"]) + output_access_dialog(locate(href_list["id_card"]),locate(href_list["user"])) + if (href_list["finish_req_access"]) + add_req_access = 0 + var/mob/user = locate(href_list["user"]) + user << browse(null,"window=exosuit_add_access") /* if (href_list["ai_take_control"]) @@ -1036,6 +1068,24 @@ if ("alientalk") return max(0, src.cell.charge) +/obj/mecha/proc/output_access_dialog(obj/item/weapon/card/id/id_card, mob/user) + if(!id_card || !user) return + var/output = "Following keycodes are present in this system:
" + for(var/a in operation_req_access) + output += "[get_access_desc(a)] - Delete
" + output += "
Following keycodes were detected on portable device:
" + 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] - Add
" + output += "
Finish (Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)" + output += "" + user << browse(output, "window=exosuit_add_access") + onclose(user, "exosuit_add_access") + return + + ////////////////////////////////////////// //////// Mecha global iterators //////// ////////////////////////////////////////// @@ -1069,6 +1119,7 @@ if ("alientalk") src.stop() return +/* /datum/global_iterator/mecha_location_temp_check //mecha location temperature checks process(var/obj/mecha/mecha) @@ -1079,6 +1130,7 @@ if ("alientalk") mecha.take_damage(5,"fire") mecha.check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL)) return +*/ /datum/global_iterator/mecha_internal_damage // processing internal damage diff --git a/code/game/mecha/mecha_construction.dm b/code/game/mecha/mecha_construction.dm index 966a63cd3d3..0bcfe460b27 100644 --- a/code/game/mecha/mecha_construction.dm +++ b/code/game/mecha/mecha_construction.dm @@ -17,6 +17,7 @@ name="Mecha Chassis" icon_state = "backbone" var/datum/construction/construct + construction_cost = list("metal"=20000) flags = FPRINT | CONDUCT attackby(obj/item/W as obj, mob/user as mob) @@ -39,30 +40,35 @@ /obj/item/mecha_parts/part/ripley_torso name="Ripley Torso" icon_state = "ripley_harness" + origin_tech = "programming=2;materials=3;biotech=1" construction_time = 300 construction_cost = list("metal"=40000,"glass"=15000) /obj/item/mecha_parts/part/ripley_left_arm name="Ripley Left Arm" icon_state = "ripley_l_arm" + origin_tech = "programming=2;materials=3" construction_time = 200 construction_cost = list("metal"=25000) /obj/item/mecha_parts/part/ripley_right_arm name="Ripley Right Arm" icon_state = "ripley_r_arm" + origin_tech = "programming=2;materials=3" construction_time = 200 construction_cost = list("metal"=25000) /obj/item/mecha_parts/part/ripley_left_leg name="Ripley Left Leg" icon_state = "ripley_l_leg" + origin_tech = "programming=2;materials=3" construction_time = 200 construction_cost = list("metal"=30000) /obj/item/mecha_parts/part/ripley_right_leg name="Ripley Right Leg" icon_state = "ripley_r_leg" + origin_tech = "programming=2;materials=3" construction_time = 200 construction_cost = list("metal"=30000) @@ -79,51 +85,113 @@ /obj/item/mecha_parts/part/gygax_torso name="Gygax Torso" icon_state = "gygax_harness" - origin_tech = "programming=3;materials=4;biotech=1" + origin_tech = "programming=2;materials=4;biotech=2" construction_time = 300 construction_cost = list("metal"=50000,"glass"=20000) /obj/item/mecha_parts/part/gygax_head name="Gygax Head" icon_state = "gygax_head" - origin_tech = "programming=3;materials=4;magnets=3" + origin_tech = "programming=2;materials=4;magnets=3" construction_time = 200 construction_cost = list("metal"=20000,"glass"=10000) /obj/item/mecha_parts/part/gygax_left_arm name="Gygax Left Arm" icon_state = "gygax_l_arm" - origin_tech = "programming=3;materials=4" + origin_tech = "programming=2;materials=4" construction_time = 200 - construction_cost = list("metal"=30000,"glass"=20000) + construction_cost = list("metal"=30000) /obj/item/mecha_parts/part/gygax_right_arm name="Gygax Right Arm" icon_state = "gygax_r_arm" - origin_tech = "programming=3;materials=4" + origin_tech = "programming=2;materials=4" construction_time = 200 - construction_cost = list("metal"=30000,"glass"=20000) + construction_cost = list("metal"=30000) /obj/item/mecha_parts/part/gygax_left_leg name="Gygax Left Leg" icon_state = "gygax_l_leg" - origin_tech = "programming=3;materials=4" + origin_tech = "programming=2;materials=4" construction_time = 200 - construction_cost = list("metal"=35000,"glass"=20000) + construction_cost = list("metal"=35000) /obj/item/mecha_parts/part/gygax_right_leg name="Gygax Right Leg" icon_state = "gygax_r_leg" - origin_tech = "programming=3;materials=4" + origin_tech = "programming=2;materials=4" construction_time = 200 - construction_cost = list("metal"=35000,"glass"=20000) + construction_cost = list("metal"=35000) /obj/item/mecha_parts/part/gygax_armour name="Gygax Armour Plates" icon_state = "gygax_armour" origin_tech = "materials=5;combat=4" construction_time = 600 - construction_cost = list("metal"=75000,"diamond"=10000) + construction_cost = list("metal"=50000,"diamond"=10000) + + +//////////// Durand + +/obj/item/mecha_parts/chassis/durand + name = "Durand Chassis" + construction_cost = list("metal"=25000) + + New() + ..() + construct = new /datum/construction/mecha/durand_chassis(src) + +/obj/item/mecha_parts/part/durand_torso + name="Durand Torso" + icon_state = "gygax_harness" + origin_tech = "programming=2;materials=4;biotech=2" + construction_time = 300 + construction_cost = list("metal"=55000,"glass"=20000,"silver"=10000) + +/obj/item/mecha_parts/part/durand_head + name="Durand Head" + icon_state = "gygax_head" + origin_tech = "programming=2;materials=4;magnets=3" + construction_time = 200 + construction_cost = list("metal"=25000,"glass"=10000,"silver"=5000) + +/obj/item/mecha_parts/part/durand_left_arm + name="Durand Left Arm" + icon_state = "gygax_l_arm" + origin_tech = "programming=2;materials=4" + construction_time = 200 + construction_cost = list("metal"=35000,"silver"=5000) + +/obj/item/mecha_parts/part/durand_right_arm + name="Durand Right Arm" + icon_state = "gygax_r_arm" + origin_tech = "programming=2;materials=4" + construction_time = 200 + construction_cost = list("metal"=35000,"silver"=5000) + +/obj/item/mecha_parts/part/durand_left_leg + name="Durand Left Leg" + icon_state = "gygax_l_leg" + origin_tech = "programming=2;materials=4" + construction_time = 200 + construction_cost = list("metal"=40000,"silver"=5000) + +/obj/item/mecha_parts/part/durand_right_leg + name="Durand Right Leg" + icon_state = "gygax_r_leg" + origin_tech = "programming=2;materials=4" + construction_time = 200 + construction_cost = list("metal"=40000,"silver"=5000) + +/obj/item/mecha_parts/part/durand_armour + name="Durand Armour Plates" + icon_state = "gygax_armour" + origin_tech = "materials=5;combat=4" + construction_time = 600 + construction_cost = list("metal"=50000,"uranium"=10000) + + ////////// Firefighter @@ -214,7 +282,7 @@ throw_range = 15 ripley - origin_tech = "programming=3;materials=1" + origin_tech = "programming=3" ripley/peripherals name = "Circuit board (Ripley Peripherals Control module)" @@ -225,7 +293,7 @@ icon_state = "mainboard" gygax - origin_tech = "programming=4;materials=2" + origin_tech = "programming=4" gygax/peripherals name = "Circuit board (Gygax Peripherals Control module)" @@ -234,18 +302,34 @@ gygax/targeting name = "Circuit board (Gygax Weapon Control and Targeting module)" icon_state = "mcontroller" - origin_tech = "programming=3;materials=1;combat=3" + origin_tech = "programming=3;combat=3" gygax/main name = "Circuit board (Gygax Central Control module)" icon_state = "mainboard" + durand + origin_tech = "programming=4" + + durand/peripherals + name = "Circuit board (Durand Peripherals Control module)" + icon_state = "mcontroller" + + durand/targeting + name = "Circuit board (Durand Weapon Control and Targeting module)" + icon_state = "mcontroller" + origin_tech = "programming=3;combat=3" + + durand/main + name = "Circuit board (Durand Central Control module)" + icon_state = "mainboard" + firefighter/peripherals name = "Circuit board (Ripley-on-Fire Peripherals Control module)" icon_state = "mcontroller" honker - origin_tech = "programming=3;materials=2" + origin_tech = "programming=4" honker/peripherals name = "Circuit board (H.O.N.K Peripherals Control module)" @@ -731,6 +815,116 @@ +/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") + ) + + custom_action(step, atom/used_atom, mob/user) + user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") + holder.overlays += used_atom.icon_state+"+o" + del used_atom + return 1 + + action(atom/used_atom,mob/user as mob) + return check_all_steps(used_atom,user) + + spawn_result() + var/obj/item/mecha_parts/chassis/const_holder = holder + const_holder.construct = new /datum/construction/mecha/durand(const_holder) + const_holder.density = 1 + spawn() + del src + return + +/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 + ) + + action(atom/used_atom,mob/user as mob) + return check_step(used_atom,user) + + custom_action(step, atom/used_atom, mob/user) + if(!..()) + return 0 + + //TODO: better messages. + switch(step) + if(20) + user.visible_message("[user] connects [holder] hydraulic systems", "You connect [holder] hydraulic systems.") + if(19) + user.visible_message("[user] adjusts [holder] hydraulic systems.", "You adjust [holder] hydraulic systems.") + if(18) + user.visible_message("[user] adds the wiring to [holder].", "You add the wiring to [holder].") + if(17) + user.visible_message("[user] adjusts the wiring of [holder].", "You adjust the wiring of [holder].") + if(16) + user.visible_message("[user] installs the central control module into [holder].", "You install the central computer mainboard into [holder].") + del used_atom + if(15) + user.visible_message("[user] secures the mainboard.", "You secure the mainboard.") + if(14) + user.visible_message("[user] installs the peripherals control module into [holder].", "You install the peripherals control module into [holder].") + del used_atom + if(13) + user.visible_message("[user] secures the peripherals control module.", "You secure the peripherals control module.") + if(12) + user.visible_message("[user] installs the weapon control module into [holder].", "You install the weapon control module into [holder].") + del used_atom + if(11) + user.visible_message("[user] secures the weapon control module.", "You secure the weapon control module.") + if(10) + user.visible_message("[user] installs advanced scanner module to [holder].", "You install advanced scanner module to [holder].") + del used_atom + if(9) + user.visible_message("[user] secures the advanced scanner module.", "You secure the advanced scanner module.") + if(8) + user.visible_message("[user] installs advanced capacitor to [holder].", "You install advanced capacitor to [holder].") + del used_atom + if(7) + user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.") + if(6) + user.visible_message("[user] installs internal armor layer to [holder].", "You install internal armor layer to [holder].") + if(5) + user.visible_message("[user] secures internal armor layer.", "You secure internal armor layer.") + if(4) + user.visible_message("[user] welds internal armor layer to [holder].", "You weld the internal armor layer to [holder].") + if(3) + user.visible_message("[user] installs Durand Armour Plates to [holder].", "You install Durand Armour Plates to [holder].") + holder.overlays += used_atom.icon_state + del used_atom + if(2) + user.visible_message("[user] secures Durand Armour Plates.", "You secure Durand Armour Plates.") + if(1) + user.visible_message("[user] welds Durand Armour Plates to [holder].", "You weld Durand Armour Plates to [holder].") + return 1 + + + ////////////////// misc //////////////// diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 70bc263e669..103bdfd67f4 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -88,6 +88,7 @@ desc = "Device used to transmit exosuit data." icon = 'device.dmi' icon_state = "motion2" + origin_tech = "programming=2;magnets=2" var/construction_time = 30 var/list/construction_cost = list("metal"=500) diff --git a/code/game/mecha/working/working.dm b/code/game/mecha/working/working.dm index c113d650420..af64204922e 100644 --- a/code/game/mecha/working/working.dm +++ b/code/game/mecha/working/working.dm @@ -1,11 +1,6 @@ /obj/mecha/working - deflect_chance = 10 - health = 500 req_access = access_heads - operation_req_access = list(access_engine,access_robotics) - internals_req_access = list(access_engine,access_robotics) - var/add_req_access = 1 - internal_damage_threshold = 70 + internal_damage_threshold = 60 /obj/mecha/working/New() ..() @@ -24,24 +19,6 @@ /obj/mecha/working/range_action(atom/target as obj|mob|turf) return -/obj/mecha/working/Topic(href, href_list) - ..() - if (href_list["unlock_id_upload"]) - add_req_access = 1 - if (href_list["add_req_access"]) - if(!add_req_access) return - var/access = text2num(href_list["add_req_access"]) - operation_req_access += access - output_access_dialog(locate(href_list["id_card"]),locate(href_list["user"])) - if (href_list["del_req_access"]) - operation_req_access -= text2num(href_list["del_req_access"]) - output_access_dialog(locate(href_list["id_card"]),locate(href_list["user"])) - if (href_list["finish_req_access"]) - add_req_access = 0 - var/mob/user = locate(href_list["user"]) - user << browse(null,"window=exosuit_add_access") - return - /obj/mecha/working/get_stats_part() var/output = ..() output += "[src.name] Tools:
" @@ -51,41 +28,4 @@ else output += "None" output += "
" - return output - - -/obj/mecha/working/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(add_req_access && (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))) - 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_access_dialog(id_card, user) - else - return ..() - -/obj/mecha/working/get_commands() - var/output = {"Unlock ID upload panel
- "} - output += ..() - return output - - -/obj/mecha/working/proc/output_access_dialog(obj/item/weapon/card/id/id_card, mob/user) - if(!id_card || !user) return - var/output = "Following keycodes are present in this system:
" - for(var/a in operation_req_access) - output += "[get_access_desc(a)] - Delete
" - output += "
Following keycodes were detected on portable device:
" - 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] - Add
" - output += "
Finish (Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)" - output += "" - user << browse(output, "window=exosuit_add_access") - onclose(user, "exosuit_add_access") - return + return output \ No newline at end of file diff --git a/code/game/research/designs.dm b/code/game/research/designs.dm index 75bdeadf46a..0d800c827c4 100644 --- a/code/game/research/designs.dm +++ b/code/game/research/designs.dm @@ -380,7 +380,7 @@ datum name = "Circuit Design (APLU \"Ripley\" Central Control module)" desc = "Allows for the construction of a \"Ripley\" Central Control module." id = "ripley_main" - req_tech = list("programming" = 3, "materials" = 3) + req_tech = list("programming" = 3, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/ripley/main" @@ -389,7 +389,7 @@ datum name = "Circuit Design (APLU \"Ripley\" Peripherals Control module)" desc = "Allows for the construction of a \"Ripley\" Peripheral Control module." id = "ripley_peri" - req_tech = list("programming" = 3, "materials" = 3) + req_tech = list("programming" = 3, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/ripley/peripherals" @@ -398,7 +398,7 @@ datum name = "Circuit Design (\"Gygax\" Central Control module)" desc = "Allows for the construction of a \"Gygax\" Central Control module." id = "gygax_main" - req_tech = list("programming" = 4, "materials" = 4) + req_tech = list("programming" = 4, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/gygax/main" @@ -407,7 +407,7 @@ datum name = "Circuit Design (\"Gygax\" Peripherals Control module)" desc = "Allows for the construction of a \"Gygax\" Peripheral Control module." id = "gygax_peri" - req_tech = list("programming" = 4, "materials" = 4) + req_tech = list("programming" = 4, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/gygax/peripherals" @@ -416,16 +416,44 @@ datum name = "Circuit Design (\"Gygax\" Weapons & Targeting Control module)" desc = "Allows for the construction of a \"Gygax\" Weapons & Targeting Control module." id = "gygax_targ" - req_tech = list("programming" = 4, "materials" = 4) + req_tech = list("programming" = 4, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/gygax/targeting" + durand_main + name = "Circuit Design (\"Gygax\" Central Control module)" + desc = "Allows for the construction of a \"Gygax\" Central Control module." + id = "durand_main" + req_tech = list("programming" = 4, "materials" = 2) + build_type = IMPRINTER + materials = list("$glass" = 2000, "acid" = 20) + build_path = "/obj/item/mecha_parts/circuitboard/durand/main" + + durand_peri + name = "Circuit Design (\"Gygax\" Peripherals Control module)" + desc = "Allows for the construction of a \"Gygax\" Peripheral Control module." + id = "durand_peri" + req_tech = list("programming" = 4, "materials" = 2) + build_type = IMPRINTER + materials = list("$glass" = 2000, "acid" = 20) + build_path = "/obj/item/mecha_parts/circuitboard/durand/peripherals" + + durand_targ + name = "Circuit Design (\"Gygax\" Weapons & Targeting Control module)" + desc = "Allows for the construction of a \"Gygax\" Weapons & Targeting Control module." + id = "durand_targ" + req_tech = list("programming" = 4, "materials" = 2) + build_type = IMPRINTER + materials = list("$glass" = 2000, "acid" = 20) + build_path = "/obj/item/mecha_parts/circuitboard/durand/targeting" + + honker_main name = "Circuit Design (\"H.O.N.K\" Central Control module)" desc = "Allows for the construction of a \"H.O.N.K\" Central Control module." id = "honker_main" - req_tech = list("programming" = 3, "materials" = 3) + req_tech = list("programming" = 3, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/honker/main" @@ -434,7 +462,7 @@ datum name = "Circuit Design (\"H.O.N.K\" Peripherals Control module)" desc = "Allows for the construction of a \"H.O.N.K\" Peripheral Control module." id = "honker_peri" - req_tech = list("programming" = 3, "materials" = 3) + req_tech = list("programming" = 3, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/honker/peripherals" @@ -443,7 +471,7 @@ datum name = "Circuit Design (\"H.O.N.K\" Weapons & Targeting Control module)" desc = "Allows for the construction of a \"H.O.N.K\" Weapons & Targeting Control module." id = "honker_targ" - req_tech = list("programming" = 3, "materials" = 3) + req_tech = list("programming" = 3, "materials" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "acid" = 20) build_path = "/obj/item/mecha_parts/circuitboard/honker/targeting" @@ -505,7 +533,7 @@ datum desc = "An exosuit mounted Gravitational Catapult." id = "mech_gravcatapult" build_type = MECHFAB - req_tech = list("bluespace" = 1, "magnets" = 3) + req_tech = list("bluespace" = 2, "magnets" = 3) build_path = "/obj/item/mecha_parts/mecha_equipment/gravcatapult" diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index a31590247e9..547d2eee6dd 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -7,6 +7,10 @@ src.camera.status = 0.0 + if(src.in_contents_of(/obj/machinery/recharge_station))//exit the recharge station + var/obj/machinery/recharge_station/RC = src.loc + RC.go_out() + if(src.blind) src.blind.layer = 0 src.sight |= SEE_TURFS diff --git a/icons/mob/xcomalien.dmi b/icons/mob/xcomalien.dmi index 7148ba6aa2b..2698282fe6e 100644 Binary files a/icons/mob/xcomalien.dmi and b/icons/mob/xcomalien.dmi differ