mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Fuck it
Removes sight_state altogether Makes mommi hud more in line with robot hud Fixes a bug where mommis weren't being charged power for using their sight
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
#define ui_inv3 "CENTER:16,SOUTH:5" //borgs
|
||||
#define ui_borg_module "CENTER+1:16,SOUTH:5" //borgs
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
#define ui_mommi_panel "CENTER+1:16,SOUTH:5"
|
||||
#define ui_mommi_store "CENTER+1:16,SOUTH:5"
|
||||
#define ui_mommi_module "CENTER:16,SOUTH:5"
|
||||
#define ui_mommi_sight "CENTER-2:16,SOUTH:5"
|
||||
#define ui_mommi_hats "CENTER-3:16,SOUTH:5"
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
using.name = "panel"
|
||||
using.icon = 'icons/mob/screen1_robot.dmi'
|
||||
using.icon_state = "panel"
|
||||
using.screen_loc = ui_mommi_panel
|
||||
using.screen_loc = ui_borg_panel
|
||||
using.layer = 19
|
||||
src.adding += using
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi'
|
||||
mymob.throw_icon.icon_state = "store"
|
||||
mymob.throw_icon.name = "store"
|
||||
mymob.throw_icon.screen_loc = ui_borg_store
|
||||
mymob.throw_icon.screen_loc = ui_mommi_store
|
||||
|
||||
// Temp
|
||||
mymob.bodytemp = getFromPool(/obj/screen)
|
||||
|
||||
@@ -977,10 +977,7 @@
|
||||
R.emagged = 0
|
||||
if (R.activated(R.module.emag))
|
||||
R.module_active = null
|
||||
if(R.sight_state == R.module.emag)
|
||||
R.sight_state = null
|
||||
R.contents -= R.module.emag
|
||||
else if(R.tool_state == R.module.emag)
|
||||
if(R.tool_state == R.module.emag)
|
||||
R.tool_state = null
|
||||
R.contents -= R.module.emag
|
||||
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
|
||||
@@ -1010,10 +1007,7 @@
|
||||
var/mob/living/silicon/robot/mommi/M=R
|
||||
if (M.activated(M.module.emag))
|
||||
M.module_active = null
|
||||
if(M.sight_state == M.module.emag)
|
||||
M.sight_state = null
|
||||
M.contents -= M.module.emag
|
||||
else if(M.tool_state == M.module.emag)
|
||||
if(M.tool_state == M.module.emag)
|
||||
M.tool_state = null
|
||||
M.contents -= M.module.emag
|
||||
if (R.module)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
if(isMoMMI(user))
|
||||
var/in_range = in_range(src, user) || src.loc == user
|
||||
if(in_range)
|
||||
if(src == user:tool_state || src == user:sight_state)
|
||||
if(src == user:tool_state)
|
||||
return 0
|
||||
attack_hand(user)
|
||||
else if(isrobot(user))
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
return module_active
|
||||
|
||||
/mob/living/silicon/robot/mommi/get_all_slots()
|
||||
return list(tool_state, sight_state, head_state)
|
||||
return list(tool_state, head_state)
|
||||
|
||||
/mob/living/silicon/robot/mommi/get_equipped_items()
|
||||
return list(sight_state, head_state)
|
||||
return head_state
|
||||
|
||||
/mob/living/silicon/robot/mommi/proc/is_in_modules(obj/item/W, var/permit_sheets=0)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/silicon/robot/mommi/proc/is_in_modules() called tick#: [world.time]")
|
||||
@@ -200,9 +200,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/activated(obj/item/O)
|
||||
if(sight_state == O)
|
||||
return 1
|
||||
else if(tool_state == O) // Sight
|
||||
if(tool_state == O) // Sight
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -217,69 +215,46 @@
|
||||
|
||||
//module_active(module) - Checks whether there is a module active in the slot specified by "module".
|
||||
/mob/living/silicon/robot/mommi/module_active(var/module)
|
||||
if(!(module in list(INV_SLOT_TOOL, INV_SLOT_SIGHT)))
|
||||
if(!(module in INV_SLOT_TOOL))
|
||||
return
|
||||
|
||||
switch(module)
|
||||
if(INV_SLOT_TOOL)
|
||||
if(tool_state)
|
||||
return 1
|
||||
if(INV_SLOT_SIGHT)
|
||||
if(sight_state)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//get_selected_module() - Returns the slot number of the currently selected module. Returns 0 if no modules are selected.
|
||||
/mob/living/silicon/robot/mommi/get_selected_module()
|
||||
if(tool_state && module_active == tool_state)
|
||||
return INV_SLOT_TOOL
|
||||
else if(sight_state && module_active == sight_state)
|
||||
return INV_SLOT_SIGHT
|
||||
|
||||
return 0
|
||||
|
||||
//select_module(module) - Selects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/mommi/select_module(var/module)
|
||||
if(!(module in list(INV_SLOT_TOOL, INV_SLOT_SIGHT)))
|
||||
if(!(module in INV_SLOT_TOOL))
|
||||
return
|
||||
if(!module_active(module)) return
|
||||
|
||||
switch(module)
|
||||
if(INV_SLOT_TOOL)
|
||||
if(module_active != tool_state)
|
||||
inv_tool.icon_state = "inv1 +a"
|
||||
//inv_sight.icon_state = "sight"
|
||||
module_active = tool_state
|
||||
return
|
||||
if(INV_SLOT_SIGHT)
|
||||
if(module_active != sight_state)
|
||||
inv_tool.icon_state = "inv1"
|
||||
//inv_sight.icon_state = "sight+a"
|
||||
module_active = sight_state
|
||||
return
|
||||
return
|
||||
|
||||
//deselect_module(module) - Deselects the module slot specified by "module"
|
||||
/mob/living/silicon/robot/mommi/deselect_module(var/module)
|
||||
if(!(module in list(INV_SLOT_TOOL, INV_SLOT_SIGHT)))
|
||||
if(!(module in INV_SLOT_TOOL))
|
||||
return
|
||||
|
||||
switch(module)
|
||||
if(INV_SLOT_TOOL)
|
||||
if(module_active == tool_state)
|
||||
inv_tool.icon_state = "inv1"
|
||||
module_active = null
|
||||
return
|
||||
if(INV_SLOT_SIGHT)
|
||||
if(module_active == sight_state)
|
||||
//inv_sight.icon_state = "sight"
|
||||
module_active = null
|
||||
return
|
||||
return
|
||||
|
||||
//toggle_module(module) - Toggles the selection of the module slot specified by "module".
|
||||
/mob/living/silicon/robot/mommi/toggle_module(var/module)
|
||||
if(!(module in list(INV_SLOT_TOOL, INV_SLOT_SIGHT)))
|
||||
if(!(module in INV_SLOT_TOOL))
|
||||
return
|
||||
if(module_selected(module))
|
||||
deselect_module(module)
|
||||
|
||||
@@ -39,21 +39,21 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/mommi/use_power()
|
||||
if (src.cell)
|
||||
if(src.cell.charge <= 0)
|
||||
if(cell)
|
||||
if(cell.charge <= 0)
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
stat = 1
|
||||
else if (src.cell.charge <= MOMMI_LOW_POWER)
|
||||
uneq_all()
|
||||
src.cell.use(1)
|
||||
cell.use(1)
|
||||
else
|
||||
if(src.sight_state)
|
||||
src.cell.use(5)
|
||||
if(src.tool_state)
|
||||
src.cell.use(5)
|
||||
src.cell.use(1)
|
||||
src.blinded = 0
|
||||
src.stat = 0
|
||||
if(sensor_mode)
|
||||
cell.use(5)
|
||||
if(tool_state)
|
||||
cell.use(5)
|
||||
cell.use(1)
|
||||
blinded = 0
|
||||
stat = 0
|
||||
else
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
@@ -250,8 +250,6 @@
|
||||
// This way of doing it ensures that shit we pick up will be visible, wheras shit inside of us isn't.
|
||||
if(I!=src.cell && I!=src.radio && I!=src.camera && I!=src.mmi)
|
||||
src.client.screen += I
|
||||
if(src.sight_state)
|
||||
src.sight_state:screen_loc = ui_inv1
|
||||
if(src.tool_state)
|
||||
src.tool_state:screen_loc = ui_inv2
|
||||
if(src.head_state)
|
||||
|
||||
@@ -26,11 +26,8 @@ They can only use one tool at a time, they can't choose modules, and they have 1
|
||||
mob_bump_flag = ROBOT
|
||||
mob_swap_flags = ALLMOBS
|
||||
mob_push_flags = 0
|
||||
//var/obj/screen/inv_sight = null
|
||||
|
||||
//one tool and one sightmod can be activated at any one time.
|
||||
var/tool_state = null
|
||||
var/sight_state = null
|
||||
var/head_state = null
|
||||
|
||||
modtype = "robot" // Not sure what this is, but might be cool to have seperate loadouts for MoMMIs (e.g. paintjobs and tools)
|
||||
@@ -392,7 +389,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
|
||||
<BR>
|
||||
<B>Activated Modules</B>
|
||||
<BR>
|
||||
Sight Mode: [sight_state ? "<A HREF=?src=\ref[src];mod=\ref[sight_state]>[sight_state]</A>" : "No module selected"]<BR>
|
||||
Sight Mode: <A HREF=?src=\ref[src];vision=0>[sensor_mode ? "[vision_types_list[sensor_mode]]" : "No sight module enabled"]</A><BR>
|
||||
Utility Module: [tool_state ? "<A HREF=?src=\ref[src];mod=\ref[tool_state]>[tool_state]</A>" : "No module selected"]<BR>
|
||||
<BR>
|
||||
<B>Installed Modules</B><BR><BR>"}
|
||||
|
||||
@@ -1234,6 +1234,7 @@
|
||||
<BODY>
|
||||
<B>Activated Modules</B>
|
||||
<BR>
|
||||
Sight Mode: <A HREF=?src=\ref[src];vision=0>[sensor_mode ? "[vision_types_list[sensor_mode]]" : "No sight module enabled"]</A><BR>
|
||||
Module 1: [module_state_1 ? "<A HREF=?src=\ref[src];mod=\ref[module_state_1]>[module_state_1]<A>" : "No Module"]<BR>
|
||||
Module 2: [module_state_2 ? "<A HREF=?src=\ref[src];mod=\ref[module_state_2]>[module_state_2]<A>" : "No Module"]<BR>
|
||||
Module 3: [module_state_3 ? "<A HREF=?src=\ref[src];mod=\ref[module_state_3]>[module_state_3]<A>" : "No Module"]<BR>
|
||||
@@ -1321,6 +1322,9 @@
|
||||
checklaws()
|
||||
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
|
||||
statelaws()
|
||||
if(href_list["vision"])
|
||||
sensor_mode()
|
||||
installed_modules()
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/verb/sensor_mode()
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define MESON_VISION 3 // Engineering borg and mommis
|
||||
#define NIGHT 4 // night vision
|
||||
#define THERMAL_VISION 5 // combat borgs thermals
|
||||
var/global/list/vision_types_list = list("Security Hud","Medical Hud", "Meson Vision", "Night Vision", "Thermal Vision")
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user