BS12 -> Ponies merge

This commit is contained in:
ZomgPonies
2013-09-09 10:51:16 -04:00
parent b389395c0e
commit c1222034ee
125 changed files with 18129 additions and 1673 deletions
@@ -517,6 +517,7 @@ client/proc/one_click_antag()
new_vox.mind_initialize()
new_vox.mind.assigned_role = "MODE"
new_vox.mind.special_role = "Vox Raider"
new_vox.mutations |= NOCLONE //Stops the station crew from messing around with their DNA.
ticker.mode.traitors += new_vox.mind
new_vox.equip_vox_raider()
+4 -4
View File
@@ -37,8 +37,8 @@ var/global/vox_tick = 1
if(3) // Vox saboteur!
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/carapace(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/carapace(src), slot_head)
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/stealth(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/stealth(src), slot_head)
equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(src), slot_belt)
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
equip_to_slot_or_del(new /obj/item/weapon/card/emag(src), slot_l_store)
@@ -46,8 +46,8 @@ var/global/vox_tick = 1
equip_to_slot_or_del(new /obj/item/device/multitool(src), slot_l_hand)
if(4) // Vox medic!
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/pressure(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/pressure(src), slot_head)
equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/medic(src), slot_wear_suit)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/medic(src), slot_head)
equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(src), slot_belt) // Who needs actual surgical tools?
equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(src), slot_glasses) // REPLACE WITH CODED VOX ALTERNATIVE.
equip_to_slot_or_del(new /obj/item/weapon/circular_saw(src), slot_l_store)
+14 -1
View File
@@ -1,7 +1,7 @@
////////////
//SECURITY//
////////////
#define TOPIC_SPAM_DELAY 4 //4 ticks is about 3/10ths of a second
#define TOPIC_SPAM_DELAY 2 //2 ticks is about 2/10ths of a second; it was 4 ticks, but that caused too many clicks to be lost due to lag
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
//I would just like the code ready should it ever need to be used.
@@ -242,6 +242,19 @@
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()
getFiles(
'nano/js/libraries.min.js',
'nano/js/nano_update.js',
'nano/js/nano_config.js',
'nano/js/nano_base_helpers.js',
'nano/css/shared.css',
'nano/css/icons.css',
'nano/templates/cryo.tmpl',
'nano/images/uiBackground.png',
'nano/images/uiIcons16.png',
'nano/images/uiIcons24.png',
'nano/images/uiLinkPendingIcon.gif',
'nano/images/uiNoticeBackground.jpg',
'nano/images/uiTitleFluff.png',
'html/search.js',
'html/panels.css',
'icons/pda_icons/pda_atmos.png',
+1 -1
View File
@@ -879,7 +879,7 @@ datum/preferences
for(var/L in all_languages)
var/datum/language/lang = all_languages[L]
if(!(lang.flags & RESTRICTED))
new_languages += lang
new_languages += lang.name
language = input("Please select a secondary language", "Character Generation", null) in new_languages
+30 -1
View File
@@ -1,6 +1,32 @@
/obj/item/clothing
name = "clothing"
var/list/species_restricted = null //Only these species can wear this kit.
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
if(species_restricted && istype(M,/mob/living/carbon/human))
var/wearable = null
var/exclusive = null
var/mob/living/carbon/human/H = M
if("exclude" in species_restricted)
exclusive = 1
if(H.species)
if(exclusive)
if(!(H.species.name in species_restricted))
wearable = 1
else
if(H.species.name in species_restricted)
wearable = 1
if(!wearable)
M << "\red Your species cannot wear [src]."
return 0
return ..()
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
@@ -50,6 +76,7 @@ BLIND // can't see anything
body_parts_covered = HANDS
slot_flags = SLOT_GLOVES
attack_verb = list("challenged")
species_restricted = list("exclude","Unathi","Tajara")
/obj/item/clothing/gloves/examine()
set src in usr
@@ -94,6 +121,7 @@ BLIND // can't see anything
permeability_coefficient = 0.50
slowdown = SHOES_SLOWDOWN
species_restricted = list("exclude","Unathi","Tajara")
//Suit
/obj/item/clothing/suit
@@ -122,6 +150,7 @@ BLIND // can't see anything
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECITON_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
/obj/item/clothing/suit/space
name = "Space suit"
@@ -140,7 +169,7 @@ BLIND // can't see anything
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECITON_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
//Under clothing
/obj/item/clothing/under
+5
View File
@@ -59,6 +59,11 @@
desc = "A beret with the security insignia emblazoned on it. For officers that are more inclined towards style than safety."
icon_state = "beret_badge"
flags = FPRINT | TABLEPASS
/obj/item/clothing/head/beret/eng
name = "engineering beret"
desc = "A beret with the engineering insignia emblazoned on it. For engineers that are more inclined towards style than safety."
icon_state = "e_beret_badge"
flags = FPRINT | TABLEPASS
//Medical
/obj/item/clothing/head/surgery
+7 -1
View File
@@ -85,4 +85,10 @@
name = "security cap"
desc = "It's baseball hat in tasteful red colour."
icon_state = "secsoft"
color = "sec"
color = "sec"
/obj/item/clothing/head/soft/sec/corp
name = "corporate security cap"
desc = "It's baseball hat in corpotate colours."
icon_state = "corpsoft"
color = "corp"
@@ -8,6 +8,7 @@
origin_tech = "syndicate=3"
var/list/clothing_choices = list()
siemens_coefficient = 0.8
species_restricted = null
/obj/item/clothing/shoes/mime
name = "mime shoes"
@@ -48,11 +49,13 @@
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECITON_TEMPERATURE
heat_protection = FEET
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = null
/obj/item/clothing/shoes/sandal
desc = "A pair of rather plain, wooden sandals."
name = "sandals"
icon_state = "wizard"
species_restricted = null
/obj/item/clothing/shoes/sandal/marisa
desc = "A pair of magic, black shoes."
@@ -66,6 +69,7 @@
permeability_coefficient = 0.05
flags = NOSLIP
slowdown = SHOES_SLOWDOWN+1
species_restricted = null
/obj/item/clothing/shoes/clown_shoes
desc = "The prankster's standard-issue clowning shoes. Damn they're huge!"
@@ -75,6 +79,7 @@
slowdown = SHOES_SLOWDOWN+1
color = "clown"
var/footstep = 1 //used for squeeks whilst walking
species_restricted = null
/obj/item/clothing/shoes/jackboots
name = "jackboots"
@@ -96,6 +101,7 @@
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECITON_TEMPERATURE
heat_protection = FEET
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = null
/obj/item/clothing/shoes/cyborg
name = "cyborg boots"
@@ -107,6 +113,7 @@
desc = "Fluffy!"
icon_state = "slippers"
item_state = "slippers"
species_restricted = null
/obj/item/clothing/shoes/slippers_worn
name = "worn bunny slippers"
+123 -65
View File
@@ -1,20 +1,64 @@
// Tajaran rigs.
/obj/item/clothing/head/helmet/space/rig/tajara
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding. This one doesn't look like it was made for humans."
icon_state = "rig0-taj-helmet"
item_state = "rig0-taj-helmet"
color = "taj-helmet"
species_restricted = list("Tajaran")
/obj/item/clothing/suit/space/rig/tajara
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding. This one doesn't look like it was made for humans."
icon_state = "rig-taj"
item_state = "rig-taj"
color = "rig-taj"
species_restricted = list("Tajaran")
//Skrell space gear. Sleek like a wetsuit.
/obj/item/clothing/head/helmet/space/skrell
name = "Skrellian helmet"
desc = "Smoothly contoured and polished to a shine. Still looks like a fishbowl."
armor = list(melee = 20, bullet = 20, laser = 50,energy = 50, bomb = 50, bio = 100, rad = 100)
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = list("Skrell","Human")
/obj/item/clothing/head/helmet/space/skrell/white
icon_state = "skrell_helmet_white"
item_state = "skrell_helmet_white"
color = "skrell_helmet_white"
/obj/item/clothing/head/helmet/space/skrell/black
icon_state = "skrell_helmet_black"
item_state = "skrell_helmet_black"
color = "skrell_helmet_black"
/obj/item/clothing/suit/space/skrell
name = "Skrellian hardsuit"
desc = "Seems like a wetsuit with reinforced plating seamlessly attached to it. Very chic."
armor = list(melee = 20, bullet = 20, laser = 50,energy = 50, bomb = 50, bio = 100, rad = 100)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = list("Skrell","Human")
/obj/item/clothing/suit/space/skrell/white
icon_state = "skrell_suit_white"
item_state = "skrell_suit_white"
color = "skrell_suit_white"
/obj/item/clothing/suit/space/skrell/black
icon_state = "skrell_suit_black"
item_state = "skrell_suit_black"
color = "skrell_suit_black"
//Unathi space gear. Huge and restrictive.
/obj/item/clothing/head/helmet/space/unathi
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
heat_protection = HEAD
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
var/up = 0 //So Unathi helmets play nicely with the weldervision check.
mob_can_equip(M as mob, slot)
var/mob/living/carbon/human/U = M
if(U.species.name != "Unathi")
U << "<span class='warning'>This clearly isn't designed for your species!</span>"
return 0
return ..()
/obj/item/clothing/suit/space/unathi/mob_can_equip(M as mob, slot)
var/mob/living/carbon/human/U = M
if(U.species.name != "Unathi")
U << "<span class='warning'>This clearly isn't designed for your species!</span>"
return 0
return ..()
species_restricted = list("Unathi")
/obj/item/clothing/head/helmet/space/unathi/helmet_cheap
name = "NT breacher helmet"
@@ -22,9 +66,13 @@
icon_state = "unathi_helm_cheap"
item_state = "unathi_helm_cheap"
color = "unathi_helm_cheap"
/obj/item/clothing/suit/space/unathi
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
heat_protection = HEAD
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = list("Unathi")
/obj/item/clothing/suit/space/unathi/rig_cheap
name = "NT breacher chassis"
@@ -32,68 +80,90 @@
icon_state = "rig-unathi-cheap"
item_state = "rig-unathi-cheap"
slowdown = 3
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
/obj/item/clothing/head/helmet/space/unathi/breacher
name = "breacher helm"
desc = "Weathered, ancient and battle-scarred. The helmet is too."
icon_state = "unathi_breacher"
item_state = "unathi_breacher"
color = "unathi_breacher"
/obj/item/clothing/suit/space/unathi/breacher
name = "breacher chassis"
desc = "Huge, bulky and absurdly heavy. It must be like wearing a tank."
icon_state = "unathi_breacher"
item_state = "unathi_breacher"
color = "unathi_breacher"
slowdown = 1
// Vox space gear (vaccuum suit, low pressure armour)
// Can't be equipped by any other species due to bone structure and vox cybernetics.
/obj/item/clothing/head/helmet/space/vox/pressure
name = "alien helmet"
icon_state = "vox-pressure"
item_state = "vox-pressure"
desc = "Hey, wasn't this a prop in \'The Abyss\'?"
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
/obj/item/clothing/suit/space/vox/pressure
name = "alien pressure suit"
icon_state = "vox-pressure"
item_state = "vox-pressure"
desc = "A huge, armoured, pressurized suit, designed for distinctly nonhuman proportions."
/obj/item/clothing/suit/space/vox
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
slowdown = 2
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = list("Vox")
/obj/item/clothing/head/helmet/space/vox
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
flags = HEADCOVERSEYES|STOPSPRESSUREDMAGE
species_restricted = list("Vox")
/obj/item/clothing/head/helmet/space/vox/pressure
name = "alien helmet"
icon_state = "vox-pressure"
item_state = "vox-pressure"
desc = "Hey, wasn't this a prop in \'The Abyss\'?"
/obj/item/clothing/suit/space/vox/pressure
name = "alien pressure suit"
icon_state = "vox-pressure"
item_state = "vox-pressure"
desc = "A huge, armoured, pressurized suit, designed for distinctly nonhuman proportions."
/obj/item/clothing/head/helmet/space/vox/carapace
name = "alien visor"
icon_state = "vox-carapace"
item_state = "vox-carapace"
desc = "A glowing visor, perhaps stolen from a depressed Cylon."
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
flags = HEADCOVERSEYES|STOPSPRESSUREDMAGE
/obj/item/clothing/suit/space/vox/carapace
name = "alien carapace armour"
icon_state = "vox-carapace"
item_state = "vox-carapace"
desc = "An armoured, segmented carapace with glowing purple lights. It looks pretty run-down."
w_class = 3
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank)
slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
/obj/item/clothing/head/helmet/space/vox/mob_can_equip(M as mob, slot)
var/mob/living/carbon/human/V = M
if(V.species.name != "Vox")
V << "<span class='warning'>This clearly isn't designed for your species!</span>"
return 0
return ..()
/obj/item/clothing/head/helmet/space/vox/stealth
name = "alien stealth helmet"
icon_state = "vox-stealth"
item_state = "vox-stealth"
desc = "A smoothly contoured, matte-black alien helmet."
/obj/item/clothing/suit/space/vox/mob_can_equip(M as mob, slot)
var/mob/living/carbon/human/V = M
if(V.species.name != "Vox")
V << "<span class='warning'>This clearly isn't designed for your species!</span>"
return 0
/obj/item/clothing/suit/space/vox/stealth
name = "alien stealth suit"
icon_state = "vox-stealth"
item_state = "vox-stealth"
desc = "A sleek black suit. It seems to have a tail, and is very heavy."
return ..()
/obj/item/clothing/head/helmet/space/vox/medic
name = "alien goggled helmet"
icon_state = "vox-medic"
item_state = "vox-medic"
desc = "An alien helmet with enormous goggled lenses."
/obj/item/clothing/suit/space/vox/medic
name = "alien armour"
icon_state = "vox-medic"
item_state = "vox-medic"
desc = "An almost organic looking nonhuman pressure suit."
/obj/item/clothing/under/vox
has_sensor = 0
species_restricted = list("Vox")
/obj/item/clothing/under/vox/vox_casual
name = "alien clothing"
@@ -117,13 +187,7 @@
siemens_coefficient = 0
permeability_coefficient = 0.05
color="gloves-vox"
/obj/item/clothing/gloves/yellow/vox/mob_can_equip(M as mob, slot)
var/mob/living/carbon/human/U = M
if(U.species.name != "Vox")
U << "<span class='warning'>This clearly isn't designed for your species!</span>"
return 0
return ..()
species_restricted = list("Vox")
/obj/item/clothing/shoes/magboots/vox
@@ -131,6 +195,7 @@
name = "vox boots"
item_state = "boots-vox"
icon_state = "boots-vox"
species_restricted = list("Vox")
toggle()
//set name = "Toggle Floor Grip"
@@ -148,11 +213,4 @@
examine()
set src in view()
..()
/obj/item/clothing/shoes/magboots/vox/mob_can_equip(M as mob, slot)
var/mob/living/carbon/human/U = M
if(U.species.name != "Vox")
U << "<span class='warning'>This clearly isn't designed for your species!</span>"
return 0
return ..()
..()
+2
View File
@@ -12,6 +12,7 @@
icon_action_button = "action_hardhat"
heat_protection = HEAD
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox")
attack_self(mob/user)
if(!isturf(user.loc))
@@ -46,6 +47,7 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
//Chief Engineer's rig
/obj/item/clothing/head/helmet/space/rig/elite
+15 -2
View File
@@ -48,6 +48,16 @@
flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/obj/item/clothing/under/rank/security/corp
icon_state = "sec_corporate"
item_state = "sec_corporate"
color = "sec_corporate"
/obj/item/clothing/under/rank/warden/corp
icon_state = "warden_corporate"
item_state = "warden_corporate"
color = "warden_corporate"
/*
* Detective
*/
@@ -83,6 +93,10 @@
flags = FPRINT | TABLEPASS
siemens_coefficient = 0.8
/obj/item/clothing/under/rank/head_of_security/corp
icon_state = "hos_corporate"
item_state = "hos_corporate"
color = "hos_corporate"
/obj/item/clothing/head/helmet/HoS
name = "Head of Security Hat"
@@ -94,10 +108,9 @@
flags_inv = HIDEEARS
siemens_coefficient = 0.8
/obj/item/clothing/suit/armor/hos
name = "armored coat"
desc = "A greatcoat enchanced with a special alloy for some protection and style."
desc = "A greatcoat enhanced with a special alloy for some protection and style."
icon_state = "hos"
item_state = "hos"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS
-3
View File
@@ -1,6 +1,3 @@
/mob/dead/observer/say_understands(var/other)
return 1
/mob/dead/observer/say(var/message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
+1 -1
View File
@@ -1,7 +1,7 @@
// All mobs should have custom emote, really..
/mob/proc/custom_emote(var/m_type=1,var/message = null)
if(!use_me && usr == src)
if(stat || !use_me && usr == src)
usr << "You are unable to emote."
return
+26 -6
View File
@@ -43,11 +43,18 @@
key = "v"
flags = RESTRICTED
/*
/datum/language/diona
name = "Rootspeak"
desc = "A creaking, subvocal language spoken instinctively by the Dionaea. Due to the unique makeup of the average Diona, a phrase of Rootspeak can be a combination of anywhere from one to twelve individual voices and notes."
speech_verb = "creaks and rustles"
colour = "soghun"
key = "q"
flags = RESTRICTED
/datum/language/human
name = "Sol Common"
desc = "A bastardized hybrid of informal English and elements of Mandarin Chinese; the common language of the Sol system."
key = "hum"
key = "1"
flags = RESTRICTED
// Galactic common languages (systemwide accepted standards).
@@ -55,14 +62,13 @@
name = "Tradeband"
desc = "Maintained by the various trading cartels in major systems, this elegant, structured language is used for bartering and bargaining."
speech_verb = "enunciates"
key = "tra"
key = "2"
/datum/language/gutter
name = "Gutter"
desc = "Much like Standard, this crude pidgin tongue descended from numerous languages and serves as Tradeband for criminal elements."
speech_verb = "growls"
key = "gut"
*/
key = "3"
// Language handling.
/mob/proc/add_language(var/language)
@@ -86,4 +92,18 @@
languages -= L
return 1
return 0
return 0
//TBD
/mob/verb/check_languages()
set name = "Check Known Languages"
set category = "IC"
set src = usr
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
for(var/datum/language/L in languages)
dat += "<b>[L.name] (:[L.key])</b><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
@@ -5,8 +5,7 @@
/mob/living/carbon/alien
name = "alien"
voice_name = "alien"
voice_message = "hisses"
say_message = "hisses"
speak_emote = list("hisses")
icon = 'icons/mob/alien.dmi'
gender = NEUTER
dna = null
@@ -1,8 +1,3 @@
/mob/living/carbon/alien/say_understands(var/other)
if (istype(other, /mob/living/carbon/alien))
return 1
return ..()
/mob/living/carbon/alien/say(var/message)
if (silent)
@@ -22,12 +17,6 @@
return ..(message)
else
// ~lol~
/mob/living/carbon/alien/say_quote(var/text)
// var/ending = copytext(text, length(text))
return "[say_message], \"[text]\"";
/mob/living/proc/alien_talk(var/message)
log_say("[key_name(src)] : [message]")
+86 -2
View File
@@ -255,7 +255,16 @@
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") as null|anything in sortList(vents)
if(!selection) return
if(!selection)
return
if(!do_after(src, 45))
return
if(!src||!selection)
return
if(loc==startloc)
if(contents.len)
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
@@ -476,4 +485,79 @@
return num2text(method ? temp : temp + rand(-10, 10))
if(PULSE_THREADY)
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
// output for machines^ ^^^^^^^output for people^^^^^^^^^
// output for machines^ ^^^^^^^output for people^^^^^^^^^
//Brain slug proc for voluntary removal of control.
/mob/living/carbon/proc/release_control()
set category = "Alien"
set name = "Release Control"
set desc = "Release control of your host's body."
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(!B)
return
if(B.controlling)
src << "\red <B>You withdraw your probosci, releasing control of [B.host_brain]</B>"
B.host_brain << "\red <B>Your vision swims as the alien parasite releases control of your body.</B>"
B.ckey = ckey
B.controlling = 0
if(B.host_brain.ckey)
ckey = B.host_brain.ckey
B.host_brain.ckey = null
B.host_brain.name = "host brain"
B.host_brain.real_name = "host brain"
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
verbs -= /mob/living/carbon/proc/spawn_larvae
//Brain slug proc for tormenting the host.
/mob/living/carbon/proc/punish_host()
set category = "Alien"
set name = "Torment host"
set desc = "Punish your host with agony."
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(!B)
return
if(B.host_brain.ckey)
src << "\red <B>You send a punishing spike of psychic agony lancing into your host's brain.</B>"
B.host_brain << "\red <B><FONT size=3>Horrific, burning agony lances through you, ripping a soundless scream from your trapped mind!</FONT></B>"
//Check for brain worms in head.
/mob/living/carbon/proc/has_brain_worms()
for(var/I in contents)
if(istype(I,/mob/living/simple_animal/borer))
return I
return 0
/mob/living/carbon/proc/spawn_larvae()
set category = "Alien"
set name = "Reproduce"
set desc = "Spawn several young."
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(!B)
return
if(B.chemicals >= 100)
src << "\red <B>Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.</B>"
visible_message("\red <B>[src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!</B>")
B.chemicals -= 100
new /obj/effect/decal/cleanable/vomit(get_turf(src))
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
new /mob/living/simple_animal/borer(get_turf(src))
else
src << "You do not have enough chemicals stored to reproduce."
return
@@ -4,8 +4,6 @@
var/brain_op_stage = 0.0
var/list/datum/disease2/disease/virus2 = list()
var/antibodies = 0
var/silent = null //Can't talk. Value goes down every life proc.
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
@@ -71,7 +71,7 @@
B.host_brain.name = "host brain"
B.host_brain.real_name = "host brain"
verbs -= /mob/living/carbon/human/proc/release_control
verbs -= /mob/living/carbon/proc/release_control
//Check for heist mode kill count.
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist) ) )
@@ -134,5 +134,5 @@
/mob/living/carbon/human/proc/Drain()
ChangeToHusk()
mutations |= NOCLONE
//mutations |= NOCLONE
return
+1 -81
View File
@@ -1278,84 +1278,4 @@ mob/living/carbon/human/yank_out_object()
if(species)
return 1
else
return 0
//Brain slug proc for voluntary removal of control.
/mob/living/carbon/human/proc/release_control()
set category = "Alien"
set name = "Release Control"
set desc = "Release control of your host's body."
var/datum/organ/external/head = get_organ("head")
var/mob/living/simple_animal/borer/B
for(var/I in head.implants)
if(istype(I,/mob/living/simple_animal/borer))
B = I
if(!B)
return
if(B.controlling)
src << "\red <B>You withdraw your probosci, releasing control of [B.host_brain]</B>"
B.host_brain << "\red <B>Your vision swims as the alien parasite releases control of your body.</B>"
B.ckey = ckey
B.controlling = 0
if(B.host_brain.ckey)
ckey = B.host_brain.ckey
B.host_brain.ckey = null
B.host_brain.name = "host brain"
B.host_brain.real_name = "host brain"
verbs -= /mob/living/carbon/human/proc/release_control
verbs -= /mob/living/carbon/human/proc/punish_host
verbs -= /mob/living/carbon/human/proc/spawn_larvae
//Brain slug proc for tormenting the host.
/mob/living/carbon/human/proc/punish_host()
set category = "Alien"
set name = "Torment host"
set desc = "Punish your host with agony."
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(!B)
return
if(B.host_brain.ckey)
src << "\red <B>You send a punishing spike of psychic agony lancing into your host's brain.</B>"
B.host_brain << "\red <B><FONT size=3>Horrific, burning agony lances through you, ripping a soundless scream from your trapped mind!</FONT></B>"
//Check for brain worms in head.
/mob/living/carbon/human/proc/has_brain_worms()
var/datum/organ/external/head = get_organ("head")
for(var/I in head.implants)
if(istype(I,/mob/living/simple_animal/borer))
return I
return 0
/mob/living/carbon/human/proc/spawn_larvae()
set category = "Alien"
set name = "Reproduce"
set desc = "Spawn several young."
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(!B)
return
if(B.chemicals >= 100)
src << "\red <B>Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.</B>"
visible_message("\red <B>[src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!</B>")
B.chemicals -= 100
new /obj/effect/decal/cleanable/vomit(get_turf(src))
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
new /mob/living/simple_animal/borer(get_turf(src))
else
src << "You do not have enough chemicals stored to reproduce."
return
return 0
@@ -191,6 +191,8 @@ emp_act
user << "\red [src]'s [affecting.display_name] is already sabotaged!"
else
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties."
var/obj/item/weapon/card/emag/emag = I
emag.uses--
affecting.sabotaged = 1
return
+15 -1
View File
@@ -215,6 +215,7 @@
adjustCloneLoss(0.1)
proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || (prob(1)))
heal_organ_damage(0,1)
@@ -237,6 +238,16 @@
radiation = 0
else
if(species.flags & RAD_ABSORB)
var/rads = radiation/25
radiation -= rads
nutrition += rads
heal_overall_damage(rads,rads)
adjustOxyLoss(-(rads))
adjustToxLoss(-(rads))
updatehealth()
return
var/damage = 0
switch(radiation)
if(1 to 49)
@@ -275,6 +286,7 @@
proc/breathe()
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
if(species && species.flags & NO_BREATHE) return
var/datum/organ/internal/lungs/L = internal_organs["lungs"]
L.process()
@@ -312,7 +324,6 @@
breath = loc.remove_air(breath_moles)
if(!is_lung_ruptured())
if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
if(prob(5))
@@ -850,6 +861,8 @@
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
traumatic_shock -= light_amount
if(nutrition > 500)
nutrition = 500
if(light_amount > 2) //if there's enough light, heal
@@ -902,6 +915,7 @@
if(species.flags & REQUIRE_LIGHT)
if(nutrition < 200)
take_overall_damage(2,0)
traumatic_shock++
if (drowsyness)
drowsyness--
+1 -77
View File
@@ -1,53 +1,5 @@
/mob/living/carbon/human/say(var/message)
if(silent)
return
//Mimes dont speak! Changeling hivemind and emotes are allowed.
if(miming)
if(length(message) >= 2)
if(mind && mind.changeling)
if(copytext(message, 1, 2) != "*" && department_radio_keys[copytext(message, 1, 3)] != "changeling")
return
else
return ..(message)
if(stat == DEAD)
return ..(message)
if(length(message) >= 1) //In case people forget the '*help' command, this will slow them the message and prevent people from saying one letter at a time
if (copytext(message, 1, 2) != "*")
return
/*if(dna)
if(dna.mutantrace == "lizard")
if(copytext(message, 1, 2) != "*")
message = replacetext(message, "s", stutter("ss"))
if(dna.mutantrace == "slime" && prob(5))
if(copytext(message, 1, 2) != "*")
if(copytext(message, 1, 2) == ";")
message = ";"
else
message = ""
message += "SKR"
var/imax = rand(5,20)
for(var/i = 0,i<imax,i++)
message += "E"*/
if(stat != DEAD)
for(var/datum/disease/pierrot_throat/D in viruses)
var/list/temp_message = text2list(message, " ") //List each word in the message
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++) //Create a second list for excluding words down the line
pick_list += i
for(var/i=1, ((i <= D.stage) && (i <= temp_message.len)), i++) //Loop for each stage of the disease or until we run out of words
if(prob(3 * D.stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = "HONK"
pick_list -= H //Make sure that you dont HONK the same word twice
message = dd_list2text(temp_message, " ")
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
if(copytext(message, 1, 2) != "*")
@@ -68,28 +20,6 @@
message = replacetext(message, "u", "µ")
message = replacetext(message, "b", "ß")
/*else if(istype(wear_mask, /obj/item/clothing/mask/luchador))
if(copytext(message, 1, 2) != "*")
message = replacetext(message, "captain", "CAPITÁN")
message = replacetext(message, "station", "ESTACIÓN")
message = replacetext(message, "sir", "SEÑOR")
message = replacetext(message, "the ", "el ")
message = replacetext(message, "my ", "mi ")
message = replacetext(message, "is ", "es ")
message = replacetext(message, "it's", "es")
message = replacetext(message, "friend", "amigo")
message = replacetext(message, "buddy", "amigo")
message = replacetext(message, "hello", "hola")
message = replacetext(message, " hot", " caliente")
message = replacetext(message, " very ", " muy ")
message = replacetext(message, "sword", "espada")
message = replacetext(message, "library", "biblioteca")
message = replacetext(message, "traitor", "traidor")
message = replacetext(message, "wizard", "mago")
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
if(prob(25))
message += " OLE!"*/
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
if(hoers.voicechange)
@@ -109,13 +39,7 @@
if(has_brain_worms()) //Brain worms translate everything. Even mice and alien speak.
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
if (istype(other, /mob/living/silicon/robot))
if (istype(other, /mob/living/silicon))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
@@ -657,20 +657,9 @@ proc/get_damage_icon_part(damage_state, body_part)
drop_r_hand()
if(wear_suit.blood_DNA)
var/t_state
if( istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat) )
t_state = "armor"
else if( istype(wear_suit, /obj/item/clothing/suit/storage/det_suit || /obj/item/clothing/suit/storage/labcoat) )
t_state = "coat"
else
t_state = "suit"
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_state]blood")
if(wear_suit.blood_DNA)
var/obj/item/clothing/suit/S = wear_suit
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
var/obj/item/clothing/suit/S = wear_suit
lying.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood2")
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[S.blood_overlay_type]blood")
overlays_lying[SUIT_LAYER] = lying
overlays_standing[SUIT_LAYER] = standing
@@ -1,5 +1,6 @@
//Lallander was here
/mob/living/carbon/human/whisper(message as text)
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
return
@@ -68,11 +69,18 @@
O.hear_talk(src, message)
var/list/listening = hearers(message_range, src)
listening -= src
listening += src
listening |= src
//Pass whispers on to anything inside the immediate listeners.
for(var/mob/L in listening)
for(var/mob/C in L.contents)
if(istype(C,/mob/living))
listening += C
var/list/eavesdropping = hearers(2, src)
eavesdropping -= src
eavesdropping -= listening
var/list/watching = hearers(5, src)
watching -= src
watching -= listening
@@ -110,10 +118,7 @@
if (length(heard_b))
var/message_b
if (src.voice_message)
message_b = src.voice_message
else
message_b = stars(message)
message_b = stars(message)
if (italics)
message_b = "<i>[message_b]</i>"
@@ -3,8 +3,7 @@
icon = 'icons/mob/slimes.dmi'
icon_state = "grey baby slime"
pass_flags = PASSTABLE
voice_message = "skree!"
say_message = "hums"
speak_emote = list("hums")
layer = 5
@@ -56,6 +55,7 @@
name = "adult slime"
icon = 'icons/mob/slimes.dmi'
icon_state = "grey adult slime"
speak_emote = list("telepathically chirps")
health = 200
gender = NEUTER
@@ -1,21 +0,0 @@
/mob/living/carbon/slime/say(var/message)
if (silent)
return
else
return ..()
/mob/living/carbon/slime/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "telepathically asks, \"[text]\"";
else if (ending == "!")
return "telepathically cries, \"[text]\"";
return "telepathically chirps, \"[text]\"";
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
@@ -0,0 +1,122 @@
/*
Tiny babby plant critter plus procs.
*/
/mob/living/carbon/monkey/diona
name = "diona nymph"
voice_name = "diona nymph"
speak_emote = list("chirrups")
ico = "nymph"
var/list/donors = list()
var/ready_evolve = 0
/mob/living/carbon/monkey/diona/New()
..()
gender = NEUTER
dna.mutantrace = "plant"
greaterform = "Diona"
add_language("Rootspeak")
//Verbs after this point.
/mob/living/carbon/monkey/diona/verb/fertilize_plant()
set category = "Diona"
set name = "Fertilize plant"
set desc = "Turn your food into nutrients for plants."
var/list/trays = list()
for(var/obj/machinery/hydroponics/tray in range(1))
if(tray.nutrilevel < 10)
trays += tray
var/obj/machinery/hydroponics/target = input("Select a tray:") as null|anything in trays
if(!src || !target || target.nutrilevel == 10) return //Sanity check.
src.nutrition -= ((10-target.nutrilevel)*5)
target.nutrilevel = 10
src.visible_message("\red [src] secretes a trickle of green liquid from its tail, refilling [target]'s nutrient tray.","\red You secrete a trickle of green liquid from your tail, refilling [target]'s nutrient tray.")
/mob/living/carbon/monkey/diona/verb/eat_weeds()
set category = "Diona"
set name = "Eat Weeds"
set desc = "Clean the weeds out of soil or a hydroponics tray."
var/list/trays = list()
for(var/obj/machinery/hydroponics/tray in range(1))
if(tray.weedlevel > 0)
trays += tray
var/obj/machinery/hydroponics/target = input("Select a tray:") as null|anything in trays
if(!src || !target || target.weedlevel == 0) return //Sanity check.
src.reagents.add_reagent("nutriment", target.weedlevel)
target.weedlevel = 0
src.visible_message("\red [src] begins rooting through [target], ripping out weeds and eating them noisily.","\red You begin rooting through [target], ripping out weeds and eating them noisily.")
/mob/living/carbon/monkey/diona/verb/evolve()
set category = "Diona"
set name = "Evolve"
set desc = "Grow to a more complex form."
if(donors.len < 5)
src << "You are not yet ready for your growth..."
return
if(reagents.get_reagent_amount("nutriment") < 5)
src << "You have not yet consumed enough to grow..."
return
src.visible_message("\red [src] begins to shift and quiver, and erupts in a shower of shed bark and twigs!","\red You begin to shift and quiver, then erupt in a shower of shed bark and twigs, attaining your adult form!")
var/mob/living/carbon/human/adult = new(loc)
adult.set_species("Diona")
for(var/datum/language/L in languages)
adult.add_language(L.name)
adult.regenerate_icons()
adult.name = src.name
adult.real_name = src.real_name
adult.ckey = src.ckey
del(src)
/mob/living/carbon/monkey/diona/verb/steal_blood()
set category = "Diona"
set name = "Steal Blood"
set desc = "Take a blood sample from a suitable donor."
var/list/choices = list()
for(var/mob/living/C in view(1,src))
if(C.real_name != real_name)
choices += C
var/mob/living/M = input(src,"Who do you wish to take a sample from?") in null|choices
if(!M || !src) return
if(donors.Find(M.real_name))
src << "\red That donor offers you nothing new."
return
src.visible_message("\red [src] flicks out a feeler and neatly steals a sample of [M]'s blood.","\red You flick out a feeler and neatly steal a sample of [M]'s blood.")
donors += M.real_name
spawn(25)
update_progression()
/mob/living/carbon/monkey/diona/proc/update_progression()
if(!donors.len)
return
if(donors.len == 5)
ready_evolve = 1
src << "\green You feel ready to move on to your next stage of growth."
else if(donors.len == 3)
universal_speak = 1
src << "\green You feel your awareness expand, and realize you know how to speak to the meat-creatures around you."
else
src << "\green The blood seeps into your small form, and you draw out the echoes of memories and personality from it, working them into your budding mind."
@@ -117,6 +117,17 @@
emote("collapse")
if (radiation)
if(istype(src,/mob/living/carbon/monkey/diona)) //Filthy check. Dionaea don't take rad damage.
var/rads = radiation/25
radiation -= rads
nutrition += rads
heal_overall_damage(rads,rads)
adjustOxyLoss(-(rads))
adjustToxLoss(-(rads))
updatehealth()
return
if (radiation > 100)
radiation = 100
Weaken(10)
@@ -408,6 +419,25 @@
proc/handle_chemicals_in_body()
if(istype(src,/mob/living/carbon/monkey/diona)) //Filthy check. Dionaea nymphs need light or they get sad.
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(loc)) //else, there's considered to be no light
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
traumatic_shock -= light_amount
if(nutrition > 500)
nutrition = 500
if(light_amount > 2) //if there's enough light, heal
heal_overall_damage(1,1)
adjustToxLoss(-1)
adjustOxyLoss(-1)
if(reagents) reagents.metabolize(src)
if (drowsyness)
@@ -1,8 +1,7 @@
/mob/living/carbon/monkey
name = "monkey"
voice_name = "monkey"
voice_message = "chimpers"
say_message = "chimpers"
speak_emote = list("chimpers")
icon_state = "monkey1"
icon = 'icons/mob/monkey.dmi'
gender = NEUTER
@@ -17,24 +16,21 @@
/mob/living/carbon/monkey/tajara
name = "farwa"
voice_name = "farwa"
voice_message = "mews"
say_message = "mews"
speak_emote = list("mews")
ico = "tajkey"
uni_append = "0A0E00"
/mob/living/carbon/monkey/skrell
name = "neaera"
voice_name = "neaera"
voice_message = "squicks"
say_message = "squicks"
speak_emote = list("squicks")
ico = "skrellkey"
uni_append = "01CC92"
/mob/living/carbon/monkey/unathi
name = "stok"
voice_name = "stok"
voice_message = "hisses"
say_message = "hisses"
speak_emote = list("hisses")
ico = "stokkey"
uni_append = "044C5D"
@@ -43,7 +39,7 @@
reagents = R
R.my_atom = src
if(name == "monkey" || name == "farwa" || name == "stok" || name == "neara") //Hideous but necessary to stop Pun-Pun becoming generic.
if(name == "monkey" || name == "farwa" || name == "stok" || name == "neara" || name == "diona nymph") //Hideous but necessary to stop Pun-Pun becoming generic.
name = "[name] ([rand(1, 1000)])"
real_name = name
@@ -71,18 +67,29 @@
..()
dna.mutantrace = "lizard"
greaterform = "Unathi"
add_language("Sinta'unathi")
/mob/living/carbon/monkey/skrell/New()
..()
dna.mutantrace = "skrell"
greaterform = "Skrell"
add_language("Skrellian")
/mob/living/carbon/monkey/tajara/New()
..()
dna.mutantrace = "tajaran"
greaterform = "Tajaran"
add_language("Siik'tajr")
/mob/living/carbon/monkey/diona/New()
..()
gender = NEUTER
dna.mutantrace = "plant"
greaterform = "Diona"
add_language("Rootspeak")
/mob/living/carbon/monkey/movement_delay()
var/tally = 0
@@ -1,8 +0,0 @@
/mob/living/carbon/monkey/say(var/message)
if (silent)
return
else
return ..()
/mob/living/carbon/monkey/say_quote(var/text)
return "[src.say_message], \"[text]\"";
+30 -2
View File
@@ -15,7 +15,7 @@
var/attack_verb = "punch" // Empty hand hurt intent verb.
var/mutantrace // Safeguard due to old code.
var/breath_type // Non-oxygen gas breathed, if any.
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/cold_level_1 = 260 // Cold damage level 1 below this point.
var/cold_level_2 = 200 // Cold damage level 2 below this point.
@@ -63,6 +63,14 @@
attack_verb = "scratch"
darksight = 8
cold_level_1 = 200
cold_level_2 = 140
cold_level_3 = 80
heat_level_1 = 330
heat_level_2 = 380
heat_level_3 = 800
primitive = /mob/living/carbon/monkey/tajara
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL
@@ -82,6 +90,13 @@
deform = 'icons/mob/human_races/r_def_vox.dmi'
language = "Vox-pidgin"
warning_low_pressure = 50
hazard_low_pressure = 0
cold_level_1 = 80
cold_level_2 = 50
cold_level_3 = 0
eyes = "vox_eyes_s"
breath_type = "nitrogen"
@@ -91,6 +106,19 @@
name = "Diona"
icobase = 'icons/mob/human_races/r_plant.dmi'
deform = 'icons/mob/human_races/r_def_plant.dmi'
language = "Rootspeak"
attack_verb = "slash"
primitive = /mob/living/carbon/monkey/diona
flags = WHITELISTED | NO_EAT | NO_BREATHE | REQUIRE_LIGHT | NON_GENDERED | NO_SCAN | IS_PLANT
warning_low_pressure = 50
hazard_low_pressure = -1
cold_level_1 = 50
cold_level_2 = -1
cold_level_3 = -1
heat_level_1 = 2000
heat_level_2 = 3000
heat_level_3 = 4000
flags = WHITELISTED | NO_BREATHE | REQUIRE_LIGHT | NON_GENDERED | NO_SCAN | IS_PLANT | RAD_ABSORB
+2 -2
View File
@@ -29,10 +29,10 @@
var/t_sl_gas = null
var/t_n2 = null
var/now_pushing = null
var/cameraFollow = null
var/tod = null // Time of death
var/update_slimes = 1
var/update_slimes = 1
var/silent = null //Can't talk. Value goes down every life proc.
+44 -75
View File
@@ -15,10 +15,6 @@ var/list/department_radio_keys = list(
":t" = "Syndicate", "#t" = "Syndicate", ".t" = "Syndicate",
":u" = "Supply", "#u" = "Supply", ".u" = "Supply",
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
":k" = "skrell", "#k" = "skrell", ".k" = "skrell",
":j" = "tajaran", "#j" = "tajaran", ".j" = "tajaran",
":o" = "soghun", "#o" = "soghun", ".o" = "soghun",
":v" = "vox", "#v" = "vox", ".v" = "vox",
":R" = "right hand", "#R" = "right hand", ".R" = "right hand",
":L" = "left hand", "#L" = "left hand", ".L" = "left hand",
@@ -35,10 +31,6 @@ var/list/department_radio_keys = list(
":T" = "Syndicate", "#T" = "Syndicate", ".T" = "Syndicate",
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
":G" = "changeling", "#G" = "changeling", ".G" = "changeling",
":K" = "skrell", "#K" = "skrell", ".K" = "skrell",
":J" = "tajaran", "#J" = "tajaran", ".J" = "tajaran",
":O" = "soghun", "#O" = "soghun", ".O" = "soghun",
":V" = "vox", "#V" = "vox", ".V" = "vox",
//kinda localization -- rastaf0
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
@@ -56,10 +48,7 @@ var/list/department_radio_keys = list(
":ô" = "alientalk", "#ô" = "alientalk", ".ô" = "alientalk",
":å" = "Syndicate", "#å" = "Syndicate", ".å" = "Syndicate",
":é" = "Supply", "#é" = "Supply", ".é" = "Supply",
":ï" = "changeling", "#ï" = "changeling", ".ï" = "changeling",
":ë" = "skrell", "#ë" = "skrell", ".ë" = "skrell",
":î" = "tajaran", "#î" = "tajaran", ".î" = "tajaran",
":ù" = "soghun", "#ù" = "soghun", ".ù" = "soghun"
":ï" = "changeling", "#ï" = "changeling", ".ï" = "changeling"
)
/mob/living/proc/binarycheck()
@@ -86,14 +75,27 @@ var/list/department_radio_keys = list(
/mob/living/say(var/message)
/*
Formatting and sanitizing.
*/
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
message = capitalize(message)
/*
Sanity checking and speech failure.
*/
if (!message)
return
if (stat == 2)
if(silent)
return
if (stat == 2) // Dead.
return say_dead(message)
else if (stat) // Unconcious.
return
if (src.client)
if(client.prefs.muted & MUTE_IC)
@@ -102,94 +104,74 @@ var/list/department_radio_keys = list(
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
// stat == 2 is handled above, so this stops transmission of uncontious messages
if (stat)
return
// Mute disability
if (sdisabilities & MUTE)
return
// Muzzled.
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
// emotes
// Emotes.
if (copytext(message, 1, 2) == "*" && !stat)
return emote(copytext(message, 2))
/*
Identity hiding.
*/
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && name != GetVoice())
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_id_name("Unknown")])"
/*
Now we get into the real meat of the say processing. Determining the message mode.
*/
var/italics = 0
var/message_range = null
var/message_mode = null
var/datum/language/speaking = null //For use if a specific language is being spoken.
// If brain damaged, talk on headset at random.
if (getBrainLoss() >= 60 && prob(50))
if (ishuman(src))
message_mode = "headset"
var/braindam = getBrainLoss()
if (braindam >= 60)
if(prob(braindam/4))
message = stutter(message)
if(prob(braindam))
message = uppertext(message)
// General public key. Special message handling
else if (copytext(message, 1, 2) == ";")
else if (copytext(message, 1, 2) == ";" || prob(braindam/2))
if (ishuman(src))
message_mode = "headset"
else if(ispAI(src) || isrobot(src))
message_mode = "pAI"
message = copytext(message, 2)
// Begin checking for either a message mode or a language to speak.
else if (length(message) >= 2)
var/channel_prefix = copytext(message, 1, 3)
//Check if the person is speaking a language that they know.
for(var/datum/language/L in languages)
if(lowertext(channel_prefix) == ":[L.key]")
speaking = L
break
if(languages.len)
for(var/datum/language/L in languages)
if(lowertext(channel_prefix) == ":[L.key]")
speaking = L
break
message_mode = department_radio_keys[channel_prefix]
if (message_mode)
if (message_mode || speaking || copytext(message,1,2) == ":")
message = trim(copytext(message, 3))
if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
if (!(istype(src,/mob/living/carbon/human) || istype(src,/mob/living/carbon/monkey) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
message_mode = null //only humans can use headsets
// Check changed so that parrots can use headsets. Other simple animals do not have ears and will cause runtimes.
// And borgs -Sieve
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
message_mode = "" //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
if (!message)
return
// :downs:
if (getBrainLoss() >= 60)
message = replacetext(message, " am ", " ")
message = replacetext(message, " is ", " ")
message = replacetext(message, " are ", " ")
message = replacetext(message, "you", "u")
message = replacetext(message, "help", "halp")
message = replacetext(message, "grief", "grife")
message = replacetext(message, "space", "spess")
message = replacetext(message, "carp", "crap")
message = replacetext(message, "reason", "raisin")
if(prob(50))
message = uppertext(message)
message += "[stutter(pick("!", "!!", "!!!"))]"
if(!stuttering && prob(15))
message = stutter(message)
if (stuttering)
message = stutter(message)
/* //qw do not have beesease atm.
if(virus)
if(virus.name=="beesease" && virus.stage>=2)
if(prob(virus.stage*10))
var/bzz = length(message)
message = "B"
for(var/i=0,i<bzz,i++)
message += "Z"
*/
var/list/obj/item/used_radios = new
var/is_speaking_radio = 0
@@ -203,16 +185,6 @@ var/list/department_radio_keys = list(
message_range = 1
italics = 1
if ("secure headset")
if (src:ears)
src:ears.talk_into(src, message, 1)
used_radios += src:ears
is_speaking_radio = 1
message_range = 1
italics = 1
if ("right hand")
if (r_hand)
r_hand.talk_into(src, message)
@@ -400,13 +372,10 @@ var/list/department_radio_keys = list(
M << speech_bubble
if (length(heard_b))
var/message_b
if (voice_message)
message_b = voice_message
else
message_b = stars(message)
message_b = say_quote(message_b,speaking)
var/message_b
message_b = stars(message)
message_b = say_quote(message_b,speaking)
if (italics)
message_b = "<i>[message_b]</i>"
+2 -2
View File
@@ -652,7 +652,7 @@ var/list/ai_list = list()
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
return
/mob/living/silicon/ai/proc/corereturn()
/*/mob/living/silicon/ai/proc/corereturn()
set category = "Malfunction"
set name = "Return to Main Core"
@@ -660,7 +660,7 @@ var/list/ai_list = list()
if(!istype(apc))
src << "\blue You are already in your Main Core."
return
apc.malfvacate()
apc.malfvacate()*/
//Toggles the luminosity and applies it by re-entereing the camera.
/mob/living/silicon/ai/proc/toggle_camera_light()
+2 -16
View File
@@ -5,29 +5,15 @@
//If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead.
..(message)
/mob/living/silicon/ai/say_understands(var/other)
/mob/living/silicon/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/silicon/decoy))
if (istype(other, /mob/living/silicon))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
return ..()
/mob/living/silicon/ai/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "queries, \"[text]\"";
else if (ending == "!")
return "declares, \"[text]\"";
return "states, \"[text]\"";
var/announcing_vox = 0
var/const/VOX_CHANNEL = 200
var/const/VOX_VOLUME = 75
+1 -20
View File
@@ -9,23 +9,4 @@
src.icon = 'icons/mob/AI.dmi'
src.icon_state = "ai"
src.anchored = 1
src.canmove = 0
/mob/living/silicon/decoy/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
return ..()
/mob/living/silicon/decoy/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "queries, \"[text]\"";
else if (ending == "!")
return "declares, \"[copytext(text, 1, length(text))]\"";
return "states, \"[text]\"";
src.canmove = 0
@@ -1,28 +1,3 @@
/mob/living/silicon/pai/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
return ..()
/mob/living/silicon/pai/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "[src.speakQuery], \"[text]\"";
else if (ending == "!")
return "[src.speakExclamation], \"[text]\"";
return "[src.speakStatement], \"[text]\"";
/mob/living/silicon/pai/say(var/msg)
if(silence_time)
src << "<font color=green>Communication circuits remain unitialized.</font>"
+10 -8
View File
@@ -9,7 +9,6 @@
var/sight_mode = 0
var/custom_name = ""
var/base_icon
var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best
var/crisis //Admin-settable for combat module use.
@@ -204,6 +203,8 @@
if("Engineering")
module = new /obj/item/weapon/robot_module/engineering(src)
channels = list("Engineering" = 1)
if(camera && "Robots" in camera.network)
camera.network.Add("Engineering")
module_sprites["Basic"] = "Engineering"
module_sprites["Antique"] = "engineerrobot"
module_sprites["Landmate"] = "landmate"
@@ -232,7 +233,6 @@
choose_icon(6,module_sprites)
radio.config(channels)
base_icon = icon_state
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(prefix)
@@ -700,6 +700,8 @@
if(!opened)//Cover is closed
if(locked)
if(prob(90))
var/obj/item/weapon/card/emag/emag = W
emag.uses--
user << "You emag the cover lock."
locked = 0
else
@@ -1010,9 +1012,11 @@
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
overlays += "[icon_state]-shield"
if(base_icon)
if(modtype == "Combat")
var/base_icon = ""
base_icon = icon_state
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
icon_state = "[base_icon]-roll"
icon_state = "[icon_state]-roll"
else
icon_state = base_icon
return
@@ -1232,8 +1236,8 @@
var/icontype
if (src.name == "Lucy" && src.ckey == "rowtree")
icontype = "Lucy"
if (custom_sprite == 1)
icontype = "Custom"
triesleft = 0
else
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
@@ -1243,11 +1247,9 @@
else
src << "Something is badly wrong with the sprite selection. Harass a coder."
icon_state = module_sprites[1]
base_icon = icon_state
return
overlays -= "eyes"
base_icon = icon_state
updateicon()
if (triesleft >= 1)
@@ -65,6 +65,7 @@
..()
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/device/reagent_scanner/adv(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
@@ -1,24 +0,0 @@
/mob/living/silicon/robot/say_understands(var/other)
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
// if (istype(other, /mob/living/silicon/hivebot))
// return 1
return ..()
/mob/living/silicon/robot/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "queries, \"[text]\"";
else if (ending == "!")
return "declares, \"[text]\"";
return "states, \"[text]\"";
+10
View File
@@ -1,3 +1,13 @@
/mob/living/silicon/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "queries, \"[text]\"";
else if (ending == "!")
return "declares, \"[copytext(text, 1, length(text))]\"";
return "states, \"[text]\"";
/mob/living/silicon/say(var/message)
if (!message)
return
+20 -14
View File
@@ -154,9 +154,9 @@
host.ckey = src.ckey
controlling = 1
host.verbs += /mob/living/carbon/human/proc/release_control
host.verbs += /mob/living/carbon/human/proc/punish_host
host.verbs += /mob/living/carbon/human/proc/spawn_larvae
host.verbs += /mob/living/carbon/proc/release_control
host.verbs += /mob/living/carbon/proc/punish_host
host.verbs += /mob/living/carbon/proc/spawn_larvae
/mob/living/simple_animal/borer/verb/secrete_chemicals()
set category = "Alien"
@@ -220,8 +220,11 @@ mob/living/simple_animal/borer/proc/detatch()
if(!host) return
var/datum/organ/external/head = host.get_organ("head")
head.implants -= src
if(istype(host,/mob/living/carbon/human))
var/mob/living/carbon/human/H = host
var/datum/organ/external/head = H.get_organ("head")
head.implants -= src
src.loc = get_turf(host)
controlling = 0
@@ -231,9 +234,9 @@ mob/living/simple_animal/borer/proc/detatch()
host.reset_view(null)
host.machine = null
host.verbs -= /mob/living/carbon/human/proc/release_control
host.verbs -= /mob/living/carbon/human/proc/punish_host
host.verbs -= /mob/living/carbon/human/proc/spawn_larvae
host.verbs -= /mob/living/carbon/proc/release_control
host.verbs -= /mob/living/carbon/proc/punish_host
host.verbs -= /mob/living/carbon/proc/spawn_larvae
if(host_brain.ckey)
src.ckey = host.ckey
@@ -244,7 +247,7 @@ mob/living/simple_animal/borer/proc/detatch()
host = null
/mob/living/simple_animal/borer/verb/infest(var/mob/living/carbon/human/H)
/mob/living/simple_animal/borer/verb/infest()
set category = "Alien"
set name = "Infest"
set desc = "Infest a suitable humanoid host."
@@ -258,11 +261,11 @@ mob/living/simple_animal/borer/proc/detatch()
return
var/list/choices = list()
for(var/mob/living/carbon/human/C in view(1,src))
if(istype(C,/mob/living/carbon/human) && C.stat != 2)
for(var/mob/living/carbon/C in view(1,src))
if(C.stat != 2)
choices += C
var/mob/living/carbon/human/M = input(src,"Who do you wish to infest?") in null|choices
var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
if(!M || !src) return
@@ -293,10 +296,13 @@ mob/living/simple_animal/borer/proc/detatch()
M << "Something disgusting and slimy wiggles into your ear!"
src.host = M
var/datum/organ/external/head = M.get_organ("head")
head.implants += src
src.loc = M
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/datum/organ/external/head = H.get_organ("head")
head.implants += src
host_brain.name = M.name
host_brain.real_name = M.real_name
@@ -125,6 +125,8 @@
user << "\red [src] is already overloaded - better run."
return 0
else
var/obj/item/weapon/card/emag/emag = O
emag.uses--
emagged = 1
user << "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time."
spawn(100) src << "\red Your cell seems to be outputting a lot of power..."
@@ -9,7 +9,6 @@
var/icon_gib = null //We only try to show a gibbing animation if this exists.
var/list/speak = list()
var/list/speak_emote = list()// Emotes while speaking IE: Ian [emote], [text] -- Ian barks, "WOOF!". Spoken text is generated from the speak variable.
var/speak_chance = 0
var/list/emote_hear = list() //Hearable emotes
var/list/emote_see = list() //Unlike speak_emote, the list of things in this variable only show by themselves with no spoken text. IE: Ian barks, Ian yaps
@@ -222,13 +221,6 @@
adjustBruteLoss(20)
return
/mob/living/simple_animal/say_quote(var/text)
if(speak_emote && speak_emote.len)
var/emote = pick(speak_emote)
if(emote)
return "[emote], \"[text]\""
return "says, \"[text]\"";
/mob/living/simple_animal/emote(var/act)
if(stat)
return
+1
View File
@@ -1,4 +1,5 @@
/mob/Logout()
nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs
player_list -= src
log_access("Logout: [key_name(src)]")
if(admin_datums[src.ckey])
+1
View File
@@ -719,6 +719,7 @@ note dizziness decrements automatically in the mob's Life() proc.
stat(null,"Mch-[master_controller.machines_cost]\t#[machines.len]")
stat(null,"Obj-[master_controller.objects_cost]\t#[processing_objects.len]")
stat(null,"Net-[master_controller.networks_cost]\tPnet-[master_controller.powernets_cost]")
stat(null,"NanoUI-[master_controller.nano_cost]\t#[nanomanager.processing_uis.len]")
stat(null,"Tick-[master_controller.ticker_cost]\tALL-[master_controller.total_cost]")
else
stat(null,"MasterController-ERROR")
+5 -5
View File
@@ -86,9 +86,11 @@
var/lastpuke = 0
var/unacidable = 0
var/small = 0
var/list/pinned = list() //List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() //Embedded items, since simple mobs don't have organs.
var/list/languages = list() // For speaking/listening.
var/list/pinned = list() //List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() //Embedded items, since simple mobs don't have organs.
var/list/languages = list() // For speaking/listening.
var/list/speak_emote = list("says") //Verbs used when speaking. Defaults to 'say' if speak_emote is null.
var/name_archive //For admin things like possession
var/timeofdeath = 0.0//Living
@@ -155,8 +157,6 @@
//see: setup.dm for list of mutations
var/voice_name = "unidentifiable voice"
var/voice_message = null // When you are not understood by others (replaced with just screeches, hisses, chimpers etc.)
var/say_message = null // When you are understood by others. Currently only used by aliens and monkeys in their say_quote procs
var/faction = "neutral" //Used for checking whether hostile simple animals will attack you, possibly more stuff later
+6 -3
View File
@@ -74,7 +74,10 @@
if(ticker.hide_mode)
stat("Game Mode:", "Secret")
else
stat("Game Mode:", "[master_mode]")
if(ticker.hide_mode == 0)
stat("Game Mode:", "[master_mode]") // Old setting for showing the game mode
else
stat("Game Mode: ", "Secret")
if((ticker.current_state == GAME_STATE_PREGAME) && going)
stat("Time To Start:", ticker.pregame_timeleft)
@@ -354,10 +357,10 @@
var/datum/language/chosen_language
if(client.prefs.language)
chosen_language = all_languages[client.prefs.language]
chosen_language = all_languages["[client.prefs.language]"]
if(chosen_language)
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED))
new_character.add_language(client.prefs.language)
new_character.add_language("[client.prefs.language]")
if(ticker.random_players)
new_character.gender = pick(MALE, FEMALE)
+8 -1
View File
@@ -62,8 +62,12 @@
return
/mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null)
if(!other)
return 1
//Universal speak makes everything understandable, for obvious reasons.
else if(other.universal_speak || src.universal_speak)
return 1
else if (src.stat == 2)
return 1
else if (speaking) //Language check.
@@ -83,11 +87,12 @@
return 1
else if(isAI(src) && ispAI(other))
return 1
else if (istype(other, src.type) || istype(src, other.type))
else if (istype(other, src.type) || istype(src, other.type))
return 1
return 0
/mob/proc/say_quote(var/text,var/datum/language/speaking)
if(!text)
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
//tcomms code is still runtiming somewhere here
@@ -97,6 +102,8 @@
if (speaking)
speechverb = "[speaking.speech_verb]</span>, \"<span class='[speaking.colour]'>"
else if(speak_emote && speak_emote.len)
speechverb = "[pick(speak_emote)], \""
else if (src.stuttering)
speechverb = "stammers, \""
else if (src.slurring)
+3 -3
View File
@@ -631,9 +631,9 @@
H.name = "host brain"
H.real_name = "host brain"
verbs -= /mob/living/carbon/human/proc/release_control
verbs -= /mob/living/carbon/human/proc/punish_host
verbs -= /mob/living/carbon/human/proc/spawn_larvae
verbs -= /mob/living/carbon/proc/release_control
verbs -= /mob/living/carbon/proc/punish_host
verbs -= /mob/living/carbon/proc/spawn_larvae
return
+205
View File
@@ -0,0 +1,205 @@
json_token
var
value
New(v)
src.value = v
text
number
word
symbol
eof
json_reader
var
list
string = list("'", "\"")
symbols = list("{", "}", "\[", "]", ":", "\"", "'", ",")
sequences = list("b" = 8, "t" = 9, "n" = 10, "f" = 12, "r" = 13)
tokens
json
i = 1
proc
// scanner
ScanJson(json)
src.json = json
. = new/list()
src.i = 1
while(src.i <= lentext(json))
var/char = get_char()
if(is_whitespace(char))
i++
continue
if(string.Find(char))
. += read_string(char)
else if(symbols.Find(char))
. += new/json_token/symbol(char)
else if(is_digit(char))
. += read_number()
else
. += read_word()
i++
. += new/json_token/eof()
read_word()
var/val = ""
while(i <= lentext(json))
var/char = get_char()
if(is_whitespace(char) || symbols.Find(char))
i-- // let scanner handle this character
return new/json_token/word(val)
val += char
i++
read_string(delim)
var
escape = FALSE
val = ""
while(++i <= lentext(json))
var/char = get_char()
if(escape)
switch(char)
if("\\", "'", "\"", "/", "u")
val += char
else
// TODO: support octal, hex, unicode sequences
ASSERT(sequences.Find(char))
val += ascii2text(sequences[char])
else
if(char == delim)
return new/json_token/text(val)
else if(char == "\\")
escape = TRUE
else
val += char
CRASH("Unterminated string.")
read_number()
var/val = ""
var/char = get_char()
while(is_digit(char) || char == "." || lowertext(char) == "e")
val += char
i++
char = get_char()
i-- // allow scanner to read the first non-number character
return new/json_token/number(text2num(val))
check_char()
ASSERT(args.Find(get_char()))
get_char()
return copytext(json, i, i+1)
is_whitespace(char)
return char == " " || char == "\t" || char == "\n" || text2ascii(char) == 13
is_digit(char)
var/c = text2ascii(char)
return 48 <= c && c <= 57 || char == "+" || char == "-"
// parser
ReadObject(list/tokens)
src.tokens = tokens
. = new/list()
i = 1
read_token("{", /json_token/symbol)
while(i <= tokens.len)
var/json_token/K = get_token()
check_type(/json_token/word, /json_token/text)
next_token()
read_token(":", /json_token/symbol)
.[K.value] = read_value()
var/json_token/S = get_token()
check_type(/json_token/symbol)
switch(S.value)
if(",")
next_token()
continue
if("}")
next_token()
return
else
die()
get_token()
return tokens[i]
next_token()
return tokens[++i]
read_token(val, type)
var/json_token/T = get_token()
if(!(T.value == val && istype(T, type)))
CRASH("Expected '[val]', found '[T.value]'.")
next_token()
return T
check_type(...)
var/json_token/T = get_token()
for(var/type in args)
if(istype(T, type))
return
CRASH("Bad token type: [T.type].")
check_value(...)
var/json_token/T = get_token()
ASSERT(args.Find(T.value))
read_key()
var/char = get_char()
if(char == "\"" || char == "'")
return read_string(char)
read_value()
var/json_token/T = get_token()
switch(T.type)
if(/json_token/text, /json_token/number)
next_token()
return T.value
if(/json_token/word)
next_token()
switch(T.value)
if("true")
return TRUE
if("false")
return FALSE
if("null")
return null
if(/json_token/symbol)
switch(T.value)
if("\[")
return read_array()
if("{")
return ReadObject(tokens.Copy(i))
die()
read_array()
read_token("\[", /json_token/symbol)
. = new/list()
var/list/L = .
while(i <= tokens.len)
// Avoid using Add() or += in case a list is returned.
L.len++
L[L.len] = read_value()
var/json_token/T = get_token()
check_type(/json_token/symbol)
switch(T.value)
if(",")
next_token()
continue
if("]")
next_token()
return
else
die()
next_token()
CRASH("Unterminated array.")
die(json_token/T)
if(!T) T = get_token()
CRASH("Unexpected token: [T.value].")
+54
View File
@@ -0,0 +1,54 @@
json_writer
proc
WriteObject(list/L)
. = "{"
var/i = 1
for(var/k in L)
var/val = L[k]
. += {"\"[k]\":[write(val)]"}
if(i++ < L.len)
. += ","
.+= "}"
write(val)
if(isnum(val))
return num2text(val, 100)
else if(isnull(val))
return "null"
else if(istype(val, /list))
if(is_associative(val))
return WriteObject(val)
else
return write_array(val)
else
. += write_string("[val]")
write_array(list/L)
. = "\["
for(var/i = 1 to L.len)
. += write(L[i])
if(i < L.len)
. += ","
. += "]"
write_string(txt)
var/static/list/json_escape = list("\\", "\"", "'", "\n")
for(var/targ in json_escape)
var/start = 1
while(start <= lentext(txt))
var/i = findtext(txt, targ, start)
if(!i)
break
if(targ == "\n")
txt = copytext(txt, 1, i) + "\\n" + copytext(txt, i+1)
else
txt = copytext(txt, 1, i) + "\\" + copytext(txt, i)
start = i + 2
return {""[txt]""}
is_associative(list/L)
for(var/key in L)
// if the key is a list that means it's actually an array of lists (stupid Byond...)
if(!isnum(key) && !istype(key, /list))
return TRUE
+12
View File
@@ -0,0 +1,12 @@
/*
n_Json v11.3.21
*/
proc
json2list(json)
var/static/json_reader/_jsonr = new()
return _jsonr.ReadObject(_jsonr.ScanJson(json))
list2json(list/L)
var/static/json_writer/_jsonw = new()
return _jsonw.WriteObject(L)
+6
View File
@@ -0,0 +1,6 @@
// All movable things can have a Nano UI, always use ui_interact to open/interact with a Nano UI
/atom/movable/proc/ui_interact(mob/user, ui_key = "main")
return
// Used by the Nano UI Manager (/datum/nanomanager) to track UIs opened by this mob
/mob/var/list/open_uis = list()
+69
View File
@@ -0,0 +1,69 @@
// This is the window/UI manager for Nano UI
// There should only ever be one (global) instance of nanomanger
/datum/nanomanager
var/open_uis[0]
var/list/processing_uis = list()
/datum/nanomanager/New()
return
/datum/nanomanager/proc/get_open_ui(var/mob/user, src_object, ui_key)
var/src_object_key = "\ref[src_object]"
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
return null
else if (isnull(open_uis[src_object_key][ui_key]) || !istype(open_uis[src_object_key][ui_key], /list))
return null
for (var/datum/nanoui/ui in open_uis[src_object_key][ui_key])
if (ui.user == user)
return ui
return null
/datum/nanomanager/proc/update_uis(src_object)
var/src_object_key = "\ref[src_object]"
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
return 0
var/update_count = 0
for (var/ui_key in open_uis[src_object_key])
for (var/datum/nanoui/ui in open_uis[src_object_key][ui_key])
if(ui && ui.src_object && ui.user)
ui.process()
update_count++
return update_count
/datum/nanomanager/proc/ui_opened(var/datum/nanoui/ui)
var/src_object_key = "\ref[ui.src_object]"
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
open_uis[src_object_key] = list(ui.ui_key = list())
else if (isnull(open_uis[src_object_key][ui.ui_key]) || !istype(open_uis[src_object_key][ui.ui_key], /list))
open_uis[src_object_key][ui.ui_key] = list();
ui.user.open_uis.Add(ui)
var/list/uis = open_uis[src_object_key][ui.ui_key]
uis.Add(ui)
processing_uis.Add(ui)
/datum/nanomanager/proc/ui_closed(var/datum/nanoui/ui)
var/src_object_key = "\ref[ui.src_object]"
if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list))
return 0 // wasn't open
else if (isnull(open_uis[src_object_key][ui.ui_key]) || !istype(open_uis[src_object_key][ui.ui_key], /list))
return 0 // wasn't open
processing_uis.Remove(ui)
ui.user.open_uis.Remove(ui)
var/list/uis = open_uis[src_object_key][ui.ui_key]
return uis.Remove(ui)
// user has logged out (or is switching mob) so close/clear all uis
/datum/nanomanager/proc/user_logout(var/mob/user)
if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0)
return 0 // has no open uis
for (var/datum/nanoui/ui in user.open_uis)
ui.close();
+251
View File
@@ -0,0 +1,251 @@
/datum/nanoui
var/mob/user
var/atom/movable/src_object
var/title
var/ui_key
var/window_id // window_id is used as the window name for browse and onclose
var/width = 0
var/height = 0
var/atom/ref = null
var/on_close_logic = 1
var/window_options = "focus=0;can_close=1;can_minimize=1;can_maximize=0;can_resize=1;titlebar=1;" // window option is set using window_id
var/list/stylesheets = list()
var/list/scripts = list()
var/templates[0]
var/title_image
var/head_elements
var/body_elements
var/head_content = ""
var/content = "<div id='mainTemplate'></div>" // the #mainTemplate div will contain the compiled "main" template html
var/list/initial_data[0]
var/is_auto_updating = 0
var/status = 2
/datum/nanoui/New(nuser, nsrc_object, nui_key, ntemplate, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
user = nuser
src_object = nsrc_object
ui_key = nui_key
window_id = "[ui_key]\ref[src_object]"
add_template("main", ntemplate)
if (ntitle)
title = ntitle
if (nwidth)
width = nwidth
if (nheight)
height = nheight
if (nref)
ref = nref
add_common_assets()
/datum/nanoui/proc/add_common_assets()
add_script("libraries.min.js") // The jQuery library
add_script("nano_update.js") // The NanoUpdate JS, this is used to receive updates and apply them.
add_script("nano_config.js") // The NanoUpdate JS, this is used to receive updates and apply them.
add_script("nano_base_helpers.js") // The NanoBaseHelpers JS, this is used to set up template helpers which are common to all templates
add_stylesheet("shared.css") // this CSS sheet is common to all UIs
add_stylesheet("icons.css") // this CSS sheet is common to all UIs
/datum/nanoui/proc/set_status(state)
if (state != status)
status = state
push_data(list(), 1) // Update the UI
else
status = state
/datum/nanoui/proc/set_auto_update(state = 1)
is_auto_updating = state
/datum/nanoui/proc/set_initial_data(data)
initial_data = modify_data(data)
/datum/nanoui/proc/add_head_content(nhead_content)
head_content = nhead_content
/datum/nanoui/proc/set_window_options(nwindow_options)
window_options = nwindow_options
/datum/nanoui/proc/set_title_image(ntitle_image)
//title_image = ntitle_image
/datum/nanoui/proc/add_stylesheet(file)
stylesheets.Add(file)
/datum/nanoui/proc/add_script(file)
scripts.Add(file)
/datum/nanoui/proc/add_template(name, file)
templates[name] = file
/datum/nanoui/proc/set_content(ncontent)
content = ncontent
/datum/nanoui/proc/add_content(ncontent)
content += ncontent
/datum/nanoui/proc/use_on_close_logic(nsetting)
on_close_logic = nsetting
/datum/nanoui/proc/get_header()
for (var/filename in stylesheets)
head_content += "<link rel='stylesheet' type='text/css' href='[filename]'>"
var/title_attributes = "id='uiTitle'"
if (title_image)
title_attributes = "id='uiTitle icon' style='background-image: url([title_image]);'"
var/templatel_data[0]
for (var/key in templates)
templatel_data[key] = templates[key];
var/template_data_json = "{}" // An empty JSON object
if (templatel_data.len > 0)
template_data_json = list2json(templatel_data)
var/initial_data_json = "{}" // An empty JSON object
if (initial_data.len > 0)
initial_data_json = list2json(initial_data)
var/url_parameters_json = list2json(list("src" = "\ref[src_object]"))
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<head>
[head_content]
</head>
<body scroll=auto data-url-parameters='[url_parameters_json]' data-template-data='[template_data_json]' data-initial-data='[initial_data_json]'>
<script type='text/javascript'>
function receiveUpdateData(jsonString)
{
// We need both jQuery and NanoUpdate to be able to recieve data
if (typeof NanoUpdate != 'undefined' && typeof jQuery != 'undefined')
{
NanoUpdate.receiveUpdateData(jsonString);
}
else
{
alert('receiveUpdateData error: something is not defined!');
if (typeof NanoUpdate == 'undefined')
{
alert('NanoUpdate not defined!');
}
if (typeof jQuery == 'undefined')
{
alert('jQuery not defined!');
}
}
// At the moment any data received before those libraries are loaded will be lost
}
</script>
<div id='uiWrapper'>
[title ? "<div id='uiTitleWrapper'><div id='uiStatusIcon' class='icon24 uiStatusGood'></div><div [title_attributes]>[title]</div><div id='uiTitleFluff'></div></div>" : ""]
<div id='uiContent'>
"}
/datum/nanoui/proc/get_footer()
var/scriptsContent = ""
for (var/filename in scripts)
scriptsContent += "<script type='text/javascript' src='[filename]'></script>"
return {"
[scriptsContent]
</div>
</div>
</body>
</html>"}
/datum/nanoui/proc/get_content()
return {"
[get_header()]
[content]
[get_footer()]
"}
/datum/nanoui/proc/open()
var/window_size = ""
if (width && height)
window_size = "size=[width]x[height];"
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
on_close_winset()
//onclose(user, window_id)
nanomanager.ui_opened(src)
/datum/nanoui/proc/close()
is_auto_updating = 0
nanomanager.ui_closed(src)
user << browse(null, "window=[window_id]")
/datum/nanoui/proc/on_close_winset()
if(!user.client)
world << "ERROR: No user.client!?"
return
var/params = "\ref[src]"
winset(user, window_id, "on-close=\"nanoclose [params]\"")
/datum/nanoui/proc/process(update = 0)
var/dist = get_dist(src_object, user)
if (dist <= 1)
set_status(2) // interactive
else if (dist <= 2)
set_status(1) // update only
else if (dist <= 3)
set_status(0) // no updates, completely disabled
return // don't auto update
else
close()
return
if (update || is_auto_updating)
src_object.ui_interact(user, ui_key)
/datum/nanoui/proc/modify_data(data)
data["ui"] = list(
"status" = status,
"user" = list("name" = user.name)
)
//user << list2json(data)
return data
/datum/nanoui/proc/push_data(data, force_push = 0)
if (!status && !force_push)
user << "Cannot update UI, user out of range (status [status])"
return
data = modify_data(data)
user << output(list2params(list(list2json(data))),"[window_id].browser:receiveUpdateData")
on_close_winset()
/client/verb/nanoclose(var/uiref as text)
set hidden = 1 // hide this verb from the user's panel
set name = "nanoclose" // no autocomplete on cmd line
//world << "world [src] looking for [uiref]"
var/datum/nanoui/ui = locate(uiref)
if (ui)
//world << "[src] UI found [ui.window_id]"
ui.close()
if (ui.on_close_logic)
if(ui.ref)
var/href = "close=1"
//world << "[src] Topic [href] [ui.ref]"
src.Topic(href, params2list(href), ui.ref) // this will direct to the atom's
// Topic() proc via client.Topic()
else
// no atomref specified (or not found)
// so just reset the user mob's machine var
if(src && src.mob)
//world << "[src] was [src.mob.machine], setting to null"
src.mob.unset_machine()
else
world << "[src] UI not found"
return
+10 -10
View File
@@ -635,10 +635,10 @@
t += "<BR><HR><A href='?src=\ref[src];malfhack=1'><I>Override Programming</I></A><BR>"
else
t += "<BR><HR><I>APC Hacked</I><BR>"
if(!src.occupant)
/*if(!src.occupant)
t += "<A href='?src=\ref[src];occupyapc=1'><I>Shunt Core Processes</I></A><BR>"
else
t += "<I>Core Processes Uploaded</I><BR>"
t += "<I>Core Processes Uploaded</I><BR>"*/
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A>"
@@ -903,19 +903,19 @@
malfai << "Hack complete. The APC is now under your exclusive control."
update_icon()
else if (href_list["occupyapc"])
/*else if (href_list["occupyapc"])
malfoccupy(usr)
else if (href_list["deoccupyapc"])
malfvacate()
malfvacate()*/
if(usingUI)
src.updateDialog()
return
/obj/machinery/power/apc/proc/malfoccupy(var/mob/living/silicon/ai/malf)
/*/obj/machinery/power/apc/proc/malfoccupy(var/mob/living/silicon/ai/malf)
if(!istype(malf))
return
if(istype(malf.loc, /obj/machinery/power/apc)) // Already in an APC
@@ -953,7 +953,7 @@
if(forced)
src.occupant.loc = src.loc
src.occupant.death()
src.occupant.gib()
src.occupant.gib()*/
/obj/machinery/power/apc/proc/ion_act()
@@ -1235,8 +1235,8 @@
ticker.mode:apcs--
stat |= BROKEN
operating = 0
if(occupant)
malfvacate(1)
/*if(occupant)
malfvacate(1)*/
update_icon()
update()
@@ -1263,8 +1263,8 @@
area.power_equip = 0
area.power_environ = 0
area.power_change()
if(occupant)
malfvacate(1)
/*if(occupant)
malfvacate(1)*/
..()
/obj/machinery/power/apc/proc/shock(mob/user, prb)
@@ -47,7 +47,7 @@
/obj/item/ammo_casing/a12mm
desc = "A 12mm bullet casing."
caliber = "12mm"
projectile_type = "/obj/item/projectile/bullet/midbullet"
projectile_type = "/obj/item/projectile/bullet/midbullet2"
/obj/item/ammo_casing/shotgun
@@ -93,4 +93,4 @@
/obj/item/ammo_casing/a762
desc = "A 7.62 bullet casing."
caliber = "a762"
projectile_type = "/obj/item/projectile/bullet"
projectile_type = "/obj/item/projectile/bullet/a762"
+35 -4
View File
@@ -1657,6 +1657,33 @@ datum
..()
return
rezadone
name = "Rezadone"
id = "rezadone"
description = "A powder derived from fish toxin, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects."
reagent_state = SOLID
color = "#669900" // rgb: 102, 153, 0
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
switch(data)
if(1 to 15)
M.adjustCloneLoss(-1)
M.heal_organ_damage(1,1)
if(15 to 35)
M.adjustCloneLoss(-2)
M.heal_organ_damage(2,1)
M.status_flags &= ~DISFIGURED
if(35 to INFINITY)
M.adjustToxLoss(1)
M.make_dizzy(5)
M.make_jittery(5)
..()
return
spaceacillin
name = "Spaceacillin"
id = "spaceacillin"
@@ -2035,8 +2062,10 @@ datum
victim << "\red Your [safe_thing] protect you from most of the pepperspray!"
victim.eye_blurry = max(M.eye_blurry, 15)
victim.eye_blind = max(M.eye_blind, 5)
victim.Paralyse(1)
victim.drop_item()
victim.Stun(5)
victim.Weaken(5)
//victim.Paralyse(10)
//victim.drop_item()
return
else if ( eyes_covered ) // Eye cover is better than mouth cover
victim << "\red Your [safe_thing] protects your eyes from the pepperspray!"
@@ -2048,8 +2077,10 @@ datum
victim << "\red You're sprayed directly in the eyes with pepperspray!"
victim.eye_blurry = max(M.eye_blurry, 25)
victim.eye_blind = max(M.eye_blind, 10)
victim.Paralyse(1)
victim.drop_item()
victim.Stun(5)
victim.Weaken(5)
//victim.Paralyse(10)
//victim.drop_item()
frostoil
name = "Frost Oil"
@@ -458,6 +458,13 @@ datum
required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5)
result_amount = 2
rezadone
name = "Rezadone"
id = "rezadone"
result = "rezadone"
required_reagents = list("carpotoxin" = 1, "cryptobiolin" = 1, "copper" = 1)
result_amount = 3
mindbreaker
name = "Mindbreaker Toxin"
id = "mindbreaker"
+20
View File
@@ -1279,6 +1279,26 @@ datum/design/adv_mass_spectrometer
reliability_base = 74
build_path = "/obj/item/device/mass_spectrometer/adv"
datum/design/reagent_scanner
name = "Reagent Scanner"
desc = "A device for identifying chemicals."
id = "reagent_scanner"
req_tech = list("biotech" = 2, "magnets" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 30, "$glass" = 20)
reliability_base = 76
build_path = "/obj/item/device/reagent_scanner"
datum/design/adv_reagent_scanner
name = "Advanced Reagent Scanner"
desc = "A device for identifying chemicals and their proportions."
id = "adv_reagent_scanner"
req_tech = list("biotech" = 2, "magnets" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 30, "$glass" = 20)
reliability_base = 74
build_path = "/obj/item/device/reagent_scanner/adv"
datum/design/mmi
name = "Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
+1 -1
View File
@@ -358,4 +358,4 @@
name = "Headache"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
mob << "<span class = 'notice'> Your head hurts a bit</span>"
mob << "<span class = 'notice'> Your head hurts a bit</span>"