mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-24 05:06:16 +01:00
Merge pull request #553 from jack-fractal/cyborg_backpack
Porting UI changes for AI's and Robots
This commit is contained in:
@@ -282,6 +282,12 @@
|
||||
if(src.throw_icon)
|
||||
src.throw_icon.icon_state = "act_throw_on"
|
||||
|
||||
/mob/living/carbon/key_pressed_q()
|
||||
if(!get_active_hand())
|
||||
usr << "\red You have nothing to drop in your hand."
|
||||
return
|
||||
return drop_item()
|
||||
|
||||
/mob/proc/throw_item(atom/target)
|
||||
return
|
||||
|
||||
|
||||
@@ -502,13 +502,15 @@
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health)
|
||||
else
|
||||
return 0
|
||||
else if(istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
else if(istype(M, /mob/living/silicon))
|
||||
var/mob/living/silicon/R = M
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
return istype(R.module_state_1, /obj/item/borg/sight/hud/sec) || istype(R.module_state_2, /obj/item/borg/sight/hud/sec) || istype(R.module_state_3, /obj/item/borg/sight/hud/sec)
|
||||
if(R.sensor_mode == 1)
|
||||
return 1
|
||||
if("medical")
|
||||
return istype(R.module_state_1, /obj/item/borg/sight/hud/med) || istype(R.module_state_2, /obj/item/borg/sight/hud/med) || istype(R.module_state_3, /obj/item/borg/sight/hud/med)
|
||||
if(R.sensor_mode == 2)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -724,7 +724,11 @@ var/list/ai_verbs_default = list(
|
||||
else
|
||||
lightNearbyCamera()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "AI Commands"
|
||||
toggle_sensor_mode()
|
||||
|
||||
// Handled camera lighting, when toggled.
|
||||
// It will get the nearest camera from the eyeobj, lighting it.
|
||||
|
||||
@@ -172,6 +172,12 @@
|
||||
src.show_laws()
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
regular_hud_updates()
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1,src.eyeobj)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1,src.eyeobj)
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
var/obj/nano_module/crew_monitor/crew_monitor
|
||||
|
||||
/mob/living/silicon/ai/proc/init_subsystems()
|
||||
crew_monitor = new(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/nano_crew_monitor()
|
||||
set category = "AI Commands"
|
||||
set name = "Crew Monitor"
|
||||
if (!crew_monitor)
|
||||
init_subsystems()
|
||||
crew_monitor.ui_interact(usr)
|
||||
@@ -7,6 +7,10 @@
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n"
|
||||
|
||||
msg += "\n"
|
||||
msg += describe_all_modules() // describe modules
|
||||
msg += "\n"
|
||||
msg += "<span class='warning'>"
|
||||
if (src.getBruteLoss())
|
||||
if (src.getBruteLoss() < 75)
|
||||
|
||||
@@ -5,67 +5,110 @@
|
||||
/mob/living/silicon/robot/get_active_hand()
|
||||
return module_active
|
||||
|
||||
|
||||
|
||||
/*-------TODOOOOOOOOOO--------*/
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
if(isnull(module_active))
|
||||
return
|
||||
if(module_state_1 == module_active)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
/mob/living/silicon/robot/proc/uneq_module(obj/item/O,var/display_tool_transfer=TRUE)
|
||||
if(!O)
|
||||
return 0
|
||||
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
else if(istype(O, /obj/item/device/flashlight))
|
||||
var/obj/item/device/flashlight/F = O
|
||||
if(F.on)
|
||||
F.on = 0
|
||||
F.update_brightness(src)
|
||||
if(client)
|
||||
client.screen -= O
|
||||
contents -= O
|
||||
if(module)
|
||||
O.loc = module //Return item to module so it appears in its contents, so it can be taken out again.
|
||||
|
||||
if (!display_tool_transfer)
|
||||
for(var/mob/M in viewers(src, null)) // show when cyborgs change their modules
|
||||
if (M == src)
|
||||
usr << "<span class='notice'>You retract \icon[O] [O] into your internal tool storage.</span>"
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[src] retracts \icon[O] [O] into their internal tool storage.</span>")
|
||||
else //Otherwise they can only see that you've put something back.
|
||||
M.show_message("<span class='notice'>[src] retracts a tool into their internal tool storage.</span>")
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
module_state_1 = null
|
||||
if(module_state_1 == O)
|
||||
inv1.icon_state = "inv1"
|
||||
else if(module_state_2 == module_active)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_active = null
|
||||
module_state_2 = null
|
||||
module_state_1 = null
|
||||
else if(module_state_2 == O)
|
||||
inv2.icon_state = "inv2"
|
||||
else if(module_state_3 == module_active)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_active = null
|
||||
module_state_2 = null
|
||||
else if(module_state_3 == O)
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
|
||||
hud_used.update_robot_modules_display() // update the display
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(var/obj/item/O)
|
||||
if(!(locate(O) in src.module.modules) && O != src.module.emag)
|
||||
return
|
||||
if(activated(O))
|
||||
src << "Already activated"
|
||||
return
|
||||
var/selected=get_selected_module() // this makes you swap your selected module if you've got one selected
|
||||
if (selected)
|
||||
for(var/mob/M in viewers(src, null)) // show when cyborgs change their modules
|
||||
if (M == src)
|
||||
usr << "<span class='notice'>You swap \icon[module_active] [module_active] for \icon[O] [O].</span>"
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[src] swaps \icon[module_active] [module_active] for \icon[O] [O].</span>")
|
||||
else //Otherwise they can only see that you've swapped something.
|
||||
M.show_message("<span class='notice'>[src] swaps some of their tools.</span>")
|
||||
uneq_active(TRUE)
|
||||
|
||||
var/target=(selected) ? selected : first_free_module() // find where we're putting this
|
||||
if (!target) // if there's nowhere to put it just warn them and kick out
|
||||
src << "You need to disable a module first!"
|
||||
return
|
||||
|
||||
switch (target)
|
||||
if(1)
|
||||
module_state_1=O
|
||||
O.screen_loc = inv1.screen_loc
|
||||
if(2)
|
||||
module_state_2=O
|
||||
O.screen_loc = inv2.screen_loc
|
||||
if(3)
|
||||
module_state_3=O
|
||||
O.screen_loc = inv3.screen_loc
|
||||
|
||||
O.layer = 20 // this bit moves the target object into the robot, and moves it's location on screen
|
||||
contents += O
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
|
||||
if (selected) // replaces your selection if you're swapping
|
||||
select_module(selected)
|
||||
else // only do this if we activated a module but weren't swapping
|
||||
for(var/mob/M in viewers(src, null)) // show when cyborgs change their modules
|
||||
if (M == src)
|
||||
usr << "<span class='notice'>You retrieve \icon[O] [O] from your internal tool storage.</span>"
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[src] extends \icon[O] [O] from their internal tool storage.</span>")
|
||||
else //Otherwise they can only see that you've swapped something.
|
||||
M.show_message("<span class='notice'>[src] extends a tool.</span>")
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active(var/display_tool_transfer=FALSE)
|
||||
uneq_module(module_active,display_tool_transfer)
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_all()
|
||||
module_active = null
|
||||
|
||||
if(module_state_1)
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_1:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_1
|
||||
contents -= module_state_1
|
||||
module_state_1 = null
|
||||
inv1.icon_state = "inv1"
|
||||
if(module_state_2)
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_2:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_2
|
||||
contents -= module_state_2
|
||||
module_state_2 = null
|
||||
inv2.icon_state = "inv2"
|
||||
if(module_state_3)
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode &= ~module_state_3:sight_mode
|
||||
if (client)
|
||||
client.screen -= module_state_3
|
||||
contents -= module_state_3
|
||||
module_state_3 = null
|
||||
inv3.icon_state = "inv3"
|
||||
updateicon()
|
||||
uneq_module(module_state_1)
|
||||
uneq_module(module_state_2)
|
||||
uneq_module(module_state_3)
|
||||
|
||||
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
||||
if(module_state_1 == O)
|
||||
@@ -164,6 +207,11 @@
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/deselect_current_module() //deselect current module
|
||||
deselect_module(get_selected_module())
|
||||
|
||||
|
||||
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
|
||||
/mob/living/silicon/robot/proc/toggle_module(var/module) //Module is 1-3
|
||||
if(module < 1 || module > 3) return
|
||||
@@ -177,23 +225,75 @@
|
||||
deselect_module(get_selected_module()) //If we can't do select anything, at least deselect the current module.
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/first_active_module()
|
||||
for (var/slot=0,slot<=3,slot++)
|
||||
if (module_active(slot))
|
||||
return slot
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/first_free_module()
|
||||
for (var/slot=1,slot<=3,slot++)
|
||||
if (!module_active(slot))
|
||||
return slot
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/next_slot(var/slot)
|
||||
if (slot >= 3)
|
||||
return 1
|
||||
return slot+1
|
||||
|
||||
//cycle_modules() - Cycles through the list of selected modules.
|
||||
/mob/living/silicon/robot/proc/cycle_modules()
|
||||
var/slot_start = get_selected_module()
|
||||
if(slot_start) deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
|
||||
var/slot_num
|
||||
if(slot_start == 0)
|
||||
slot_num = 1
|
||||
slot_start = 2
|
||||
if(slot_start)
|
||||
deselect_module(slot_start) //Only deselect if we have a selected slot.
|
||||
if(!slot_start) // we did not find a module
|
||||
select_module(first_active_module()) // try to select the first active module
|
||||
else
|
||||
slot_num = slot_start + 1
|
||||
|
||||
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num++
|
||||
if(slot_num > 3) slot_num = 1 //Wrap around.
|
||||
|
||||
var/slot_num = next_slot(slot_start)
|
||||
while(slot_start != slot_num) //If we wrap around without finding any free slots, just give up.
|
||||
if(module_active(slot_num))
|
||||
select_module(slot_num)
|
||||
return
|
||||
slot_num=next_slot(slot_num)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_v()
|
||||
uneq_active()
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_c()
|
||||
deselect_current_module()
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_q()
|
||||
hud_used.toggle_show_robot_modules()
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_1()
|
||||
return select_module(1)
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_2()
|
||||
return select_module(2)
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_3()
|
||||
return select_module(3)
|
||||
|
||||
/mob/living/silicon/robot/key_pressed_4()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/describe_module(var/slot)
|
||||
var/list/index_module=list(module_state_1,module_state_2,module_state_3)
|
||||
var/result = " Hardpoint [slot] holds "
|
||||
result += (index_module[slot]) ? "\icon[index_module[slot]] [index_module[slot]]." : "nothing."
|
||||
result += "\n"
|
||||
return result
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/describe_all_modules()
|
||||
var/result="It has three tool hardpoints.\n"
|
||||
for (var/x = 1; x <=3; x++)
|
||||
result+=describe_module(x)
|
||||
var/selected=get_selected_module()
|
||||
if (selected)
|
||||
result+="\nThe activity light on hardpoint [selected] is on.\n"
|
||||
return result
|
||||
|
||||
@@ -167,8 +167,11 @@
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
client.images.Remove(hud)
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
|
||||
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
|
||||
var/obj/screen/robot_modules_background
|
||||
|
||||
//3 Modules can be activated at any one time.
|
||||
var/obj/item/weapon/robot_module/module = null
|
||||
@@ -73,6 +76,10 @@
|
||||
|
||||
add_language("Robot Talk", 1)
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
|
||||
|
||||
ident = rand(1, 999)
|
||||
updatename("Default")
|
||||
updateicon()
|
||||
@@ -168,103 +175,44 @@
|
||||
modules+="Combat"
|
||||
modtype = input("Please, select a module!", "Robot", null, null) in modules
|
||||
|
||||
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
|
||||
|
||||
if(module)
|
||||
return
|
||||
|
||||
switch(modtype)
|
||||
if("Standard")
|
||||
module = new /obj/item/weapon/robot_module/standard(src)
|
||||
module_sprites["Basic"] = "robot_old"
|
||||
module_sprites["Android"] = "droid"
|
||||
module_sprites["Default"] = "robot"
|
||||
|
||||
if("Service")
|
||||
module = new /obj/item/weapon/robot_module/butler(src)
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
module_sprites["Rich"] = "maximillion"
|
||||
module_sprites["Default"] = "Service2"
|
||||
|
||||
if("Clerical")
|
||||
module = new /obj/item/weapon/robot_module/clerical(src)
|
||||
module_sprites["Waitress"] = "Service"
|
||||
module_sprites["Kent"] = "toiletbot"
|
||||
module_sprites["Bro"] = "Brobot"
|
||||
module_sprites["Rich"] = "maximillion"
|
||||
module_sprites["Default"] = "Service2"
|
||||
|
||||
if("Miner")
|
||||
module = new /obj/item/weapon/robot_module/miner(src)
|
||||
module.channels = list("Supply" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("MINE")
|
||||
module_sprites["Basic"] = "Miner_old"
|
||||
module_sprites["Advanced Droid"] = "droid-miner"
|
||||
module_sprites["Treadhead"] = "Miner"
|
||||
|
||||
if("Crisis")
|
||||
module = new /obj/item/weapon/robot_module/crisis(src)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
module_sprites["Needles"] = "medicalrobot"
|
||||
|
||||
if("Surgeon")
|
||||
module = new /obj/item/weapon/robot_module/surgeon(src)
|
||||
module.channels = list("Medical" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Medical")
|
||||
|
||||
module_sprites["Basic"] = "Medbot"
|
||||
module_sprites["Standard"] = "surgeon"
|
||||
module_sprites["Advanced Droid"] = "droid-medical"
|
||||
module_sprites["Needles"] = "medicalrobot"
|
||||
|
||||
if("Security")
|
||||
module = new /obj/item/weapon/robot_module/security(src)
|
||||
module.channels = list("Security" = 1)
|
||||
module_sprites["Basic"] = "secborg"
|
||||
module_sprites["Red Knight"] = "Security"
|
||||
module_sprites["Black Knight"] = "securityrobot"
|
||||
module_sprites["Bloodhound"] = "bloodhound"
|
||||
|
||||
if("Engineering")
|
||||
module = new /obj/item/weapon/robot_module/engineering(src)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
|
||||
if("Construction")
|
||||
module = new /obj/item/weapon/robot_module/construction(src)
|
||||
module.channels = list("Engineering" = 1)
|
||||
if(camera && "Robots" in camera.network)
|
||||
camera.network.Add("Engineering")
|
||||
module_sprites["Basic"] = "Engineering"
|
||||
module_sprites["Antique"] = "engineerrobot"
|
||||
module_sprites["Landmate"] = "landmate"
|
||||
|
||||
if("Janitor")
|
||||
module = new /obj/item/weapon/robot_module/janitor(src)
|
||||
module_sprites["Basic"] = "JanBot2"
|
||||
module_sprites["Mopbot"] = "janitorrobot"
|
||||
module_sprites["Mop Gear Rex"] = "mopgearrex"
|
||||
|
||||
if("Combat")
|
||||
module = new /obj/item/weapon/robot_module/combat(src)
|
||||
module_sprites["Combat Android"] = "droid-combat"
|
||||
module.channels = list("Security" = 1)
|
||||
|
||||
//languages
|
||||
// languages
|
||||
module.add_languages(src)
|
||||
|
||||
// cameras
|
||||
module.add_to_camera_network(src)
|
||||
|
||||
// sensors
|
||||
module.add_sensor_modification(src)
|
||||
|
||||
// create sprite list
|
||||
var/list/module_sprites = module.sprites.Copy()
|
||||
|
||||
//Custom_sprite check and entry
|
||||
if (custom_sprite == 1)
|
||||
@@ -425,6 +373,12 @@
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "Robot Commands"
|
||||
toggle_sensor_mode()
|
||||
|
||||
// this function shows information about the malf_ai gameplay type in the status screen
|
||||
/mob/living/silicon/robot/show_malf_ai()
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
item_state = "electronic"
|
||||
flags = FPRINT|TABLEPASS | CONDUCT
|
||||
var/channels = list()
|
||||
var/camera_network = null
|
||||
var/sensor_mode = 0
|
||||
var/list/sprites = list("Basic"="robot_old")
|
||||
var/list/modules = list()
|
||||
var/obj/item/emag = null
|
||||
var/obj/item/borg/upgrade/jetpack = null
|
||||
@@ -26,11 +29,9 @@
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.emag = new /obj/item/toy/sword(src)
|
||||
src.emag.name = "Placeholder Emag Item"
|
||||
// src.jetpack = new /obj/item/toy/sword(src)
|
||||
// src.jetpack.name = "Placeholder Upgrade Item"
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R)
|
||||
|
||||
if(!stacktypes || !stacktypes.len) return
|
||||
@@ -66,9 +67,19 @@
|
||||
R.add_language("Rootspeak", 0)
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_to_camera_network(var/mob/living/silicon/robot/R)
|
||||
if (camera_network)
|
||||
if(R.camera && "Robots" in R.camera.network)
|
||||
R.camera.network.Add(camera_network)
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/proc/add_sensor_modification(var/mob/living/silicon/robot/R)
|
||||
R.sensor_mode=sensor_mode
|
||||
|
||||
|
||||
/obj/item/weapon/robot_module/standard
|
||||
name = "standard robot module"
|
||||
|
||||
sprites=list("Basic" = "robot_old","Android" = "droid", "Default" = "robot")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -82,6 +93,13 @@
|
||||
|
||||
/obj/item/weapon/robot_module/surgeon
|
||||
name = "surgeon robot module"
|
||||
sensor_mode=MED_HUD
|
||||
channels=list("Medical" = 1)
|
||||
camera_network="Medical"
|
||||
sprites=list( "Basic" = "Medbot",
|
||||
"Standard "= "surgeon",
|
||||
"Advanced Droid" = "droid-medical",
|
||||
"Needles" = "medicalrobot")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/medical/advanced/bruise_pack = 5,
|
||||
/obj/item/stack/nanopaste = 5
|
||||
@@ -119,6 +137,13 @@
|
||||
|
||||
/obj/item/weapon/robot_module/crisis
|
||||
name = "crisis robot module"
|
||||
sensor_mode=MED_HUD
|
||||
channels=list("Medical" = 1)
|
||||
camera_network="Medical"
|
||||
sprites=list( "Basic" = "Medbot",
|
||||
"Standard "= "surgeon",
|
||||
"Advanced Droid" = "droid-medical",
|
||||
"Needles" = "medicalrobot")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/medical/ointment = 5,
|
||||
/obj/item/stack/medical/bruise_pack = 5,
|
||||
@@ -128,7 +153,6 @@
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/borg/sight/hud/med(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
src.modules += new /obj/item/device/reagent_scanner/adv(src)
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
@@ -164,7 +188,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/construction
|
||||
name = "construction robot module"
|
||||
|
||||
channels = list("Engineering" = 1)
|
||||
camera_network="Engineering"
|
||||
sprites=list( "Basic" = "Engineering",
|
||||
"Antique" = "engineerrobot",
|
||||
"Landmate" = "landmate")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/sheet/metal = 50,
|
||||
/obj/item/stack/sheet/plasteel = 10,
|
||||
@@ -185,7 +213,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/engineering
|
||||
name = "engineering robot module"
|
||||
|
||||
channels = list("Engineering" = 1)
|
||||
camera_network="Engineering"
|
||||
sprites=list( "Basic" = "Engineering",
|
||||
"Antique" = "engineerrobot",
|
||||
"Landmate" = "landmate")
|
||||
stacktypes = list(
|
||||
/obj/item/stack/sheet/metal = 50,
|
||||
/obj/item/stack/sheet/glass = 50,
|
||||
@@ -233,11 +265,15 @@
|
||||
|
||||
/obj/item/weapon/robot_module/security
|
||||
name = "security robot module"
|
||||
|
||||
sensor_mode=SEC_HUD
|
||||
channels=list("Security" = 1)
|
||||
sprites = list( "Basic" = "secborg",
|
||||
"Red Knight" = "Security",
|
||||
"Black Knight" = "securityrobot",
|
||||
"Bloodhound" = "bloodhound")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/borg/sight/hud/sec(src)
|
||||
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
|
||||
@@ -262,7 +298,9 @@
|
||||
|
||||
/obj/item/weapon/robot_module/janitor
|
||||
name = "janitorial robot module"
|
||||
|
||||
sprites=list( "Basic" = "JanBot2",
|
||||
"Mopbot" = "janitorrobot",
|
||||
"Mop Gear Rex" = "mopgearrex" )
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -285,7 +323,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/butler
|
||||
name = "service robot module"
|
||||
|
||||
sprites = list( "Waitress" = "Service",
|
||||
"Kent" = "toiletbot",
|
||||
"Bro" = "Brobot",
|
||||
"Rich" = "maximillion",
|
||||
"Default" = "Service2")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -326,7 +368,11 @@
|
||||
|
||||
/obj/item/weapon/robot_module/clerical
|
||||
name = "clerical robot module"
|
||||
|
||||
sprites = list( "Waitress" = "Service",
|
||||
"Kent" = "toiletbot",
|
||||
"Bro" = "Brobot",
|
||||
"Rich" = "maximillion",
|
||||
"Default" = "Service2")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -354,7 +400,10 @@
|
||||
|
||||
/obj/item/weapon/robot_module/miner
|
||||
name = "miner robot module"
|
||||
|
||||
channels=list("Supply" = 1)
|
||||
sprites = list( "Basic" = "Miner_old",
|
||||
"Advanced Droid" = "droid-miner",
|
||||
"Treadhead" = "Miner")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
@@ -380,7 +429,8 @@
|
||||
|
||||
/obj/item/weapon/robot_module/combat
|
||||
name = "combat robot module"
|
||||
|
||||
channels=list("Security" = 1)
|
||||
sprites = list("Combat Android" = "droid-combat")
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define SEC_HUD 1 //Security HUD mode
|
||||
#define MED_HUD 2 //Medical HUD mode
|
||||
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
@@ -11,6 +14,7 @@
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/sensor_mode = 0 //Determines the current HUD.
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
|
||||
var/local_transmit //If set, can only speak to others of the same type within a short range.
|
||||
@@ -204,4 +208,17 @@
|
||||
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
|
||||
switch(sensor_type)
|
||||
if ("Security")
|
||||
sensor_mode = SEC_HUD
|
||||
src << "<span class='notice'>Security records overlay enabled.</span>"
|
||||
if ("Medical")
|
||||
sensor_mode = MED_HUD
|
||||
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
|
||||
if ("Disable")
|
||||
sensor_mode = 0
|
||||
src << "Sensor augmentations disabled."
|
||||
|
||||
@@ -394,6 +394,65 @@ var/list/intents = list("help","disarm","grab","hurt")
|
||||
if(2) return "grab"
|
||||
else return "hurt"
|
||||
|
||||
/mob/proc/key_pressed_c()
|
||||
return
|
||||
/mob/proc/key_pressed_q()
|
||||
return
|
||||
/mob/proc/key_pressed_v()
|
||||
return
|
||||
|
||||
/client/verb/key_pressed_c()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-c"
|
||||
if (mob)
|
||||
mob:key_pressed_c()
|
||||
|
||||
/client/verb/key_pressed_q()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-q"
|
||||
if (mob)
|
||||
mob:key_pressed_q()
|
||||
|
||||
/client/verb/key_pressed_v()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-v"
|
||||
if (mob)
|
||||
mob:key_pressed_v()
|
||||
|
||||
/mob/proc/key_pressed_1()
|
||||
return a_intent_change("help")
|
||||
/mob/proc/key_pressed_2()
|
||||
return a_intent_change("disarm")
|
||||
/mob/proc/key_pressed_3()
|
||||
return a_intent_change("grab")
|
||||
/mob/proc/key_pressed_4()
|
||||
return a_intent_change("hurt")
|
||||
|
||||
/client/verb/key_pressed_1()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-1"
|
||||
if (mob)
|
||||
mob:key_pressed_1()
|
||||
|
||||
/client/verb/key_pressed_2()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-2"
|
||||
if (mob)
|
||||
mob:key_pressed_2()
|
||||
|
||||
/client/verb/key_pressed_3()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-3"
|
||||
if (mob)
|
||||
mob:key_pressed_3()
|
||||
|
||||
/client/verb/key_pressed_4()
|
||||
set hidden = 1
|
||||
set name = "key-pressed-4"
|
||||
if (mob)
|
||||
mob:key_pressed_4()
|
||||
|
||||
|
||||
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
|
||||
/mob/verb/a_intent_change(input as text)
|
||||
set name = "a-intent"
|
||||
|
||||
Reference in New Issue
Block a user