mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
- Added a speach_probability variable to parrots, which starts out at 10. It decreases over time, meaning that while it's speach chance is initially prob(10) in each life cycle, as soon as it succeeds, it will be prob(9) and so on, until it eventually gets to prob(1). In effect this reduces the amount of Poly spam.
- Increased the time between vending machine adverts from 60s to 600s = 10 minutes. In addition, I set it so a newly created vending machine assigns a random time for it's first message to be displayed to ensure that all vending machines don't say their message at the same time. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4981 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
var/parrot_speed = 5 //"Delay in world ticks between movement." Yeah, that's BS but it does directly affect movement. Higher number = slower.
|
||||
var/parrot_been_shot = 0 //Parrots get a speed bonus after being shot. This will deincrement every Life() and at 0 the parrot will return to regular speed.
|
||||
|
||||
var/speach_probability = 10 //This means it has a 10% chance of speaking the first time, each time it speaks, this is reduced by 1, eventually becoming prob(1) per life tick.
|
||||
var/list/speech_buffer = list()
|
||||
var/list/available_channels = list()
|
||||
|
||||
@@ -299,12 +300,13 @@
|
||||
Phrases that the parrot hears in mob/living/say() get added to speach_buffer.
|
||||
Every once in a while, the parrot picks one of the lines from the buffer and replaces an element of the 'speech' list.
|
||||
Then it clears the buffer to make sure they dont magically remember something from hours ago. */
|
||||
if(speech_buffer.len && prob(10))
|
||||
if(speech_buffer.len && prob(speach_probability))
|
||||
if(speak.len)
|
||||
speak.Remove(pick(speak))
|
||||
|
||||
speak.Add(pick(speech_buffer))
|
||||
clearlist(speech_buffer)
|
||||
speach_probability = max(1, speach_probability-1) //This ensures that the amount of parrot spam reduces over time, as each time it speaks, the chance of it speaking again is reduced by 1, eventually reaching a prob(1)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user