From 66f0a9c2b7134c1d44c76a5bbbf088054c0cdcb6 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Thu, 4 Jan 2018 01:06:25 -0500 Subject: [PATCH] mob living silicon --- code/modules/mob/living/silicon/ai/examine.dm | 48 +++++++++---------- .../mob/living/silicon/ai/freelook/chunk.dm | 2 +- .../mob/living/silicon/ai/freelook/eye.dm | 8 +--- code/modules/mob/living/silicon/death.dm | 22 ++++----- code/modules/mob/living/silicon/pai/pai.dm | 4 +- .../mob/living/silicon/pai/software.dm | 23 ++++----- .../modules/mob/living/silicon/robot/login.dm | 1 + .../modules/mob/living/silicon/robot/robot.dm | 37 +++++++------- .../mob/living/silicon/robot/robot_modules.dm | 46 +++++++++++++----- 9 files changed, 104 insertions(+), 87 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index 3af95cec4c..025d3d8e6d 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -1,26 +1,26 @@ -/mob/living/silicon/ai/examine(mob/user) +/mob/living/silicon/ai/examine(mob/user) var/msg = "*---------*\nThis is [icon2html(src, user)] [src]!\n" - if (stat == DEAD) - msg += "It appears to be powered-down.\n" - else - msg += "" - if (getBruteLoss()) - if (getBruteLoss() < 30) - msg += "It looks slightly dented.\n" - else - msg += "It looks severely dented!\n" - if (getFireLoss()) - if (getFireLoss() < 30) - msg += "It looks slightly charred.\n" - else - msg += "Its casing is melted and heat-warped!\n" - msg += "" - if(deployed_shell) - msg += "The wireless networking light is blinking.\n" - else if (!shunted && !client) - msg += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem...\n" - msg += "*---------*" - - to_chat(user, msg) - + if (stat == DEAD) + msg += "It appears to be powered-down.\n" + else + msg += "" + if (getBruteLoss()) + if (getBruteLoss() < 30) + msg += "It looks slightly dented.\n" + else + msg += "It looks severely dented!\n" + if (getFireLoss()) + if (getFireLoss() < 30) + msg += "It looks slightly charred.\n" + else + msg += "Its casing is melted and heat-warped!\n" + msg += "" + if(deployed_shell) + msg += "The wireless networking light is blinking.\n" + else if (!shunted && !client) + msg += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem...\n" + msg += "*---------*" + + to_chat(user, msg) + ..() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index 2a009d4d00..a76c02f3b5 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -173,4 +173,4 @@ obscured += t.obscured #undef UPDATE_BUFFER -#undef CHUNK_SIZE +#undef CHUNK_SIZE \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 1d2598c63d..b5b1bd082b 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -16,7 +16,6 @@ // It will also stream the chunk that the new loc is in. /mob/camera/aiEye/proc/setLoc(T) - if(ai) if(!isturf(ai.loc)) return @@ -34,6 +33,8 @@ if(istype(ai.current, /obj/machinery/holopad)) var/obj/machinery/holopad/H = ai.current H.move_hologram(ai, T) + if(ai.camera_light_on) + ai.light_cameras() /mob/camera/aiEye/Move() return 0 @@ -85,11 +86,6 @@ if(!user.tracking) user.cameraFollow = null - //user.unset_machine() //Uncomment this if it causes problems. - //user.lightNearbyCamera() - if(user.camera_light_on) - user.light_cameras() - // Return to the Core. /mob/living/silicon/ai/proc/view_core() diff --git a/code/modules/mob/living/silicon/death.dm b/code/modules/mob/living/silicon/death.dm index 7537697d71..2e1adb1959 100644 --- a/code/modules/mob/living/silicon/death.dm +++ b/code/modules/mob/living/silicon/death.dm @@ -1,13 +1,13 @@ -/mob/living/silicon/spawn_gibs() +/mob/living/silicon/spawn_gibs() new /obj/effect/gibspawner/robot(get_turf(src)) - -/mob/living/silicon/spawn_dust() - new /obj/effect/decal/remains/robot(loc) - -/mob/living/silicon/death(gibbed) - if(!gibbed) - emote("deathgasp") - diag_hud_set_status() - diag_hud_set_health() - update_health_hud() + +/mob/living/silicon/spawn_dust() + new /obj/effect/decal/remains/robot(loc) + +/mob/living/silicon/death(gibbed) + if(!gibbed) + emote("deathgasp") + diag_hud_set_status() + diag_hud_set_health() + update_health_hud() . = ..() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 91541fccf1..50b7dee271 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -52,7 +52,7 @@ var/obj/machinery/door/hackdoor // The airlock being hacked var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check - var/obj/item/radio/integrated/signal/sradio // AI's signaller + var/obj/item/integrated_signaler/signaler // AI's signaller var/holoform = FALSE var/canholo = TRUE @@ -105,7 +105,7 @@ P.setPersonality(src) forceMove(P) card = P - sradio = new(src) + signaler = new(src) if(!radio) radio = new /obj/item/device/radio(src) diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index e73792e705..bb057f7774 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -169,23 +169,20 @@ if("signaller") if(href_list["send"]) - - sradio.send_signal("ACTIVATE") + signaler.send_activation() audible_message("[icon2html(src, world)] *beep* *beep*") if(href_list["freq"]) - - var/new_frequency = (sradio.frequency + text2num(href_list["freq"])) - if(new_frequency < 1200 || new_frequency > 1600) + var/new_frequency = (signaler.frequency + text2num(href_list["freq"])) + if(new_frequency < MIN_FREE_FREQ || new_frequency > MAX_FREE_FREQ) new_frequency = sanitize_frequency(new_frequency) - sradio.set_frequency(new_frequency) + signaler.set_frequency(new_frequency) if(href_list["code"]) - - sradio.code += text2num(href_list["code"]) - sradio.code = round(sradio.code) - sradio.code = min(100, sradio.code) - sradio.code = max(1, sradio.code) + signaler.code += text2num(href_list["code"]) + signaler.code = round(signaler.code) + signaler.code = min(100, signaler.code) + signaler.code = max(1, signaler.code) @@ -397,14 +394,14 @@ Frequency: - - - [format_frequency(sradio.frequency)] + [format_frequency(signaler.frequency)] + +
Code: - - - [sradio.code] + [signaler.code] + +
diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm index cf55cdd5f9..8fb58b9472 100644 --- a/code/modules/mob/living/silicon/robot/login.dm +++ b/code/modules/mob/living/silicon/robot/login.dm @@ -1,3 +1,4 @@ + /mob/living/silicon/robot/Login() ..() regenerate_icons() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5ac72d0ba3..77161ff46c 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -5,8 +5,6 @@ icon_state = "robot" maxHealth = 100 health = 100 - macro_default = "robot-default" - macro_hotkeys = "robot-hotkeys" bubble_icon = "robot" designation = "Default" //used for displaying the prefix & getting the current module of cyborg has_limbs = 1 @@ -247,17 +245,6 @@ return //won't work if dead robot_alerts() -//for borg hotkeys, here module refers to borg inv slot, not core module -/mob/living/silicon/robot/verb/cmd_toggle_module(module as num) - set name = "Toggle Module" - set hidden = 1 - toggle_module(module) - -/mob/living/silicon/robot/verb/cmd_unequip_module() - set name = "Unequip Module" - set hidden = 1 - uneq_active() - /mob/living/silicon/robot/proc/robot_alerts() var/dat = "" for (var/cat in alarms) @@ -536,6 +523,19 @@ toner = tonermax qdel(W) to_chat(user, "You fill the toner level of [src] to its max capacity.") + + else if(istype(W, /obj/item/device/flashlight)) + if(!opened) + to_chat(user, "You need to open the panel to repair the headlamp!") + if(lamp_cooldown <= world.time) + to_chat(user, "The headlamp is already functional!") + else + if(!user.temporarilyRemoveItemFromInventory(W)) + to_chat(user, "[W] seems to be stuck to your hand. You'll have to find a different light.") + return + lamp_cooldown = 0 + qdel(W) + to_chat(user, "You replace the headlamp bulbs.") else return ..() @@ -812,6 +812,9 @@ /mob/living/silicon/robot/modules/security set_module = /obj/item/robot_module/security +/mob/living/silicon/robot/modules/clown + set_module = /obj/item/robot_module/clown + /mob/living/silicon/robot/modules/peacekeeper set_module = /obj/item/robot_module/peacekeeper @@ -829,7 +832,7 @@ lawupdate = FALSE scrambledcodes = TRUE // These are rogue borgs. ionpulse = TRUE - var/playstyle_string = "You are a Syndicate assault cyborg!
\ + var/playstyle_string = "You are a Syndicate assault cyborg!
\ You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \ Your cyborg LMG will slowly produce ammunition from your power supply, and your operative pinpointer will find and locate fellow nuclear operatives. \ Help the operatives secure the disk at all costs!" @@ -851,7 +854,7 @@ /mob/living/silicon/robot/modules/syndicate/medical icon_state = "syndi-medi" - playstyle_string = "You are a Syndicate medical cyborg!
\ + playstyle_string = "You are a Syndicate medical cyborg!
\ You are armed with powerful medical tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \ Your hypospray will produce Restorative Nanites, a wonder-drug that will heal most types of bodily damages, including clone and brain damage. It also produces morphine for offense. \ Your defibrillator paddles can revive operatives through their hardsuits, or can be used on harm intent to shock enemies! \ @@ -1015,9 +1018,9 @@ status_flags &= ~CANPUSH if(module.clean_on_move) - flags_1 |= CLEAN_ON_MOVE_1 + AddComponent(/datum/component/cleaning) else - flags_1 &= ~CLEAN_ON_MOVE_1 + qdel(GetComponent(/datum/component/cleaning)) hat_offset = module.hat_offset diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index b7cb412927..84f90a0c6d 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -33,8 +33,8 @@ var/ride_allow_incapacitated = FALSE var/allow_riding = TRUE -/obj/item/robot_module/New() - ..() +/obj/item/robot_module/Initialize() + . = ..() for(var/i in basic_modules) var/obj/item/I = new i(src) basic_modules += I @@ -336,17 +336,6 @@ can_be_pushed = FALSE hat_offset = 3 -/obj/item/robot_module/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1) - ..() - var/obj/item/gun/energy/e_gun/advtaser/cyborg/T = locate(/obj/item/gun/energy/e_gun/advtaser/cyborg) in basic_modules - if(T) - if(T.cell.charge < T.cell.maxcharge) - var/obj/item/ammo_casing/energy/S = T.ammo_type[T.select] - T.cell.give(S.e_cost * coeff) - T.update_icon() - else - T.charge_tick = 0 - /obj/item/robot_module/security/do_transform_animation() ..() to_chat(loc, "While you have picked the security module, you still have to follow your laws, NOT Space Law. \ @@ -435,6 +424,37 @@ if(CL) CL.reagents.add_reagent("lube", 2 * coeff) +/obj/item/robot_module/clown + name = "Clown" + basic_modules = list( + /obj/item/device/assembly/flash/cyborg, + /obj/item/toy/crayon/rainbow, + /obj/item/device/instrument/bikehorn, + /obj/item/stamp/clown, + /obj/item/bikehorn, + /obj/item/bikehorn/airhorn, + /obj/item/paint/anycolor, + /obj/item/soap/nanotrasen, + /obj/item/pneumatic_cannon/pie/selfcharge/cyborg, + /obj/item/razor, //killbait material + /obj/item/lipstick/purple, + /obj/item/reagent_containers/spray/waterflower/cyborg, + /obj/item/borg/cyborghug/peacekeeper, + /obj/item/borg/lollipop/clown, + /obj/item/picket_sign/cyborg, + /obj/item/reagent_containers/borghypo/clown, + /obj/item/extinguisher/mini) + emag_modules = list( + /obj/item/reagent_containers/borghypo/clown/hacked, + /obj/item/reagent_containers/spray/waterflower/cyborg/hacked) + ratvar_modules = list( + /obj/item/clockwork/slab/cyborg, + /obj/item/clockwork/weapon/ratvarian_spear, + /obj/item/clockwork/replica_fabricator/cyborg) + moduleselect_icon = "service" + cyborg_base_icon = "clown" + hat_offset = -2 + /obj/item/robot_module/butler name = "Service" basic_modules = list(