mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 16:09:15 +00:00
Fix flashlights actually stunning
Also make clear_fullscreen() waitfor = 0 to be safe, and bump travis version
This commit is contained in:
@@ -4,7 +4,7 @@ sudo: false
|
||||
env:
|
||||
global:
|
||||
- BYOND_MAJOR="510"
|
||||
- BYOND_MINOR="1321"
|
||||
- BYOND_MINOR="1322"
|
||||
- NODE_VERSION="4"
|
||||
matrix:
|
||||
- DM_MAPFILE="tgstation2"
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
return screen
|
||||
|
||||
/mob/proc/clear_fullscreen(category, animate = 10)
|
||||
set waitfor = 0
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if(!screen)
|
||||
return
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
return
|
||||
|
||||
if(M == user) //they're using it on themselves
|
||||
if(M.flash_eyes())
|
||||
if(M.flash_eyes(visual = 1))
|
||||
M.visible_message("[M] directs [src] to \his eyes.", \
|
||||
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
|
||||
else
|
||||
@@ -79,7 +79,7 @@
|
||||
else if(M.dna.check_mutation(XRAY)) //mob has X-RAY vision
|
||||
user << "<span class='danger'>[M] pupils give an eerie glow!</span>"
|
||||
else //they're okay!
|
||||
if(M.flash_eyes())
|
||||
if(M.flash_eyes(visual = 1))
|
||||
user << "<span class='notice'>[M]'s pupils narrow.</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -169,9 +169,11 @@
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
|
||||
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
|
||||
var/damage = intensity - check_eye_prot()
|
||||
if(..()) // we've been flashed
|
||||
if(visual)
|
||||
return
|
||||
if(weakeyes)
|
||||
Stun(2)
|
||||
switch(damage)
|
||||
@@ -202,7 +204,6 @@
|
||||
else
|
||||
src << "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>"
|
||||
return 1
|
||||
|
||||
else if(damage == 0) // just enough protection
|
||||
if(prob(20))
|
||||
src << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
|
||||
|
||||
@@ -703,7 +703,7 @@ Sorry Giacom. Please don't be mad :(
|
||||
floating = 0
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, type = /obj/screen/fullscreen/flash)
|
||||
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND)))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(src, "clear_fullscreen", 25, FALSE, "flash", 25)
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
/mob/living/silicon/grabbedby(mob/living/user)
|
||||
return
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, type = /obj/screen/fullscreen/flash/noise)
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/noise)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1083,7 +1083,7 @@
|
||||
#include "code\modules\hydroponics\hydroitemdefines.dm"
|
||||
#include "code\modules\hydroponics\hydroponics.dm"
|
||||
#include "code\modules\hydroponics\seed_extractor.dm"
|
||||
#include "code\modules\hydroponics\seeds.dm"
|
||||
#include "code\modules\hydroponics\seeds.dm"
|
||||
#include "code\modules\jobs\access.dm"
|
||||
#include "code\modules\jobs\jobs.dm"
|
||||
#include "code\modules\jobs\whitelist.dm"
|
||||
@@ -1097,7 +1097,7 @@
|
||||
#include "code\modules\jobs\job_types\medical.dm"
|
||||
#include "code\modules\jobs\job_types\science.dm"
|
||||
#include "code\modules\jobs\job_types\security.dm"
|
||||
#include "code\modules\jobs\job_types\silicon.dm"
|
||||
#include "code\modules\jobs\job_types\silicon.dm"
|
||||
#include "code\modules\library\lib_items.dm"
|
||||
#include "code\modules\library\lib_machines.dm"
|
||||
#include "code\modules\library\lib_readme.dm"
|
||||
|
||||
Reference in New Issue
Block a user