April sync (#360)

* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
This commit is contained in:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions
+45 -43
View File
@@ -1,4 +1,4 @@
var/global/posibrain_notif_cooldown = 0
GLOBAL_VAR(posibrain_notify_cooldown)
/obj/item/device/mmi/posibrain
name = "positronic brain"
@@ -7,11 +7,11 @@ var/global/posibrain_notif_cooldown = 0
icon_state = "posibrain"
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "biotech=3;programming=3;plasmatech=2"
var/notified = 0
var/next_ask
var/askDelay = 600 //one minute
var/used = 0 //Prevents split personality virus. May be reset if personality deletion code is added.
var/searching = FALSE
brainmob = null
req_access = list(access_robotics)
req_access = list(GLOB.access_robotics)
mecha = null//This does not appear to be used outside of reference in mecha.dm.
braintype = "Android"
var/autoping = TRUE //if it pings on creation immediately
@@ -25,9 +25,8 @@ var/global/posibrain_notif_cooldown = 0
Remember, the purpose of your existence is to serve the crew and the station. Above all else, do no harm.</b>"
var/new_mob_message = "<span class='notice'>The positronic brain chimes quietly.</span>"
var/dead_message = "<span class='deadsay'>It appears to be completely inactive. The reset light is blinking.</span>"
var/list/fluff_names = list("PBU","HIU","SINA","ARMA","OSI","HBL","MSO","RR","CHRI","CDB","HG","XSI","ORNG","GUN","KOR","MET","FRE","XIS","SLI","PKP","HOG","RZH","GOOF","MRPR","JJR","FIRC","INC","PHL","BGB","ANTR","MIW","WJ","JRD","CHOC","ANCL","JLLO","JNLG","KOS","TKRG","XAL","STLP","CBOS","DUNC","FXMC","DRSD")
var/picked_fluff_name //which fluff name we picked
var/list/possible_names //If you leave this blank, it will use the global posibrain names
var/picked_name
/obj/item/device/mmi/posibrain/Topic(href, href_list)
if(href_list["activate"])
@@ -36,42 +35,42 @@ var/global/posibrain_notif_cooldown = 0
activate(ghost)
/obj/item/device/mmi/posibrain/proc/ping_ghosts(msg, newlymade)
if(newlymade || !posibrain_notif_cooldown)
if(newlymade || GLOB.posibrain_notify_cooldown <= world.time)
notify_ghosts("[name] [msg] in [get_area(src)]!", ghost_sound = !newlymade ? 'sound/effects/ghost2.ogg':null, enter_link = "<a href=?src=\ref[src];activate=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK, flashwindow = FALSE)
if(!newlymade)
posibrain_notif_cooldown = 1
addtimer(CALLBACK(src, .proc/reset_posibrain_cooldown), askDelay)
/obj/item/device/mmi/posibrain/proc/reset_posibrain_cooldown()
posibrain_notif_cooldown = 0
GLOB.posibrain_notify_cooldown = world.time + askDelay
/obj/item/device/mmi/posibrain/attack_self(mob/user)
if(brainmob && !brainmob.key && !notified)
//Start the process of requesting a new ghost.
to_chat(user, begin_activation_message)
ping_ghosts("requested", FALSE)
notified = 1
used = 0
update_icon()
spawn(askDelay) //Seperate from the global cooldown.
notified = 0
update_icon()
if(brainmob.client)
visible_message(success_message)
else
visible_message(fail_message)
return //Code for deleting personalities recommended here.
if(!brainmob || brainmob.key)
return
if(next_ask > world.time)
return
//Start the process of requesting a new ghost.
to_chat(user, begin_activation_message)
ping_ghosts("requested", FALSE)
next_ask = world.time + askDelay
searching = TRUE
addtimer(CALLBACK(src, .proc/check_success), askDelay)
/obj/item/device/mmi/posibrain/proc/check_success()
searching = FALSE
update_icon()
if(QDELETED(brainmob))
return
if(brainmob.client)
visible_message(success_message)
else
visible_message(fail_message)
/obj/item/device/mmi/posibrain/attack_ghost(mob/user)
activate(user)
//Two ways to activate a positronic brain. A clickable link in the ghost notif, or simply clicking the object itself.
/obj/item/device/mmi/posibrain/proc/activate(mob/user)
if(used || (brainmob && brainmob.key) || jobban_isbanned(user,"posibrain"))
if(QDELETED(brainmob))
return
if(brainmob.key || jobban_isbanned(user,"posibrain"))
return
var/posi_ask = alert("Become a [name]? (Warning, You can no longer be cloned, and all past lives will be forgotten!)","Are you positive?","Yes","No")
if(posi_ask == "No" || QDELETED(src))
return
@@ -97,10 +96,11 @@ var/global/posibrain_notif_cooldown = 0
update_icon()
/obj/item/device/mmi/posibrain/proc/transfer_personality(mob/candidate)
if(used || (brainmob && brainmob.key)) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain.
if(QDELETED(brainmob))
return
if(brainmob.key) //Prevents hostile takeover if two ghosts get the prompt or link for the same brain.
to_chat(candidate, "This brain has already been taken! Please try your possession again later!")
return FALSE
notified = 0
if(candidate.mind && !isobserver(candidate))
candidate.mind.transfer_to(brainmob)
else
@@ -109,12 +109,11 @@ var/global/posibrain_notif_cooldown = 0
to_chat(brainmob, welcome_message)
brainmob.mind.assigned_role = new_role
brainmob.stat = CONSCIOUS
dead_mob_list -= brainmob
living_mob_list += brainmob
GLOB.dead_mob_list -= brainmob
GLOB.living_mob_list += brainmob
visible_message(new_mob_message)
update_icon()
used = 1
return TRUE
@@ -124,7 +123,7 @@ var/global/posibrain_notif_cooldown = 0
if(brainmob && brainmob.key)
switch(brainmob.stat)
if(CONSCIOUS)
if(!src.brainmob.client)
if(!brainmob.client)
msg = "It appears to be in stand-by mode." //afk
if(DEAD)
msg = "<span class='deadsay'>It appears to be completely inactive.</span>"
@@ -133,24 +132,27 @@ var/global/posibrain_notif_cooldown = 0
to_chat(user, msg)
/obj/item/device/mmi/posibrain/New()
/obj/item/device/mmi/posibrain/Initialize()
..()
brainmob = new(src)
picked_fluff_name = pick(fluff_names)
brainmob.name = "[picked_fluff_name]-[rand(100, 999)]"
var/new_name
if(!LAZYLEN(possible_names))
new_name = pick(GLOB.posibrain_names)
else
new_name = pick(possible_names)
brainmob.name = "[new_name]-[rand(100, 999)]"
brainmob.real_name = brainmob.name
brainmob.loc = src
brainmob.container = src
if(autoping)
ping_ghosts("created", TRUE)
..()
/obj/item/device/mmi/posibrain/attackby(obj/item/O, mob/user)
return
/obj/item/device/mmi/posibrain/update_icon()
if(notified)
if(searching)
icon_state = "[initial(icon_state)]-searching"
return
if(brainmob && brainmob.key)