- F12 now properly hides the action buttons

- Changed the 'black overlay' you get when paralyzed, blind or in critical condition to include a small circle around you. It still 'blinks' once every 25 seconds or so.
- Added a flag BLOCK_GAS_SMOKE_EFFECT, which can be applied to masks, glasses and hats, which prevent gas smoke, which contains reagents, from having an effect on you. Currently only present for gas masks.
- Dramatically lowered the amount of damage you get per breath while in critical condition. Critical condition now lasts for about 5 minutes if nothing is causing you any additional harm. This in combination with the new black image overlay is an attempt at making doctors more willing to help. For one thing they'll have more time to get to you, for another you will get to see if they murder you before sending you to genetics.
- Added Cheridan's wooden chairs to code
- Added a action_button_name to all items, which defaults to null and contains the text which appears on the action button. If an action button exists, but this variable is not set, the text will default to 'Use [name]', name being the name of the item tied to the button.
- Fixed the problem which resulted in certain glasses types making you keep night vision abilities even after you took them off. 

(Screenshot of black overlay: http://www.kamletos.si/blackimage4.png)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4280 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-08-02 08:25:34 +00:00
parent 26a0226f0d
commit 49f3db9954
18 changed files with 326 additions and 69 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "gas mask"
desc = "A face-covering mask that can be connected to an air supply."
icon_state = "gas_alt"
flags = FPRINT|TABLEPASS|SUITSPACE|MASKCOVERSMOUTH|MASKCOVERSEYES
flags = FPRINT | TABLEPASS | SUITSPACE | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
w_class = 3.0
item_state = "gas_alt"
+11 -10
View File
@@ -544,17 +544,18 @@
desc = "Just like back home, on clown planet! HONK!"
icon_state = "pie"
trash = /obj/item/trash/plate
New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("banana",5)
bitesize = 3
throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/pie_smudge(src.loc)
src.visible_message("\red [src.name] splats.","\red You hear a splat.")
del(src)
/obj/item/weapon/reagent_containers/food/snacks/pie/New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("banana",5)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/pie_smudge(src.loc)
src.visible_message("\red [src.name] splats.","\red You hear a splat.")
del(src)
/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis
name = "Berry Clafoutis"
@@ -254,10 +254,10 @@
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen( null )
mymob.blind.icon = 'icons/mob/screen1_alien.dmi'
mymob.blind.icon_state = "blackanimate"
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen( null )
@@ -178,10 +178,10 @@
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen( null )
mymob.blind.icon = 'icons/mob/screen1_alien.dmi'
mymob.blind.icon_state = "blackanimate"
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen( null )
+3 -3
View File
@@ -19,8 +19,8 @@
druggy.mouse_opacity = 0
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
+12 -3
View File
@@ -550,10 +550,11 @@
src.hotkeybuttons += mymob.pullin
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen( null )
@@ -897,6 +898,9 @@ Radar-related things
if(!src.hud_used) return
if(!src.client) return
if(!hud_used.hud_shown) //Hud toggled to minimal
return
src.client.screen -= src.hud_used.item_action_list
hud_used.item_action_list = list()
@@ -905,6 +909,10 @@ Radar-related things
var/obj/screen/item_action/A = new(src.hud_used)
A.icon = 'icons/mob/screen1_action.dmi'
A.icon_state = I.icon_action_button
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
@@ -918,6 +926,7 @@ Radar-related things
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list
+33 -19
View File
@@ -1,6 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
#define HUMAN_MAX_OXYLOSS 12 //Defines how much oxyloss humans can get per tick. No air applies this value.
#define HUMAN_CRIT_MAX_OXYLOSS ( (4 * last_tick_duration) /3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
/mob/living/carbon/human
var/oxygen_alert = 0
@@ -31,7 +32,7 @@
//No need to update all of these procs if the guy is dead.
if(stat != DEAD)
if(air_master.current_cycle%4==2) //First, resolve location and get a breath
spawn(0) breathe() //Only try to take a breath every 4 seconds, unless suffocating
spawn(0) breathe() //Only try to take a breath every 4 ticks, unless suffocating
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
@@ -258,10 +259,7 @@
//No breath from internal atmosphere so get breath from location
if(!breath)
if(istype(loc, /obj/))
var/obj/location_as_object = loc
breath = location_as_object.handle_internal_lifeform(src, BREATH_VOLUME)
else if(istype(loc, /turf/))
if(isturf(loc))
var/breath_moles = 0
/*if(environment.return_pressure() > ONE_ATMOSPHERE)
// Loads of air around (pressure effect will be handled elsewhere), so lets just take a enough to fill our lungs at normal atmos pressure (using n = Pv/RT)
@@ -271,12 +269,16 @@
breath_moles = environment.total_moles()*BREATH_PERCENTAGE
breath = loc.remove_air(breath_moles)
// Handle chem smoke effect -- Doohl
var/block = 0
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas))
if(wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
block = 1
if(glasses)
if(glasses.flags & BLOCK_GAS_SMOKE_EFFECT)
block = 1
if(head)
if(head.flags & BLOCK_GAS_SMOKE_EFFECT)
block = 1
if(!block)
@@ -290,9 +292,6 @@
break // If they breathe in the nasty stuff once, no need to continue checking
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
handle_breath(breath)
@@ -322,7 +321,10 @@
if(!breath || (breath.total_moles() == 0))
if(reagents.has_reagent("inaprovaline"))
return
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
if(health > 0)
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
else
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
oxygen_alert = max(oxygen_alert, 1)
@@ -697,14 +699,17 @@
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
Paralyse(3)
/* Done by handle_breath()
if( health <= 20 && prob(1) )
spawn(0)
emote("gasp")
if(!reagents.has_reagent("inaprovaline"))
adjustOxyLoss(1)
Paralyse(3)
adjustOxyLoss(1)*/
if(hallucination)
if(hallucination >= 20)
@@ -849,16 +854,20 @@
if(glasses)
if(istype(glasses, /obj/item/clothing/glasses/meson))
sight |= SEE_TURFS
if(!druggy) see_invisible = SEE_INVISIBLE_MINIMUM
if(!druggy)
see_invisible = SEE_INVISIBLE_MINIMUM
else if(istype(glasses, /obj/item/clothing/glasses/night))
see_in_dark = 5
if(!druggy) see_invisible = SEE_INVISIBLE_MINIMUM
if(!druggy)
see_invisible = SEE_INVISIBLE_MINIMUM
else if(istype(glasses, /obj/item/clothing/glasses/thermal))
sight |= SEE_MOBS
if(!druggy) see_invisible = SEE_INVISIBLE_MINIMUM
if(!druggy)
see_invisible = SEE_INVISIBLE_MINIMUM
else if(istype(glasses, /obj/item/clothing/glasses/material))
sight |= SEE_OBJS
if(!druggy) see_invisible = SEE_INVISIBLE_MINIMUM
if(!druggy)
see_invisible = SEE_INVISIBLE_MINIMUM
/* HUD shit goes here, as long as it doesn't modify sight flags */
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
@@ -880,6 +889,10 @@
else if(istype(O, /obj/item/clothing/glasses/hud/security))
O.process_hud(src)
if(!druggy) see_invisible = SEE_INVISIBLE_LIVING
else
see_invisible = SEE_INVISIBLE_LIVING
else
see_invisible = SEE_INVISIBLE_LIVING
if(sleep && !hal_crit) sleep.icon_state = "sleep[sleeping]" //used?
@@ -1028,4 +1041,5 @@
if ((changeling.geneticdamage > 0))
changeling.geneticdamage = changeling.geneticdamage-1
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_MAX_OXYLOSS
#undef HUMAN_CRIT_MAX_OXYLOSS
+3 -3
View File
@@ -452,10 +452,10 @@
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "blackanimate"
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen( null )
+3 -3
View File
@@ -201,10 +201,10 @@
mymob.pullin.screen_loc = ui_borg_pull
mymob.blind = new /obj/screen( null )
mymob.blind.icon = 'icons/mob/screen1_robot.dmi'
mymob.blind.icon_state = "blackanimate"
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen( null )
+4
View File
@@ -291,6 +291,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
src.client.screen -= src.hud_used.other
if(src.hud_used.hotkeybuttons)
src.client.screen -= src.hud_used.hotkeybuttons
if(src.hud_used.item_action_list)
src.client.screen -= src.hud_used.item_action_list
//Due to some poor coding some things need special treatment:
//These ones are a part of 'adding', 'other' or 'hotkeybuttons' but we want them to stay
@@ -311,11 +313,13 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(src.hud_used.hotkeybuttons && !src.hud_used.hotkey_ui_hidden)
src.client.screen += src.hud_used.hotkeybuttons
src.hud_used.action_intent.screen_loc = ui_acti //Restore intent selection to the original position
src.client.screen += src.zone_sel //This one is a special snowflake
hud_used.hidden_inventory_update()
hud_used.persistant_inventory_update()
update_action_buttons()
else
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
else
+24 -17
View File
@@ -639,10 +639,10 @@
g_amt = 100
brightness = 8
large
w_class = 2
name = "large light tube"
brightness = 15
/obj/item/weapon/light/tube/large
w_class = 2
name = "large light tube"
brightness = 15
/obj/item/weapon/light/bulb
name = "light bulb"
@@ -653,6 +653,10 @@
g_amt = 100
brightness = 5
/obj/item/weapon/light/throw_impact(atom/hit_atom)
..()
shatter()
/obj/item/weapon/light/bulb/fire
name = "fire bulb"
desc = "A replacement fire bulb."
@@ -663,18 +667,18 @@
brightness = 5
// update the icon state and description of the light
/obj/item/weapon/light
proc/update()
switch(status)
if(LIGHT_OK)
icon_state = base_state
desc = "A replacement [name]."
if(LIGHT_BURNED)
icon_state = "[base_state]-burned"
desc = "A burnt-out [name]."
if(LIGHT_BROKEN)
icon_state = "[base_state]-broken"
desc = "A broken [name]."
/obj/item/weapon/light/proc/update()
switch(status)
if(LIGHT_OK)
icon_state = base_state
desc = "A replacement [name]."
if(LIGHT_BURNED)
icon_state = "[base_state]-burned"
desc = "A burnt-out [name]."
if(LIGHT_BROKEN)
icon_state = "[base_state]-broken"
desc = "A broken [name]."
/obj/item/weapon/light/New()
@@ -715,8 +719,11 @@
if(user.a_intent != "hurt")
return
shatter()
/obj/item/weapon/light/proc/shatter()
if(status == LIGHT_OK || status == LIGHT_BURNED)
user << "The [name] shatters!"
src.visible_message("\red [name] shatters.","\red You hear a small glass object shatter.")
status = LIGHT_BROKEN
force = 5
playsound(src.loc, 'Glasshit.ogg', 75, 1)