Files
Polaris/code/modules/xenoarcheaology/artifacts/autocloner.dm
Aronai Sieyes 715de43f35 VChat: Redone chat output done in Vue.js (#6761)
* Better notifications

* Add buttons to del/move tabs in edit mode

* Add a <span> to emotes

* Fix duplicate IDs in VChat and add more logging

* VChat: Redone chat output in Vue.js

* Ported tg asset cache

* VChat DME Update

* Replace \image macro with bicon()

* NanoUI Subsystem Fixes

Don't do this, the asset subsystem does this for you

* Allow narrate/globalnarrate shenanigans

Allows HTML if your entire thing is HTML

* Disable bicon() icon object cache, and create text tag cache

* Ore Scanner is written incorrectly

Only revealed by vchat

* Fixes 2 VChat bugs

* Underline links in VChat

* Fix LOOC color

* VChat Improvements

Hopefully, anyway.
- Arbitrary font size setting
- Line height setting
- Multiple crush settings
- Rewrote how tabs work hopefully for performance
- Hidden messages are actually put elsewhere
- Attempts to correct chat backlog restore on rejoin

* Surgery steps to use <span>

* Some VChat Tweaks

- Chat remains between client reconnects if your client didn't close (so things like using the reconnect button, or autoreconnects at round end when that feels like working)
- The client doesn't send pings to the server, the server sends pings to the client. This fixes AFK measurements for AFK kick purposes.
- Turn latency indicator into a green/red indicator to show if you're connected, and when clicked will perform a one-time ping (and block doing it again for 10 seconds). It will display '?ms' if it never got a reply, or '999ms' if it did, but it was over 1s.

* Include date in filename for VChat log save

* Merge pull request #6767 from Cyantime/patch-2

Change chat export naming scheme

* Adds VChat tab saving

Saves every time you enter/exit edit mode. Persists between rounds, VChat reloads via verb, etc.

* Fix chat exporting when someone has used unicode

Only affects clients still using 512

* Use CLIENT_FROM_VAR for ease of code reading

* Update code/modules/client/asset_cache.dm

Co-Authored-By: Novacat <35587478+Novacat@users.noreply.github.com>

* Fix runtime when client disconnects before vchat loads

* Fix polaris version of command reports

* Fix LOOC color in oldchat

* Put some styles in various adminpm messages

* Round info and advanced who spans

* Fix missing tag-end

* Maybe fix images for linux and statpanel but also doom everyone

Co-authored-by: ShadowLarkens <ShadowLarkens@users.noreply.github.com>
Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
2020-03-27 14:07:28 -07:00

85 lines
2.9 KiB
Plaintext

/obj/machinery/auto_cloner
name = "mysterious pod"
desc = "It's full of a viscous liquid, but appears dark and silent."
icon = 'icons/obj/cryogenics.dmi'
icon_state = "cellold0"
var/spawn_type
var/time_spent_spawning = 0
var/time_per_spawn = 0
var/last_process= 0
density = 1
var/previous_power_state = 0
use_power = USE_POWER_IDLE
active_power_usage = 2000
idle_power_usage = 1000
/obj/machinery/auto_cloner/New()
..()
time_per_spawn = rand(1200,3600)
//33% chance to spawn nasties
if(prob(33))
spawn_type = pick(
/mob/living/simple_mob/animal/giant_spider/nurse,
/mob/living/simple_mob/animal/space/alien,
/mob/living/simple_mob/animal/space/bear,
/mob/living/simple_mob/creature,
/mob/living/simple_mob/slime/xenobio)
else
spawn_type = pick(\
/mob/living/simple_mob/animal/passive/cat,
/mob/living/simple_mob/animal/passive/dog/corgi,
/mob/living/simple_mob/animal/passive/dog/corgi/puppy,
/mob/living/simple_mob/animal/passive/chicken,
/mob/living/simple_mob/animal/passive/cow,
/mob/living/simple_mob/animal/passive/bird/parrot,
/mob/living/simple_mob/animal/passive/crab,
/mob/living/simple_mob/animal/passive/mouse,
/mob/living/simple_mob/animal/goat)
//todo: how the hell is the asteroid permanently powered?
/obj/machinery/auto_cloner/process()
if(powered(power_channel))
if(!previous_power_state)
previous_power_state = 1
icon_state = "cellold1"
src.visible_message("<span class='notice'>[bicon(src)] [src] suddenly comes to life!</span>")
//slowly grow a mob
if(prob(5))
src.visible_message("<span class='notice'>[bicon(src)] [src] [pick("gloops","glugs","whirrs","whooshes","hisses","purrs","hums","gushes")].</span>")
//if we've finished growing...
if(time_spent_spawning >= time_per_spawn)
time_spent_spawning = 0
update_use_power(USE_POWER_IDLE)
src.visible_message("<span class='notice'>[bicon(src)] [src] pings!</span>")
icon_state = "cellold1"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow."
if(spawn_type)
new spawn_type(src.loc)
//if we're getting close to finished, kick into overdrive power usage
if(time_spent_spawning / time_per_spawn > 0.75)
update_use_power(USE_POWER_ACTIVE)
icon_state = "cellold2"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow. A dark shape appears to be forming inside..."
else
update_use_power(USE_POWER_IDLE)
icon_state = "cellold1"
desc = "It's full of a bubbling viscous liquid, and is lit by a mysterious glow."
time_spent_spawning = time_spent_spawning + world.time - last_process
else
if(previous_power_state)
previous_power_state = 0
icon_state = "cellold0"
src.visible_message("<span class='notice'>[bicon(src)] [src] suddenly shuts down.</span>")
//cloned mob slowly breaks down
time_spent_spawning = max(time_spent_spawning + last_process - world.time, 0)
last_process = world.time