mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge branch 'release' of https://github.com/VOREStation/VOREStation into izac-voreupdate
This commit is contained in:
13
.github/ISSUE_TEMPLATE.md
vendored
13
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,19 +1,26 @@
|
||||
<!-- Please DO NOT report 'suggestions' on GitHub. If your issue consists of an opinion about how something should be, it doesn't belong here. -->
|
||||
<!-- If your issue consists of something not operating as intended, please report it below by filling out the template. -->
|
||||
<!-- These directions will not appear in the issue, when submitted. -->
|
||||
|
||||
<!--Please provide a clear and concise description of what the bug is.-->
|
||||
#### Brief description of the bug
|
||||
|
||||
|
||||
<!--What normally happens when this occurs? Keep in mind that behavior may be different on other servers.-->
|
||||
#### What you expected to happen
|
||||
|
||||
|
||||
<!--Please use as much detail as possible when describing the bug behavior, including any context (things you did before) that might be relevant.-->
|
||||
#### What actually happened
|
||||
|
||||
|
||||
<!-- Same here, please include any context that might have contributed, such as actions taken right before.-->
|
||||
#### Steps to reproduce
|
||||
- (Step 1)
|
||||
- (Step 2)
|
||||
- (and so on)
|
||||
|
||||
<!--Optional, you may remove this section.-->
|
||||
#### Code Revision
|
||||
- (Found using the "Show Server Revision" verb under the OOC tab.)
|
||||
|
||||
<!--Optional, you may remove this section.-->
|
||||
#### Anything else you may wish to add:
|
||||
- (Location if it's a mapping issue, screenshots, sprites, etc.)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//tgstation-server DMAPI
|
||||
|
||||
#define TGS_DMAPI_VERSION "5.0.0"
|
||||
#define TGS_DMAPI_VERSION "5.1.1"
|
||||
|
||||
//All functions and datums outside this document are subject to change with any version and should not be relied on
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
|
||||
#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //Before a reboot mode change, extras parameters are the current and new reboot mode enums
|
||||
#define TGS_EVENT_PORT_SWAP -2 //Before a port change is about to happen, extra parameters is new port
|
||||
#define TGS_EVENT_INSTANCE_RENAMED -3 //Before the instance is renamed, extra prameter is the new name
|
||||
#define TGS_EVENT_INSTANCE_RENAMED -3 //Before the instance is renamed, extra parameter is the new name
|
||||
#define TGS_EVENT_WATCHDOG_REATTACH -4 //After the watchdog reattaches to DD, extra parameter is the new /datum/tgs_version of the server
|
||||
|
||||
//See the descriptions for the parameters of these codes here: https://github.com/tgstation/tgstation-server/blob/master/src/Tgstation.Server.Host/Components/EventType.cs
|
||||
#define TGS_EVENT_REPO_RESET_ORIGIN 0
|
||||
@@ -70,7 +71,10 @@
|
||||
#define TGS_EVENT_COMPILE_FAILURE 10
|
||||
#define TGS_EVENT_COMPILE_COMPLETE 11 // Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the TGS_EVENT_DEPLOYMENT_COMPLETE instead
|
||||
#define TGS_EVENT_INSTANCE_AUTO_UPDATE_START 12
|
||||
#define TGS_EVENT_DEPLOYMENT_COMPLETE 13
|
||||
#define TGS_EVENT_REPO_MERGE_CONFLICT 13
|
||||
#define TGS_EVENT_DEPLOYMENT_COMPLETE 14
|
||||
#define TGS_EVENT_WATCHDOG_SHUTDOWN 15
|
||||
#define TGS_EVENT_WATCHDOG_DETACH 16
|
||||
|
||||
//OTHER ENUMS
|
||||
|
||||
@@ -85,7 +89,7 @@
|
||||
//REQUIRED HOOKS
|
||||
|
||||
//Call this somewhere in /world/New() that is always run
|
||||
//IMPORTANT: This function may sleep! Other TGS functions will not succeed until it completes
|
||||
//IMPORTANT: This function may sleep!
|
||||
//event_handler: optional user defined event handler. The default behaviour is to broadcast the event in english to all connected admin channels
|
||||
//minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated
|
||||
/world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE)
|
||||
@@ -193,6 +197,32 @@
|
||||
/world/proc/TgsAvailable()
|
||||
return
|
||||
|
||||
//Forces a hard reboot of BYOND by ending the process
|
||||
//unlike del(world) clients will try to reconnect
|
||||
//If the service has not requested a shutdown, the next server will take over
|
||||
/world/proc/TgsEndProcess()
|
||||
return
|
||||
|
||||
//Send a message to non-admin connected chats
|
||||
//message: The message to send
|
||||
//admin_only: If TRUE, message will instead be sent to only admin connected chats
|
||||
/world/proc/TgsTargetedChatBroadcast(message, admin_only)
|
||||
return
|
||||
|
||||
//Send a private message to a specific user
|
||||
//message: The message to send
|
||||
//user: The /datum/tgs_chat_user to send to
|
||||
/world/proc/TgsChatPrivateMessage(message, datum/tgs_chat_user/user)
|
||||
return
|
||||
|
||||
//The following functions will sleep if a call to TgsNew() is sleeping
|
||||
|
||||
//Sends a message to connected game chats
|
||||
//message: The message to send
|
||||
//channels: optional channels to limit the broadcast to
|
||||
/world/proc/TgsChatBroadcast(message, list/channels)
|
||||
return
|
||||
|
||||
//Gets the current /datum/tgs_version of the server tools running the server
|
||||
/world/proc/TgsVersion()
|
||||
return
|
||||
@@ -217,34 +247,10 @@
|
||||
/world/proc/TgsTestMerges()
|
||||
return
|
||||
|
||||
//Forces a hard reboot of BYOND by ending the process
|
||||
//unlike del(world) clients will try to reconnect
|
||||
//If the service has not requested a shutdown, the next server will take over
|
||||
/world/proc/TgsEndProcess()
|
||||
return
|
||||
|
||||
//Gets a list of connected tgs_chat_channel
|
||||
/world/proc/TgsChatChannelInfo()
|
||||
return
|
||||
|
||||
//Sends a message to connected game chats
|
||||
//message: The message to send
|
||||
//channels: optional channels to limit the broadcast to
|
||||
/world/proc/TgsChatBroadcast(message, list/channels)
|
||||
return
|
||||
|
||||
//Send a message to non-admin connected chats
|
||||
//message: The message to send
|
||||
//admin_only: If TRUE, message will instead be sent to only admin connected chats
|
||||
/world/proc/TgsTargetedChatBroadcast(message, admin_only)
|
||||
return
|
||||
|
||||
//Send a private message to a specific user
|
||||
//message: The message to send
|
||||
//user: The /datum/tgs_chat_user to send to
|
||||
/world/proc/TgsChatPrivateMessage(message, datum/tgs_chat_user/user)
|
||||
return
|
||||
|
||||
/*
|
||||
The MIT License
|
||||
|
||||
|
||||
@@ -281,10 +281,8 @@
|
||||
|
||||
//A list of every mob with a client
|
||||
for(var/mob in player_list)
|
||||
//VOREStation Edit - Trying to fix some vorestation bug.
|
||||
if(!ismob(mob))
|
||||
player_list -= mob
|
||||
crash_with("There is a null or non-mob reference inside player_list ([mob]).")
|
||||
continue
|
||||
//VOREStation Edit End - Trying to fix some vorestation bug.
|
||||
if(get_turf(mob) in hearturfs)
|
||||
|
||||
@@ -75,8 +75,16 @@
|
||||
#define ui_ai_pda_log "SOUTH:6,WEST+11:16"
|
||||
#define ui_ai_take_picture "SOUTH:6,WEST+12:16"
|
||||
#define ui_ai_view_images "SOUTH:6,WEST+13:16"
|
||||
#define ui_ai_multicam "SOUTH+1:6,WEST+12:16"
|
||||
#define ui_ai_add_multicam "SOUTH+1:6,WEST+13:16"
|
||||
#define ui_ai_multicam "SOUTH+1:6,WEST+11:16"
|
||||
#define ui_ai_add_multicam "SOUTH+1:6,WEST+12:16"
|
||||
#define ui_ai_updown "SOUTH+1:6,WEST+13:16"
|
||||
|
||||
//Upper-middle right (alerts)
|
||||
#define ui_alert1 "EAST-1:28,CENTER+5:27"
|
||||
#define ui_alert2 "EAST-1:28,CENTER+4:25"
|
||||
#define ui_alert3 "EAST-1:28,CENTER+3:23"
|
||||
#define ui_alert4 "EAST-1:28,CENTER+2:21"
|
||||
#define ui_alert5 "EAST-1:28,CENTER+1:19"
|
||||
|
||||
//Gun buttons
|
||||
#define ui_gun1 "EAST-2:26,SOUTH+2:7"
|
||||
@@ -96,13 +104,12 @@
|
||||
#define ui_alien_oxygen "EAST-1:28,NORTH-4:25"
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_nutrition "EAST-1:28,CENTER-2:11"
|
||||
#define ui_temp "EAST-1:28,CENTER-1:13"
|
||||
#define ui_health "EAST-1:28,CENTER:15"
|
||||
#define ui_internal "EAST-1:28,CENTER+1:17"
|
||||
#define ui_temp "EAST-1:28,CENTER-2:13"
|
||||
#define ui_health "EAST-1:28,CENTER-1:15"
|
||||
#define ui_internal "EAST-1:28,CENTER:17"
|
||||
//borgs
|
||||
#define ui_borg_health "EAST-1:28,CENTER-1:13" //borgs have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alien_health "EAST-1:28,CENTER-1:13" //aliens have the health display where humans have the pressure damage indicator.
|
||||
#define ui_borg_health "EAST-1:28,CENTER-2:13" //borgs have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alien_health "EAST-1:28,CENTER-2:13" //aliens have the health display where humans have the pressure damage indicator.
|
||||
|
||||
#define ui_ling_chemical_display "EAST-1:28,CENTER-3:15"
|
||||
#define ui_wiz_energy_display "EAST-1:28,CENTER-3:15"
|
||||
@@ -144,3 +151,11 @@
|
||||
|
||||
#define ui_spell_master "EAST-2:16,NORTH-1:26"
|
||||
#define ui_genetic_master "EAST-1:16,NORTH-3:16"
|
||||
|
||||
// Ghost ones
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6,CENTER+2:24"
|
||||
#define ui_ghost_updown "SOUTH: 6,CENTER+3:24"
|
||||
|
||||
@@ -1,169 +1,195 @@
|
||||
/obj/screen/ai/multicam
|
||||
name = "Multicamera Mode"
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
icon_state = "multicam"
|
||||
|
||||
/obj/screen/ai/multicam/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.toggle_multicam()
|
||||
|
||||
/obj/screen/ai/add_multicam
|
||||
name = "New Camera"
|
||||
icon = 'icons/mob/screen_ai.dmi'
|
||||
icon_state = "new_cam"
|
||||
|
||||
/obj/screen/ai/add_multicam/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.drop_new_multicam()
|
||||
|
||||
/datum/hud/proc/ai_hud()
|
||||
adding = list()
|
||||
other = list()
|
||||
/obj/screen/ai/up/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.zMove(UP)
|
||||
|
||||
/obj/screen/ai/down/Click()
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.zMove(DOWN)
|
||||
|
||||
/mob/living/silicon/ai/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
HUD.ui_style = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
HUD.adding = list()
|
||||
HUD.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
//AI core
|
||||
using = new /obj/screen()
|
||||
using.name = "AI Core"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "ai_core"
|
||||
using.screen_loc = ui_ai_core
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Camera list
|
||||
using = new /obj/screen()
|
||||
using.name = "Show Camera List"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "camera"
|
||||
using.screen_loc = ui_ai_camera_list
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Track
|
||||
using = new /obj/screen()
|
||||
using.name = "Track With Camera"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "track"
|
||||
using.screen_loc = ui_ai_track_with_camera
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Camera light
|
||||
using = new /obj/screen()
|
||||
using.name = "Toggle Camera Light"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "camera_light"
|
||||
using.screen_loc = ui_ai_camera_light
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Crew Monitoring
|
||||
using = new /obj/screen()
|
||||
using.name = "Crew Monitoring"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "crew_monitor"
|
||||
using.screen_loc = ui_ai_crew_monitor
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Crew Manifest
|
||||
using = new /obj/screen()
|
||||
using.name = "Show Crew Manifest"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "manifest"
|
||||
using.screen_loc = ui_ai_crew_manifest
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Alerts
|
||||
using = new /obj/screen()
|
||||
using.name = "Show Alerts"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "alerts"
|
||||
using.screen_loc = ui_ai_alerts
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Announcement
|
||||
using = new /obj/screen()
|
||||
using.name = "Announcement"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "announcement"
|
||||
using.screen_loc = ui_ai_announcement
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Shuttle
|
||||
using = new /obj/screen()
|
||||
using.name = "Call Emergency Shuttle"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "call_shuttle"
|
||||
using.screen_loc = ui_ai_shuttle
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Laws
|
||||
using = new /obj/screen()
|
||||
using.name = "State Laws"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "state_laws"
|
||||
using.screen_loc = ui_ai_state_laws
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//PDA message
|
||||
using = new /obj/screen()
|
||||
using.name = "PDA - Send Message"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "pda_send"
|
||||
using.screen_loc = ui_ai_pda_send
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//PDA log
|
||||
using = new /obj/screen()
|
||||
using.name = "PDA - Show Message Log"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "pda_receive"
|
||||
using.screen_loc = ui_ai_pda_log
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Take image
|
||||
using = new /obj/screen()
|
||||
using.name = "Take Image"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "take_picture"
|
||||
using.screen_loc = ui_ai_take_picture
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//View images
|
||||
using = new /obj/screen()
|
||||
using.name = "View Images"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "view_images"
|
||||
using.screen_loc = ui_ai_view_images
|
||||
using.layer = SCREEN_LAYER
|
||||
adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Multicamera mode
|
||||
using = new /obj/screen/ai/multicam()
|
||||
using.screen_loc = ui_ai_multicam
|
||||
adding += using
|
||||
using = new /obj/screen/ai/multicam() // special
|
||||
using.name = "Multicamera Mode"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "multicam"
|
||||
using.screen_loc = ui_ai_multicam
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
//Add multicamera camera
|
||||
using = new /obj/screen/ai/add_multicam()
|
||||
using.screen_loc = ui_ai_add_multicam
|
||||
adding += using
|
||||
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += adding + other
|
||||
mymob.client.screen += mymob.client.void
|
||||
using = new /obj/screen/ai/add_multicam() // special
|
||||
using.name = "New Camera"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "new_cam"
|
||||
using.screen_loc = ui_ai_add_multicam
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
return
|
||||
//Up and Down
|
||||
using = new /obj/screen/ai/up() // special
|
||||
using.name = "Move Upwards"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "up"
|
||||
using.screen_loc = ui_ai_updown
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
using = new /obj/screen/ai/down() // special
|
||||
using.name = "Move Downwards"
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "down"
|
||||
using.screen_loc = ui_ai_updown
|
||||
using.layer = SCREEN_LAYER
|
||||
HUD.adding += using
|
||||
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += HUD.adding + HUD.other
|
||||
client.screen += client.void
|
||||
|
||||
443
code/_onclick/hud/alert.dm
Normal file
443
code/_onclick/hud/alert.dm
Normal file
@@ -0,0 +1,443 @@
|
||||
//A system to manage and display alerts on screen without needing you to do it yourself
|
||||
|
||||
//PUBLIC - call these wherever you want
|
||||
|
||||
|
||||
/mob/proc/throw_alert(category, type, severity, obj/new_master)
|
||||
|
||||
/* Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already
|
||||
category is a text string. Each mob may only have one alert per category; the previous one will be replaced
|
||||
path is a type path of the actual alert type to throw
|
||||
severity is an optional number that will be placed at the end of the icon_state for this alert
|
||||
For example, high pressure's icon_state is "highpressure" and can be serverity 1 or 2 to get "highpressure1" or "highpressure2"
|
||||
new_master is optional and sets the alert's icon state to "template" in the ui_style icons with the master as an overlay.
|
||||
Clicks are forwarded to master */
|
||||
|
||||
if(!category)
|
||||
return
|
||||
|
||||
var/obj/screen/alert/alert
|
||||
if(alerts[category])
|
||||
alert = alerts[category]
|
||||
if(new_master && new_master != alert.master)
|
||||
WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [alert.master]")
|
||||
clear_alert(category)
|
||||
return .()
|
||||
else if(alert.type != type)
|
||||
clear_alert(category)
|
||||
return .()
|
||||
else if(!severity || severity == alert.severity)
|
||||
if(alert.timeout)
|
||||
clear_alert(category)
|
||||
return .()
|
||||
else //no need to update
|
||||
return 0
|
||||
else
|
||||
alert = new type
|
||||
|
||||
if(new_master)
|
||||
alert.icon_state = "template" // blank, so our icon is presented
|
||||
var/image/I = image(icon = new_master.icon, icon_state = new_master.icon_state, dir = SOUTH)
|
||||
alert.add_overlay(I)
|
||||
alert.master = new_master
|
||||
else
|
||||
alert.icon_state = "[initial(alert.icon_state)][severity]"
|
||||
alert.severity = severity
|
||||
|
||||
alerts[category] = alert
|
||||
if(client && hud_used)
|
||||
hud_used.reorganize_alerts()
|
||||
alert.transform = matrix(32, 6, MATRIX_TRANSLATE)
|
||||
animate(alert, transform = matrix(), time = 2.5, easing = CUBIC_EASING)
|
||||
|
||||
if(alert.timeout)
|
||||
spawn(alert.timeout)
|
||||
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
|
||||
clear_alert(category)
|
||||
alert.timeout = world.time + alert.timeout - world.tick_lag
|
||||
return alert
|
||||
|
||||
// Proc to clear an existing alert.
|
||||
/mob/proc/clear_alert(category)
|
||||
var/obj/screen/alert/alert = alerts[category]
|
||||
if(!alert)
|
||||
return 0
|
||||
|
||||
alerts -= category
|
||||
if(client && hud_used)
|
||||
hud_used.reorganize_alerts()
|
||||
client.screen -= alert
|
||||
qdel(alert)
|
||||
|
||||
/obj/screen/alert
|
||||
icon = 'icons/mob/screen_alert.dmi'
|
||||
icon_state = "default"
|
||||
name = "Alert"
|
||||
desc = "Something seems to have gone wrong with this alert, so report this bug please"
|
||||
mouse_opacity = 1
|
||||
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
|
||||
var/severity = 0
|
||||
var/alerttooltipstyle = ""
|
||||
var/no_underlay // Don't underlay the UI style's blank template icon under this
|
||||
|
||||
|
||||
/obj/screen/alert/MouseEntered(location,control,params)
|
||||
openToolTip(usr, src, params, title = name, content = desc, theme = alerttooltipstyle)
|
||||
|
||||
|
||||
/obj/screen/alert/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
|
||||
//Gas alerts
|
||||
/obj/screen/alert/not_enough_oxy
|
||||
name = "Choking (No O2)"
|
||||
desc = "You're not getting enough oxygen. Find some good air before you pass out! \
|
||||
The box in your backpack has an oxygen tank and breath mask in it."
|
||||
icon_state = "not_enough_oxy"
|
||||
|
||||
/obj/screen/alert/too_much_oxy
|
||||
name = "Choking (O2)"
|
||||
desc = "There's too much oxygen in the air, and you're breathing it in! Find some good air before you pass out!"
|
||||
icon_state = "too_much_oxy"
|
||||
|
||||
/obj/screen/alert/not_enough_nitro
|
||||
name = "Choking (No N)"
|
||||
desc = "You're not getting enough nitrogen. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_nitro"
|
||||
|
||||
/obj/screen/alert/too_much_nitro
|
||||
name = "Choking (N)"
|
||||
desc = "There's too much nitrogen in the air, and you're breathing it in! Find some good air before you pass out!"
|
||||
icon_state = "too_much_nitro"
|
||||
|
||||
/obj/screen/alert/not_enough_co2
|
||||
name = "Choking (No CO2)"
|
||||
desc = "You're not getting enough carbon dioxide. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_co2"
|
||||
|
||||
/obj/screen/alert/too_much_co2
|
||||
name = "Choking (CO2)"
|
||||
desc = "There's too much carbon dioxide in the air, and you're breathing it in! Find some good air before you pass out!"
|
||||
icon_state = "too_much_co2"
|
||||
|
||||
/obj/screen/alert/too_much_co2/plant
|
||||
name = "Livin' the good life"
|
||||
desc = "There's so much carbon dioxide in the air, you're in fucking heaven. Watch out for passed out fleshies, though."
|
||||
icon_state = "too_much_co2"
|
||||
|
||||
/obj/screen/alert/not_enough_tox
|
||||
name = "Choking (No Phoron)"
|
||||
desc = "You're not getting enough phoron. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_tox"
|
||||
|
||||
/obj/screen/alert/tox_in_air
|
||||
name = "Choking (Phoron)"
|
||||
desc = "There's highly flammable, toxic phoron in the air and you're breathing it in. Find some fresh air. \
|
||||
The box in your backpack has an oxygen tank and gas mask in it."
|
||||
icon_state = "too_much_tox"
|
||||
|
||||
/obj/screen/alert/not_enough_fuel
|
||||
name = "Choking (No Volatile fuel)"
|
||||
desc = "You're not getting enough volatile fuel. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_tox"
|
||||
|
||||
/obj/screen/alert/not_enough_n2o
|
||||
name = "Choking (No Sleeping Gas)"
|
||||
desc = "You're not getting enough sleeping gas. Find some good air before you pass out!"
|
||||
icon_state = "not_enough_tox"
|
||||
//End gas alerts
|
||||
|
||||
|
||||
/obj/screen/alert/fat
|
||||
name = "Fat"
|
||||
desc = "You ate too much food, lardass. Run around the station and lose some weight."
|
||||
icon_state = "fat"
|
||||
|
||||
/obj/screen/alert/fat/vampire
|
||||
desc = "You drank too much blood, lardass. Run around the station and lose some weight."
|
||||
icon_state = "v_fat"
|
||||
|
||||
/obj/screen/alert/fat/synth
|
||||
desc = "Your battery is full! Don't overvolt it."
|
||||
icon_state = "c_fat"
|
||||
|
||||
/obj/screen/alert/hungry
|
||||
name = "Hungry"
|
||||
desc = "Some food would be good right about now."
|
||||
icon_state = "hungry"
|
||||
|
||||
/obj/screen/alert/hungry/vampire
|
||||
desc = "You could use a bloodsnack or two."
|
||||
icon_state = "v_hungry"
|
||||
|
||||
/obj/screen/alert/hungry/synth
|
||||
desc = "Battery's running a bit low, could use a topoff."
|
||||
icon_state = "c_hungry"
|
||||
|
||||
/obj/screen/alert/starving
|
||||
name = "Starving"
|
||||
desc = "You're severely malnourished. The hunger pains make moving around a chore."
|
||||
icon_state = "starving"
|
||||
|
||||
/obj/screen/alert/starving/vampire
|
||||
desc = "You *need* blood; go rip out someone's throat already!"
|
||||
icon_state = "v_starving"
|
||||
|
||||
/obj/screen/alert/starving/synth
|
||||
desc = "Your battery is about to die! Charge it ASAP!"
|
||||
icon_state = "c_starving"
|
||||
|
||||
/obj/screen/alert/hot
|
||||
name = "Too Hot"
|
||||
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
|
||||
icon_state = "hot"
|
||||
|
||||
/obj/screen/alert/hot/robot
|
||||
desc = "The air around you is too hot for a humanoid. Be careful to avoid exposing them to this enviroment."
|
||||
|
||||
/obj/screen/alert/cold
|
||||
name = "Too Cold"
|
||||
desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit."
|
||||
icon_state = "cold"
|
||||
|
||||
/obj/screen/alert/cold/robot
|
||||
desc = "The air around you is too cold for a humanoid. Be careful to avoid exposing them to this enviroment."
|
||||
|
||||
/obj/screen/alert/lowpressure
|
||||
name = "Low Pressure"
|
||||
desc = "The air around you is hazardously thin. A space suit would protect you."
|
||||
icon_state = "lowpressure"
|
||||
|
||||
/obj/screen/alert/highpressure
|
||||
name = "High Pressure"
|
||||
desc = "The air around you is hazardously thick. A fire suit would protect you."
|
||||
icon_state = "highpressure"
|
||||
|
||||
/obj/screen/alert/blind
|
||||
name = "Blind"
|
||||
desc = "You can't see! This may be caused by a genetic defect, eye trauma, being unconscious, \
|
||||
or something covering your eyes."
|
||||
icon_state = "blind"
|
||||
|
||||
/obj/screen/alert/high
|
||||
name = "High"
|
||||
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
|
||||
icon_state = "high"
|
||||
|
||||
/obj/screen/alert/embeddedobject
|
||||
name = "Embedded Object"
|
||||
desc = "Something got lodged into your flesh and is causing major bleeding. It might fall out with time, but surgery is the safest way. \
|
||||
If you're feeling frisky, right click on yourself and select \"Remove embedded object\" to pull the object out."
|
||||
icon_state = "embeddedobject"
|
||||
|
||||
/obj/screen/alert/embeddedobject/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/carbon/human/M = usr
|
||||
return M.help_shake_act(M)
|
||||
|
||||
/obj/screen/alert/asleep
|
||||
name = "Asleep"
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
icon_state = "asleep"
|
||||
|
||||
/obj/screen/alert/weightless
|
||||
name = "Weightless"
|
||||
desc = "Gravity has ceased affecting you, and you're floating around aimlessly. You'll need something large and heavy, like a \
|
||||
wall or lattice, to push yourself off if you want to move. A jetpack would enable free range of motion. A pair of \
|
||||
magboots would let you walk around normally on the floor. Barring those, you can throw things, use a fire extinguisher, \
|
||||
or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
icon_state = "weightless"
|
||||
|
||||
/obj/screen/alert/fire
|
||||
name = "On Fire"
|
||||
desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area."
|
||||
icon_state = "fire"
|
||||
|
||||
/obj/screen/alert/fire/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
return L.resist()
|
||||
|
||||
|
||||
//ALIENS
|
||||
|
||||
/obj/screen/alert/alien_tox
|
||||
name = "Plasma"
|
||||
desc = "There's flammable plasma in the air. If it lights up, you'll be toast."
|
||||
icon_state = "alien_tox"
|
||||
alerttooltipstyle = "alien"
|
||||
|
||||
/obj/screen/alert/alien_fire
|
||||
// This alert is temporarily gonna be thrown for all hot air but one day it will be used for literally being on fire
|
||||
name = "Too Hot"
|
||||
desc = "It's too hot! Flee to space or at least away from the flames. Standing on weeds will heal you."
|
||||
icon_state = "alien_fire"
|
||||
alerttooltipstyle = "alien"
|
||||
|
||||
/obj/screen/alert/alien_vulnerable
|
||||
name = "Severed Matriarchy"
|
||||
desc = "Your queen has been killed, you will suffer movement penalties and loss of hivemind. A new queen cannot be made until you recover."
|
||||
icon_state = "alien_noqueen"
|
||||
alerttooltipstyle = "alien"
|
||||
|
||||
//BLOBS
|
||||
|
||||
/obj/screen/alert/nofactory
|
||||
name = "No Factory"
|
||||
desc = "You have no factory, and are slowly dying!"
|
||||
icon_state = "blobbernaut_nofactory"
|
||||
alerttooltipstyle = "blob"
|
||||
|
||||
//SILICONS
|
||||
|
||||
/obj/screen/alert/nocell
|
||||
name = "Missing Power Cell"
|
||||
desc = "Unit has no power cell. No modules available until a power cell is reinstalled. Robotics may provide assistance."
|
||||
icon_state = "nocell"
|
||||
|
||||
/obj/screen/alert/emptycell
|
||||
name = "Out of Power"
|
||||
desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged. \
|
||||
Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
|
||||
icon_state = "emptycell"
|
||||
|
||||
/obj/screen/alert/lowcell
|
||||
name = "Low Charge"
|
||||
desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
|
||||
icon_state = "lowcell"
|
||||
|
||||
//Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg
|
||||
/obj/screen/alert/hacked
|
||||
name = "Hacked"
|
||||
desc = "Hazardous non-standard equipment detected. Please ensure any usage of this equipment is in line with unit's laws, if any."
|
||||
icon_state = "hacked"
|
||||
|
||||
/obj/screen/alert/locked
|
||||
name = "Locked Down"
|
||||
desc = "Unit has been remotely locked down. Usage of a Robotics Control Console like the one in the Research Director's \
|
||||
office by your AI master or any qualified human may resolve this matter. Robotics may provide further assistance if necessary."
|
||||
icon_state = "locked"
|
||||
|
||||
/obj/screen/alert/newlaw
|
||||
name = "Law Update"
|
||||
desc = "Laws have potentially been uploaded to or removed from this unit. Please be aware of any changes \
|
||||
so as to remain in compliance with the most up-to-date laws."
|
||||
icon_state = "newlaw"
|
||||
timeout = 300
|
||||
|
||||
//MECHS
|
||||
|
||||
/obj/screen/alert/low_mech_integrity
|
||||
name = "Mech Damaged"
|
||||
desc = "Mech integrity is low."
|
||||
icon_state = "low_mech_integrity"
|
||||
|
||||
|
||||
//GHOSTS
|
||||
//TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages
|
||||
/obj/screen/alert/notify_cloning
|
||||
name = "Revival"
|
||||
desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!"
|
||||
icon_state = "template"
|
||||
timeout = 300
|
||||
|
||||
/obj/screen/alert/notify_cloning/Click()
|
||||
if(!usr || !usr.client) return
|
||||
var/mob/observer/dead/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
// /obj/screen/alert/notify_jump
|
||||
// name = "Body created"
|
||||
// desc = "A body was created. You can enter it."
|
||||
// icon_state = "template"
|
||||
// timeout = 300
|
||||
// var/atom/jump_target = null
|
||||
// var/attack_not_jump = null
|
||||
|
||||
// /obj/screen/alert/notify_jump/Click()
|
||||
// if(!usr || !usr.client) return
|
||||
// if(!jump_target) return
|
||||
// var/mob/dead/observer/G = usr
|
||||
// if(!istype(G)) return
|
||||
// if(attack_not_jump)
|
||||
// jump_target.attack_ghost(G)
|
||||
// else
|
||||
// var/turf/T = get_turf(jump_target)
|
||||
// if(T && isturf(T))
|
||||
// G.loc = T
|
||||
|
||||
//OBJECT-BASED
|
||||
|
||||
/obj/screen/alert/restrained/buckled
|
||||
name = "Buckled"
|
||||
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
|
||||
|
||||
/obj/screen/alert/restrained/handcuffed
|
||||
name = "Handcuffed"
|
||||
desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself."
|
||||
|
||||
/obj/screen/alert/restrained/legcuffed
|
||||
name = "Legcuffed"
|
||||
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
|
||||
|
||||
/obj/screen/alert/restrained/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
return L.resist()
|
||||
// PRIVATE = only edit, use, or override these if you're editing the system as a whole
|
||||
|
||||
// Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there
|
||||
/datum/hud/proc/reorganize_alerts()
|
||||
var/list/alerts = mymob.alerts
|
||||
if(!hud_shown)
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
mymob.client.screen -= alerts[alerts[i]]
|
||||
return 1
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
var/obj/screen/alert/alert = alerts[alerts[i]]
|
||||
|
||||
if(alert.icon_state in cached_icon_states(ui_style)) // prevents "" state from attempting matches
|
||||
alert.icon = ui_style
|
||||
|
||||
else if(!alert.no_underlay)
|
||||
var/image/I = image(icon = ui_style, icon_state = "template")
|
||||
I.color = ui_color
|
||||
alert.underlays = list(I)
|
||||
|
||||
switch(i)
|
||||
if(1)
|
||||
. = ui_alert1
|
||||
if(2)
|
||||
. = ui_alert2
|
||||
if(3)
|
||||
. = ui_alert3
|
||||
if(4)
|
||||
. = ui_alert4
|
||||
if(5)
|
||||
. = ui_alert5 // Right now there's 5 slots
|
||||
else
|
||||
. = ""
|
||||
alert.screen_loc = .
|
||||
mymob?.client?.screen |= alert
|
||||
return 1
|
||||
|
||||
/mob
|
||||
var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
|
||||
|
||||
/obj/screen/alert/Click(location, control, params)
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
var/paramslist = params2list(params)
|
||||
if(paramslist["shift"]) // screen objects don't do the normal Click() stuff so we'll cheat
|
||||
usr << "<span class='boldnotice'>[name]</span> - <span class='info'>[desc]</span>"
|
||||
return
|
||||
if(master)
|
||||
return usr.client.Click(master, location, control, params)
|
||||
|
||||
/obj/screen/alert/Destroy()
|
||||
..()
|
||||
severity = 0
|
||||
master = null
|
||||
screen_loc = ""
|
||||
return QDEL_HINT_QUEUE
|
||||
@@ -1,33 +1,31 @@
|
||||
/datum/hud/proc/larva_hud()
|
||||
/mob/living/carbon/alien/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
HUD.ui_style = 'icons/mob/screen1_alien.dmi'
|
||||
|
||||
HUD.adding = list()
|
||||
HUD.other = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = 'icons/mob/screen1_alien.dmi'
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = (m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
HUD.adding += using
|
||||
HUD.move_intent = using
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_alien_health
|
||||
healths = new /obj/screen()
|
||||
healths.icon = HUD.ui_style
|
||||
healths.icon_state = "health0"
|
||||
healths.name = "health"
|
||||
healths.screen_loc = ui_alien_health
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += list( mymob.healths, mymob.fire) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
mymob.client.screen += mymob.client.void
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += list(healths)
|
||||
client.screen += HUD.adding + HUD.other
|
||||
client.screen += client.void
|
||||
|
||||
140
code/_onclick/hud/ghost.dm
Normal file
140
code/_onclick/hud/ghost.dm
Normal file
@@ -0,0 +1,140 @@
|
||||
/obj/screen/ghost
|
||||
icon = 'icons/mob/screen_ghost.dmi'
|
||||
|
||||
/obj/screen/ghost/MouseEntered()
|
||||
flick(icon_state + "_anim", src)
|
||||
|
||||
/obj/screen/ghost/jumptomob
|
||||
name = "Jump to mob"
|
||||
icon_state = "jumptomob"
|
||||
|
||||
/obj/screen/ghost/jumptomob/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.jumptomob()
|
||||
|
||||
/obj/screen/ghost/orbit
|
||||
name = "Orbit"
|
||||
icon_state = "orbit"
|
||||
|
||||
/obj/screen/ghost/orbit/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.follow()
|
||||
|
||||
/obj/screen/ghost/reenter_corpse
|
||||
name = "Reenter corpse"
|
||||
icon_state = "reenter_corpse"
|
||||
|
||||
/obj/screen/ghost/reenter_corpse/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
/obj/screen/ghost/teleport
|
||||
name = "Teleport"
|
||||
icon_state = "teleport"
|
||||
|
||||
/obj/screen/ghost/teleport/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Candidate"
|
||||
icon_state = "pai"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.paialert()
|
||||
|
||||
/obj/screen/ghost/up
|
||||
name = "Move Upwards"
|
||||
icon_state = "up"
|
||||
|
||||
/obj/screen/ghost/up/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.zMove(UP)
|
||||
|
||||
/obj/screen/ghost/down
|
||||
name = "Move Downwards"
|
||||
icon_state = "down"
|
||||
|
||||
/obj/screen/ghost/down/Click()
|
||||
var/mob/observer/dead/G = usr
|
||||
G.zMove(DOWN)
|
||||
|
||||
/mob/observer/dead/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
var/list/adding = list()
|
||||
HUD.adding = adding
|
||||
|
||||
var/obj/screen/using
|
||||
using = new /obj/screen/ghost/jumptomob()
|
||||
using.screen_loc = ui_ghost_jumptomob
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/orbit()
|
||||
using.screen_loc = ui_ghost_orbit
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/reenter_corpse()
|
||||
using.screen_loc = ui_ghost_reenter_corpse
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/teleport()
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/up()
|
||||
using.screen_loc = ui_ghost_updown
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/ghost/down()
|
||||
using.screen_loc = ui_ghost_updown
|
||||
using.hud = src
|
||||
adding += using
|
||||
|
||||
/*
|
||||
using = new /obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
using.hud = src
|
||||
adding += using
|
||||
*/
|
||||
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += HUD.adding
|
||||
client.screen += client.void
|
||||
|
||||
/* I wish we had this. Not yet, though.
|
||||
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
|
||||
// don't show this HUD if observing; show the HUD of the observee
|
||||
var/mob/dead/observer/O = mymob
|
||||
if (istype(O) && O.observetarget)
|
||||
plane_masters_update()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client.prefs.ghost_hud)
|
||||
screenmob.client.screen -= static_inventory
|
||||
else
|
||||
screenmob.client.screen += static_inventory
|
||||
|
||||
//We should only see observed mob alerts.
|
||||
/datum/hud/ghost/reorganize_alerts(mob/viewmob)
|
||||
var/mob/dead/observer/O = mymob
|
||||
if (istype(O) && O.observetarget)
|
||||
return
|
||||
. = ..()
|
||||
*/
|
||||
@@ -190,6 +190,10 @@ var/list/global_huds = list(
|
||||
var/action_buttons_hidden = 0
|
||||
var/list/slot_info
|
||||
|
||||
var/icon/ui_style
|
||||
var/ui_color
|
||||
var/ui_alpha
|
||||
|
||||
datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
instantiate()
|
||||
@@ -303,29 +307,23 @@ datum/hud/New(mob/owner)
|
||||
|
||||
|
||||
/datum/hud/proc/instantiate()
|
||||
if(!ismob(mymob)) return 0
|
||||
if(!mymob.client) return 0
|
||||
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
var/ui_color = mymob.client.prefs.UI_style_color
|
||||
var/ui_alpha = mymob.client.prefs.UI_style_alpha
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
|
||||
mymob.create_mob_hud(src)
|
||||
|
||||
if(ishuman(mymob))
|
||||
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
|
||||
else if(isrobot(mymob))
|
||||
robot_hud(ui_style, ui_color, ui_alpha, mymob)
|
||||
else if(isbrain(mymob))
|
||||
mymob.instantiate_hud(src)
|
||||
else if(isalien(mymob))
|
||||
larva_hud()
|
||||
else if(isAI(mymob))
|
||||
ai_hud()
|
||||
else if(isobserver(mymob))
|
||||
ghost_hud()
|
||||
else
|
||||
mymob.instantiate_hud(src)
|
||||
persistant_inventory_update()
|
||||
mymob.reload_fullscreen() // Reload any fullscreen overlays this mob has.
|
||||
mymob.update_action_buttons()
|
||||
reorganize_alerts()
|
||||
|
||||
/mob/proc/instantiate_hud(var/datum/hud/HUD)
|
||||
return
|
||||
/mob/proc/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
if(!client)
|
||||
return 0
|
||||
|
||||
HUD.ui_style = ui_style2icon(client?.prefs?.UI_style)
|
||||
HUD.ui_color = client?.prefs?.UI_style_color
|
||||
HUD.ui_alpha = client?.prefs?.UI_style_alpha
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12(var/full = 0 as null)
|
||||
@@ -388,6 +386,7 @@ datum/hud/New(mob/owner)
|
||||
hud_used.hidden_inventory_update()
|
||||
hud_used.persistant_inventory_update()
|
||||
update_action_buttons()
|
||||
hud_used.reorganize_alerts()
|
||||
|
||||
//Similar to button_pressed_F12() but keeps zone_sel, gun_setting_icon, and healths.
|
||||
/mob/proc/toggle_zoom_hud()
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
/mob/living/carbon/human/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
|
||||
HUD.human_hud(ui_style, ui_color, ui_alpha, src)
|
||||
/mob/living/carbon/human/create_mob_hud(datum/hud/HUD)
|
||||
..()
|
||||
|
||||
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_White.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
|
||||
var/datum/hud_data/hud_data
|
||||
if(!istype(target))
|
||||
hud_data = new()
|
||||
if(species?.hud)
|
||||
hud_data = species.hud
|
||||
else
|
||||
hud_data = target.species.hud
|
||||
hud_data = new ()
|
||||
|
||||
if(hud_data.icon)
|
||||
ui_style = hud_data.icon
|
||||
if(hud_data.icon) // Species wants a specific dmi for the HUD
|
||||
HUD.ui_style = hud_data.icon
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
src.hotkeybuttons = list() //These can be disabled for hotkey users
|
||||
src.slot_info = list()
|
||||
var/adding = list()
|
||||
var/other = list()
|
||||
var/hotkeybuttons = list()
|
||||
var/slot_info = list()
|
||||
|
||||
HUD.adding = adding
|
||||
HUD.other = other
|
||||
HUD.hotkeybuttons = hotkeybuttons //These can be disabled for hotkey users
|
||||
HUD.slot_info = slot_info
|
||||
|
||||
var/list/hud_elements = list()
|
||||
var/obj/screen/using
|
||||
@@ -25,10 +29,10 @@
|
||||
for(var/gear_slot in hud_data.gear)
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.icon = ui_style
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
inv_box.hud = src
|
||||
inv_box.icon = HUD.ui_style
|
||||
inv_box.color = HUD.ui_color
|
||||
inv_box.alpha = HUD.ui_alpha
|
||||
inv_box.hud = HUD
|
||||
|
||||
var/list/slot_data = hud_data.gear[gear_slot]
|
||||
inv_box.name = gear_slot
|
||||
@@ -41,339 +45,291 @@
|
||||
inv_box.set_dir(slot_data["dir"])
|
||||
|
||||
if(slot_data["toggle"])
|
||||
src.other += inv_box
|
||||
other += inv_box
|
||||
has_hidden_gear = 1
|
||||
else
|
||||
src.adding += inv_box
|
||||
adding += inv_box
|
||||
|
||||
if(has_hidden_gear)
|
||||
using = new /obj/screen()
|
||||
using.name = "toggle"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "other"
|
||||
using.screen_loc = ui_inventory
|
||||
using.hud_layerise()
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
|
||||
// Draw the attack intent dialogue.
|
||||
if(hud_data.has_a_intent)
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.icon = ui_style
|
||||
using.icon_state = "intent_"+mymob.a_intent
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "intent_"+a_intent
|
||||
using.screen_loc = ui_acti
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
HUD.action_intent = using
|
||||
|
||||
hud_elements |= using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen()
|
||||
using.name = I_HELP
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM //These sit on the intent box
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
adding += using
|
||||
HUD.help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen()
|
||||
using.name = I_DISARM
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
adding += using
|
||||
HUD.disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen()
|
||||
using.name = I_GRAB
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
adding += using
|
||||
HUD.grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico = new(HUD.ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen()
|
||||
using.name = I_HURT
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
adding += using
|
||||
HUD.hurt_intent = using
|
||||
//end intent small hud objects
|
||||
|
||||
if(hud_data.has_m_intent)
|
||||
using = new /obj/screen()
|
||||
using.name = "mov_intent"
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = (m_intent == "run" ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
move_intent = using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
HUD.move_intent = using
|
||||
|
||||
if(hud_data.has_drop)
|
||||
using = new /obj/screen()
|
||||
using.name = "drop"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "act_drop"
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.hotkeybuttons += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
hotkeybuttons += using
|
||||
|
||||
if(hud_data.has_hands)
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "equip"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "act_equip"
|
||||
using.screen_loc = ui_equip
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
adding += using
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.hud = src
|
||||
inv_box.hud = HUD
|
||||
inv_box.name = "r_hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon = HUD.ui_style
|
||||
inv_box.icon_state = "r_hand_inactive"
|
||||
if(!target.hand) //This being 0 or null means the right hand is in use
|
||||
if(!hand) //This being 0 or null means the right hand is in use
|
||||
inv_box.icon_state = "r_hand_active"
|
||||
inv_box.screen_loc = ui_rhand
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.r_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
inv_box.color = HUD.ui_color
|
||||
inv_box.alpha = HUD.ui_alpha
|
||||
HUD.r_hand_hud_object = inv_box
|
||||
adding += inv_box
|
||||
slot_info["[slot_r_hand]"] = inv_box.screen_loc
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
inv_box.hud = src
|
||||
inv_box.hud = HUD
|
||||
inv_box.name = "l_hand"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon = HUD.ui_style
|
||||
inv_box.icon_state = "l_hand_inactive"
|
||||
if(target.hand) //This being 1 means the left hand is in use
|
||||
if(hand) //This being 1 means the left hand is in use
|
||||
inv_box.icon_state = "l_hand_active"
|
||||
inv_box.screen_loc = ui_lhand
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
src.l_hand_hud_object = inv_box
|
||||
src.adding += inv_box
|
||||
inv_box.color = HUD.ui_color
|
||||
inv_box.alpha = HUD.ui_alpha
|
||||
HUD.l_hand_hud_object = inv_box
|
||||
adding += inv_box
|
||||
slot_info["[slot_l_hand]"] = inv_box.screen_loc
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "hand1"
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.hud = src
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.hud = HUD
|
||||
adding += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "hand2"
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.hud = src
|
||||
src.adding += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.hud = HUD
|
||||
adding += using
|
||||
|
||||
if(hud_data.has_resist)
|
||||
using = new /obj/screen()
|
||||
using.name = "resist"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "act_resist"
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
src.hotkeybuttons += using
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
hotkeybuttons += using
|
||||
|
||||
if(hud_data.has_throw)
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "act_throw_off"
|
||||
mymob.throw_icon.name = "throw"
|
||||
mymob.throw_icon.screen_loc = ui_drop_throw
|
||||
mymob.throw_icon.color = ui_color
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
src.hotkeybuttons += mymob.throw_icon
|
||||
hud_elements |= mymob.throw_icon
|
||||
throw_icon = new /obj/screen()
|
||||
throw_icon.icon = HUD.ui_style
|
||||
throw_icon.icon_state = "act_throw_off"
|
||||
throw_icon.name = "throw"
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
throw_icon.color = HUD.ui_color
|
||||
throw_icon.alpha = HUD.ui_alpha
|
||||
hotkeybuttons += throw_icon
|
||||
hud_elements |= throw_icon
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
src.hotkeybuttons += mymob.pullin
|
||||
hud_elements |= mymob.pullin
|
||||
pullin = new /obj/screen()
|
||||
pullin.icon = HUD.ui_style
|
||||
pullin.icon_state = "pull0"
|
||||
pullin.name = "pull"
|
||||
pullin.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += pullin
|
||||
hud_elements |= pullin
|
||||
|
||||
if(hud_data.has_internals)
|
||||
mymob.internals = new /obj/screen()
|
||||
mymob.internals.icon = ui_style
|
||||
mymob.internals.icon_state = "internal0"
|
||||
if(istype(target.internal, /obj/item/weapon/tank)) //Internals on already? Iight, prove it
|
||||
mymob.internals.icon_state = "internal1"
|
||||
mymob.internals.name = "internal"
|
||||
mymob.internals.screen_loc = ui_internal
|
||||
hud_elements |= mymob.internals
|
||||
internals = new /obj/screen()
|
||||
internals.icon = HUD.ui_style
|
||||
internals.icon_state = "internal0"
|
||||
if(istype(internal, /obj/item/weapon/tank)) //Internals on already? Iight, prove it
|
||||
internals.icon_state = "internal1"
|
||||
internals.name = "internal"
|
||||
internals.screen_loc = ui_internal
|
||||
hud_elements |= internals
|
||||
|
||||
if(hud_data.has_warnings)
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = ui_style
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
hud_elements |= mymob.oxygen
|
||||
|
||||
mymob.toxin = new /obj/screen()
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
mymob.toxin.name = "toxin"
|
||||
mymob.toxin.screen_loc = ui_toxin
|
||||
hud_elements |= mymob.toxin
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = ui_style
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
hud_elements |= mymob.fire
|
||||
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_health
|
||||
hud_elements |= mymob.healths
|
||||
|
||||
if(hud_data.has_pressure)
|
||||
mymob.pressure = new /obj/screen()
|
||||
mymob.pressure.icon = ui_style
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
hud_elements |= mymob.pressure
|
||||
|
||||
if(hud_data.has_bodytemp)
|
||||
mymob.bodytemp = new /obj/screen()
|
||||
mymob.bodytemp.icon = ui_style
|
||||
mymob.bodytemp.icon_state = "temp1"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
hud_elements |= mymob.bodytemp
|
||||
|
||||
if(hud_data.has_nutrition)
|
||||
mymob.nutrition_icon = new /obj/screen()
|
||||
mymob.nutrition_icon.icon = ui_style
|
||||
mymob.nutrition_icon.icon_state = "nutrition0"
|
||||
mymob.nutrition_icon.name = "nutrition"
|
||||
mymob.nutrition_icon.screen_loc = ui_nutrition
|
||||
hud_elements |= mymob.nutrition_icon
|
||||
healths = new /obj/screen()
|
||||
healths.icon = HUD.ui_style
|
||||
healths.icon_state = "health0"
|
||||
healths.name = "health"
|
||||
healths.screen_loc = ui_health
|
||||
hud_elements |= healths
|
||||
|
||||
//VOREStation Addition begin
|
||||
mymob.shadekin_dark_display = new /obj/screen/shadekin/darkness()
|
||||
mymob.shadekin_dark_display.screen_loc = ui_shadekin_dark_display
|
||||
mymob.shadekin_dark_display.icon_state = "dark"
|
||||
hud_elements |= mymob.shadekin_dark_display
|
||||
shadekin_dark_display = new /obj/screen/shadekin/darkness()
|
||||
shadekin_dark_display.screen_loc = ui_shadekin_dark_display
|
||||
shadekin_dark_display.icon_state = "dark"
|
||||
hud_elements |= shadekin_dark_display
|
||||
|
||||
mymob.shadekin_energy_display = new /obj/screen/shadekin/energy()
|
||||
mymob.shadekin_energy_display.screen_loc = ui_shadekin_energy_display
|
||||
mymob.shadekin_energy_display.icon_state = "energy0"
|
||||
hud_elements |= mymob.shadekin_energy_display
|
||||
shadekin_energy_display = new /obj/screen/shadekin/energy()
|
||||
shadekin_energy_display.screen_loc = ui_shadekin_energy_display
|
||||
shadekin_energy_display.icon_state = "energy0"
|
||||
hud_elements |= shadekin_energy_display
|
||||
|
||||
mymob.xenochimera_danger_display = new /obj/screen/xenochimera/danger_level()
|
||||
mymob.xenochimera_danger_display.screen_loc = ui_xenochimera_danger_display
|
||||
mymob.xenochimera_danger_display.icon_state = "danger00"
|
||||
hud_elements |= mymob.xenochimera_danger_display
|
||||
xenochimera_danger_display = new /obj/screen/xenochimera/danger_level()
|
||||
xenochimera_danger_display.screen_loc = ui_xenochimera_danger_display
|
||||
xenochimera_danger_display.icon_state = "danger00"
|
||||
hud_elements |= xenochimera_danger_display
|
||||
//VOREStation Addition end
|
||||
|
||||
mymob.ling_chem_display = new /obj/screen/ling/chems()
|
||||
mymob.ling_chem_display.screen_loc = ui_ling_chemical_display
|
||||
mymob.ling_chem_display.icon_state = "ling_chems"
|
||||
hud_elements |= mymob.ling_chem_display
|
||||
ling_chem_display = new /obj/screen/ling/chems()
|
||||
ling_chem_display.screen_loc = ui_ling_chemical_display
|
||||
ling_chem_display.icon_state = "ling_chems"
|
||||
hud_elements |= ling_chem_display
|
||||
|
||||
mymob.wiz_instability_display = new /obj/screen/wizard/instability()
|
||||
mymob.wiz_instability_display.screen_loc = ui_wiz_instability_display
|
||||
mymob.wiz_instability_display.icon_state = "wiz_instability_none"
|
||||
hud_elements |= mymob.wiz_instability_display
|
||||
wiz_instability_display = new /obj/screen/wizard/instability()
|
||||
wiz_instability_display.screen_loc = ui_wiz_instability_display
|
||||
wiz_instability_display.icon_state = "wiz_instability_none"
|
||||
hud_elements |= wiz_instability_display
|
||||
|
||||
mymob.wiz_energy_display = new/obj/screen/wizard/energy()
|
||||
mymob.wiz_energy_display.screen_loc = ui_wiz_energy_display
|
||||
mymob.wiz_energy_display.icon_state = "wiz_energy"
|
||||
hud_elements |= mymob.wiz_energy_display
|
||||
wiz_energy_display = new/obj/screen/wizard/energy()
|
||||
wiz_energy_display.screen_loc = ui_wiz_energy_display
|
||||
wiz_energy_display.icon_state = "wiz_energy"
|
||||
hud_elements |= wiz_energy_display
|
||||
|
||||
|
||||
mymob.pain = new /obj/screen( null )
|
||||
pain = new /obj/screen( null )
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.color = ui_color
|
||||
mymob.zone_sel.alpha = ui_alpha
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
hud_elements |= mymob.zone_sel
|
||||
zone_sel = new /obj/screen/zone_sel( null )
|
||||
zone_sel.icon = HUD.ui_style
|
||||
zone_sel.color = HUD.ui_color
|
||||
zone_sel.alpha = HUD.ui_alpha
|
||||
zone_sel.overlays.Cut()
|
||||
zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
|
||||
hud_elements |= zone_sel
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
mymob.gun_setting_icon.icon = ui_style
|
||||
mymob.gun_setting_icon.color = ui_color
|
||||
mymob.gun_setting_icon.alpha = ui_alpha
|
||||
hud_elements |= mymob.gun_setting_icon
|
||||
gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
gun_setting_icon.icon = HUD.ui_style
|
||||
gun_setting_icon.color = HUD.ui_color
|
||||
gun_setting_icon.alpha = HUD.ui_alpha
|
||||
hud_elements |= gun_setting_icon
|
||||
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
mymob.item_use_icon.icon = ui_style
|
||||
mymob.item_use_icon.color = ui_color
|
||||
mymob.item_use_icon.alpha = ui_alpha
|
||||
item_use_icon = new /obj/screen/gun/item(null)
|
||||
item_use_icon.icon = HUD.ui_style
|
||||
item_use_icon.color = HUD.ui_color
|
||||
item_use_icon.alpha = HUD.ui_alpha
|
||||
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
mymob.gun_move_icon.icon = ui_style
|
||||
mymob.gun_move_icon.color = ui_color
|
||||
mymob.gun_move_icon.alpha = ui_alpha
|
||||
gun_move_icon = new /obj/screen/gun/move(null)
|
||||
gun_move_icon.icon = HUD.ui_style
|
||||
gun_move_icon.color = HUD.ui_color
|
||||
gun_move_icon.alpha = HUD.ui_alpha
|
||||
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
mymob.radio_use_icon.icon = ui_style
|
||||
mymob.radio_use_icon.color = ui_color
|
||||
mymob.radio_use_icon.alpha = ui_alpha
|
||||
radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
radio_use_icon.icon = HUD.ui_style
|
||||
radio_use_icon.color = HUD.ui_color
|
||||
radio_use_icon.alpha = HUD.ui_alpha
|
||||
|
||||
if(mymob.client)
|
||||
mymob.client.screen = list()
|
||||
if(client)
|
||||
client.screen = list()
|
||||
|
||||
mymob.client.screen += hud_elements
|
||||
mymob.client.screen += src.adding + src.hotkeybuttons
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
inventory_shown = 0
|
||||
|
||||
return
|
||||
client.screen += hud_elements
|
||||
client.screen += adding + hotkeybuttons
|
||||
client.screen += client.void
|
||||
|
||||
HUD.inventory_shown = 0
|
||||
|
||||
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
||||
set category = "OOC"
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
|
||||
/datum/hud/proc/unplayer_hud()
|
||||
return
|
||||
|
||||
/datum/hud/proc/ghost_hud()
|
||||
return
|
||||
|
||||
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||
|
||||
blobpwrdisplay = new /obj/screen()
|
||||
blobpwrdisplay.name = "blob power"
|
||||
blobpwrdisplay.icon_state = "block"
|
||||
blobpwrdisplay.screen_loc = ui_health
|
||||
blobpwrdisplay.layer = HUD_LAYER
|
||||
|
||||
blobhealthdisplay = new /obj/screen()
|
||||
blobhealthdisplay.name = "blob health"
|
||||
blobhealthdisplay.icon_state = "block"
|
||||
blobhealthdisplay.screen_loc = ui_internal
|
||||
blobhealthdisplay.layer = HUD_LAYER
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
|
||||
mymob.client.screen += mymob.client.void
|
||||
/*
|
||||
/datum/hud/proc/slime_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
|
||||
|
||||
src.adding = list()
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.icon_state = "intent_"+mymob.a_intent
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//intent small hud objects
|
||||
var/icon/ico
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "help"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||
using = new /obj/screen( src )
|
||||
using.name = "disarm"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = "grab"
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||
using = new /obj/screen( src )
|
||||
using.name = I_HURT
|
||||
using.icon = ico
|
||||
using.screen_loc = ui_zonesel
|
||||
using.layer = HUD_LAYER+0.01
|
||||
src.adding += using
|
||||
hurt_intent = using
|
||||
|
||||
mymob.client.screen = list()
|
||||
mymob.client.screen += src.adding
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
return
|
||||
*/
|
||||
|
||||
// HUD.construct_hud() //Archaic.
|
||||
/*
|
||||
/datum/hud/proc/construct_hud()
|
||||
var/constructtype
|
||||
|
||||
if(istype(mymob,/mob/living/simple_mob/construct/armoured) || istype(mymob,/mob/living/simple_mob/construct/behemoth))
|
||||
constructtype = "juggernaut"
|
||||
else if(istype(mymob,/mob/living/simple_mob/construct/builder))
|
||||
constructtype = "artificer"
|
||||
else if(istype(mymob,/mob/living/simple_mob/construct/wraith))
|
||||
constructtype = "wraith"
|
||||
else if(istype(mymob,/mob/living/simple_mob/construct/harvester))
|
||||
constructtype = "harvester"
|
||||
|
||||
if(constructtype)
|
||||
|
||||
mymob.fire.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_construct_fire
|
||||
|
||||
mymob.healths.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.healths.icon_state = "[constructtype]_health0"
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_construct_health
|
||||
|
||||
mymob.pullin.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_construct_pull
|
||||
|
||||
|
||||
mymob.zone_sel.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.zone_sel.overlays.len = 0
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
|
||||
|
||||
mymob.purged.icon = 'icons/mob/screen1_construct.dmi'
|
||||
mymob.purged.icon_state = "purge0"
|
||||
mymob.purged.name = "purged"
|
||||
mymob.purged.screen_loc = ui_construct_purge
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.zone_sel, mymob.purged)
|
||||
mymob.client.screen += mymob.client.void
|
||||
*/
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
var/obj/screen/robot_inventory
|
||||
/*
|
||||
/mob/living/silicon/robot/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
|
||||
HUD.robot_hud(ui_style, ui_color, ui_alpha, src)*/
|
||||
|
||||
/datum/hud/proc/robot_hud(ui_style='icons/mob/screen1_robot.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/silicon/robot/target)
|
||||
/* var/datum/hud_data/hud_data
|
||||
if(!istype(target))
|
||||
hud_data = new()
|
||||
/mob/living/silicon/robot/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
|
||||
..()
|
||||
|
||||
if(hud_data.icon)
|
||||
ui_style = hud_data.icon*/
|
||||
|
||||
if(ui_style == 'icons/mob/screen/minimalist.dmi')
|
||||
ui_style = 'icons/mob/screen1_robot_minimalist.dmi'
|
||||
// Don't care about your prefs! Our icon is more important
|
||||
if(HUD.ui_style == 'icons/mob/screen/minimalist.dmi')
|
||||
HUD.ui_style = 'icons/mob/screen1_robot_minimalist.dmi'
|
||||
else
|
||||
ui_style = 'icons/mob/screen1_robot.dmi'
|
||||
HUD.ui_style = 'icons/mob/screen1_robot.dmi'
|
||||
|
||||
src.adding = list()
|
||||
src.other = list()
|
||||
var/list/adding = list()
|
||||
var/list/other = list()
|
||||
|
||||
HUD.adding = adding
|
||||
HUD.other = other
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -25,51 +21,51 @@ var/obj/screen/robot_inventory
|
||||
using = new /obj/screen()
|
||||
using.name = "radio"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "radio"
|
||||
using.screen_loc = ui_movi
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
adding += using
|
||||
|
||||
//Module select
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "module1"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "inv1"
|
||||
using.screen_loc = ui_inv1
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
mymob:inv1 = using
|
||||
adding += using
|
||||
inv1 = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "module2"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "inv2"
|
||||
using.screen_loc = ui_inv2
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
mymob:inv2 = using
|
||||
adding += using
|
||||
inv2 = using
|
||||
|
||||
using = new /obj/screen()
|
||||
using.name = "module3"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
using.icon = HUD.ui_style
|
||||
using.color = HUD.ui_color
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = "inv3"
|
||||
using.screen_loc = ui_inv3
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
mymob:inv3 = using
|
||||
adding += using
|
||||
inv3 = using
|
||||
|
||||
//End of module select
|
||||
|
||||
@@ -77,129 +73,96 @@ var/obj/screen/robot_inventory
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
using.set_dir(SOUTHWEST)
|
||||
using.icon = ui_style
|
||||
using.alpha = ui_alpha
|
||||
using.icon_state = mymob.a_intent
|
||||
using.icon = HUD.ui_style
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.icon_state = a_intent
|
||||
using.screen_loc = ui_acti
|
||||
using.layer = HUD_LAYER
|
||||
src.adding += using
|
||||
action_intent = using
|
||||
|
||||
//Cell
|
||||
mymob:cells = new /obj/screen()
|
||||
mymob:cells.icon = ui_style
|
||||
mymob:cells.icon_state = "charge-empty"
|
||||
mymob:cells.alpha = ui_alpha
|
||||
mymob:cells.name = "cell"
|
||||
mymob:cells.screen_loc = ui_toxin
|
||||
src.other += mymob:cells
|
||||
adding += using
|
||||
HUD.action_intent = using
|
||||
|
||||
//Health
|
||||
mymob.healths = new /obj/screen()
|
||||
mymob.healths.icon = ui_style
|
||||
mymob.healths.icon_state = "health0"
|
||||
mymob.healths.alpha = ui_alpha
|
||||
mymob.healths.name = "health"
|
||||
mymob.healths.screen_loc = ui_borg_health
|
||||
src.other += mymob.healths
|
||||
healths = new /obj/screen()
|
||||
healths.icon = HUD.ui_style
|
||||
healths.icon_state = "health0"
|
||||
healths.alpha = HUD.ui_alpha
|
||||
healths.name = "health"
|
||||
healths.screen_loc = ui_borg_health
|
||||
other += healths
|
||||
|
||||
//Installed Module
|
||||
mymob.hands = new /obj/screen()
|
||||
mymob.hands.icon = ui_style
|
||||
mymob.hands.icon_state = "nomod"
|
||||
mymob.hands.alpha = ui_alpha
|
||||
mymob.hands.name = "module"
|
||||
mymob.hands.screen_loc = ui_borg_module
|
||||
src.other += mymob.hands
|
||||
hands = new /obj/screen()
|
||||
hands.icon = HUD.ui_style
|
||||
hands.icon_state = "nomod"
|
||||
hands.alpha = HUD.ui_alpha
|
||||
hands.name = "module"
|
||||
hands.screen_loc = ui_borg_module
|
||||
other += hands
|
||||
|
||||
//Module Panel
|
||||
using = new /obj/screen()
|
||||
using.name = "panel"
|
||||
using.icon = ui_style
|
||||
using.icon = HUD.ui_style
|
||||
using.icon_state = "panel"
|
||||
using.alpha = ui_alpha
|
||||
using.alpha = HUD.ui_alpha
|
||||
using.screen_loc = ui_borg_panel
|
||||
using.layer = HUD_LAYER-0.01
|
||||
src.adding += using
|
||||
adding += using
|
||||
|
||||
//Store
|
||||
mymob.throw_icon = new /obj/screen()
|
||||
mymob.throw_icon.icon = ui_style
|
||||
mymob.throw_icon.icon_state = "store"
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
mymob.throw_icon.color = ui_color
|
||||
mymob.throw_icon.name = "store"
|
||||
mymob.throw_icon.screen_loc = ui_borg_store
|
||||
src.other += mymob.throw_icon
|
||||
throw_icon = new /obj/screen()
|
||||
throw_icon.icon = HUD.ui_style
|
||||
throw_icon.icon_state = "store"
|
||||
throw_icon.alpha = HUD.ui_alpha
|
||||
throw_icon.color = HUD.ui_color
|
||||
throw_icon.name = "store"
|
||||
throw_icon.screen_loc = ui_borg_store
|
||||
other += throw_icon
|
||||
|
||||
//Inventory
|
||||
robot_inventory = new /obj/screen()
|
||||
robot_inventory.name = "inventory"
|
||||
robot_inventory.icon = ui_style
|
||||
robot_inventory.icon = HUD.ui_style
|
||||
robot_inventory.icon_state = "inventory"
|
||||
robot_inventory.alpha = ui_alpha
|
||||
robot_inventory.color = ui_color
|
||||
robot_inventory.alpha = HUD.ui_alpha
|
||||
robot_inventory.color = HUD.ui_color
|
||||
robot_inventory.screen_loc = ui_borg_inventory
|
||||
src.other += robot_inventory
|
||||
other += robot_inventory
|
||||
|
||||
//Temp
|
||||
mymob.bodytemp = new /obj/screen()
|
||||
mymob.bodytemp.icon_state = "temp0"
|
||||
mymob.bodytemp.name = "body temperature"
|
||||
mymob.bodytemp.screen_loc = ui_temp
|
||||
pullin = new /obj/screen()
|
||||
pullin.icon = HUD.ui_style
|
||||
pullin.icon_state = "pull0"
|
||||
pullin.alpha = HUD.ui_alpha
|
||||
pullin.color = HUD.ui_color
|
||||
pullin.name = "pull"
|
||||
pullin.screen_loc = ui_borg_pull
|
||||
other += pullin
|
||||
|
||||
mymob.oxygen = new /obj/screen()
|
||||
mymob.oxygen.icon = ui_style
|
||||
mymob.oxygen.icon_state = "oxy0"
|
||||
mymob.oxygen.alpha = ui_alpha
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
src.other += mymob.oxygen
|
||||
|
||||
mymob.fire = new /obj/screen()
|
||||
mymob.fire.icon = ui_style
|
||||
mymob.fire.icon_state = "fire0"
|
||||
mymob.fire.alpha = ui_alpha
|
||||
mymob.fire.name = "fire"
|
||||
mymob.fire.screen_loc = ui_fire
|
||||
src.other += mymob.fire
|
||||
|
||||
mymob.pullin = new /obj/screen()
|
||||
mymob.pullin.icon = ui_style
|
||||
mymob.pullin.icon_state = "pull0"
|
||||
mymob.pullin.alpha = ui_alpha
|
||||
mymob.pullin.color = ui_color
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_borg_pull
|
||||
src.other += mymob.pullin
|
||||
|
||||
mymob.zone_sel = new /obj/screen/zone_sel()
|
||||
mymob.zone_sel.icon = ui_style
|
||||
mymob.zone_sel.alpha = ui_alpha
|
||||
mymob.zone_sel.overlays.Cut()
|
||||
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
|
||||
zone_sel = new /obj/screen/zone_sel()
|
||||
zone_sel.icon = HUD.ui_style
|
||||
zone_sel.alpha = HUD.ui_alpha
|
||||
zone_sel.overlays.Cut()
|
||||
zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]")
|
||||
|
||||
//Handle the gun settings buttons
|
||||
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
mymob.gun_setting_icon.icon = ui_style
|
||||
mymob.gun_setting_icon.alpha = ui_alpha
|
||||
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
||||
mymob.item_use_icon.icon = ui_style
|
||||
mymob.item_use_icon.alpha = ui_alpha
|
||||
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
||||
mymob.gun_move_icon.icon = ui_style
|
||||
mymob.gun_move_icon.alpha = ui_alpha
|
||||
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
mymob.radio_use_icon.icon = ui_style
|
||||
mymob.radio_use_icon.alpha = ui_alpha
|
||||
gun_setting_icon = new /obj/screen/gun/mode(null)
|
||||
gun_setting_icon.icon = HUD.ui_style
|
||||
gun_setting_icon.alpha = HUD.ui_alpha
|
||||
item_use_icon = new /obj/screen/gun/item(null)
|
||||
item_use_icon.icon = HUD.ui_style
|
||||
item_use_icon.alpha = HUD.ui_alpha
|
||||
gun_move_icon = new /obj/screen/gun/move(null)
|
||||
gun_move_icon.icon = HUD.ui_style
|
||||
gun_move_icon.alpha = HUD.ui_alpha
|
||||
radio_use_icon = new /obj/screen/gun/radio(null)
|
||||
radio_use_icon.icon = HUD.ui_style
|
||||
radio_use_icon.alpha = HUD.ui_alpha
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, robot_inventory, mymob.gun_setting_icon)
|
||||
mymob.client.screen += src.adding + src.other
|
||||
mymob.client.screen += mymob.client.void
|
||||
|
||||
return
|
||||
if(client && apply_to_client)
|
||||
client.screen = list()
|
||||
client.screen += list( throw_icon, zone_sel, hands, healths, pullin, robot_inventory, gun_setting_icon)
|
||||
client.screen += HUD.adding + HUD.other
|
||||
client.screen += client.void
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
|
||||
@@ -480,6 +480,19 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
|
||||
for(var/mob/observer/dead/G in player_list)
|
||||
if(G.mind == src)
|
||||
if(G.can_reenter_corpse || even_if_they_cant_reenter)
|
||||
return G
|
||||
break
|
||||
|
||||
/datum/mind/proc/grab_ghost(force)
|
||||
var/mob/observer/dead/G = get_ghost(even_if_they_cant_reenter = force)
|
||||
. = G
|
||||
if(G)
|
||||
G.reenter_corpse()
|
||||
|
||||
//Initialisation procs
|
||||
/mob/living/proc/mind_initialize()
|
||||
if(mind)
|
||||
|
||||
21
code/datums/observation/power_change.dm
Normal file
21
code/datums/observation/power_change.dm
Normal file
@@ -0,0 +1,21 @@
|
||||
// Observer Pattern Implementation: Area Power Change
|
||||
// Registration type: /area
|
||||
//
|
||||
// Raised when: An /area has a power change (the APC powers up/down or some channels are enabled/disabled)
|
||||
//
|
||||
// Arguments that the called proc should expect:
|
||||
// /area: The area experiencing the power change
|
||||
|
||||
GLOBAL_DATUM_INIT(apc_event, /decl/observ/area_power_change, new)
|
||||
|
||||
/decl/observ/area_power_change
|
||||
name = "Area Power Change"
|
||||
expected_type = /area
|
||||
|
||||
/********************
|
||||
* Movement Handling *
|
||||
********************/
|
||||
|
||||
/area/power_change()
|
||||
. = ..()
|
||||
GLOB.apc_event.raise_event(src)
|
||||
@@ -83,7 +83,8 @@
|
||||
/obj/item/toy/plushie/borgplushie/medihound,
|
||||
/obj/item/toy/plushie/borgplushie/scrubpuppy,
|
||||
/obj/item/toy/plushie/foxbear,
|
||||
/obj/item/toy/plushie/nukeplushie)
|
||||
/obj/item/toy/plushie/nukeplushie,
|
||||
/obj/item/toy/plushie/otter)
|
||||
//VOREStation Add End
|
||||
name = "Plushies Crate"
|
||||
cost = 15
|
||||
|
||||
@@ -550,6 +550,7 @@
|
||||
/obj/item/clothing/under/rank/warden/corp,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt2, //VOREStation Add,
|
||||
/obj/item/clothing/head/helmet/warden,
|
||||
/obj/item/weapon/cartridge/security,
|
||||
/obj/item/device/radio/headset/headset_sec,
|
||||
@@ -577,6 +578,7 @@
|
||||
/obj/item/clothing/suit/storage/vest/hos,
|
||||
/obj/item/clothing/under/rank/head_of_security/corp,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat/jensen/alt, //VOREStation Add,
|
||||
/obj/item/clothing/head/helmet/dermal,
|
||||
/obj/item/weapon/cartridge/hos,
|
||||
/obj/item/device/radio/headset/heads/hos,
|
||||
|
||||
@@ -400,6 +400,7 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
if(has_gravity)
|
||||
thunk(M)
|
||||
M.update_floating( M.Check_Dense_Object() )
|
||||
M.update_gravity(has_gravity)
|
||||
|
||||
/area/proc/thunk(mob)
|
||||
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
C.handcuffed = null
|
||||
if(C.buckled && C.buckled.buckle_require_restraints)
|
||||
C.buckled.unbuckle_mob()
|
||||
C.update_inv_handcuffed()
|
||||
C.update_handcuffed()
|
||||
if (C.client)
|
||||
C.client.screen -= W
|
||||
W.forceMove(C.loc)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
H.handcuffed = null
|
||||
if(H.buckled && H.buckled.buckle_require_restraints)
|
||||
H.buckled.unbuckle_mob()
|
||||
H.update_inv_handcuffed()
|
||||
H.update_handcuffed()
|
||||
if (H.client)
|
||||
H.client.screen -= W
|
||||
W.forceMove(H.loc)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
for(var/mob/observer/dead/ghost in player_list)
|
||||
if(ghost.mind == H.mind)
|
||||
ghost.notify_revive("The Technomancer [user.real_name] is trying to revive you. \
|
||||
Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg')
|
||||
Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg', source = user)
|
||||
break
|
||||
|
||||
H.adjustBruteLoss(-40)
|
||||
|
||||
@@ -672,10 +672,10 @@
|
||||
src.visible_message("The machine states, 'YOU ARE UNDER ARREST, RAIDER!' and shoots handcuffs onto [usr]!", "You hear something say 'YOU ARE UNDER ARREST, RAIDER!' and a clinking sound")
|
||||
var/obj/item/weapon/handcuffs/C = new(src.loc)
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(istype(usr))
|
||||
if(istype(H))
|
||||
C.forceMove(H)
|
||||
H.handcuffed = C
|
||||
H.update_inv_handcuffed()
|
||||
H.update_handcuffed()
|
||||
else
|
||||
C.throw_at(usr,16,3,src)
|
||||
|
||||
|
||||
@@ -323,10 +323,9 @@
|
||||
if ((!subject.ckey) || (!subject.client))
|
||||
scantemp = "Error: Mental interface failure."
|
||||
if(subject.stat == DEAD && subject.mind && subject.mind.key) // If they're dead and not in their body, tell them to get in it.
|
||||
for(var/mob/observer/dead/ghost in player_list)
|
||||
if(ghost.ckey == ckey(subject.mind.key))
|
||||
ghost.notify_revive("Someone is trying to scan your body in the cloner. Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg')
|
||||
break
|
||||
var/mob/observer/dead/ghost = subject.get_ghost()
|
||||
if(ghost)
|
||||
ghost.notify_revive("Someone is trying to scan your body in the cloner. Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg', source = src)
|
||||
return
|
||||
if (!isnull(find_record(subject.ckey)))
|
||||
scantemp = "Subject already in database."
|
||||
|
||||
@@ -119,13 +119,11 @@
|
||||
return //VOREStation Edit: unable to open doors
|
||||
else
|
||||
bumpopen(M)
|
||||
// VOREStation Add - UAVs open public doors
|
||||
if(istype(AM, /obj/item/device/uav))
|
||||
if(check_access(null))
|
||||
open()
|
||||
else
|
||||
do_animate("deny")
|
||||
//VOREStation Add End
|
||||
|
||||
if(istype(AM, /mob/living/bot))
|
||||
var/mob/living/bot/bot = AM
|
||||
|
||||
@@ -1134,7 +1134,8 @@
|
||||
/obj/item/toy/plushie/borgplushie/medihound = 1,
|
||||
/obj/item/toy/plushie/borgplushie/scrubpuppy = 1,
|
||||
/obj/item/toy/plushie/foxbear = 1,
|
||||
/obj/item/toy/plushie/nukeplushie = 1)
|
||||
/obj/item/toy/plushie/nukeplushie = 1,
|
||||
/obj/item/toy/plushie/otter = 1)
|
||||
//VOREStation Add End
|
||||
premium = list(/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne = 1,
|
||||
/obj/item/weapon/storage/trinketbox = 2)
|
||||
@@ -1173,7 +1174,8 @@
|
||||
/obj/item/toy/plushie/borgplushie/medihound = 50,
|
||||
/obj/item/toy/plushie/borgplushie/scrubpuppy = 50,
|
||||
/obj/item/toy/plushie/foxbear = 50,
|
||||
/obj/item/toy/plushie/nukeplushie = 50)
|
||||
/obj/item/toy/plushie/nukeplushie = 50,
|
||||
/obj/item/toy/plushie/otter = 50)
|
||||
//VOREStation Add End
|
||||
|
||||
/obj/machinery/vending/fishing
|
||||
|
||||
@@ -629,6 +629,7 @@
|
||||
////////////////////////////////////////
|
||||
|
||||
/obj/mecha/take_damage(amount, type="brute")
|
||||
update_damage_alerts()
|
||||
if(amount)
|
||||
var/damage = absorbDamage(amount,type)
|
||||
health -= damage
|
||||
@@ -969,6 +970,7 @@
|
||||
if(src.health<initial(src.health))
|
||||
to_chat(user, "<span class='notice'>You repair some damage to [src.name].</span>")
|
||||
src.health += min(10, initial(src.health)-src.health)
|
||||
update_damage_alerts()
|
||||
else
|
||||
to_chat(user, "The [src.name] is at full integrity")
|
||||
return
|
||||
@@ -1319,6 +1321,8 @@
|
||||
src.verbs += /obj/mecha/verb/eject
|
||||
src.log_append_to_last("[H] moved in as pilot.")
|
||||
src.icon_state = src.reset_icon()
|
||||
update_cell_alerts()
|
||||
update_damage_alerts()
|
||||
set_dir(dir_in)
|
||||
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
|
||||
if(occupant.client && cloaked_selfimage)
|
||||
@@ -1401,6 +1405,8 @@
|
||||
occupant.loc = mmi
|
||||
mmi.mecha = null
|
||||
occupant.canmove = 0
|
||||
occupant.clear_alert("charge")
|
||||
occupant.clear_alert("mech damage")
|
||||
occupant = null
|
||||
icon_state = src.reset_icon()+"-open"
|
||||
set_dir(dir_in)
|
||||
@@ -1975,12 +1981,14 @@
|
||||
return call((proc_res["dynusepower"]||src), "dynusepower")(amount)
|
||||
|
||||
/obj/mecha/proc/dynusepower(amount)
|
||||
update_cell_alerts()
|
||||
if(get_charge())
|
||||
cell.use(amount)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/mecha/proc/give_power(amount)
|
||||
update_cell_alerts()
|
||||
if(!isnull(get_charge()))
|
||||
cell.give(amount)
|
||||
return 1
|
||||
@@ -2158,3 +2166,31 @@
|
||||
//src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/mecha/proc/update_cell_alerts()
|
||||
if(occupant && cell)
|
||||
var/cellcharge = cell.charge/cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
occupant.clear_alert("charge")
|
||||
if(0.5 to 0.75)
|
||||
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 1)
|
||||
if(0.25 to 0.5)
|
||||
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 2)
|
||||
if(0.01 to 0.25)
|
||||
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 3)
|
||||
else
|
||||
occupant.throw_alert("charge", /obj/screen/alert/emptycell)
|
||||
|
||||
/obj/mecha/proc/update_damage_alerts()
|
||||
if(occupant)
|
||||
var/integrity = health/initial(health)*100
|
||||
switch(integrity)
|
||||
if(30 to 45)
|
||||
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 1)
|
||||
if(15 to 35)
|
||||
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 2)
|
||||
if(-INFINITY to 15)
|
||||
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 3)
|
||||
else
|
||||
occupant.clear_alert("mech damage")
|
||||
@@ -73,6 +73,7 @@
|
||||
//VOREStation Add End
|
||||
|
||||
post_buckle_mob(M)
|
||||
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/unbuckle_mob(mob/living/buckled_mob, force = FALSE)
|
||||
@@ -88,6 +89,7 @@
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob.update_floating( buckled_mob.Check_Dense_Object() )
|
||||
buckled_mob.clear_alert("buckled")
|
||||
// buckled_mob = null
|
||||
buckled_mobs -= buckled_mob
|
||||
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
|
||||
var/drop_sound = 'sound/items/drop/device.ogg' // drop sound - this is the default
|
||||
|
||||
var/tip_timer // reference to timer id for a tooltip we might open soon
|
||||
|
||||
/obj/item/New()
|
||||
..()
|
||||
if(embed_chance < 0)
|
||||
@@ -882,4 +884,18 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/is_welder()
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/item/MouseEntered(location,control,params)
|
||||
. = ..()
|
||||
if(usr.is_preference_enabled(/datum/client_preference/inv_tooltips) && ((src in usr) || isstorage(loc))) // If in inventory or in storage we're looking at
|
||||
var/user = usr
|
||||
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), 5, TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/MouseExited()
|
||||
. = ..()
|
||||
deltimer(tip_timer)
|
||||
closeToolTip(usr)
|
||||
|
||||
/obj/item/proc/openTip(location, control, params, user)
|
||||
openToolTip(user, src, params, title = name, content = desc)
|
||||
|
||||
@@ -386,11 +386,9 @@
|
||||
|
||||
// This proc is used so that we can return out of the revive process while ensuring that busy and update_icon() are handled
|
||||
/obj/item/weapon/shockpaddles/proc/do_revive(mob/living/carbon/human/H, mob/user)
|
||||
if(!H.client && !H.teleop)
|
||||
for(var/mob/observer/dead/ghost in player_list)
|
||||
if(ghost.mind == H.mind)
|
||||
ghost.notify_revive("Someone is trying to resuscitate you. Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg')
|
||||
break
|
||||
var/mob/observer/dead/ghost = H.get_ghost()
|
||||
if(ghost)
|
||||
ghost.notify_revive("Someone is trying to resuscitate you. Re-enter your body if you want to be revived!", 'sound/effects/genetics.ogg', source = src)
|
||||
|
||||
//beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
|
||||
user.visible_message("<span class='warning'>\The [user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
|
||||
|
||||
@@ -20,23 +20,19 @@
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/New()
|
||||
if(power_use)
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
brightness_levels = list("low" = 0.25, "medium" = 0.5, "high" = 1)
|
||||
power_usage = brightness_levels[brightness_level]
|
||||
|
||||
if(power_use && cell_type)
|
||||
cell = new cell_type(src)
|
||||
brightness_levels = list("low" = 0.25, "medium" = 0.5, "high" = 1)
|
||||
power_usage = brightness_levels[brightness_level]
|
||||
else
|
||||
verbs -= /obj/item/device/flashlight/verb/toggle
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/Destroy()
|
||||
if(power_use)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel_null(cell)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/flashlight/get_cell()
|
||||
@@ -57,18 +53,17 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/process()
|
||||
if(on)
|
||||
if(cell)
|
||||
if(brightness_level && power_usage)
|
||||
if(power_usage < cell.charge)
|
||||
cell.charge -= power_usage
|
||||
else
|
||||
cell.charge = 0
|
||||
visible_message("<span class='warning'>\The [src] flickers before going dull.</span>")
|
||||
set_light(0)
|
||||
playsound(src.loc, 'sound/effects/sparks3.ogg', 10, 1, -3) //Small cue that your light went dull in your pocket.
|
||||
on = 0
|
||||
update_icon()
|
||||
if(!on || !cell)
|
||||
return PROCESS_KILL
|
||||
|
||||
if(brightness_level && power_usage)
|
||||
if(cell.use(power_usage) != power_usage) // we weren't able to use our full power_usage amount!
|
||||
visible_message("<span class='warning'>\The [src] flickers before going dull.</span>")
|
||||
set_light(0)
|
||||
playsound(src.loc, 'sound/effects/sparks3.ogg', 10, 1, -3) //Small cue that your light went dull in your pocket.
|
||||
on = 0
|
||||
update_icon()
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/item/device/flashlight/update_icon()
|
||||
if(on)
|
||||
@@ -110,6 +105,10 @@
|
||||
to_chat(user, "You flick the switch on [src], but nothing happens.")
|
||||
return 0
|
||||
on = !on
|
||||
if(on && power_use)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(power_use)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
playsound(src.loc, 'sound/weapons/empty.ogg', 15, 1, -3)
|
||||
update_icon()
|
||||
user.update_action_buttons()
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
var/datum/looping_sound/geiger/soundloop
|
||||
|
||||
/obj/item/device/geiger/Initialize()
|
||||
START_PROCESSING(SSobj, src)
|
||||
soundloop = new(list(src), FALSE)
|
||||
return ..()
|
||||
|
||||
@@ -60,6 +59,10 @@
|
||||
|
||||
/obj/item/device/geiger/attack_self(var/mob/user)
|
||||
scanning = !scanning
|
||||
if(scanning)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_sound()
|
||||
to_chat(user, "<span class='notice'>[bicon(src)] You switch [scanning ? "on" : "off"] \the [src].</span>")
|
||||
|
||||
@@ -11,9 +11,20 @@
|
||||
flags = NOBLOODY
|
||||
var/circuit = /obj/item/weapon/circuitboard/intercom
|
||||
var/number = 0
|
||||
var/last_tick //used to delay the powercheck
|
||||
var/wiresexposed = 0
|
||||
|
||||
/obj/item/device/radio/intercom/Initialize()
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
GLOB.apc_event.register(A, src, /obj/update_icon)
|
||||
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
GLOB.apc_event.unregister(A, src, /obj/update_icon)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/intercom/custom
|
||||
name = "station intercom (Custom)"
|
||||
broadcasting = 0
|
||||
@@ -66,7 +77,6 @@
|
||||
|
||||
/obj/item/device/radio/intercom/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
circuit = new circuit(src)
|
||||
|
||||
/obj/item/device/radio/intercom/department/medbay/New()
|
||||
@@ -109,10 +119,6 @@
|
||||
..()
|
||||
internal_channels[num2text(RAID_FREQ)] = list(access_syndicate)
|
||||
|
||||
/obj/item/device/radio/intercom/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
spawn (0)
|
||||
@@ -129,15 +135,8 @@
|
||||
wiresexposed = !wiresexposed
|
||||
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(wiresexposed)
|
||||
if(!on)
|
||||
icon_state = "intercom-p_open"
|
||||
else
|
||||
icon_state = "intercom_open"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
return
|
||||
if(wiresexposed && W.is_wirecutter())
|
||||
update_icon()
|
||||
else if(wiresexposed && W.is_wirecutter())
|
||||
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||
@@ -155,7 +154,6 @@
|
||||
qdel(src)
|
||||
else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if (!on)
|
||||
@@ -172,29 +170,21 @@
|
||||
|
||||
return canhear_range
|
||||
|
||||
/obj/item/device/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
/obj/item/device/radio/intercom/update_icon()
|
||||
var/area/A = get_area(src)
|
||||
on = A?.powered(EQUIP)
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
if(!on)
|
||||
if(wiresexposed)
|
||||
icon_state = "intercom-p_open"
|
||||
else
|
||||
var/area/A = get_area(src)
|
||||
if(!A)
|
||||
on = 0
|
||||
else
|
||||
on = A.powered(EQUIP) // set "on" to the power status
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
if(wiresexposed)
|
||||
icon_state = "intercom_open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
if(!on)
|
||||
if(wiresexposed)
|
||||
icon_state = "intercom-p_open"
|
||||
else
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
if(wiresexposed)
|
||||
icon_state = "intercom_open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
//VOREStation Add Start
|
||||
/obj/item/device/radio/intercom/AICtrlClick(var/mob/user)
|
||||
ToggleBroadcast()
|
||||
|
||||
@@ -28,14 +28,17 @@
|
||||
/obj/item/device/suit_cooling_unit/ui_action_click()
|
||||
toggle(usr)
|
||||
|
||||
/obj/item/device/suit_cooling_unit/New()
|
||||
START_PROCESSING(SSobj, src)
|
||||
cell = new/obj/item/weapon/cell/high() //comes not with the crappy default power cell - because this is dedicated EVA equipment
|
||||
cell.loc = src
|
||||
/obj/item/device/suit_cooling_unit/Initialize()
|
||||
. = ..()
|
||||
cell = new/obj/item/weapon/cell/high(src) //comes not with the crappy default power cell - because this is dedicated EVA equipment
|
||||
|
||||
/obj/item/device/suit_cooling_unit/Destroy()
|
||||
qdel_null(cell)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/suit_cooling_unit/process()
|
||||
if (!on || !cell)
|
||||
return
|
||||
return PROCESS_KILL
|
||||
|
||||
if (!ismob(loc))
|
||||
return
|
||||
@@ -106,11 +109,13 @@
|
||||
return
|
||||
|
||||
on = 1
|
||||
START_PROCESSING(SSobj, src)
|
||||
updateicon()
|
||||
|
||||
/obj/item/device/suit_cooling_unit/proc/turn_off(var/failed)
|
||||
if(failed) visible_message("\The [src] clicks and whines as it powers down.")
|
||||
on = 0
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
updateicon()
|
||||
|
||||
/obj/item/device/suit_cooling_unit/attack_self(var/mob/user)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "nanopaste"
|
||||
singular_name = "nanite swarm"
|
||||
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
|
||||
icon = 'icons/obj/stacks.dmi'
|
||||
icon = 'icons/obj/stacks_vr.dmi' //VOREStation Edit
|
||||
icon_state = "nanopaste"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
amount = 10
|
||||
|
||||
@@ -54,3 +54,9 @@
|
||||
icon = 'icons/obj/toy_vr.dmi'
|
||||
icon_state = "plushie_nuke"
|
||||
attack_verb = list("shot", "nuked", "detonated")
|
||||
|
||||
/obj/item/toy/plushie/otter
|
||||
name = "otter plush"
|
||||
desc = "A perfectly sized snuggable river weasel! Keep away from Clams."
|
||||
icon = 'icons/obj/toy_vr.dmi'
|
||||
icon_state = "plushie_otter"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/obj/item/device/uav
|
||||
name = "recon skimmer"
|
||||
desc = "A semi-portable reconisance drone that folds into a backpack-sized carrying case."
|
||||
desc = "A semi-portable reconnaissance drone that folds into a backpack-sized carrying case."
|
||||
icon = 'icons/obj/uav.dmi'
|
||||
icon_state = "uav"
|
||||
|
||||
|
||||
@@ -90,6 +90,22 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// Mounted one is more complex
|
||||
/obj/item/weapon/rcd/electric/mounted/rig/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
world.log << "One"
|
||||
return FALSE
|
||||
if(user.incapacitated())
|
||||
world.log << "Two"
|
||||
return FALSE
|
||||
|
||||
var/obj/item/rig_module/device/D = loc
|
||||
if(!istype(D) || !D?.holder?.wearer == user)
|
||||
world.log << "Three"
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/rcd/attack_self(mob/living/user)
|
||||
..()
|
||||
var/list/choices = list(
|
||||
@@ -118,7 +134,7 @@
|
||||
"Change Window Type" = image(icon = 'icons/mob/radial.dmi', icon_state = "windowtype")
|
||||
)
|
||||
*/
|
||||
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
var/choice = show_radial_menu(user, user, choices, custom_check = CALLBACK(src, .proc/check_menu, user), tooltips = TRUE)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
switch(choice)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
user.drop_from_inventory(cuffs)
|
||||
cuffs.loc = target
|
||||
target.handcuffed = cuffs
|
||||
target.update_inv_handcuffed()
|
||||
target.update_handcuffed()
|
||||
target.drop_r_hand()
|
||||
target.drop_l_hand()
|
||||
target.stop_pulling()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
source.handcuffed = null
|
||||
if(source.buckled && source.buckled.buckle_require_restraints)
|
||||
source.buckled.unbuckle_mob()
|
||||
source.update_inv_handcuffed()
|
||||
source.update_handcuffed()
|
||||
if (source.client)
|
||||
source.client.screen -= W
|
||||
if (W)
|
||||
|
||||
@@ -84,9 +84,8 @@
|
||||
item_state_slots = list(slot_r_hand_str = "jetpack-void", slot_l_hand_str = "jetpack-void")
|
||||
|
||||
/obj/item/weapon/tank/jetpack/void/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen
|
||||
name = "jetpack (oxygen)"
|
||||
@@ -95,9 +94,8 @@
|
||||
item_state_slots = list(slot_r_hand_str = "jetpack", slot_l_hand_str = "jetpack")
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
name = "jetpack (carbon dioxide)"
|
||||
@@ -107,9 +105,8 @@
|
||||
item_state_slots = list(slot_r_hand_str = "jetpack-black", slot_l_hand_str = "jetpack-black")
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig
|
||||
name = "jetpack"
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
|
||||
/obj/item/weapon/tank/oxygen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/oxygen/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -43,14 +42,12 @@
|
||||
icon_state = "anesthetic"
|
||||
|
||||
/obj/item/weapon/tank/anesthetic/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
air_contents.gas["oxygen"] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
air_contents.gas["sleeping_agent"] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
air_contents.update_values()
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
* Air
|
||||
*/
|
||||
@@ -66,12 +63,9 @@
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/obj/item/weapon/tank/air/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
src.air_contents.adjust_multi("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, "nitrogen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
* Phoron
|
||||
*/
|
||||
@@ -83,10 +77,8 @@
|
||||
slot_flags = null //they have no straps!
|
||||
|
||||
/obj/item/weapon/tank/phoron/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas("phoron", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -109,10 +101,8 @@
|
||||
slot_flags = SLOT_BACK //these ones have straps!
|
||||
|
||||
/obj/item/weapon/tank/vox/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
air_contents.adjust_gas("phoron", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/phoron/pressurized
|
||||
name = "fuel can"
|
||||
@@ -120,12 +110,9 @@
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/weapon/tank/phoron/pressurized/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
adjust_scale(0.8)
|
||||
|
||||
air_contents.adjust_gas("phoron", (7*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
@@ -149,9 +136,8 @@
|
||||
gauge_icon = "indicator_emergency"
|
||||
|
||||
/obj/item/weapon/tank/emergency/oxygen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas("oxygen", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/emergency/oxygen/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -178,9 +164,8 @@
|
||||
volume = 10
|
||||
|
||||
/obj/item/weapon/tank/stasis/oxygen/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas("oxygen", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/emergency/nitrogen
|
||||
name = "emergency nitrogen tank"
|
||||
@@ -205,7 +190,7 @@
|
||||
gauge_icon = "indicator_emergency"
|
||||
|
||||
/obj/item/weapon/tank/emergency/phoron/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas("phoron", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
/obj/item/weapon/tank/emergency/phoron/double
|
||||
@@ -224,10 +209,8 @@
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
|
||||
/obj/item/weapon/tank/nitrogen/Initialize()
|
||||
..()
|
||||
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/nitrogen/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -243,6 +226,5 @@
|
||||
volume = 10
|
||||
|
||||
/obj/item/weapon/tank/stasis/nitro_cryo/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
src.air_contents.adjust_gas_temp("nitrogen", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*TN60C), TN60C)
|
||||
return
|
||||
|
||||
@@ -59,15 +59,13 @@ var/list/global/tank_gauge_cache = list()
|
||||
|
||||
|
||||
/obj/item/weapon/tank/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
src.init_proxy()
|
||||
src.air_contents = new /datum/gas_mixture()
|
||||
src.air_contents.volume = volume //liters
|
||||
src.air_contents.temperature = T20C
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_gauge()
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/Destroy()
|
||||
QDEL_NULL(air_contents)
|
||||
@@ -81,6 +79,13 @@ var/list/global/tank_gauge_cache = list()
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/tank/equipped() // Note that even grabbing into a hand calls this, so it should be fine as a 'has a player touched this'
|
||||
. = ..()
|
||||
// An attempt at optimization. There are MANY tanks during rounds that will never get touched.
|
||||
// Don't see why any of those would explode spontaneously. So only tanks that players touch get processed.
|
||||
// This could be optimized more, but it's a start!
|
||||
START_PROCESSING(SSobj, src) // This has a built in safety to avoid multi-processing
|
||||
|
||||
/obj/item/weapon/tank/examine(mob/user)
|
||||
. = ..()
|
||||
if(loc == user)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
C.handcuffed = null
|
||||
if(C.buckled && C.buckled.buckle_require_restraints)
|
||||
C.buckled.unbuckle_mob()
|
||||
C.update_inv_handcuffed()
|
||||
C.update_handcuffed()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -199,4 +199,7 @@
|
||||
|
||||
// Test for if stepping on a tile containing this obj is safe to do, used for things like landmines and cliffs.
|
||||
/obj/proc/is_safe_to_step(mob/living/L)
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/proc/container_resist(var/mob/living)
|
||||
return
|
||||
|
||||
@@ -479,7 +479,8 @@
|
||||
/obj/item/toy/plushie/borgplushie/medihound,
|
||||
/obj/item/toy/plushie/borgplushie/scrubpuppy,
|
||||
/obj/item/toy/plushie/foxbear,
|
||||
/obj/item/toy/plushie/nukeplushie)
|
||||
/obj/item/toy/plushie/nukeplushie,
|
||||
/obj/item/toy/plushie/otter)
|
||||
//VOREStation Add End
|
||||
|
||||
/obj/random/plushielarge
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/catwalk/attackby(obj/item/C as obj, mob/user as mob)
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.isOn() && WT.remove_fuel(0, user))
|
||||
deconstruct(user)
|
||||
return
|
||||
if(C.is_crowbar() && plated_tile)
|
||||
hatch_open = !hatch_open
|
||||
if(hatch_open)
|
||||
|
||||
@@ -403,8 +403,7 @@
|
||||
return 0 //closed but not sealed...
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/mob_breakout(var/mob/living/escapee)
|
||||
|
||||
/obj/structure/closet/container_resist(var/mob/living/escapee)
|
||||
if(breakout || !req_breakout())
|
||||
return
|
||||
|
||||
@@ -415,30 +414,31 @@
|
||||
|
||||
visible_message("<span class='danger'>\The [src] begins to shake violently!</span>")
|
||||
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.incapacitated() || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!req_breakout())
|
||||
breakout = 0
|
||||
return
|
||||
spawn(0)
|
||||
breakout = 1 //can't think of a better way to do this right now.
|
||||
for(var/i in 1 to (6*breakout_time * 2)) //minutes * 6 * 5seconds * 2
|
||||
if(!do_after(escapee, 50)) //5 seconds
|
||||
breakout = 0
|
||||
return
|
||||
if(!escapee || escapee.incapacitated() || escapee.loc != src)
|
||||
breakout = 0
|
||||
return //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!req_breakout())
|
||||
breakout = 0
|
||||
return
|
||||
|
||||
playsound(src.loc, breakout_sound, 100, 1)
|
||||
animate_shake()
|
||||
add_fingerprint(escapee)
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
to_chat(escapee, "<span class='warning'>You successfully break out!</span>")
|
||||
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, breakout_sound, 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
add_fingerprint(escapee)
|
||||
|
||||
//Well then break it!
|
||||
breakout = 0
|
||||
to_chat(escapee, "<span class='warning'>You successfully break out!</span>")
|
||||
visible_message("<span class='danger'>\The [escapee] successfully broke out of \the [src]!</span>")
|
||||
playsound(src.loc, breakout_sound, 100, 1)
|
||||
break_open()
|
||||
animate_shake()
|
||||
|
||||
/obj/structure/closet/proc/break_open()
|
||||
sealed = 0
|
||||
|
||||
@@ -150,6 +150,7 @@
|
||||
/obj/item/clothing/under/rank/warden/corp,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt2, //VOREStation Add,
|
||||
/obj/item/clothing/head/helmet/dermal,
|
||||
/obj/item/clothing/head/helmet/warden,
|
||||
/obj/item/clothing/head/helmet/warden/hat,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
/obj/item/clothing/suit/storage/vest/hos,
|
||||
/obj/item/clothing/under/rank/head_of_security/jensen,
|
||||
/obj/item/clothing/under/rank/head_of_security/corp,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat/jensen/alt,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat/jensen,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat,
|
||||
/obj/item/clothing/head/helmet/dermal,
|
||||
@@ -122,6 +123,7 @@
|
||||
/obj/item/clothing/head/helmet/HoS,
|
||||
/obj/item/clothing/suit/storage/vest/hos,
|
||||
/obj/item/clothing/under/rank/head_of_security/jensen,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat/jensen/alt,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat/jensen,
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat,
|
||||
/obj/item/clothing/head/helmet/dermal,
|
||||
@@ -176,6 +178,7 @@
|
||||
/obj/item/clothing/suit/storage/vest/warden,
|
||||
/obj/item/clothing/under/nanotrasen/security/warden,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt,
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt2,
|
||||
/obj/item/clothing/head/helmet/warden,
|
||||
/obj/item/weapon/cartridge/security,
|
||||
/obj/item/device/radio/headset/headset_sec,
|
||||
|
||||
@@ -234,6 +234,14 @@
|
||||
else
|
||||
name = "[sofa_material] [initial(name)]"
|
||||
|
||||
/obj/structure/bed/chair/update_layer()
|
||||
// Corner east/west should be on top of mobs, any other state's north should be.
|
||||
if((icon_state == "sofacorner" && ((dir & EAST) || (dir & WEST))) || (icon_state != "sofacorner" && (dir & NORTH)))
|
||||
plane = MOB_PLANE
|
||||
layer = MOB_LAYER + 0.1
|
||||
else
|
||||
reset_plane_and_layer()
|
||||
|
||||
/obj/structure/bed/chair/sofa/left
|
||||
icon_state = "sofaend_left"
|
||||
base_icon = "sofaend_left"
|
||||
|
||||
@@ -70,41 +70,6 @@
|
||||
var/message = get_staffwho_message(holder)
|
||||
to_chat(src, message)
|
||||
|
||||
/proc/get_staffwho_numbers()
|
||||
var/admin_count = 0
|
||||
var/mod_count = 0
|
||||
var/dev_count = 0
|
||||
var/other_count = 0
|
||||
var/list/keys = list()
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
var/keymsg = "[C.key]"
|
||||
if(C.is_afk())
|
||||
keymsg += " *(AFK)*"
|
||||
else if(C.holder.fakekey)
|
||||
keymsg += " *(Stealth)*"
|
||||
else if(isobserver(C.mob))
|
||||
keymsg += " *(Ghost)*"
|
||||
else if(isnewplayer(C.mob))
|
||||
keymsg += " *(Lobby)*"
|
||||
else
|
||||
keymsg += " *(Ingame)*"
|
||||
keys += keymsg
|
||||
|
||||
if(R_ADMIN & C.holder.rights && R_BAN & C.holder.rights) // R_ADMIN and R_BAN apparently an admin makes
|
||||
admin_count++
|
||||
|
||||
else if(R_ADMIN & C.holder.rights && !(R_SERVER & C.holder.rights)) // R_ADMIN but not R_SERVER makes a moderator
|
||||
mod_count++
|
||||
|
||||
else if(R_SERVER & C.holder.rights) // R_SERVER makes a dev
|
||||
dev_count++
|
||||
|
||||
else // No R_ADMIN&&R_BAN, R_ADMIN!R_BAN, R_SERVER, must be a GM or something
|
||||
other_count++
|
||||
|
||||
return list("Admins" = admin_count, "Mods" = mod_count, "Devs" = dev_count, "Other" = other_count, "keys" = keys)
|
||||
|
||||
// VOREStation Edit - This whole proc has various vorestation edits throughout. Practically every other line.
|
||||
/proc/get_staffwho_message(datum/admins/holder)
|
||||
var/msg = ""
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.hud_used = new /datum/hud(H)
|
||||
H.instantiate_hud(H.hud_used)
|
||||
H.create_mob_hud(H.hud_used)
|
||||
return ..()
|
||||
|
||||
/mob/living/Destroy()
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
// For setting the stance WITHOUT processing it
|
||||
/datum/ai_holder/proc/set_stance(var/new_stance)
|
||||
if(holder.key && !autopilot)
|
||||
if(holder?.key && !autopilot)
|
||||
return
|
||||
if(stance == new_stance)
|
||||
ai_log("set_stance() : Ignoring change stance to same stance request.", AI_LOG_INFO)
|
||||
|
||||
@@ -165,6 +165,12 @@ var/list/_client_preferences_by_type
|
||||
enabled_description = "Show"
|
||||
disabled_description = "Hide"
|
||||
|
||||
/datum/client_preference/inv_tooltips
|
||||
description ="Inventory tooltips"
|
||||
key = "INV_TOOLTIPS"
|
||||
enabled_description = "Show"
|
||||
disabled_description = "Hide"
|
||||
|
||||
/datum/client_preference/attack_icons
|
||||
description ="Attack icons"
|
||||
key = "ATTACK_ICONS"
|
||||
|
||||
@@ -295,6 +295,19 @@
|
||||
|
||||
feedback_add_details("admin_verb","TMobTooltips") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_inv_tooltips()
|
||||
set name = "Toggle Item Tooltips"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying name/desc over items when moused over (only applies in inventory)."
|
||||
|
||||
var/pref_path = /datum/client_preference/inv_tooltips
|
||||
toggle_preference(pref_path)
|
||||
SScharacter_setup.queue_preferences_save(prefs)
|
||||
|
||||
to_chat(src,"You will now [(is_preference_enabled(/datum/client_preference/inv_tooltips)) ? "see" : "not see"] inventory tooltips.")
|
||||
|
||||
feedback_add_details("admin_verb","TInvTooltips") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_hear_instruments()
|
||||
set name = "Toggle Hear/Ignore Instruments"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/item/clothing/gloves/mob_can_equip(mob/user, slot)
|
||||
/obj/item/clothing/gloves/mob_can_equip(mob/user, slot, disable_warning = 0)
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(slot && slot == slot_gloves)
|
||||
|
||||
@@ -55,6 +55,34 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/container_resist(mob/living/micro)
|
||||
var/mob/living/carbon/human/macro = loc
|
||||
if(!istype(macro))
|
||||
to_chat(micro, "<span class='notice'>You start to climb out of [src]!</span>")
|
||||
if(do_after(micro, 50, src))
|
||||
to_chat(micro, "<span class='notice'>You climb out of [src]!</span>")
|
||||
micro.forceMove(loc)
|
||||
return
|
||||
|
||||
var/escape_message_micro = "You start to climb out of [src]!"
|
||||
var/escape_message_macro = "Something is trying to climb out of your [src]!"
|
||||
var/escape_time = 60
|
||||
|
||||
if(macro.shoes == src)
|
||||
escape_message_micro = "You start to climb around the larger creature's feet and ankles!"
|
||||
escape_time = 100
|
||||
|
||||
to_chat(micro, "<span class='notice'>[escape_message_micro]</span>")
|
||||
to_chat(macro, "<span class='danger'>[escape_message_macro]</span>")
|
||||
if(!do_after(micro, escape_time, macro))
|
||||
to_chat(micro, "<span class='danger'>You're pinned underfoot!</span>")
|
||||
to_chat(macro, "<span class='danger'>You pin the escapee underfoot!</span>")
|
||||
return
|
||||
|
||||
to_chat(micro, "<span class='notice'>You manage to escape [src]!</span>")
|
||||
to_chat(macro, "<span class='danger'>Someone has climbed out of your [src]!</span>")
|
||||
micro.forceMove(macro.loc)
|
||||
|
||||
/obj/item/clothing/gloves
|
||||
sprite_sheets = list(
|
||||
SPECIES_TESHARI = 'icons/mob/species/seromi/gloves.dmi',
|
||||
|
||||
@@ -125,8 +125,6 @@
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
var/obj/item/rig_module/module = new path(src)
|
||||
@@ -184,6 +182,22 @@
|
||||
spark_system = null
|
||||
return ..()
|
||||
|
||||
// We only care about processing when we're on a mob
|
||||
/obj/item/weapon/rig/Moved(old_loc, direction, forced)
|
||||
if(ismob(loc))
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
// If we've lost any parts, grab them back.
|
||||
var/mob/living/M
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
if(piece.loc != src && !(wearer && piece.loc == wearer))
|
||||
if(istype(piece.loc, /mob/living))
|
||||
M = piece.loc
|
||||
M.unEquip(piece)
|
||||
piece.forceMove(src)
|
||||
|
||||
/obj/item/weapon/rig/get_worn_icon_file(var/body_type,var/slot_name,var/default_icon,var/inhands)
|
||||
if(!inhands && (slot_name == slot_back_str || slot_name == slot_belt_str))
|
||||
if(icon_override)
|
||||
@@ -466,14 +480,13 @@
|
||||
turn_cooling_off(H, 1)
|
||||
|
||||
/obj/item/weapon/rig/process()
|
||||
// If we've lost any parts, grab them back.
|
||||
var/mob/living/M
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
if(piece.loc != src && !(wearer && piece.loc == wearer))
|
||||
if(istype(piece.loc, /mob/living))
|
||||
M = piece.loc
|
||||
M.unEquip(piece)
|
||||
piece.forceMove(src)
|
||||
// Not on a mob...?
|
||||
if(!ismob(loc))
|
||||
if(wearer?.wearing_rig == src)
|
||||
wearer.wearing_rig = null
|
||||
wearer = null
|
||||
return PROCESS_KILL
|
||||
|
||||
// Run through cooling
|
||||
coolingProcess()
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/item/clothing/suit/armor/combat/USDF
|
||||
name = "marine body armor"
|
||||
desc = "When I joined the Corps, we didn't have any fancy-schmanzy armor. We had sticks! Two sticks, and a rock for the whole platoon<EFBFBD>and we had to <i>share</i> the rock!"
|
||||
desc = "When I joined the Corps, we didn't have any fancy-schmanzy armor. We had sticks! Two sticks, and a rock for the whole platoon-and we had to <i>share</i> the rock!"
|
||||
icon_state = "unsc_armor"
|
||||
icon = 'icons/obj/clothing/suits_vr.dmi'
|
||||
icon_override = 'icons/mob/suit_vr.dmi'
|
||||
@@ -76,4 +76,12 @@
|
||||
/obj/item/clothing/suit/armor/combat/imperial/centurion
|
||||
name = "imperial centurion armor"
|
||||
desc = "Not all heroes wear capes, but it'd be cooler if they did."
|
||||
icon_state = "ge_armorcent"
|
||||
icon_state = "ge_armorcent"
|
||||
|
||||
/obj/item/clothing/suit/storage/vest/wardencoat/alt2
|
||||
icon = 'icons/obj/clothing/suits_vr.dmi'
|
||||
icon_override = 'icons/mob/suit_vr.dmi'
|
||||
|
||||
/obj/item/clothing/suit/storage/vest/hoscoat/jensen/alt
|
||||
icon = 'icons/obj/clothing/suits_vr.dmi'
|
||||
icon_override = 'icons/mob/suit_vr.dmi'
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
// Seed details/line data.
|
||||
var/datum/seed/seed = null // The currently planted seed
|
||||
|
||||
var/image/ov_lowhealth
|
||||
var/image/ov_lowwater
|
||||
var/image/ov_lownutri
|
||||
var/image/ov_harvest
|
||||
var/image/ov_frozen
|
||||
var/image/ov_alert3
|
||||
|
||||
// Reagent information for process(), consider moving this to a controller along
|
||||
// with cycle information under 'mechanical concerns' at some point.
|
||||
@@ -170,6 +176,8 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/Initialize()
|
||||
. = ..()
|
||||
if(!ov_lowhealth)
|
||||
setup_overlays()
|
||||
temp_chem_holder = new()
|
||||
temp_chem_holder.create_reagents(10)
|
||||
create_reagents(200)
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/setup_overlays()
|
||||
ov_lowhealth = image(icon = icon, icon_state = "over_lowhealth3")
|
||||
ov_lowhealth.plane = PLANE_LIGHTING_ABOVE
|
||||
ov_lowwater = image(icon = icon, icon_state = "over_lowwater3")
|
||||
ov_lowwater.plane = PLANE_LIGHTING_ABOVE
|
||||
ov_lownutri = image(icon = icon, icon_state = "over_lownutri3")
|
||||
ov_lownutri.plane = PLANE_LIGHTING_ABOVE
|
||||
ov_harvest = image(icon = icon, icon_state = "over_alert3")
|
||||
ov_harvest.plane = PLANE_LIGHTING_ABOVE
|
||||
ov_frozen = image(icon = icon, icon_state = "over_harvest3")
|
||||
ov_frozen.plane = PLANE_LIGHTING_ABOVE
|
||||
ov_alert3 = image(icon = icon, icon_state = "over_frozen3")
|
||||
ov_alert3.plane = PLANE_LIGHTING_ABOVE
|
||||
|
||||
//Refreshes the icon and sets the luminosity
|
||||
/obj/machinery/portable_atmospherics/hydroponics/update_icon()
|
||||
// Update name.
|
||||
@@ -12,12 +26,12 @@
|
||||
if(labelled)
|
||||
name += " ([labelled])"
|
||||
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
// Updates the plant overlay.
|
||||
if(!isnull(seed))
|
||||
|
||||
if(mechanical && health <= (seed.get_trait(TRAIT_ENDURANCE) / 2))
|
||||
overlays += "over_lowhealth3"
|
||||
add_overlay(ov_lowhealth)
|
||||
|
||||
if(dead)
|
||||
var/ikey = "[seed.get_trait(TRAIT_PLANT_ICON)]-dead"
|
||||
@@ -25,7 +39,7 @@
|
||||
if(!dead_overlay)
|
||||
dead_overlay = image('icons/obj/hydroponics_growing.dmi', "[ikey]")
|
||||
dead_overlay.color = DEAD_PLANT_COLOUR
|
||||
overlays |= dead_overlay
|
||||
add_overlay(dead_overlay)
|
||||
else
|
||||
if(!seed.growth_stages)
|
||||
seed.update_growth_stages()
|
||||
@@ -49,7 +63,7 @@
|
||||
plant_overlay = image('icons/obj/hydroponics_growing.dmi', "[ikey]")
|
||||
plant_overlay.color = seed.get_trait(TRAIT_PLANT_COLOUR)
|
||||
plant_controller.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"] = plant_overlay
|
||||
overlays |= plant_overlay
|
||||
add_overlay(plant_overlay)
|
||||
|
||||
if(harvest && overlay_stage == seed.growth_stages)
|
||||
ikey = "[seed.get_trait(TRAIT_PRODUCT_ICON)]"
|
||||
@@ -58,25 +72,25 @@
|
||||
harvest_overlay = image('icons/obj/hydroponics_products.dmi', "[ikey]")
|
||||
harvest_overlay.color = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
plant_controller.plant_icon_cache["product-[ikey]-[seed.get_trait(TRAIT_PRODUCT_COLOUR)]"] = harvest_overlay
|
||||
overlays |= harvest_overlay
|
||||
add_overlay(harvest_overlay)
|
||||
|
||||
|
||||
//Draw the cover.
|
||||
if(closed_system)
|
||||
overlays += "hydrocover"
|
||||
add_overlay("hydrocover")
|
||||
|
||||
//Updated the various alert icons.
|
||||
if(mechanical)
|
||||
if(waterlevel <= 10)
|
||||
overlays += "over_lowwater3"
|
||||
add_overlay(ov_lowwater)
|
||||
if(nutrilevel <= 2)
|
||||
overlays += "over_lownutri3"
|
||||
add_overlay(ov_lownutri)
|
||||
if(weedlevel >= 5 || pestlevel >= 5 || toxins >= 40)
|
||||
overlays += "over_alert3"
|
||||
add_overlay(ov_alert3)
|
||||
if(harvest)
|
||||
overlays += "over_harvest3"
|
||||
add_overlay(ov_harvest)
|
||||
if(frozen)
|
||||
overlays += "over_frozen3"
|
||||
add_overlay(ov_frozen)
|
||||
|
||||
// Update bioluminescence.
|
||||
if(seed)
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
if(!name) //To prevent nameless ghosts
|
||||
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
real_name = name
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
..()
|
||||
|
||||
/mob/observer/dead/Topic(href, href_list)
|
||||
@@ -318,6 +319,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(usr, "Not when you're not dead!")
|
||||
return
|
||||
|
||||
if(!A)
|
||||
A = input(usr, "Select an area:", "Ghost Teleport") as null|anything in return_sorted_areas()
|
||||
if(!A)
|
||||
return
|
||||
|
||||
usr.forceMove(pick(get_area_turfs(A)))
|
||||
usr.on_mob_jump()
|
||||
|
||||
@@ -326,6 +332,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Follow" // "Haunt"
|
||||
set desc = "Follow and haunt a mob."
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Follow") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if(!target) return
|
||||
ManualFollow(target)
|
||||
@@ -359,6 +370,45 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
forceMove(T)
|
||||
sleep(15)
|
||||
|
||||
var/icon/I = icon(target.icon,target.icon_state,target.dir)
|
||||
|
||||
var/orbitsize = (I.Width()+I.Height())*0.5
|
||||
orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25)
|
||||
|
||||
var/rot_seg
|
||||
|
||||
/* We don't have this pref yet
|
||||
switch(ghost_orbit)
|
||||
if(GHOST_ORBIT_TRIANGLE)
|
||||
rot_seg = 3
|
||||
if(GHOST_ORBIT_SQUARE)
|
||||
rot_seg = 4
|
||||
if(GHOST_ORBIT_PENTAGON)
|
||||
rot_seg = 5
|
||||
if(GHOST_ORBIT_HEXAGON)
|
||||
rot_seg = 6
|
||||
else //Circular
|
||||
rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle
|
||||
*/
|
||||
|
||||
orbit(target, orbitsize, FALSE, 20, rot_seg)
|
||||
|
||||
/mob/observer/dead/orbit()
|
||||
set_dir(2) //reset dir so the right directional sprites show up
|
||||
return ..()
|
||||
|
||||
/mob/observer/dead/stop_orbit(datum/component/orbiter/orbits)
|
||||
. = ..()
|
||||
//restart our floating animation after orbit is done.
|
||||
pixel_y = 0
|
||||
pixel_x = 0
|
||||
transform = null
|
||||
animate(src, pixel_y = 2, time = 10, loop = -1)
|
||||
|
||||
/mob/observer/dead/proc/stop_following()
|
||||
following = null
|
||||
stop_orbit()
|
||||
|
||||
/mob/proc/update_following()
|
||||
. = get_turf(src)
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
@@ -373,7 +423,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/Destroy()
|
||||
for(var/mob/observer/dead/M in following_mobs)
|
||||
M.following = null
|
||||
M.stop_following()
|
||||
following_mobs = null
|
||||
return ..()
|
||||
|
||||
@@ -381,7 +431,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(ismob(following))
|
||||
var/mob/M = following
|
||||
M.following_mobs -= src
|
||||
following = null
|
||||
stop_following()
|
||||
return ..()
|
||||
|
||||
/mob/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
@@ -406,35 +456,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Jump to Mob"
|
||||
set desc = "Teleport to a mob"
|
||||
set popup_menu = FALSE //VOREStation Edit - Declutter.
|
||||
if(istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = target //Destination mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
set popup_menu = FALSE
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
following = null
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
/*
|
||||
/mob/observer/dead/verb/boo()
|
||||
set category = "Ghost"
|
||||
set name = "Boo!"
|
||||
set desc= "Scare your crew members because of boredom!"
|
||||
|
||||
if(bootime > world.time) return
|
||||
var/obj/machinery/light/L = locate(/obj/machinery/light) in view(1, src)
|
||||
if(L)
|
||||
L.flicker()
|
||||
bootime = world.time + 600
|
||||
if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer!
|
||||
return
|
||||
//Maybe in the future we can add more <i>spooky</i> code here!
|
||||
return
|
||||
*/
|
||||
|
||||
if(!input)
|
||||
input = input(usr, "Select a mob:", "Ghost Jump") as null|anything in getmobs()
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/target = getmobs()[input]
|
||||
if (!target)//Make sure we actually have a target
|
||||
return
|
||||
else
|
||||
var/mob/M = target //Destination mob
|
||||
var/turf/T = get_turf(M) //Turf of the destination mob
|
||||
|
||||
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
|
||||
forceMove(T)
|
||||
stop_following()
|
||||
else
|
||||
to_chat(src, "This mob is not located in the game world.")
|
||||
|
||||
/mob/observer/dead/memory()
|
||||
set hidden = 1
|
||||
@@ -445,7 +488,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, "<font color='red'>You are dead! You have no mind to store memory!</font>")
|
||||
|
||||
/mob/observer/dead/Post_Incorpmove()
|
||||
following = null
|
||||
stop_following()
|
||||
|
||||
/mob/observer/dead/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
@@ -813,21 +856,27 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
set category = "Ghost"
|
||||
set name = "Blank pAI alert"
|
||||
set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope."
|
||||
if(usr.client.prefs.be_special & BE_PAI)
|
||||
|
||||
if(usr.client.prefs?.be_special & BE_PAI)
|
||||
var/count = 0
|
||||
for(var/obj/item/device/paicard/p in all_pai_cards)
|
||||
var/obj/item/device/paicard/PP = p
|
||||
if(PP.pai == null)
|
||||
count++
|
||||
PP.icon = 'icons/obj/pda_vr.dmi' // VOREStation Edit
|
||||
PP.overlays += "pai-ghostalert"
|
||||
spawn(54)
|
||||
PP.overlays.Cut()
|
||||
to_chat(usr,"<span class='notice'>Flashing the displays of [count] unoccupied PAIs.</span>")
|
||||
else
|
||||
to_chat(usr,"<span class='warning'>You have 'Be pAI' disabled in your character prefs, so we can't help you.</span>")
|
||||
|
||||
/mob/observer/dead/speech_bubble_appearance()
|
||||
return "ghost"
|
||||
|
||||
// Lets a ghost know someone's trying to bring them back, and for them to get into their body.
|
||||
// Mostly the same as TG's sans the hud element, since we don't have TG huds.
|
||||
/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE)
|
||||
/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE, var/atom/source)
|
||||
if((last_revive_notification + 2 MINUTES) > world.time)
|
||||
return
|
||||
last_revive_notification = world.time
|
||||
@@ -836,6 +885,8 @@ mob/observer/dead/MayRespawn(var/feedback = 0)
|
||||
window_flash(client)
|
||||
if(message)
|
||||
to_chat(src, "<span class='ghostalert'><font size=4>[message]</font></span>")
|
||||
if(source)
|
||||
throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source)
|
||||
to_chat(src, "<span class='ghostalert'><a href=?src=[REF(src)];reenter=1>(Click to re-enter)</a></span>")
|
||||
if(sound)
|
||||
SEND_SOUND(src, sound(sound))
|
||||
|
||||
@@ -89,6 +89,22 @@ var/list/holder_mob_icon_cache = list()
|
||||
else if(H.r_hand == src)
|
||||
H.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/holder/container_resist(mob/living/held)
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(src)
|
||||
to_chat(M, "<span class='warning'>\The [held] wriggles out of your grip!</span>")
|
||||
to_chat(held, "<span class='warning'>You wiggle out of [M]'s grip!</span>")
|
||||
else if(istype(loc, /obj/item/clothing/accessory/holster))
|
||||
var/obj/item/clothing/accessory/holster/holster = loc
|
||||
if(holster.holstered == src)
|
||||
holster.clear_holster()
|
||||
to_chat(held, "<span class='warning'>You extricate yourself from [holster].</span>")
|
||||
held.forceMove(get_turf(held))
|
||||
else if(isitem(loc))
|
||||
to_chat(held, "<span class='warning'>You struggle free of [loc].</span>")
|
||||
held.forceMove(get_turf(held))
|
||||
|
||||
//Mob specific holders.
|
||||
/obj/item/weapon/holder/diona
|
||||
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 5)
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
H.handcuffed = new /obj/item/weapon/handcuffs/cable(H) // Better to be cable cuffed than stun-locked
|
||||
else
|
||||
H.handcuffed = new /obj/item/weapon/handcuffs(H)
|
||||
H.update_inv_handcuffed()
|
||||
H.update_handcuffed()
|
||||
busy = FALSE
|
||||
else if(istype(M, /mob/living))
|
||||
var/mob/living/L = M
|
||||
|
||||
@@ -148,11 +148,11 @@
|
||||
|
||||
if(environment.temperature > (T0C+66))
|
||||
adjustFireLoss((environment.temperature - (T0C+66))/5) // Might be too high, check in testing.
|
||||
if (fire) fire.icon_state = "fire2"
|
||||
throw_alert("alien_fire", /obj/screen/alert/alien_fire)
|
||||
if(prob(20))
|
||||
to_chat(src, "<font color='red'>You feel a searing heat!</font>")
|
||||
else
|
||||
if (fire) fire.icon_state = "fire0"
|
||||
clear_alert("alien_fire")
|
||||
|
||||
/mob/living/carbon/alien/handle_fire()
|
||||
if(..())
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed()
|
||||
update_handcuffed()
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
|
||||
@@ -318,9 +318,8 @@
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
//generates realistic-ish pulse output based on preset levels
|
||||
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
|
||||
@@ -403,3 +402,14 @@
|
||||
if(does_not_breathe)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/proc/update_handcuffed()
|
||||
if(handcuffed)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
stop_pulling()
|
||||
throw_alert("handcuffed", /obj/screen/alert/restrained/handcuffed, new_master = handcuffed)
|
||||
else
|
||||
clear_alert("handcuffed")
|
||||
update_action_buttons() //some of our action buttons might be unusable when we're handcuffed.
|
||||
update_inv_handcuffed()
|
||||
|
||||
@@ -1679,4 +1679,9 @@
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/T = loc
|
||||
T.add_blood(src)
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/reduce_cuff_time()
|
||||
if(istype(gloves, /obj/item/clothing/gloves/gauntlets/rig))
|
||||
return 2
|
||||
return ..()
|
||||
|
||||
@@ -1,30 +1,7 @@
|
||||
/mob/living/carbon/human/process_resist()
|
||||
//drop && roll
|
||||
if((on_fire || has_modifier_of_type(/datum/modifier/fire)) && !buckled)
|
||||
adjust_fire_stacks(-1.2)
|
||||
Weaken(3)
|
||||
spin(32,2)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>",
|
||||
"<span class='notice'>You stop, drop, and roll!</span>"
|
||||
)
|
||||
sleep(30)
|
||||
if(fire_stacks <= 0 && !(has_modifier_of_type(/datum/modifier/fire)))
|
||||
visible_message(
|
||||
"<span class='danger'>[src] has successfully extinguished themselves!</span>",
|
||||
"<span class='notice'>You extinguish yourself.</span>"
|
||||
)
|
||||
ExtinguishMob()
|
||||
return TRUE
|
||||
|
||||
if(handcuffed)
|
||||
spawn() escape_handcuffs()
|
||||
else if(legcuffed)
|
||||
spawn() escape_legcuffs()
|
||||
else if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
spawn() escape_straight_jacket()
|
||||
else
|
||||
..()
|
||||
/mob/living/carbon/human/resist_restraints()
|
||||
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||
return escape_straight_jacket()
|
||||
return ..()
|
||||
|
||||
#define RESIST_ATTACK_DEFAULT 0
|
||||
#define RESIST_ATTACK_CLAWS 1
|
||||
|
||||
@@ -172,7 +172,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
update_inv_handcuffed()
|
||||
update_handcuffed()
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
|
||||
@@ -25,12 +25,6 @@
|
||||
#define HUMAN_COMBUSTION_TEMP 524 //524k is the sustained combustion temperature of human fat
|
||||
|
||||
/mob/living/carbon/human
|
||||
var/oxygen_alert = 0
|
||||
var/phoron_alert = 0
|
||||
var/co2_alert = 0
|
||||
var/fire_alert = 0
|
||||
var/pressure_alert = 0
|
||||
var/temperature_alert = 0
|
||||
var/in_stasis = 0
|
||||
var/heartbeat = 0
|
||||
|
||||
@@ -46,7 +40,6 @@
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
blinded = 0
|
||||
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
|
||||
|
||||
//TODO: seperate this out
|
||||
// update the current life tick, can be used to e.g. only do something every 4 ticks
|
||||
@@ -384,8 +377,7 @@
|
||||
if(suiciding)
|
||||
failed_last_breath = 1
|
||||
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
suiciding --
|
||||
suiciding--
|
||||
return 0
|
||||
|
||||
if(does_not_breathe)
|
||||
@@ -405,9 +397,10 @@
|
||||
if(!L.is_bruised() && prob(8))
|
||||
rupture_lung()
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
|
||||
throw_alert("pressure", /obj/screen/alert/lowpressure)
|
||||
return 0
|
||||
else
|
||||
clear_alert("pressure")
|
||||
|
||||
var/safe_pressure_min = species.minimum_breath_pressure // Minimum safe partial pressure of breathable gas in kPa
|
||||
|
||||
@@ -466,6 +459,7 @@
|
||||
|
||||
var/inhale_pp = (inhaling/breath.total_moles)*breath_pressure
|
||||
var/toxins_pp = (poison/breath.total_moles)*breath_pressure
|
||||
// To be clear, this isn't how much they're exhaling -- it's the amount of the species exhale_gas that they just
|
||||
var/exhaled_pp = (exhaling/breath.total_moles)*breath_pressure
|
||||
|
||||
// Not enough to breathe
|
||||
@@ -478,10 +472,23 @@
|
||||
adjustOxyLoss(max(HUMAN_MAX_OXYLOSS*(1-ratio), 0))
|
||||
failed_inhale = 1
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
switch(breath_type)
|
||||
if("oxygen")
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_oxy)
|
||||
if("phoron")
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_tox)
|
||||
if("nitrogen")
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_nitro)
|
||||
if("carbon_dioxide")
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_co2)
|
||||
if("volatile_fuel")
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_fuel)
|
||||
if("sleeping_agent")
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_n2o)
|
||||
|
||||
else
|
||||
// We're in safe limits
|
||||
oxygen_alert = 0
|
||||
clear_alert("oxy")
|
||||
|
||||
inhaled_gas_used = inhaling/6
|
||||
|
||||
@@ -492,16 +499,15 @@
|
||||
|
||||
// Too much exhaled gas in the air
|
||||
if(exhaled_pp > safe_exhaled_max)
|
||||
if (!co2_alert|| prob(15))
|
||||
if (prob(15))
|
||||
var/word = pick("extremely dizzy","short of breath","faint","confused")
|
||||
to_chat(src, "<span class='danger'>You feel [word].</span>")
|
||||
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
co2_alert = 1
|
||||
failed_exhale = 1
|
||||
|
||||
else if(exhaled_pp > safe_exhaled_max * 0.7)
|
||||
if (!co2_alert || prob(1))
|
||||
if (!prob(1))
|
||||
var/word = pick("dizzy","short of breath","faint","momentarily confused")
|
||||
to_chat(src, "<span class='warning'>You feel [word].</span>")
|
||||
|
||||
@@ -511,26 +517,22 @@
|
||||
//give them some oxyloss, up to the limit - we don't want people falling unconcious due to CO2 alone until they're pretty close to safe_exhaled_max.
|
||||
if (getOxyLoss() < 50*ratio)
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
co2_alert = 1
|
||||
failed_exhale = 1
|
||||
|
||||
else if(exhaled_pp > safe_exhaled_max * 0.6)
|
||||
if (prob(0.3))
|
||||
if(prob(0.3))
|
||||
var/word = pick("a little dizzy","short of breath")
|
||||
to_chat(src, "<span class='warning'>You feel [word].</span>")
|
||||
|
||||
else
|
||||
co2_alert = 0
|
||||
|
||||
// Too much poison in the air.
|
||||
if(toxins_pp > safe_toxins_max)
|
||||
var/ratio = (poison/safe_toxins_max) * 10
|
||||
if(reagents)
|
||||
reagents.add_reagent("toxin", CLAMP(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE))
|
||||
breath.adjust_gas(poison_type, -poison/6, update = 0) //update after
|
||||
phoron_alert = max(phoron_alert, 1)
|
||||
throw_alert("tox_in_air", /obj/screen/alert/tox_in_air)
|
||||
else
|
||||
phoron_alert = 0
|
||||
clear_alert("tox_in_air")
|
||||
|
||||
// If there's some other shit in the air lets deal with it here.
|
||||
if(breath.gas["sleeping_agent"])
|
||||
@@ -573,25 +575,24 @@
|
||||
if(breath.temperature >= species.breath_heat_level_1)
|
||||
if(breath.temperature < species.breath_heat_level_2)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 1)
|
||||
else if(breath.temperature < species.breath_heat_level_3)
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 2)
|
||||
else
|
||||
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Heat")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
|
||||
else if(breath.temperature <= species.breath_cold_level_1)
|
||||
if(breath.temperature > species.breath_cold_level_2)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
throw_alert("temp", /obj/screen/alert/cold, 1)
|
||||
else if(breath.temperature > species.breath_cold_level_3)
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
throw_alert("temp", /obj/screen/alert/cold, 2)
|
||||
else
|
||||
apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Cold")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
var/temp_adj = breath.temperature - bodytemperature
|
||||
@@ -613,6 +614,9 @@
|
||||
else if(breath.temperature <= species.cold_discomfort_level)
|
||||
species.get_environment_discomfort(src,"cold")
|
||||
|
||||
else
|
||||
clear_alert("temp")
|
||||
|
||||
breath.update_values()
|
||||
return 1
|
||||
|
||||
@@ -653,7 +657,7 @@
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1)
|
||||
pressure_alert = 0
|
||||
clear_alert("pressure")
|
||||
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
|
||||
|
||||
//Body temperature adjusts depending on surrounding atmosphere based on your thermal protection (convection)
|
||||
@@ -674,7 +678,6 @@
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature >= species.heat_level_1)
|
||||
//Body temperature is too hot.
|
||||
fire_alert = max(fire_alert, 1)
|
||||
if(status_flags & GODMODE)
|
||||
return 1 //godmode
|
||||
|
||||
@@ -691,11 +694,9 @@
|
||||
burn_dam = HEAT_DAMAGE_LEVEL_1
|
||||
|
||||
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
|
||||
fire_alert = max(fire_alert, 2)
|
||||
|
||||
else if(bodytemperature <= species.cold_level_1)
|
||||
//Body temperature is too cold.
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
if(status_flags & GODMODE)
|
||||
return 1 //godmode
|
||||
@@ -713,7 +714,6 @@
|
||||
cold_dam = COLD_DAMAGE_LEVEL_1
|
||||
|
||||
take_overall_damage(burn=cold_dam, used_weapon = "Low Body Temperature")
|
||||
fire_alert = max(fire_alert, 1)
|
||||
|
||||
// Account for massive pressure differences. Done by Polymorph
|
||||
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
|
||||
@@ -723,13 +723,13 @@
|
||||
if(adjusted_pressure >= species.hazard_high_pressure)
|
||||
var/pressure_damage = min( ( (adjusted_pressure / species.hazard_high_pressure) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE)
|
||||
take_overall_damage(brute=pressure_damage, used_weapon = "High Pressure")
|
||||
pressure_alert = 2
|
||||
throw_alert("pressure", /obj/screen/alert/highpressure, 2)
|
||||
else if(adjusted_pressure >= species.warning_high_pressure)
|
||||
pressure_alert = 1
|
||||
throw_alert("pressure", /obj/screen/alert/highpressure, 1)
|
||||
else if(adjusted_pressure >= species.warning_low_pressure)
|
||||
pressure_alert = 0
|
||||
clear_alert("pressure")
|
||||
else if(adjusted_pressure >= species.hazard_low_pressure)
|
||||
pressure_alert = -1
|
||||
throw_alert("pressure", /obj/screen/alert/lowpressure, 1)
|
||||
else
|
||||
if( !(COLD_RESISTANCE in mutations))
|
||||
if(!isSynthetic() || !nif || !nif.flag_check(NIF_O_PRESSURESEAL,NIF_FLAGS_OTHER)) //VOREStation Edit - NIF pressure seals
|
||||
@@ -747,9 +747,9 @@
|
||||
// Firesuits (Min protection = 0.2 atmospheres) decrease oxyloss to 1/5
|
||||
|
||||
adjustOxyLoss(pressure_dam)
|
||||
pressure_alert = -2
|
||||
throw_alert("pressure", /obj/screen/alert/lowpressure, 2)
|
||||
else
|
||||
pressure_alert = -1
|
||||
clear_alert("pressure")
|
||||
|
||||
return
|
||||
|
||||
@@ -1009,12 +1009,14 @@
|
||||
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
|
||||
if(client || sleeping > 3)
|
||||
AdjustSleeping(-1)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if( prob(2) && health && !hal_crit )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
//CONSCIOUS
|
||||
else
|
||||
set_stat(CONSCIOUS)
|
||||
clear_alert("asleep")
|
||||
|
||||
//Periodically double-check embedded_flag
|
||||
if(embedded_flag && !(life_tick % 10))
|
||||
@@ -1046,19 +1048,24 @@
|
||||
SetBlinded(0)
|
||||
blinded = 0
|
||||
eye_blurry = 0
|
||||
clear_alert("blind")
|
||||
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
|
||||
SetBlinded(1)
|
||||
blinded = 1
|
||||
eye_blurry = 1
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else //You have the requisite organs
|
||||
if(sdisabilities & BLIND) // Disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else if(eye_blind) // Blindness, heals slowly over time
|
||||
AdjustBlinded(-1)
|
||||
blinded = 1
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster
|
||||
eye_blurry = max(eye_blurry-3, 0)
|
||||
blinded = 1
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
|
||||
//blurry sight
|
||||
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
|
||||
@@ -1213,83 +1220,41 @@
|
||||
healths_ma.overlays += health_images
|
||||
healths.appearance = healths_ma
|
||||
|
||||
if(nutrition_icon)
|
||||
var/prefix = isSynthetic() ? "c" : null
|
||||
switch(nutrition)
|
||||
if(450 to INFINITY) nutrition_icon.icon_state = "[prefix]nutrition0"
|
||||
if(350 to 450) nutrition_icon.icon_state = "[prefix]nutrition1"
|
||||
if(250 to 350) nutrition_icon.icon_state = "[prefix]nutrition2"
|
||||
if(150 to 250) nutrition_icon.icon_state = "[prefix]nutrition3"
|
||||
else nutrition_icon.icon_state = "[prefix]nutrition4"
|
||||
|
||||
if(pressure)
|
||||
pressure.icon_state = "pressure[pressure_alert]"
|
||||
var/fat_alert = /obj/screen/alert/fat
|
||||
var/hungry_alert = /obj/screen/alert/hungry
|
||||
var/starving_alert = /obj/screen/alert/starving
|
||||
|
||||
// if(rest) //Not used with new UI
|
||||
// if(resting || lying || sleeping) rest.icon_state = "rest1"
|
||||
// else rest.icon_state = "rest0"
|
||||
if(toxin)
|
||||
if(hal_screwyhud == 4 || (phoron_alert && !does_not_breathe)) toxin.icon_state = "tox1"
|
||||
else toxin.icon_state = "tox0"
|
||||
if(oxygen)
|
||||
if(hal_screwyhud == 3 || (oxygen_alert && !does_not_breathe)) oxygen.icon_state = "oxy1"
|
||||
else oxygen.icon_state = "oxy0"
|
||||
if(fire)
|
||||
if(fire_alert) fire.icon_state = "fire[fire_alert]" //fire_alert is either 0 if no alert, 1 for cold and 2 for heat.
|
||||
else fire.icon_state = "fire0"
|
||||
if(get_species() == SPECIES_CUSTOM)
|
||||
var/datum/species/custom/C = species
|
||||
if(/datum/trait/bloodsucker in C.traits)
|
||||
fat_alert = /obj/screen/alert/fat/vampire
|
||||
hungry_alert = /obj/screen/alert/hungry/vampire
|
||||
starving_alert = /obj/screen/alert/starving/vampire
|
||||
else if(isSynthetic())
|
||||
fat_alert = /obj/screen/alert/fat/synth
|
||||
hungry_alert = /obj/screen/alert/hungry/synth
|
||||
starving_alert = /obj/screen/alert/starving/synth
|
||||
|
||||
if(bodytemp)
|
||||
if (!species)
|
||||
switch(bodytemperature) //310.055 optimal body temp
|
||||
if(370 to INFINITY) bodytemp.icon_state = "temp4"
|
||||
if(350 to 370) bodytemp.icon_state = "temp3"
|
||||
if(335 to 350) bodytemp.icon_state = "temp2"
|
||||
if(320 to 335) bodytemp.icon_state = "temp1"
|
||||
if(300 to 320) bodytemp.icon_state = "temp0"
|
||||
if(295 to 300) bodytemp.icon_state = "temp-1"
|
||||
if(280 to 295) bodytemp.icon_state = "temp-2"
|
||||
if(260 to 280) bodytemp.icon_state = "temp-3"
|
||||
else bodytemp.icon_state = "temp-4"
|
||||
switch(nutrition)
|
||||
if(450 to INFINITY)
|
||||
throw_alert("nutrition", fat_alert)
|
||||
// if(350 to 450)
|
||||
// if(250 to 350) // Alternative more-detailed tiers, not used.
|
||||
if(250 to 450)
|
||||
clear_alert("nutrition")
|
||||
if(150 to 250)
|
||||
throw_alert("nutrition", hungry_alert)
|
||||
else
|
||||
//TODO: precalculate all of this stuff when the species datum is created
|
||||
var/base_temperature = species.body_temperature
|
||||
if(base_temperature == null) //some species don't have a set metabolic temperature
|
||||
base_temperature = (species.heat_level_1 + species.cold_level_1)/2
|
||||
|
||||
var/temp_step
|
||||
if (bodytemperature >= base_temperature)
|
||||
temp_step = (species.heat_level_1 - base_temperature)/4
|
||||
|
||||
if (bodytemperature >= species.heat_level_1)
|
||||
bodytemp.icon_state = "temp4"
|
||||
else if (bodytemperature >= base_temperature + temp_step*3)
|
||||
bodytemp.icon_state = "temp3"
|
||||
else if (bodytemperature >= base_temperature + temp_step*2)
|
||||
bodytemp.icon_state = "temp2"
|
||||
else if (bodytemperature >= base_temperature + temp_step*1)
|
||||
bodytemp.icon_state = "temp1"
|
||||
else
|
||||
bodytemp.icon_state = "temp0"
|
||||
|
||||
else if (bodytemperature < base_temperature)
|
||||
temp_step = (base_temperature - species.cold_level_1)/4
|
||||
|
||||
if (bodytemperature <= species.cold_level_1)
|
||||
bodytemp.icon_state = "temp-4"
|
||||
else if (bodytemperature <= base_temperature - temp_step*3)
|
||||
bodytemp.icon_state = "temp-3"
|
||||
else if (bodytemperature <= base_temperature - temp_step*2)
|
||||
bodytemp.icon_state = "temp-2"
|
||||
else if (bodytemperature <= base_temperature - temp_step*1)
|
||||
bodytemp.icon_state = "temp-1"
|
||||
else
|
||||
bodytemp.icon_state = "temp0"
|
||||
throw_alert("nutrition", starving_alert)
|
||||
|
||||
if(blinded)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
|
||||
else if(!machine)
|
||||
clear_fullscreens()
|
||||
clear_alert("blind")
|
||||
|
||||
if(disabilities & NEARSIGHTED) //this looks meh but saves a lot of memory by not requiring to add var/prescription
|
||||
if(glasses) //to every /obj/item
|
||||
@@ -1301,6 +1266,10 @@
|
||||
|
||||
set_fullscreen(eye_blurry, "blurry", /obj/screen/fullscreen/blurry)
|
||||
set_fullscreen(druggy, "high", /obj/screen/fullscreen/high)
|
||||
if(druggy)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
clear_alert("high")
|
||||
|
||||
if(config.welder_vision)
|
||||
var/found_welder
|
||||
|
||||
@@ -146,9 +146,11 @@
|
||||
else
|
||||
H.adjustOxyLoss(ALRAUNE_CRIT_MAX_OXYLOSS)
|
||||
|
||||
H.oxygen_alert = max(H.oxygen_alert, 1)
|
||||
H.throw_alert("pressure", /obj/screen/alert/lowpressure)
|
||||
|
||||
return // skip air processing if there's no air
|
||||
else
|
||||
H.clear_alert("pressure")
|
||||
|
||||
// now into the good stuff
|
||||
|
||||
@@ -188,10 +190,10 @@
|
||||
H.adjustOxyLoss(max(ALRAUNE_MAX_OXYLOSS*(1-ratio), 0))
|
||||
failed_inhale = 1
|
||||
|
||||
H.oxygen_alert = max(H.oxygen_alert, 1)
|
||||
H.throw_alert("oxy", /obj/screen/alert/not_enough_co2)
|
||||
else
|
||||
// We're in safe limits
|
||||
H.oxygen_alert = 0
|
||||
H.clear_alert("oxy")
|
||||
|
||||
inhaled_gas_used = inhaling/6
|
||||
breath.adjust_gas("carbon_dioxide", -inhaled_gas_used, update = 0) //update afterwards
|
||||
@@ -199,10 +201,9 @@
|
||||
|
||||
//Now we handle CO2.
|
||||
if(inhale_pp > safe_exhaled_max * 0.7) // For a human, this would be too much exhaled gas in the air. But plants don't care.
|
||||
H.co2_alert = 1 // Give them the alert on the HUD. They'll be aware when the good stuff is present.
|
||||
|
||||
H.throw_alert("co2", /obj/screen/alert/too_much_co2/plant) // Give them the alert on the HUD. They'll be aware when the good stuff is present.
|
||||
else
|
||||
H.co2_alert = 0
|
||||
H.clear_alert("co2")
|
||||
|
||||
//do the CO2 buff stuff here
|
||||
|
||||
@@ -225,9 +226,9 @@
|
||||
if(H.reagents)
|
||||
H.reagents.add_reagent("toxin", CLAMP(ratio, MIN_TOXIN_DAMAGE, MAX_TOXIN_DAMAGE))
|
||||
breath.adjust_gas(poison_type, -poison/6, update = 0) //update after
|
||||
H.phoron_alert = max(H.phoron_alert, 1)
|
||||
H.throw_alert("tox_in_air", /obj/screen/alert/tox_in_air)
|
||||
else
|
||||
H.phoron_alert = 0
|
||||
H.clear_alert("tox_in_air")
|
||||
|
||||
// If there's some other shit in the air lets deal with it here.
|
||||
if(breath.gas["sleeping_agent"])
|
||||
@@ -271,24 +272,18 @@
|
||||
if(breath.temperature >= breath_heat_level_1)
|
||||
if(breath.temperature < breath_heat_level_2)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, bodypart, used_weapon = "Excessive Heat")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
else if(breath.temperature < breath_heat_level_3)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, bodypart, used_weapon = "Excessive Heat")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
else
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, bodypart, used_weapon = "Excessive Heat")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
|
||||
else if(breath.temperature <= breath_cold_level_1)
|
||||
if(breath.temperature > breath_cold_level_2)
|
||||
H.apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, bodypart, used_weapon = "Excessive Cold")
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
else if(breath.temperature > breath_cold_level_3)
|
||||
H.apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, bodypart, used_weapon = "Excessive Cold")
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
else
|
||||
H.apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, bodypart, used_weapon = "Excessive Cold")
|
||||
H.fire_alert = max(H.fire_alert, 1)
|
||||
|
||||
|
||||
//breathing in hot/cold air also heats/cools you a bit
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 900
|
||||
movement_cooldown = 0
|
||||
movement_cooldown = 3
|
||||
|
||||
var/mob/living/carbon/human/humanform
|
||||
var/obj/item/organ/internal/nano/refactory/refactory
|
||||
|
||||
@@ -118,9 +118,6 @@
|
||||
/datum/trait/bloodsucker/apply(var/datum/species/S,var/mob/living/carbon/human/H)
|
||||
..(S,H)
|
||||
H.verbs |= /mob/living/carbon/human/proc/bloodsuck
|
||||
spawn(10 SECONDS) // Ugh!
|
||||
if(H?.nutrition_icon)
|
||||
H.nutrition_icon.icon = 'icons/mob/screen/vamp_hunger_vr.dmi'
|
||||
|
||||
/datum/trait/succubus_drain
|
||||
name = "Succubus Drain"
|
||||
|
||||
@@ -856,11 +856,14 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
if(QDESTROYING(src))
|
||||
return
|
||||
|
||||
clear_alert("legcuffed")
|
||||
remove_layer(LEGCUFF_LAYER)
|
||||
|
||||
if(!legcuffed)
|
||||
return //Not legcuffed, why bother.
|
||||
|
||||
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
|
||||
|
||||
overlays_standing[LEGCUFF_LAYER] = legcuffed.make_worn_icon(body_type = species.get_bodytype(src), slot_name = slot_legcuffed_str, default_icon = INV_LCUFF_DEF_ICON, default_layer = LEGCUFF_LAYER)
|
||||
|
||||
apply_layer(LEGCUFF_LAYER)
|
||||
|
||||
@@ -1,173 +1,99 @@
|
||||
/mob/living/carbon/process_resist()
|
||||
|
||||
//drop && roll
|
||||
if(on_fire && !buckled)
|
||||
adjust_fire_stacks(-1.2)
|
||||
Weaken(3)
|
||||
spin(32,2)
|
||||
/mob/living/carbon/resist_fire()
|
||||
adjust_fire_stacks(-1.2)
|
||||
Weaken(3)
|
||||
spin(32,2)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>",
|
||||
"<span class='notice'>You stop, drop, and roll!</span>"
|
||||
)
|
||||
sleep(30)
|
||||
if(fire_stacks <= 0)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] rolls on the floor, trying to put themselves out!</span>",
|
||||
"<span class='notice'>You stop, drop, and roll!</span>"
|
||||
"<span class='danger'>[src] has successfully extinguished themselves!</span>",
|
||||
"<span class='notice'>You extinguish yourself.</span>"
|
||||
)
|
||||
sleep(30)
|
||||
if(fire_stacks <= 0)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] has successfully extinguished themselves!</span>",
|
||||
"<span class='notice'>You extinguish yourself.</span>"
|
||||
)
|
||||
ExtinguishMob()
|
||||
return TRUE
|
||||
ExtinguishMob()
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/resist_restraints()
|
||||
var/obj/item/I = null
|
||||
if(handcuffed)
|
||||
spawn() escape_handcuffs()
|
||||
I = handcuffed
|
||||
else if(legcuffed)
|
||||
spawn() escape_legcuffs()
|
||||
else
|
||||
..()
|
||||
I = legcuffed
|
||||
|
||||
if(I)
|
||||
setClickCooldown(100)
|
||||
cuff_resist(I, cuff_break = can_break_cuffs())
|
||||
|
||||
/mob/living/carbon/proc/escape_handcuffs()
|
||||
//if(!(last_special <= world.time)) return
|
||||
/mob/living/carbon/proc/reduce_cuff_time()
|
||||
return FALSE
|
||||
|
||||
//This line represent a significant buff to grabs...
|
||||
// We don't have to check the click cooldown because /mob/living/verb/resist() has done it for us, we can simply set the delay
|
||||
setClickCooldown(100)
|
||||
/mob/living/carbon/proc/cuff_resist(obj/item/weapon/handcuffs/I, breakouttime = 1200, cuff_break = 0)
|
||||
|
||||
if(istype(I))
|
||||
breakouttime = I.breakouttime
|
||||
|
||||
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
|
||||
break_handcuffs()
|
||||
var/displaytime = breakouttime / 10
|
||||
|
||||
var/reduceCuffTime = reduce_cuff_time()
|
||||
if(reduceCuffTime)
|
||||
breakouttime /= reduceCuffTime
|
||||
displaytime /= reduceCuffTime
|
||||
|
||||
if(cuff_break)
|
||||
visible_message("<span class='danger'>[src] is trying to break [I]!</span>",
|
||||
"<span class='warning'>You attempt to break your [I]. (This will take around 5 seconds and you need to stand still)</span>")
|
||||
|
||||
if(do_after(src, 5 SECONDS, target = src, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
if(!I || buckled)
|
||||
return
|
||||
visible_message("<span class='danger'>[src] manages to break [I]!</span>",
|
||||
"<span class='warning'>You successfully break your [I].</span>")
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
if(I == handcuffed)
|
||||
handcuffed = null
|
||||
update_handcuffed()
|
||||
else if(I == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
|
||||
qdel(I)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You fail to break [I].</span>")
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>[src] attempts to remove [I]!</span>",
|
||||
"<span class='warning'>You attempt to remove [I]. (This will take around [displaytime] seconds and you need to stand still)</span>")
|
||||
if(do_after(src, breakouttime, target = src, incapacitation_flags = INCAPACITATION_DISABLED & INCAPACITATION_KNOCKDOWN))
|
||||
visible_message("<span class='danger'>[src] manages to remove [I]!</span>",
|
||||
"<span class='notice'>You successfully remove [I].</span>")
|
||||
drop_from_inventory(I)
|
||||
|
||||
/mob/living/carbon/resist_buckle()
|
||||
if(!buckled)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/handcuffs/HC = handcuffed
|
||||
if(!restrained())
|
||||
return ..()
|
||||
|
||||
//A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type
|
||||
var/breakouttime = 1200
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
//If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
|
||||
if(istype(HC))
|
||||
breakouttime = HC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H) && H.gloves && istype(H.gloves,/obj/item/clothing/gloves/gauntlets/rig))
|
||||
breakouttime /= 2
|
||||
displaytime /= 2
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] attempts to remove \the [HC]!</span>",
|
||||
"<span class='warning'>You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime, incapacitation_flags = INCAPACITATION_DISABLED & INCAPACITATION_KNOCKDOWN))
|
||||
if(!handcuffed)
|
||||
return
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] manages to remove \the [handcuffed]!</span>",
|
||||
"<span class='notice'>You successfully remove \the [handcuffed].</span>"
|
||||
)
|
||||
drop_from_inventory(handcuffed)
|
||||
|
||||
/mob/living/carbon/proc/escape_legcuffs()
|
||||
//if(!(last_special <= world.time)) return
|
||||
|
||||
//This line represent a significant buff to grabs...
|
||||
// We don't have to check the click cooldown because /mob/living/verb/resist() has done it for us, we can simply set the delay
|
||||
setClickCooldown(100)
|
||||
|
||||
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
|
||||
break_legcuffs()
|
||||
return
|
||||
|
||||
var/obj/item/weapon/handcuffs/legcuffs/LC = legcuffed
|
||||
|
||||
//A default in case you are somehow legcuffed with something that isn't an obj/item/weapon/handcuffs/legcuffs type
|
||||
var/breakouttime = 1200
|
||||
var/displaytime = 2 //Minutes to display in the "this will take X minutes."
|
||||
//If you are legcuffed with actual legcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future...
|
||||
if(istype(LC))
|
||||
breakouttime = LC.breakouttime
|
||||
displaytime = breakouttime / 600 //Minutes
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H) && H.shoes && istype(H.shoes,/obj/item/clothing/shoes/magboots/rig))
|
||||
breakouttime /= 2
|
||||
displaytime /= 2
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] attempts to remove \the [LC]!</span>",
|
||||
"<span class='warning'>You attempt to remove \the [LC]. (This will take around [displaytime] minutes and you need to stand still)</span>"
|
||||
"<span class='danger'>[src] attempts to unbuckle themself!</span>",
|
||||
"<span class='warning'>You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(src, breakouttime, incapacitation_flags = INCAPACITATION_DISABLED & INCAPACITATION_KNOCKDOWN))
|
||||
if(!legcuffed)
|
||||
if(do_after(src, 2 MINUTES, incapacitation_flags = INCAPACITATION_DEFAULT & ~(INCAPACITATION_RESTRAINED | INCAPACITATION_BUCKLED_FULLY)))
|
||||
if(!buckled)
|
||||
return
|
||||
visible_message(
|
||||
"<span class='danger'>\The [src] manages to remove \the [legcuffed]!</span>",
|
||||
"<span class='notice'>You successfully remove \the [legcuffed].</span>"
|
||||
)
|
||||
drop_from_inventory(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
visible_message("<span class='danger'>[src] manages to unbuckle themself!</span>",
|
||||
"<span class='notice'>You successfully unbuckle yourself.</span>")
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
|
||||
/mob/living/carbon/proc/can_break_cuffs()
|
||||
if(HULK in mutations)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/break_handcuffs()
|
||||
visible_message(
|
||||
"<span class='danger'>[src] is trying to break \the [handcuffed]!</span>",
|
||||
"<span class='warning'>You attempt to break your [handcuffed.name]. (This will take around 5 seconds and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(src, 5 SECONDS, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
if(!handcuffed || buckled)
|
||||
return
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[src] manages to break \the [handcuffed]!</span>",
|
||||
"<span class='warning'>You successfully break your [handcuffed.name].</span>"
|
||||
)
|
||||
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
qdel(handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
update_inv_handcuffed()
|
||||
|
||||
/mob/living/carbon/proc/break_legcuffs()
|
||||
to_chat(src, "<span class='warning'>You attempt to break your legcuffs. (This will take around 5 seconds and you need to stand still)</span>")
|
||||
visible_message("<span class='danger'>[src] is trying to break the legcuffs!</span>")
|
||||
|
||||
if(do_after(src, 5 SECONDS, incapacitation_flags = INCAPACITATION_DEFAULT & ~INCAPACITATION_RESTRAINED))
|
||||
if(!legcuffed || buckled)
|
||||
return
|
||||
|
||||
visible_message(
|
||||
"<span class='danger'>[src] manages to break the legcuffs!</span>",
|
||||
"<span class='warning'>You successfully break your legcuffs.</span>"
|
||||
)
|
||||
|
||||
say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
|
||||
qdel(legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
|
||||
/mob/living/carbon/escape_buckle()
|
||||
if(!buckled) return
|
||||
|
||||
if(!restrained())
|
||||
..()
|
||||
else
|
||||
setClickCooldown(100)
|
||||
visible_message(
|
||||
"<span class='danger'>[usr] attempts to unbuckle themself!</span>",
|
||||
"<span class='warning'>You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)</span>"
|
||||
)
|
||||
|
||||
if(do_after(usr, 2 MINUTES, incapacitation_flags = INCAPACITATION_DEFAULT & ~(INCAPACITATION_RESTRAINED | INCAPACITATION_BUCKLED_FULLY)))
|
||||
if(!buckled)
|
||||
return
|
||||
visible_message("<span class='danger'>[usr] manages to unbuckle themself!</span>",
|
||||
"<span class='notice'>You successfully unbuckle yourself.</span>")
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
|
||||
@@ -160,9 +160,14 @@
|
||||
//Eyes
|
||||
if(sdisabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
SetBlinded(1)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
AdjustBlinded(-1)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else
|
||||
clear_alert("blind")
|
||||
|
||||
if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
//Ears
|
||||
|
||||
@@ -860,53 +860,25 @@ default behaviour is:
|
||||
process_resist()
|
||||
|
||||
/mob/living/proc/process_resist()
|
||||
//Getting out of someone's inventory.
|
||||
if(istype(src.loc, /obj/item/weapon/holder))
|
||||
escape_inventory(src.loc)
|
||||
return
|
||||
|
||||
//unbuckling yourself
|
||||
if(buckled)
|
||||
spawn() escape_buckle()
|
||||
resist_buckle()
|
||||
return TRUE
|
||||
|
||||
//Breaking out of a locker?
|
||||
if( src.loc && (istype(src.loc, /obj/structure/closet)) )
|
||||
var/obj/structure/closet/C = loc
|
||||
spawn() C.mob_breakout(src)
|
||||
if(isobj(loc))
|
||||
var/obj/C = loc
|
||||
C.container_resist(src)
|
||||
return TRUE
|
||||
|
||||
if(istype(loc,/obj/item/clothing))
|
||||
spawn() escape_clothes(loc)
|
||||
else if(canmove)
|
||||
if(on_fire)
|
||||
resist_fire() //stop, drop, and roll
|
||||
else
|
||||
resist_restraints()
|
||||
|
||||
if(attempt_vr(src,"vore_process_resist",args)) return TRUE //VOREStation Code
|
||||
|
||||
/mob/living/proc/escape_inventory(obj/item/weapon/holder/H)
|
||||
if(H != src.loc) return
|
||||
|
||||
var/mob/M = H.loc //Get our mob holder (if any).
|
||||
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(H)
|
||||
to_chat(M, "<span class='warning'>\The [H] wriggles out of your grip!</span>")
|
||||
to_chat(src, "<span class='warning'>You wriggle out of \the [M]'s grip!</span>")
|
||||
|
||||
// Update whether or not this mob needs to pass emotes to contents.
|
||||
for(var/atom/A in M.contents)
|
||||
if(istype(A,/mob/living/simple_mob/animal/borer) || istype(A,/obj/item/weapon/holder))
|
||||
return
|
||||
|
||||
else if(istype(H.loc,/obj/item/clothing/accessory/holster))
|
||||
var/obj/item/clothing/accessory/holster/holster = H.loc
|
||||
if(holster.holstered == H)
|
||||
holster.clear_holster()
|
||||
to_chat(src, "<span class='warning'>You extricate yourself from \the [holster].</span>")
|
||||
H.forceMove(get_turf(H))
|
||||
else if(istype(H.loc,/obj/item))
|
||||
to_chat(src, "<span class='warning'>You struggle free of \the [H.loc].</span>")
|
||||
H.forceMove(get_turf(H))
|
||||
|
||||
/mob/living/proc/escape_buckle()
|
||||
/mob/living/proc/resist_buckle()
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/vehicle))
|
||||
var/obj/vehicle/vehicle = buckled
|
||||
@@ -922,6 +894,12 @@ default behaviour is:
|
||||
if(resisting)
|
||||
visible_message("<span class='danger'>[src] resists!</span>")
|
||||
|
||||
/mob/living/proc/resist_fire()
|
||||
return
|
||||
|
||||
/mob/living/proc/resist_restraints()
|
||||
return
|
||||
|
||||
/mob/living/verb/lay_down()
|
||||
set name = "Rest"
|
||||
set category = "IC"
|
||||
@@ -1335,3 +1313,11 @@ default behaviour is:
|
||||
BRAIN:<a href='?_src_=vars;mobToDamage=\ref[src];adjustDamage=brain'>[getBrainLoss()]</a>
|
||||
</font>
|
||||
"}
|
||||
|
||||
/mob/living/update_gravity(has_gravity)
|
||||
if(!ticker)
|
||||
return
|
||||
if(has_gravity)
|
||||
clear_alert("weightless")
|
||||
else
|
||||
throw_alert("weightless", /obj/screen/alert/weightless)
|
||||
|
||||
@@ -328,6 +328,7 @@
|
||||
O.loc = src
|
||||
src.embedded += O
|
||||
src.verbs += /mob/proc/yank_out_object
|
||||
throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
|
||||
|
||||
//This is called when the mob is thrown into a dense turf
|
||||
/mob/living/proc/turf_collision(var/turf/T, var/speed)
|
||||
@@ -366,6 +367,7 @@
|
||||
if(fire_stacks > 0 && !on_fire)
|
||||
on_fire = 1
|
||||
handle_light()
|
||||
throw_alert("fire", /obj/screen/alert/fire)
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/ExtinguishMob()
|
||||
@@ -373,6 +375,7 @@
|
||||
on_fire = 0
|
||||
fire_stacks = 0
|
||||
handle_light()
|
||||
clear_alert("fire")
|
||||
update_fire()
|
||||
|
||||
if(has_modifier_of_type(/datum/modifier/fire))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
return laws.zeroth_law != null
|
||||
|
||||
/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg, notify = TRUE)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
laws_sanity_check()
|
||||
laws.set_zeroth_law(law, law_borg)
|
||||
if(notify)
|
||||
@@ -76,6 +77,7 @@
|
||||
log_and_message_admins("cleared the supplied laws of [src]")
|
||||
|
||||
/mob/living/silicon/proc/notify_of_law_change(message)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
if((last_law_notification + 1 SECOND) > world.time)
|
||||
return
|
||||
last_law_notification = world.time
|
||||
|
||||
@@ -248,35 +248,22 @@
|
||||
src.mind.special_role = "traitor"
|
||||
traitors.current_antagonists |= src.mind
|
||||
|
||||
if (src.cells)
|
||||
if (src.cell)
|
||||
var/cellcharge = src.cell.charge/src.cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
src.cells.icon_state = "charge4"
|
||||
if(0.5 to 0.75)
|
||||
src.cells.icon_state = "charge3"
|
||||
if(0.25 to 0.5)
|
||||
src.cells.icon_state = "charge2"
|
||||
if(0 to 0.25)
|
||||
src.cells.icon_state = "charge1"
|
||||
else
|
||||
src.cells.icon_state = "charge0"
|
||||
else
|
||||
src.cells.icon_state = "charge-empty"
|
||||
update_cell()
|
||||
|
||||
if(bodytemp)
|
||||
switch(src.bodytemperature) //310.055 optimal body temp
|
||||
if(335 to INFINITY)
|
||||
src.bodytemp.icon_state = "temp2"
|
||||
if(320 to 335)
|
||||
src.bodytemp.icon_state = "temp1"
|
||||
if(300 to 320)
|
||||
src.bodytemp.icon_state = "temp0"
|
||||
if(260 to 300)
|
||||
src.bodytemp.icon_state = "temp-1"
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
if(environment)
|
||||
switch(environment.temperature) //310.055 optimal body temp
|
||||
if(400 to INFINITY)
|
||||
throw_alert("temp", /obj/screen/alert/hot/robot, 2)
|
||||
if(360 to 400)
|
||||
throw_alert("temp", /obj/screen/alert/hot/robot, 1)
|
||||
if(260 to 360)
|
||||
clear_alert("temp")
|
||||
if(200 to 260)
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, 1)
|
||||
else
|
||||
src.bodytemp.icon_state = "temp-2"
|
||||
throw_alert("temp", /obj/screen/alert/cold/robot, 2)
|
||||
|
||||
//Oxygen and fire does nothing yet!!
|
||||
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
@@ -298,20 +285,43 @@
|
||||
if(client && !client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
if(emagged)
|
||||
throw_alert("hacked", /obj/screen/alert/hacked)
|
||||
else
|
||||
clear_alert("hacked")
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/update_cell()
|
||||
if(cell)
|
||||
var/cellcharge = cell.charge/cell.maxcharge
|
||||
switch(cellcharge)
|
||||
if(0.75 to INFINITY)
|
||||
clear_alert("charge")
|
||||
if(0.5 to 0.75)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 1)
|
||||
if(0.25 to 0.5)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 2)
|
||||
if(0.01 to 0.25)
|
||||
throw_alert("charge", /obj/screen/alert/lowcell, 3)
|
||||
else
|
||||
throw_alert("charge", /obj/screen/alert/emptycell)
|
||||
else
|
||||
throw_alert("charge", /obj/screen/alert/nocell)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/update_items()
|
||||
if (src.client)
|
||||
src.client.screen -= src.contents
|
||||
for(var/obj/I in src.contents)
|
||||
if(client)
|
||||
client.screen -= contents
|
||||
for(var/obj/I in contents)
|
||||
if(I && !(istype(I,/obj/item/weapon/cell) || istype(I,/obj/item/device/radio) || istype(I,/obj/machinery/camera) || istype(I,/obj/item/device/mmi)))
|
||||
src.client.screen += I
|
||||
if(src.module_state_1)
|
||||
src.module_state_1:screen_loc = ui_inv1
|
||||
if(src.module_state_2)
|
||||
src.module_state_2:screen_loc = ui_inv2
|
||||
if(src.module_state_3)
|
||||
src.module_state_3:screen_loc = ui_inv3
|
||||
client.screen += I
|
||||
if(module_state_1)
|
||||
module_state_1:screen_loc = ui_inv1
|
||||
if(module_state_2)
|
||||
module_state_2:screen_loc = ui_inv2
|
||||
if(module_state_3)
|
||||
module_state_3:screen_loc = ui_inv3
|
||||
updateicon()
|
||||
|
||||
/mob/living/silicon/robot/proc/process_killswitch()
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
//Hud stuff
|
||||
|
||||
var/obj/screen/cells = null
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
@@ -937,6 +936,10 @@
|
||||
// They stay locked down if their wire is cut.
|
||||
if(wires.LockedCut())
|
||||
state = 1
|
||||
if(state)
|
||||
throw_alert("locked", /obj/screen/alert/locked)
|
||||
else
|
||||
clear_alert("locked")
|
||||
lockdown = state
|
||||
lockcharge = state
|
||||
update_canmove()
|
||||
|
||||
@@ -81,4 +81,4 @@
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes(0)
|
||||
cleaned_human.clean_blood(1)
|
||||
cleaned_human << "<font color='red'>[src] cleans your face!</font>"
|
||||
to_chat(cleaned_human, "<span class='warning'>[src] cleans your face!</span>")
|
||||
|
||||
@@ -52,19 +52,14 @@
|
||||
healths.icon_state = "health7"
|
||||
|
||||
//Updates the nutrition while we're here
|
||||
if(nutrition_icon)
|
||||
var/food_per = (nutrition / initial(nutrition)) * 100
|
||||
switch(food_per)
|
||||
if(90 to INFINITY)
|
||||
nutrition_icon.icon_state = "nutrition0"
|
||||
if(75 to 90)
|
||||
nutrition_icon.icon_state = "nutrition1"
|
||||
if(50 to 75)
|
||||
nutrition_icon.icon_state = "nutrition2"
|
||||
if(25 to 50)
|
||||
nutrition_icon.icon_state = "nutrition3"
|
||||
if(0 to 25)
|
||||
nutrition_icon.icon_state = "nutrition4"
|
||||
var/food_per = (nutrition / initial(nutrition)) * 100
|
||||
switch(food_per)
|
||||
if(90 to INFINITY)
|
||||
clear_alert("nutrition")
|
||||
if(50 to 90)
|
||||
throw_alert("nutrition", /obj/screen/alert/hungry)
|
||||
if(-INFINITY to 50)
|
||||
throw_alert("nutrition", /obj/screen/alert/starving)
|
||||
|
||||
// Override for special bullshit.
|
||||
/mob/living/simple_mob/proc/handle_special()
|
||||
@@ -91,54 +86,55 @@
|
||||
if( abs(Environment.temperature - bodytemperature) > temperature_range ) //VOREStation Edit: heating adjustments
|
||||
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
|
||||
|
||||
if(min_oxy)
|
||||
if(Environment.gas["oxygen"] < min_oxy)
|
||||
atmos_unsuitable = 1
|
||||
if(max_oxy)
|
||||
if(Environment.gas["oxygen"] > max_oxy)
|
||||
atmos_unsuitable = 1
|
||||
if(min_tox)
|
||||
if(Environment.gas["phoron"] < min_tox)
|
||||
atmos_unsuitable = 2
|
||||
if(max_tox)
|
||||
if(Environment.gas["phoron"] > max_tox)
|
||||
atmos_unsuitable = 2
|
||||
if(min_n2)
|
||||
if(Environment.gas["nitrogen"] < min_n2)
|
||||
atmos_unsuitable = 1
|
||||
if(max_n2)
|
||||
if(Environment.gas["nitrogen"] > max_n2)
|
||||
atmos_unsuitable = 1
|
||||
if(min_co2)
|
||||
if(Environment.gas["carbon_dioxide"] < min_co2)
|
||||
atmos_unsuitable = 1
|
||||
if(max_co2)
|
||||
if(Environment.gas["carbon_dioxide"] > max_co2)
|
||||
atmos_unsuitable = 1
|
||||
if(min_oxy && Environment.gas["oxygen"] < min_oxy)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else if(max_oxy && Environment.gas["oxygen"] > max_oxy)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("oxy", /obj/screen/alert/too_much_oxy)
|
||||
else
|
||||
clear_alert("oxy")
|
||||
|
||||
if(min_tox && Environment.gas["phoron"] < min_tox)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("tox_in_air", /obj/screen/alert/not_enough_tox)
|
||||
else if(max_tox && Environment.gas["phoron"] > max_tox)
|
||||
atmos_unsuitable = 2
|
||||
throw_alert("tox_in_air", /obj/screen/alert/tox_in_air)
|
||||
else
|
||||
clear_alert("tox_in_air")
|
||||
|
||||
if(min_n2 && Environment.gas["nitrogen"] < min_n2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("n2o", /obj/screen/alert/not_enough_nitro)
|
||||
else if(max_n2 && Environment.gas["nitrogen"] > max_n2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("n2o", /obj/screen/alert/too_much_nitro)
|
||||
else
|
||||
clear_alert("n2o")
|
||||
|
||||
if(min_co2 && Environment.gas["carbon_dioxide"] < min_co2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("co2", /obj/screen/alert/not_enough_co2)
|
||||
else if(max_co2 && Environment.gas["carbon_dioxide"] > max_co2)
|
||||
atmos_unsuitable = 1
|
||||
throw_alert("co2", /obj/screen/alert/too_much_co2)
|
||||
else
|
||||
clear_alert("co2")
|
||||
|
||||
//Atmos effect
|
||||
if(bodytemperature < minbodytemp)
|
||||
fire_alert = 2
|
||||
adjustFireLoss(cold_damage_per_tick)
|
||||
if(fire)
|
||||
fire.icon_state = "fire1"
|
||||
throw_alert("temp", /obj/screen/alert/cold, 3)
|
||||
else if(bodytemperature > maxbodytemp)
|
||||
fire_alert = 1
|
||||
adjustFireLoss(heat_damage_per_tick)
|
||||
if(fire)
|
||||
fire.icon_state = "fire2"
|
||||
throw_alert("temp", /obj/screen/alert/hot, 3)
|
||||
else
|
||||
fire_alert = 0
|
||||
if(fire)
|
||||
fire.icon_state = "fire0"
|
||||
clear_alert("temp")
|
||||
|
||||
if(atmos_unsuitable)
|
||||
adjustOxyLoss(unsuitable_atoms_damage)
|
||||
if(oxygen)
|
||||
oxygen.icon_state = "oxy1"
|
||||
else if(oxygen)
|
||||
if(oxygen)
|
||||
oxygen.icon_state = "oxy0"
|
||||
else
|
||||
adjustOxyLoss(-unsuitable_atoms_damage)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/mob/living/simple_mob/instantiate_hud(var/datum/hud/hud)
|
||||
if(!client)
|
||||
return //Why bother.
|
||||
/mob/living/simple_mob/create_mob_hud(datum/hud/HUD)
|
||||
..()
|
||||
|
||||
var/ui_style = 'icons/mob/screen1_animal.dmi'
|
||||
if(ui_icons)
|
||||
@@ -14,9 +13,9 @@
|
||||
var/list/hotkeybuttons = list()
|
||||
var/list/slot_info = list()
|
||||
|
||||
hud.adding = adding
|
||||
hud.other = other
|
||||
hud.hotkeybuttons = hotkeybuttons
|
||||
HUD.adding = adding
|
||||
HUD.other = other
|
||||
HUD.hotkeybuttons = hotkeybuttons
|
||||
|
||||
var/list/hud_elements = list()
|
||||
var/obj/screen/using
|
||||
@@ -65,8 +64,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
hud.action_intent = using
|
||||
HUD.adding += using
|
||||
HUD.action_intent = using
|
||||
|
||||
hud_elements |= using
|
||||
|
||||
@@ -82,8 +81,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM //These sit on the intent box
|
||||
hud.adding += using
|
||||
hud.help_intent = using
|
||||
HUD.adding += using
|
||||
HUD.help_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
@@ -94,8 +93,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
hud.adding += using
|
||||
hud.disarm_intent = using
|
||||
HUD.adding += using
|
||||
HUD.disarm_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
@@ -106,8 +105,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
hud.adding += using
|
||||
hud.grab_intent = using
|
||||
HUD.adding += using
|
||||
HUD.grab_intent = using
|
||||
|
||||
ico = new(ui_style, "black")
|
||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||
@@ -118,8 +117,8 @@
|
||||
using.screen_loc = ui_acti
|
||||
using.alpha = ui_alpha
|
||||
using.layer = LAYER_HUD_ITEM
|
||||
hud.adding += using
|
||||
hud.hurt_intent = using
|
||||
HUD.adding += using
|
||||
HUD.hurt_intent = using
|
||||
|
||||
//Move intent (walk/run)
|
||||
using = new /obj/screen()
|
||||
@@ -129,8 +128,8 @@
|
||||
using.screen_loc = ui_movi
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
hud.move_intent = using
|
||||
HUD.adding += using
|
||||
HUD.move_intent = using
|
||||
|
||||
//Resist button
|
||||
using = new /obj/screen()
|
||||
@@ -140,7 +139,7 @@
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.hotkeybuttons += using
|
||||
HUD.hotkeybuttons += using
|
||||
|
||||
//Pull button
|
||||
pullin = new /obj/screen()
|
||||
@@ -148,7 +147,7 @@
|
||||
pullin.icon_state = "pull0"
|
||||
pullin.name = "pull"
|
||||
pullin.screen_loc = ui_pull_resist
|
||||
hud.hotkeybuttons += pullin
|
||||
HUD.hotkeybuttons += pullin
|
||||
hud_elements |= pullin
|
||||
|
||||
//Health status
|
||||
@@ -159,54 +158,6 @@
|
||||
healths.screen_loc = ui_health
|
||||
hud_elements |= healths
|
||||
|
||||
//Oxygen dep icon
|
||||
oxygen = new /obj/screen()
|
||||
oxygen.icon = ui_style
|
||||
oxygen.icon_state = "oxy0"
|
||||
oxygen.name = "oxygen"
|
||||
oxygen.screen_loc = ui_oxygen
|
||||
hud_elements |= oxygen
|
||||
|
||||
//Toxins present icon
|
||||
toxin = new /obj/screen()
|
||||
toxin.icon = ui_style
|
||||
toxin.icon_state = "tox0"
|
||||
toxin.name = "toxin"
|
||||
toxin.screen_loc = ui_toxin
|
||||
hud_elements |= toxin
|
||||
|
||||
//Fire warning
|
||||
fire = new /obj/screen()
|
||||
fire.icon = ui_style
|
||||
fire.icon_state = "fire0"
|
||||
fire.name = "fire"
|
||||
fire.screen_loc = ui_fire
|
||||
hud_elements |= fire
|
||||
|
||||
//Pressure warning
|
||||
pressure = new /obj/screen()
|
||||
pressure.icon = ui_style
|
||||
pressure.icon_state = "pressure0"
|
||||
pressure.name = "pressure"
|
||||
pressure.screen_loc = ui_pressure
|
||||
hud_elements |= pressure
|
||||
|
||||
//Body temp warning
|
||||
bodytemp = new /obj/screen()
|
||||
bodytemp.icon = ui_style
|
||||
bodytemp.icon_state = "temp0"
|
||||
bodytemp.name = "body temperature"
|
||||
bodytemp.screen_loc = ui_temp
|
||||
hud_elements |= bodytemp
|
||||
|
||||
//Nutrition status
|
||||
nutrition_icon = new /obj/screen()
|
||||
nutrition_icon.icon = ui_style
|
||||
nutrition_icon.icon_state = "nutrition0"
|
||||
nutrition_icon.name = "nutrition"
|
||||
nutrition_icon.screen_loc = ui_nutrition
|
||||
hud_elements |= nutrition_icon
|
||||
|
||||
pain = new /obj/screen( null )
|
||||
|
||||
zone_sel = new /obj/screen/zone_sel( null )
|
||||
@@ -227,7 +178,7 @@
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.hotkeybuttons += using
|
||||
HUD.hotkeybuttons += using
|
||||
|
||||
//Equip detail
|
||||
using = new /obj/screen()
|
||||
@@ -237,7 +188,7 @@
|
||||
using.screen_loc = ui_equip
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Hand slots themselves
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
@@ -251,8 +202,8 @@
|
||||
inv_box.slot_id = slot_r_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
hud.r_hand_hud_object = inv_box
|
||||
hud.adding += inv_box
|
||||
HUD.r_hand_hud_object = inv_box
|
||||
HUD.adding += inv_box
|
||||
slot_info["[slot_r_hand]"] = inv_box.screen_loc
|
||||
|
||||
inv_box = new /obj/screen/inventory/hand()
|
||||
@@ -266,8 +217,8 @@
|
||||
inv_box.slot_id = slot_l_hand
|
||||
inv_box.color = ui_color
|
||||
inv_box.alpha = ui_alpha
|
||||
hud.l_hand_hud_object = inv_box
|
||||
hud.adding += inv_box
|
||||
HUD.l_hand_hud_object = inv_box
|
||||
HUD.adding += inv_box
|
||||
slot_info["[slot_l_hand]"] = inv_box.screen_loc
|
||||
|
||||
//Swaphand titlebar
|
||||
@@ -278,7 +229,7 @@
|
||||
using.screen_loc = ui_swaphand1
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
HUD.adding += using
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
@@ -287,7 +238,7 @@
|
||||
using.screen_loc = ui_swaphand2
|
||||
using.color = ui_color
|
||||
using.alpha = ui_alpha
|
||||
hud.adding += using
|
||||
HUD.adding += using
|
||||
|
||||
//Throw button
|
||||
throw_icon = new /obj/screen()
|
||||
@@ -297,15 +248,13 @@
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
throw_icon.color = ui_color
|
||||
throw_icon.alpha = ui_alpha
|
||||
hud.hotkeybuttons += throw_icon
|
||||
HUD.hotkeybuttons += throw_icon
|
||||
hud_elements |= throw_icon
|
||||
|
||||
extra_huds(hud,ui_style,hud_elements)
|
||||
extra_huds(HUD, HUD.ui_style, hud_elements)
|
||||
|
||||
client.screen = list()
|
||||
|
||||
client.screen += hud_elements
|
||||
client.screen += adding + hotkeybuttons
|
||||
client.screen += client.void
|
||||
|
||||
return
|
||||
if(client)
|
||||
client.screen = list()
|
||||
client.screen += hud_elements
|
||||
client.screen += adding + hotkeybuttons
|
||||
client.screen += client.void
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
var/maxbodytemp = 350 // Maximum of above
|
||||
var/heat_damage_per_tick = 3 // Amount of damage applied if animal's body temperature is higher than maxbodytemp
|
||||
var/cold_damage_per_tick = 2 // Same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
|
||||
var/fire_alert = 0 // 0 = fine, 1 = hot, 2 = cold
|
||||
|
||||
var/min_oxy = 5 // Oxygen in moles, minimum, 0 is 'no minimum'
|
||||
var/max_oxy = 0 // Oxygen in moles, maximum, 0 is 'no maximum'
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
else
|
||||
client.eye = src
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
reload_fullscreen() // Reload any fullscreen overlays this mob has.
|
||||
add_click_catcher()
|
||||
update_client_color()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
disconnect_time = world.realtime //VOREStation Addition: logging when we disappear.
|
||||
update_client_z(null)
|
||||
log_access_out(src)
|
||||
unset_machine()
|
||||
if(admin_datums[src.ckey])
|
||||
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
||||
var/admins_number = GLOB.admins.len
|
||||
|
||||
@@ -22,16 +22,10 @@
|
||||
pullin = null
|
||||
purged = null
|
||||
internals = null
|
||||
oxygen = null
|
||||
i_select = null
|
||||
m_select = null
|
||||
toxin = null
|
||||
fire = null
|
||||
bodytemp = null
|
||||
healths = null
|
||||
throw_icon = null
|
||||
nutrition_icon = null
|
||||
pressure = null
|
||||
pain = null
|
||||
item_use_icon = null
|
||||
gun_move_icon = null
|
||||
@@ -962,6 +956,7 @@ mob/proc/yank_out_object()
|
||||
valid_objects = get_visible_implants(0)
|
||||
if(valid_objects.len == 1) //Yanking out last object - removing verb.
|
||||
src.verbs -= /mob/proc/yank_out_object
|
||||
clear_alert("embeddedobject")
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
@@ -1234,3 +1229,11 @@ mob/proc/yank_out_object()
|
||||
|
||||
/mob/proc/GetAltName()
|
||||
return ""
|
||||
|
||||
/mob/proc/get_ghost(even_if_they_cant_reenter = 0)
|
||||
if(mind)
|
||||
return mind.get_ghost(even_if_they_cant_reenter)
|
||||
|
||||
/mob/proc/grab_ghost(force)
|
||||
if(mind)
|
||||
return mind.grab_ghost(force = force)
|
||||
@@ -16,16 +16,10 @@
|
||||
var/obj/screen/pullin = null
|
||||
var/obj/screen/purged = null
|
||||
var/obj/screen/internals = null
|
||||
var/obj/screen/oxygen = null
|
||||
var/obj/screen/i_select = null
|
||||
var/obj/screen/m_select = null
|
||||
var/obj/screen/toxin = null
|
||||
var/obj/screen/fire = null
|
||||
var/obj/screen/bodytemp = null
|
||||
var/obj/screen/healths = null
|
||||
var/obj/screen/throw_icon = null
|
||||
var/obj/screen/nutrition_icon = null
|
||||
var/obj/screen/pressure = null
|
||||
var/obj/screen/pain = null
|
||||
var/obj/screen/gun/item/item_use_icon = null
|
||||
var/obj/screen/gun/radio/radio_use_icon = null
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
else if(catwalk?.hatch_open)
|
||||
var/pull_up_time = max(5 SECONDS + (src.movement_delay() * 10), 1)
|
||||
to_chat(src, "<span class='notice'>You grab the edge of \the [catwalk] and start pulling yourself upward...</span>")
|
||||
var/old_dest = destination
|
||||
destination = get_step(destination, dir) // mob's dir
|
||||
if(!destination?.Enter(src, old_dest))
|
||||
to_chat(src, "<span class='notice'>There's something in the way up above in that direction, try another.</span>")
|
||||
return 0
|
||||
destination.audible_message("<span class='notice'>You hear something climbing up \the [catwalk].</span>")
|
||||
if(do_after(src, pull_up_time))
|
||||
to_chat(src, "<span class='notice'>You pull yourself up.</span>")
|
||||
|
||||
@@ -469,6 +469,8 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(!istype(implanted_object,/obj/item/weapon/implant) && !istype(implanted_object,/obj/item/device/nif)) // We don't want to remove REAL implants. Just shrapnel etc. //VOREStation Edit - NIFs pls
|
||||
implanted_object.loc = get_turf(src)
|
||||
implants -= implanted_object
|
||||
if(!owner.has_embedded_objects())
|
||||
owner.clear_alert("embeddedobject")
|
||||
|
||||
if(owner && !ignore_prosthetic_prefs)
|
||||
if(owner.client && owner.client.prefs && owner.client.prefs.real_name == owner.real_name)
|
||||
@@ -1184,6 +1186,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
implants += W
|
||||
owner.embedded_flag = 1
|
||||
owner.verbs += /mob/proc/yank_out_object
|
||||
owner.throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
|
||||
W.add_blood(owner)
|
||||
if(ismob(W.loc))
|
||||
var/mob/living/H = W.loc
|
||||
@@ -1372,4 +1375,11 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(bling.body_parts_covered & src.body_part)
|
||||
covering_clothing |= bling
|
||||
|
||||
return covering_clothing
|
||||
return covering_clothing
|
||||
|
||||
/mob/living/carbon/human/proc/has_embedded_objects()
|
||||
. = 0
|
||||
for(var/obj/item/organ/external/L in organs)
|
||||
for(var/obj/item/I in L.implants)
|
||||
if(!istype(I,/obj/item/weapon/implant) && !istype(I,/obj/item/device/nif))
|
||||
return 1
|
||||
@@ -11,10 +11,12 @@
|
||||
active_power_usage = 200
|
||||
power_channel = EQUIP
|
||||
circuit = /obj/item/weapon/circuitboard/photocopier
|
||||
can_buckle = TRUE
|
||||
var/obj/item/copyitem = null //what's in the copier!
|
||||
var/copies = 1 //how many copies to print!
|
||||
var/toner = 30 //how much toner is left! woooooo~
|
||||
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
|
||||
var/copying = FALSE // Is the printer busy with something? Sanity check variable.
|
||||
|
||||
/obj/machinery/photocopier/Initialize()
|
||||
. = ..()
|
||||
@@ -43,6 +45,7 @@
|
||||
|
||||
var/list/data = list()
|
||||
data["copyItem"] = copyitem
|
||||
data["assPresent"] = has_buckled_mobs()
|
||||
data["toner"] = toner
|
||||
data["copies"] = copies
|
||||
data["maxCopies"] = maxcopies
|
||||
@@ -58,39 +61,64 @@
|
||||
ui.open()
|
||||
ui.set_auto_update(10)
|
||||
|
||||
/obj/machinery/photocopier/proc/copy_operation(var/mob/user)
|
||||
if(copying)
|
||||
return FALSE
|
||||
copying = TRUE
|
||||
for(var/i = 0, i < copies, i++)
|
||||
if(toner <= 0)
|
||||
break
|
||||
|
||||
if (istype(copyitem, /obj/item/weapon/paper))
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
sleep(11)
|
||||
copy(copyitem)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
else if (istype(copyitem, /obj/item/weapon/photo))
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
sleep(11)
|
||||
photocopy(copyitem)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
else if (istype(copyitem, /obj/item/weapon/paper_bundle))
|
||||
sleep(11)
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
var/obj/item/weapon/paper_bundle/B = bundlecopy(copyitem)
|
||||
sleep(11*B.pages.len)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
else if (has_buckled_mobs()) // VOREStation EDIT: For ass-copying.
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it attempts to scan.</span>")
|
||||
sleep(rand(20,45)) // Sit with your bare ass on the copier for a random time, feel like a fool, get stared at.
|
||||
copyass(user)
|
||||
sleep(15)
|
||||
audible_message("<span class='notice'>You can hear [src] whirring as it finishes printing.</span>")
|
||||
playsound(loc, "sound/machines/buzzbeep.ogg", 30)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [copyitem] can't be copied by [src].</span>")
|
||||
playsound(loc, "sound/machines/buzz-two.ogg", 100)
|
||||
break
|
||||
|
||||
use_power(active_power_usage)
|
||||
copying = FALSE
|
||||
|
||||
/obj/machinery/photocopier/Topic(href, href_list)
|
||||
if(href_list["copy"])
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/copy_operation, usr), 0)
|
||||
|
||||
for(var/i = 0, i < copies, i++)
|
||||
if(toner <= 0)
|
||||
break
|
||||
|
||||
if (istype(copyitem, /obj/item/weapon/paper))
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
sleep(11)
|
||||
copy(copyitem)
|
||||
else if (istype(copyitem, /obj/item/weapon/photo))
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
sleep(11)
|
||||
photocopy(copyitem)
|
||||
else if (istype(copyitem, /obj/item/weapon/paper_bundle))
|
||||
sleep(11)
|
||||
playsound(loc, "sound/machines/copier.ogg", 100, 1)
|
||||
var/obj/item/weapon/paper_bundle/B = bundlecopy(copyitem)
|
||||
sleep(11*B.pages.len)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>\The [copyitem] can't be copied by \the [src].</span>")
|
||||
break
|
||||
|
||||
use_power(active_power_usage)
|
||||
else if(href_list["remove"])
|
||||
if(copyitem)
|
||||
copyitem.loc = usr.loc
|
||||
usr.put_in_hands(copyitem)
|
||||
to_chat(usr, "<span class='notice'>You take \the [copyitem] out of \the [src].</span>")
|
||||
copyitem = null
|
||||
else if(has_buckled_mobs())
|
||||
to_chat(buckled_mobs[1], "<span class='notice'>You feel a slight pressure on your ass.</span>") // It can't eject your asscheeks, but it'll try.
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["min"])
|
||||
if(copies > 1)
|
||||
copies--
|
||||
@@ -145,7 +173,6 @@
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
|
||||
else if(default_deconstruction_screwdriver(user, O))
|
||||
return
|
||||
else if(default_deconstruction_crowbar(user, O))
|
||||
@@ -205,6 +232,7 @@
|
||||
if(need_toner)
|
||||
toner--
|
||||
if(toner == 0)
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
return c
|
||||
|
||||
@@ -227,16 +255,103 @@
|
||||
toner -= 5 //photos use a lot of ink!
|
||||
if(toner < 0)
|
||||
toner = 0
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
|
||||
return p
|
||||
|
||||
// VOREStation Edit Start
|
||||
|
||||
/obj/machinery/photocopier/proc/copyass(mob/user)
|
||||
var/icon/temp_img
|
||||
if(!has_buckled_mobs()) // Are there no mobs buckled to the photocopier?
|
||||
return
|
||||
var/mob/sitter = buckled_mobs[1] // You have to be sitting on the copier/buckled to it and either be a xeno or a human without clothes on that cover your ass.
|
||||
if(ishuman(sitter)) // Suit checks are in can_buckle_mobs at the bottom of the file.
|
||||
var/mob/living/carbon/human/H = sitter // All human subtypes.
|
||||
var/species_to_check = H.get_species()
|
||||
if(species_to_check == SPECIES_CUSTOM || species_to_check == SPECIES_XENOCHIMERA) // Are we a custom species, or Xenochimera? If so, what is the base icon sprite for our species?
|
||||
species_to_check = H.species.base_species // Grab the base species and use that as the 'species' for the purpose of printing off your asscheeks.
|
||||
switch(species_to_check)
|
||||
if(SPECIES_HUMAN)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "human")
|
||||
if(SPECIES_TAJ)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "tajaran")
|
||||
if(SPECIES_UNATHI)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "unathi")
|
||||
if(SPECIES_SKRELL)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "skrell")
|
||||
if(SPECIES_VOX)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "vox")
|
||||
if(SPECIES_DIONA)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "diona")
|
||||
if(SPECIES_PROMETHEAN)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "slime")
|
||||
if(SPECIES_VULPKANIN)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "vulp")
|
||||
if(SPECIES_PROTEAN)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "machine")
|
||||
if(SPECIES_WEREBEAST)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "vulp") // Give Werewolves their own thicc'er than a boal of oatmeal ass sprite someday?
|
||||
if(SPECIES_XENOHYBRID, SPECIES_XENO, SPECIES_XENO_DRONE, SPECIES_XENO_HUNTER, SPECIES_XENO_QUEEN, SPECIES_XENO_SENTINEL) // Xenos + Xenohybrids have their own asses, thanks to Pybro.
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "xeno")
|
||||
if(SPECIES_ZORREN_HIGH)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "vulp") // placeholder until we get zorren butts.
|
||||
if(SPECIES_FENNEC)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "vulp") // placeholder until we get fennec butts.
|
||||
if(SPECIES_AKULA)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "xeno") // placeholder until we get proper sharkbutt. AKULA BE THICC ASS SHARKS MMMMMMMMMMMMMMKAY?
|
||||
/* // Commented out because no icons exist, BUT if someone wants to sprite some more ASSCHEEKS, then just uncomment these and you have asses for each species. - Rykka.
|
||||
if(SPECIES_TESHARI)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "tesh")
|
||||
if(SPECIES_SHADEKIN || SPECIES_SHADEKIN_CREW)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "shadekin")
|
||||
if(SPECIES_ALRAUNE)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "alraune")
|
||||
if(SPECIES_NEVREAN)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "nevrean")
|
||||
if(SPECIES_RAPALA)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "rapala")
|
||||
if(SPECIES_ZADDAT)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "zaddat")
|
||||
if(SPECIES_SERGAL)
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "sergal")
|
||||
*/
|
||||
else // Sanity/Safety check - does their species not show up or not work, or did something fail, but they're DEFINITELY a /human/ subtype? Print the 'default' ass.
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "human")
|
||||
else if(istype(sitter,/mob/living/silicon/robot/drone)) // Are we a drone?
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "drone")
|
||||
else if(istype(sitter,/mob/living/carbon/alien/diona)) // Are we a nymph, instead of a full-grown Diona?
|
||||
temp_img = icon('icons/obj/butts_vr.dmi', "nymph")
|
||||
else
|
||||
return
|
||||
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
|
||||
p.desc = "You see [sitter]'s ass on the photo."
|
||||
p.pixel_x = rand(-10, 10)
|
||||
p.pixel_y = rand(-10, 10)
|
||||
p.img = temp_img
|
||||
p.drop_sound = 'sound/items/drop/paper.ogg'
|
||||
var/icon/small_img = icon(temp_img) // Icon() is needed or else temp_img will be rescaled too >.>
|
||||
var/icon/ic = icon('icons/obj/items.dmi',"photo")
|
||||
small_img.Scale(8, 8)
|
||||
ic.Blend(small_img,ICON_OVERLAY, 10, 13)
|
||||
p.icon = ic
|
||||
toner -= 10 // PHOTOCOPYING YOUR ASS IS EXPENSIVE (And so you can't just spam it a bunch).
|
||||
if(toner < 0)
|
||||
toner = 0
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
return p
|
||||
|
||||
// VOREStation Edit Stop
|
||||
|
||||
//If need_toner is 0, the copies will still be lightened when low on toner, however it will not be prevented from printing. TODO: Implement print queues for fax machines and get rid of need_toner
|
||||
/obj/machinery/photocopier/proc/bundlecopy(var/obj/item/weapon/paper_bundle/bundle, var/need_toner=1)
|
||||
var/obj/item/weapon/paper_bundle/p = new /obj/item/weapon/paper_bundle (src)
|
||||
for(var/obj/item/weapon/W in bundle.pages)
|
||||
if(toner <= 0 && need_toner)
|
||||
toner = 0
|
||||
playsound(loc, "sound/machines/buzz-sigh.ogg", 100)
|
||||
visible_message("<span class='notice'>A red light on \the [src] flashes, indicating that it is out of toner.</span>")
|
||||
break
|
||||
|
||||
@@ -255,6 +370,21 @@
|
||||
p.pixel_x = rand(-9, 9)
|
||||
return p
|
||||
|
||||
// VOREStation Edit Start - Rykka
|
||||
|
||||
/obj/machinery/photocopier/can_buckle_check(mob/living/M, forced = FALSE)
|
||||
if(!..())
|
||||
return FALSE
|
||||
for(var/obj/item/clothing/C in M)
|
||||
if(M.item_is_in_hands(C))
|
||||
continue
|
||||
if((C.body_parts_covered & LOWER_TORSO) && !istype(C,/obj/item/clothing/under/permit))
|
||||
to_chat(usr, "<span class='warning'>One needs to not be wearing pants to photocopy one's ass...</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// VOREStation Edit Stop - Rykka
|
||||
|
||||
/obj/item/device/toner
|
||||
name = "toner cartridge"
|
||||
icon_state = "tonercartridge"
|
||||
|
||||
@@ -450,6 +450,8 @@ var/global/list/light_type_cache = list()
|
||||
else
|
||||
update_use_power(USE_POWER_ACTIVE)
|
||||
set_light(correct_range, correct_power, correct_color)
|
||||
if(cell?.charge < cell?.maxcharge)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(has_emergency_power(LIGHT_EMERGENCY_POWER_USE) && !turned_off())
|
||||
update_use_power(USE_POWER_IDLE)
|
||||
emergency_mode = TRUE
|
||||
@@ -845,11 +847,11 @@ var/global/list/light_type_cache = list()
|
||||
if(has_power())
|
||||
emergency_mode = FALSE
|
||||
update(FALSE)
|
||||
if(cell.charge == cell.maxcharge)
|
||||
if(!cell.give(LIGHT_EMERGENCY_POWER_USE*2)) // Recharge and stop if no more was able to be added
|
||||
return PROCESS_KILL
|
||||
cell.charge = min(cell.maxcharge, cell.charge + LIGHT_EMERGENCY_POWER_USE*2) //Recharge emergency power automatically while not using it
|
||||
if(emergency_mode && !use_emergency_power(LIGHT_EMERGENCY_POWER_USE))
|
||||
update(FALSE) //Disables emergency mode and sets the color to normal
|
||||
return PROCESS_KILL // Drop out if we're out of cell power. These are often in POIs and there's no point in recharging.
|
||||
|
||||
if(auto_flicker && !flickering)
|
||||
if(check_for_player_proximity(src, radius = 12, ignore_ghosts = FALSE, ignore_afk = TRUE))
|
||||
|
||||
@@ -206,6 +206,8 @@
|
||||
user.visible_message("<span class='notice'>[user] takes something out of incision on [target]'s [affected.name] with \the [tool]!</span>", \
|
||||
"<span class='notice'>You take [obj] out of incision on [target]'s [affected.name]s with \the [tool]!</span>" )
|
||||
affected.implants -= obj
|
||||
if(!target.has_embedded_objects())
|
||||
target.clear_alert("embeddedobject")
|
||||
|
||||
BITSET(target.hud_updateflag, IMPLOYAL_HUD)
|
||||
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
/world/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE)
|
||||
var/current_api = TGS_READ_GLOBAL(tgs)
|
||||
if(current_api)
|
||||
TGS_ERROR_LOG("TgsNew(): TGS API datum already set ([current_api])! Was TgsNew() called more than once?")
|
||||
TGS_ERROR_LOG("API datum already set (\ref[current_api] ([current_api]))! Was TgsNew() called more than once?")
|
||||
return
|
||||
|
||||
if(!(minimum_required_security_level in list(TGS_SECURITY_ULTRASAFE, TGS_SECURITY_SAFE, TGS_SECURITY_TRUSTED)))
|
||||
TGS_ERROR_LOG("Invalid minimum_required_security_level: [minimum_required_security_level]!")
|
||||
return
|
||||
|
||||
#ifdef TGS_V3_API
|
||||
minimum_required_security_level = TGS_SECURITY_TRUSTED
|
||||
if(minimum_required_security_level != TGS_SECURITY_TRUSTED)
|
||||
TGS_WARNING_LOG("V3 DMAPI requires trusted security!")
|
||||
minimum_required_security_level = TGS_SECURITY_TRUSTED
|
||||
#endif
|
||||
var/raw_parameter = world.params[TGS_VERSION_PARAMETER]
|
||||
if(!raw_parameter)
|
||||
@@ -13,7 +19,7 @@
|
||||
|
||||
var/datum/tgs_version/version = new(raw_parameter)
|
||||
if(!version.Valid(FALSE))
|
||||
TGS_ERROR_LOG("Failed to validate TGS version parameter: [raw_parameter]!")
|
||||
TGS_ERROR_LOG("Failed to validate DMAPI version parameter: [raw_parameter]!")
|
||||
return
|
||||
|
||||
var/api_datum
|
||||
@@ -21,6 +27,7 @@
|
||||
if(3)
|
||||
#ifndef TGS_V3_API
|
||||
TGS_ERROR_LOG("Detected V3 API but TGS_V3_API isn't defined!")
|
||||
return
|
||||
#else
|
||||
switch(version.minor)
|
||||
if(2)
|
||||
@@ -43,11 +50,16 @@
|
||||
return
|
||||
|
||||
TGS_INFO_LOG("Activating API for version [version.deprefixed_parameter]")
|
||||
var/datum/tgs_api/new_api = new api_datum(version)
|
||||
|
||||
if(event_handler && !istype(event_handler))
|
||||
TGS_ERROR_LOG("Invalid parameter for event_handler: [event_handler]")
|
||||
event_handler = null
|
||||
|
||||
var/datum/tgs_api/new_api = new api_datum(event_handler, version)
|
||||
|
||||
TGS_WRITE_GLOBAL(tgs, new_api)
|
||||
|
||||
var/result = new_api.OnWorldNew(event_handler, minimum_required_security_level)
|
||||
var/result = new_api.OnWorldNew(minimum_required_security_level)
|
||||
if(!result || result == TGS_UNIMPLEMENTED)
|
||||
TGS_WRITE_GLOBAL(tgs, null)
|
||||
TGS_ERROR_LOG("Failed to activate API!")
|
||||
|
||||
@@ -2,9 +2,11 @@ TGS_DEFINE_AND_SET_GLOBAL(tgs, null)
|
||||
|
||||
/datum/tgs_api
|
||||
var/datum/tgs_version/version
|
||||
var/datum/tgs_event_handler/event_handler
|
||||
|
||||
/datum/tgs_api/New(datum/tgs_version/version)
|
||||
/datum/tgs_api/New(datum/tgs_event_handler/event_handler, datum/tgs_version/version)
|
||||
. = ..()
|
||||
src.event_handler = event_handler
|
||||
src.version = version
|
||||
|
||||
/datum/tgs_api/latest
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
/datum/tgs_api/v3210/proc/file2list(filename)
|
||||
return splittext(trim_left(trim_right(file2text(filename))), "\n")
|
||||
|
||||
/datum/tgs_api/v3210/OnWorldNew(datum/tgs_event_handler/event_handler, minimum_required_security_level) //don't use event handling in this version
|
||||
/datum/tgs_api/v3210/OnWorldNew(minimum_required_security_level)
|
||||
. = FALSE
|
||||
|
||||
comms_key = world.params[SERVICE_WORLD_PARAM]
|
||||
|
||||
@@ -43,15 +43,13 @@
|
||||
var/list/cached_test_merges
|
||||
var/datum/tgs_revision_information/cached_revision
|
||||
|
||||
var/datum/tgs_event_handler/event_handler
|
||||
|
||||
var/export_lock = FALSE
|
||||
var/list/last_interop_response
|
||||
|
||||
/datum/tgs_api/v4/ApiVersion()
|
||||
return new /datum/tgs_version("4.0.0.0")
|
||||
|
||||
/datum/tgs_api/v4/OnWorldNew(datum/tgs_event_handler/event_handler, minimum_required_security_level)
|
||||
/datum/tgs_api/v4/OnWorldNew(minimum_required_security_level)
|
||||
json_path = world.params[TGS4_PARAM_INFO_JSON]
|
||||
if(!json_path)
|
||||
TGS_ERROR_LOG("Missing [TGS4_PARAM_INFO_JSON] world parameter!")
|
||||
@@ -76,7 +74,6 @@
|
||||
security_level = cached_json["securityLevel"]
|
||||
chat_channels_json_path = cached_json["chatChannelsJson"]
|
||||
chat_commands_json_path = cached_json["chatCommandsJson"]
|
||||
src.event_handler = event_handler
|
||||
instance_name = cached_json["instanceName"]
|
||||
|
||||
ListCustomCommands()
|
||||
|
||||
@@ -60,8 +60,10 @@
|
||||
#define DMAPI5_TOPIC_COMMAND_CHANGE_PORT 2
|
||||
#define DMAPI5_TOPIC_COMMAND_CHANGE_REBOOT_STATE 3
|
||||
#define DMAPI5_TOPIC_COMMAND_INSTANCE_RENAMED 4
|
||||
#define DMAPI5_TOPIC_COMMAND_CHAT_CHANNELS_UPDATE 4
|
||||
#define DMAPI5_TOPIC_COMMAND_SERVER_PORT_UPDATE 5
|
||||
#define DMAPI5_TOPIC_COMMAND_CHAT_CHANNELS_UPDATE 5
|
||||
#define DMAPI5_TOPIC_COMMAND_SERVER_PORT_UPDATE 6
|
||||
#define DMAPI5_TOPIC_COMMAND_HEARTBEAT 7
|
||||
#define DMAPI5_TOPIC_COMMAND_WATCHDOG_REATTACH 8
|
||||
|
||||
#define DMAPI5_TOPIC_PARAMETER_COMMAND_TYPE "commandType"
|
||||
#define DMAPI5_TOPIC_PARAMETER_CHAT_COMMAND "chatCommand"
|
||||
@@ -70,6 +72,7 @@
|
||||
#define DMAPI5_TOPIC_PARAMETER_NEW_REBOOT_STATE "newRebootState"
|
||||
#define DMAPI5_TOPIC_PARAMETER_NEW_INSTANCE_NAME "newInstanceName"
|
||||
#define DMAPI5_TOPIC_PARAMETER_CHAT_UPDATE "chatUpdate"
|
||||
#define DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION "newServerVersion"
|
||||
|
||||
#define DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE "commandResponseMessage"
|
||||
#define DMAPI5_TOPIC_RESPONSE_CHAT_RESPONSES "chatResponses"
|
||||
|
||||
@@ -15,18 +15,15 @@
|
||||
var/datum/tgs_revision_information/revision
|
||||
var/list/chat_channels
|
||||
|
||||
var/datum/tgs_event_handler/event_handler
|
||||
|
||||
/datum/tgs_api/v5/ApiVersion()
|
||||
return new /datum/tgs_version("5.0.0")
|
||||
|
||||
/datum/tgs_api/v5/OnWorldNew(datum/tgs_event_handler/event_handler, minimum_required_security_level)
|
||||
src.event_handler = event_handler
|
||||
return new /datum/tgs_version("5.1.1")
|
||||
|
||||
/datum/tgs_api/v5/OnWorldNew(minimum_required_security_level)
|
||||
server_port = world.params[DMAPI5_PARAM_SERVER_PORT]
|
||||
access_identifier = world.params[DMAPI5_PARAM_ACCESS_IDENTIFIER]
|
||||
|
||||
var/datum/tgs_version/api_version = ApiVersion()
|
||||
version = null
|
||||
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_BRIDGE_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands()))
|
||||
if(!istype(bridge_response))
|
||||
TGS_ERROR_LOG("Failed initial bridge request!")
|
||||
@@ -41,9 +38,9 @@
|
||||
TGS_INFO_LOG("DMAPI validation, exiting...")
|
||||
del(world)
|
||||
|
||||
version = new /datum/tgs_version(runtime_information[DMAPI5_RUNTIME_INFORMATION_SERVER_VERSION])
|
||||
security_level = runtime_information[DMAPI5_RUNTIME_INFORMATION_SECURITY_LEVEL]
|
||||
instance_name = runtime_information[DMAPI5_RUNTIME_INFORMATION_INSTANCE_NAME]
|
||||
version = new /datum/tgs_version(runtime_information[DMAPI5_RUNTIME_INFORMATION_SERVER_VERSION])
|
||||
|
||||
var/list/revisionData = runtime_information[DMAPI5_RUNTIME_INFORMATION_REVISION]
|
||||
if(istype(revisionData))
|
||||
@@ -84,6 +81,10 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/tgs_api/v5/proc/RequireInitialBridgeResponse()
|
||||
while(!version)
|
||||
sleep(1)
|
||||
|
||||
/datum/tgs_api/v5/OnInitializationComplete()
|
||||
Bridge(DMAPI5_BRIDGE_COMMAND_PRIME)
|
||||
|
||||
@@ -197,6 +198,20 @@
|
||||
|
||||
server_port = new_port
|
||||
return TopicResponse()
|
||||
if(DMAPI5_TOPIC_COMMAND_HEARTBEAT)
|
||||
return TopicResponse()
|
||||
if(DMAPI5_TOPIC_COMMAND_WATCHDOG_REATTACH)
|
||||
var/new_version_string = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]
|
||||
if (!istext(new_version_string))
|
||||
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]]")
|
||||
|
||||
var/datum/tgs_version/new_version = new(new_version_string)
|
||||
if (event_handler)
|
||||
event_handler.HandleEvent(TGS_EVENT_WATCHDOG_REATTACH, new_version)
|
||||
|
||||
version = new_version
|
||||
|
||||
return TopicResponse()
|
||||
|
||||
return TopicResponse("Unknown command: [command]")
|
||||
|
||||
@@ -252,15 +267,18 @@
|
||||
TGS_ERROR_LOG("Unable to set port to [port]!")
|
||||
|
||||
/datum/tgs_api/v5/InstanceName()
|
||||
RequireInitialBridgeResponse()
|
||||
return instance_name
|
||||
|
||||
/datum/tgs_api/v5/TestMerges()
|
||||
RequireInitialBridgeResponse()
|
||||
return test_merges
|
||||
|
||||
/datum/tgs_api/v5/EndProcess()
|
||||
Bridge(DMAPI5_BRIDGE_COMMAND_KILL)
|
||||
|
||||
/datum/tgs_api/v5/Revision()
|
||||
RequireInitialBridgeResponse()
|
||||
return revision
|
||||
|
||||
/datum/tgs_api/v5/ChatBroadcast(message, list/channels)
|
||||
@@ -298,6 +316,7 @@
|
||||
Bridge(DMAPI5_BRIDGE_COMMAND_CHAT_SEND, list(DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE = message))
|
||||
|
||||
/datum/tgs_api/v5/ChatChannelInfo()
|
||||
RequireInitialBridgeResponse()
|
||||
return chat_channels
|
||||
|
||||
/datum/tgs_api/v5/proc/DecodeChannels(chat_update_json)
|
||||
@@ -322,6 +341,7 @@
|
||||
return channel
|
||||
|
||||
/datum/tgs_api/v5/SecurityLevel()
|
||||
RequireInitialBridgeResponse()
|
||||
return security_level
|
||||
|
||||
/*
|
||||
|
||||
@@ -21,10 +21,44 @@
|
||||
|
||||
/datum/tgs_chat_command/staffwho/Run(datum/tgs_chat_user/sender, params)
|
||||
var/message = "Current online staff:\n"
|
||||
var/list/counts = get_staffwho_numbers()
|
||||
var/list/keys = counts["keys"]
|
||||
counts -= "keys" // Remove the 'keys' list as we don't want to iterate onto it here. We can hold the list.
|
||||
for(var/key in counts)
|
||||
message += "**[key]:** [counts[key]]\n"
|
||||
message += "**Online:** [english_list(keys, "***!!Nobody!!***")]"
|
||||
return message
|
||||
|
||||
var/list/admin_keys = list()
|
||||
var/list/mod_keys = list()
|
||||
var/list/dev_keys = list()
|
||||
var/list/other_keys = list()
|
||||
|
||||
var/count = 0
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
count++
|
||||
var/keymsg = "[C.key]"
|
||||
if(C.is_afk())
|
||||
keymsg += " (AFK)"
|
||||
else if(C.holder.fakekey)
|
||||
keymsg += " (Stealth)"
|
||||
else if(isobserver(C.mob))
|
||||
keymsg += " (Ghost)"
|
||||
else if(isnewplayer(C.mob))
|
||||
keymsg += " (Lobby)"
|
||||
else
|
||||
keymsg += " (Ingame)"
|
||||
|
||||
if(R_ADMIN & C.holder.rights && R_BAN & C.holder.rights) // R_ADMIN and R_BAN apparently an admin makes
|
||||
admin_keys += keymsg
|
||||
|
||||
else if(R_ADMIN & C.holder.rights && !(R_SERVER & C.holder.rights)) // R_ADMIN but not R_SERVER makes a moderator
|
||||
mod_keys += keymsg
|
||||
|
||||
else if(R_SERVER & C.holder.rights) // R_SERVER makes a dev
|
||||
dev_keys += keymsg
|
||||
|
||||
else // No R_ADMIN&&R_BAN, R_ADMIN!R_BAN, R_SERVER, must be a GM or something
|
||||
other_keys += keymsg
|
||||
|
||||
var/admin_msg = english_list(admin_keys, "-None-")
|
||||
var/mod_msg = english_list(mod_keys, "-None-")
|
||||
var/dev_msg = english_list(dev_keys, "-None-")
|
||||
var/other_msg = english_list(other_keys, "-None-")
|
||||
|
||||
message += "**Admins:** [admin_msg]\n**Mods/GMs:** [mod_msg]\n **Devs:** [dev_msg]\n**Other:** [other_msg]\n**Total:** [count] online"
|
||||
return message
|
||||
@@ -62,6 +62,8 @@
|
||||
#undef DMAPI5_TOPIC_COMMAND_INSTANCE_RENAMED
|
||||
#undef DMAPI5_TOPIC_COMMAND_CHAT_CHANNELS_UPDATE
|
||||
#undef DMAPI5_TOPIC_COMMAND_SERVER_PORT_UPDATE
|
||||
#undef DMAPI5_TOPIC_COMMAND_HEARTBEAT
|
||||
#undef DMAPI5_TOPIC_COMMAND_WATCHDOG_REATTACH
|
||||
|
||||
#undef DMAPI5_TOPIC_PARAMETER_COMMAND_TYPE
|
||||
#undef DMAPI5_TOPIC_PARAMETER_CHAT_COMMAND
|
||||
@@ -70,6 +72,7 @@
|
||||
#undef DMAPI5_TOPIC_PARAMETER_NEW_REBOOT_STATE
|
||||
#undef DMAPI5_TOPIC_PARAMETER_NEW_INSTANCE_NAME
|
||||
#undef DMAPI5_TOPIC_PARAMETER_CHAT_UPDATE
|
||||
#undef DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION
|
||||
|
||||
#undef DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE
|
||||
#undef DMAPI5_TOPIC_RESPONSE_CHAT_RESPONSES
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user