mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes.
Made glowshrooms and intercoms not use a ridiculous internal loop, and fixed a pickup luminosity bug with glowshrooms. fixes #3708 Fixes #3718 Fixes #3702 Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -418,6 +418,7 @@ its easier to just keep the beam vertical.
|
||||
|
||||
//returns 1 if made bloody, returns 0 otherwise
|
||||
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
|
||||
if(flags & NOBLOODY) return 0
|
||||
.=1
|
||||
if (!( istype(M, /mob/living/carbon/human) ))
|
||||
return 0
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!istype(usr, /mob/living)) //ew ew ew usr, but it's the only way to check.
|
||||
return
|
||||
|
||||
if( state != 4 )
|
||||
usr << "The washing machine cannot run in this state."
|
||||
return
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
var/spreadChance = 40
|
||||
var/spreadIntoAdjacentChance = 60
|
||||
var/evolveChance = 2
|
||||
var/lastTick = 0
|
||||
var/spreaded = 1
|
||||
|
||||
/obj/effect/glowshroom/single
|
||||
spreadChance = 0
|
||||
@@ -40,15 +42,21 @@
|
||||
else //if on the floor, glowshroom on-floor sprite
|
||||
icon_state = "glowshroomf"
|
||||
|
||||
spawn(delay)
|
||||
SetLuminosity(round(potency/10))
|
||||
Spread()
|
||||
processing_objects += src
|
||||
|
||||
/obj/effect/glowshroom/proc/Spread()
|
||||
set background = 1
|
||||
var/spreaded = 1
|
||||
SetLuminosity(round(potency/10))
|
||||
lastTick = world.timeofday
|
||||
|
||||
while(spreaded)
|
||||
/obj/effect/glowshroom/Del()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/effect/glowshroom/process()
|
||||
if(!spreaded)
|
||||
return
|
||||
|
||||
if(((world.timeofday - lastTick) > delay) || ((world.timeofday - lastTick) < 0))
|
||||
lastTick = world.timeofday
|
||||
spreaded = 0
|
||||
|
||||
for(var/i=1,i<=yield,i++)
|
||||
@@ -90,8 +98,6 @@
|
||||
if(prob(evolveChance)) //very low chance to evolve on its own
|
||||
potency += rand(4,6)
|
||||
|
||||
sleep(delay)
|
||||
|
||||
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
|
||||
set background = 1
|
||||
var/direction = 16
|
||||
|
||||
@@ -5,13 +5,18 @@
|
||||
anchored = 1
|
||||
w_class = 4.0
|
||||
canhear_range = 2
|
||||
flags = FPRINT | CONDUCT | TABLEPASS | NOBLOODY
|
||||
var/number = 0
|
||||
var/anyai = 1
|
||||
var/mob/living/silicon/ai/ai = list()
|
||||
var/last_tick //used to delay the powercheck
|
||||
|
||||
/obj/item/device/radio/intercom/New()
|
||||
spawn(5)
|
||||
checkpower()
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/item/device/radio/intercom/Del()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/intercom/attack_ai(mob/user as mob)
|
||||
@@ -51,10 +56,9 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/intercom/proc/checkpower()
|
||||
|
||||
// Simple loop, checks for power. Strictly for intercoms
|
||||
while(src)
|
||||
/obj/item/device/radio/intercom/process()
|
||||
if(((world.timeofday - last_tick) > 30) || ((world.timeofday - last_tick) < 0))
|
||||
last_tick = world.timeofday
|
||||
|
||||
if(!src.loc)
|
||||
on = 0
|
||||
@@ -69,5 +73,3 @@
|
||||
icon_state = "intercom-p"
|
||||
else
|
||||
icon_state = "intercom"
|
||||
|
||||
sleep(30)
|
||||
@@ -12,8 +12,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Permissions Panel</title>
|
||||
<script type='text/javascript' src='html/search.js'></script>
|
||||
<link rel='stylesheet' type='text/css' href='html/panels.css'>
|
||||
<script type='text/javascript' src='search.js'></script>
|
||||
<link rel='stylesheet' type='text/css' href='panels.css'>
|
||||
</head>
|
||||
<body onload='selectTextField();updateSearch();'>
|
||||
<div id='main'><table id='searchable' cellspacing='0'>
|
||||
|
||||
@@ -886,7 +886,7 @@
|
||||
user.SetLuminosity(round(user.luminosity + (potency/10),1))
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
|
||||
user.SetLuminosity(round(user.luminosity + (potency/10),1))
|
||||
user.SetLuminosity(round(user.luminosity - (potency/10),1))
|
||||
SetLuminosity(round(potency/10,1))
|
||||
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ var/MAX_EXPLOSION_RANGE = 14
|
||||
#define CONDUCT 64 // conducts electricity (metal etc.)
|
||||
#define FPRINT 256 // takes a fingerprint
|
||||
#define ON_BORDER 512 // item has priority to check when entering or leaving
|
||||
#define NOBLOODY 2048 // used to items if they don't want to get a blood overlay
|
||||
|
||||
#define GLASSESCOVERSEYES 1024
|
||||
#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Reference in New Issue
Block a user