Merge pull request #9053 from MrPerson/screen_alert_2

More screen alerts
This commit is contained in:
phil235
2015-06-15 01:00:20 +02:00
13 changed files with 121 additions and 6 deletions
@@ -291,6 +291,8 @@
usr.put_in_hands(I)
usr.emote("scream")
usr.visible_message("[usr] successfully rips [I] out of their [L.getDisplayName()]!","<span class='notice'>You successfully remove [I] from your [L.getDisplayName()].</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
return
if(href_list["item"])
@@ -335,6 +335,8 @@
L.embedded_objects -= I
I.loc = get_turf(src)
visible_message("<span class='danger'>\the [I] falls out of [name]'s [L.getDisplayName()]!</span>","<span class='userdanger'>\the [I] falls out of your [L.getDisplayName()]!</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
/mob/living/carbon/human/handle_heart()
if(!heart_attack)
@@ -600,8 +600,12 @@
H.client.screen += global_hud.darkMask
if(H.blind)
if(H.eye_blind) H.blind.layer = 18
else H.blind.layer = 0
if(H.eye_blind)
H.throw_alert("blind")
H.blind.layer = 18
else
H.clear_alert("blind")
H.blind.layer = 0
if(!H.client)//no client, no screen to update
return 1
@@ -609,7 +613,11 @@
if( H.disabilities & NEARSIGHT && !istype(H.glasses, /obj/item/clothing/glasses/regular) )
H.client.screen += global_hud.vimpaired
if(H.eye_blurry) H.client.screen += global_hud.blurry
if(H.druggy) H.client.screen += global_hud.druggy
if(H.druggy)
H.client.screen += global_hud.druggy
H.throw_alert("high")
else
H.clear_alert("high")
if(H.eye_stat > 20)
+4
View File
@@ -293,12 +293,16 @@
CheckStamina()
if(sleeping)
throw_alert("asleep")
handle_dreams()
adjustStaminaLoss(-10)
sleeping = max(sleeping-1, 0)
if( prob(10) && health && !hal_crit )
spawn(0)
emote("snore")
else
clear_alert("asleep")
var/restingpwr = 1 + 4 * resting
+5
View File
@@ -170,8 +170,10 @@
if(blind)
if(eye_blind)
blind.layer = 18
throw_alert("blind")
else
blind.layer = 0
clear_alert("blind")
if (disabilities & NEARSIGHT)
client.screen += global_hud.vimpaired
@@ -181,6 +183,9 @@
if (druggy)
client.screen += global_hud.druggy
throw_alert("high")
else
clear_alert("high")
if(eye_stat > 20)
if(eye_stat > 30)
+4
View File
@@ -664,6 +664,10 @@ Sorry Giacom. Please don't be mad :(
/mob/living/update_gravity(has_gravity)
if(!ticker)
return
if(has_gravity)
clear_alert("weightless")
else
throw_alert("weightless")
float(!has_gravity)
/mob/living/proc/float(on)
+7
View File
@@ -6,30 +6,37 @@
make_laws()
/mob/living/silicon/proc/set_zeroth_law(var/law, var/law_borg)
throw_alert("newlaw")
src.laws_sanity_check()
src.laws.set_zeroth_law(law, law_borg)
/mob/living/silicon/proc/add_inherent_law(var/law)
throw_alert("newlaw")
laws_sanity_check()
laws.add_inherent_law(law)
/mob/living/silicon/proc/clear_inherent_laws()
throw_alert("newlaw")
laws_sanity_check()
laws.clear_inherent_laws()
/mob/living/silicon/proc/add_supplied_law(var/number, var/law)
throw_alert("newlaw")
laws_sanity_check()
laws.add_supplied_law(number, law)
/mob/living/silicon/proc/clear_supplied_laws()
throw_alert("newlaw")
laws_sanity_check()
laws.clear_supplied_laws()
/mob/living/silicon/proc/add_ion_law(var/law)
throw_alert("newlaw")
laws_sanity_check()
laws.add_ion_law(law)
/mob/living/silicon/proc/clear_ion_laws()
throw_alert("newlaw")
laws_sanity_check()
laws.clear_ion_laws()
@@ -939,6 +939,10 @@
// They stay locked down if their wire is cut.
if(wires.LockedCut())
state = 1
if(state)
throw_alert("locked")
else
clear_alert("locked")
lockcharge = state
update_canmove()
@@ -953,6 +957,10 @@
if(hud_used)
hud_used.update_robot_modules_display() //Shows/hides the emag item if the inventory screen is already open.
update_icons()
if(emagged)
throw_alert("hacked")
else
clear_alert("hacked")
/mob/living/silicon/robot/verb/outputlaws()
set category = "Robot Commands"
+9 -1
View File
@@ -188,4 +188,12 @@
for(var/obj/item/organ/limb/L in organs)
for(var/obj/item/I in L.embedded_objects)
L.embedded_objects -= I
I.loc = T
I.loc = T
clear_alert("embeddedobject")
/mob/living/carbon/human/proc/has_embedded_objects()
. = 0
for(var/obj/item/organ/limb/L in organs)
for(var/obj/item/I in L.embedded_objects)
return 1
@@ -33,6 +33,9 @@
I.loc = get_turf(H)
L.embedded_objects -= I
if(!H.has_embedded_objects())
H.clear_alert("embeddedobject")
if(objects > 0)
user.visible_message("[user] sucessfully removes [objects] objects from [H]'s [L.getDisplayName()]!", "<span class='notice'>You sucessfully remove [objects] objects from [H]'s [L.getDisplayName()].</span>")
else