This commit is contained in:
Ravensdale
2015-01-25 20:36:19 -08:00
23 changed files with 581 additions and 236 deletions

View File

@@ -26,6 +26,7 @@
var/area_uid
var/id_tag = null
var/hibernate = 0 //Do we even process?
var/pump_direction = 1 //0 = siphoning, 1 = releasing
var/external_pressure_bound = EXTERNAL_PRESSURE_BOUND
@@ -150,8 +151,8 @@
/obj/machinery/atmospherics/unary/vent_pump/process()
..()
last_power_draw = 0
last_flow_rate = 0
if (hibernate)
return 1
if (!node)
use_power = 0
@@ -177,6 +178,17 @@
transfer_moles = min(transfer_moles, environment.total_moles*air_contents.volume/environment.volume) //group_multiplier gets divided out here
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
else
//If we're in an area that is fucking ideal, and we don't have to do anything, chances are we won't next tick either so why redo these calculations?
//JESUS FUCK. THERE ARE LITERALLY 250 OF YOU MOTHERFUCKERS ON ZLEVEL ONE AND YOU DO THIS SHIT EVERY TICK WHEN VERY OFTEN THERE IS NO REASON TO
if(pump_direction && pressure_checks == PRESSURE_CHECK_EXTERNAL && controller_iteration > 10) //99% of all vents
//Fucking hibernate because you ain't doing shit.
hibernate = 1
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
hibernate = 0
if (power_draw >= 0)
last_power_draw = power_draw
use_power(power_draw)
@@ -256,6 +268,9 @@
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
hibernate = 0
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
@@ -421,4 +436,4 @@
if(length(ML.verbs & ventcrawl_verbs)) // alien queens have this removed, an istype would be complicated
ML.handle_ventcrawl(src)
return
..()*/
..()*/

View File

@@ -1074,10 +1074,6 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/New(var/newloc, var/obj/structure/door_assembly/assembly=null)
..()
//High-sec airlocks are much harder to completely break by emitters.
if(secured_wires)
emitter_resistance *= 3
//if assembly is given, create the new door from the assembly
if (assembly)
assembly_type = assembly.type

View File

@@ -23,7 +23,6 @@
var/id = 1.0
dir = 1
explosion_resistance = 25
emitter_resistance = 50 // Lots of emitter blasts, it's *blast* door after all.
// Proc: Bumped()
// Parameters: 1 (AM - Atom that tried to walk through this object)
@@ -138,13 +137,9 @@
/obj/machinery/door/blast/proc/repair_price()
var/sheets_needed = 0
var/dam = maxhealth - health
var/bla = emitter_hits
while(dam > 0)
dam -= 150
sheets_needed++
while(bla > 0)
bla -= 10
sheets_needed++
return sheets_needed
// Proc: repair()
@@ -152,14 +147,9 @@
// Description: Fully repairs the blast door.
/obj/machinery/door/blast/proc/repair()
health = maxhealth
emitter_hits = 0
if(stat & BROKEN)
stat &= ~BROKEN
// SUBTYPE: Regular
// Your classical blast door, found almost everywhere.
obj/machinery/door/blast/regular
@@ -177,5 +167,4 @@ obj/machinery/door/blast/regular
icon_state_opening = "shutterc0"
icon_state_closed = "shutter1"
icon_state_closing = "shutterc1"
icon_state = "shutter1"
emitter_resistance = 20
icon_state = "shutter1"

View File

@@ -27,8 +27,7 @@
var/air_properties_vary_with_direction = 0
var/maxhealth = 300
var/health
var/emitter_hits = 0 // For use when tracking amount of emitter hits taken.
var/emitter_resistance = 10 // Amount of emitter hits doors whistand
var/destroy_hits = 10 //How many strong hits it takes to destroy the door
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
var/obj/item/stack/sheet/metal/repairing
@@ -146,18 +145,21 @@
return
// Emitter Blasts - these will eventually completely destroy the door, given enough time.
if (istype(Proj, /obj/item/projectile/beam/emitter))
if(health > 0)
Proj.damage /= 4
else
emitter_hits ++
if(emitter_hits >= emitter_resistance)
visible_message("\red <B>[src.name] breaks apart!</B>", 1)
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
del(src)
if (Proj.damage > 90)
destroy_hits--
if (destroy_hits <= 0)
visible_message("\red <B>\The [src.name] disintegrates!</B>")
switch (Proj.damage_type)
if(BRUTE)
new /obj/item/stack/sheet/metal(src.loc, 2)
new /obj/item/stack/rods(src.loc, 3)
if(BURN)
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
del(src)
if(Proj.damage)
take_damage(Proj.damage)
//cap projectile damage so that there's still a minimum number of hits required to break the door
take_damage(min(Proj.damage, 100))

View File

@@ -15,25 +15,70 @@
var/basestate
var/shardtype = /obj/item/weapon/shard
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
var/silicate = 0 // number of units of silicate
/obj/structure/window/examine(mob/user)
. = ..(user)
if(health == maxhealth)
user << "<span class='notice'>It looks fully intact.</span>"
else
var/perc = health / maxhealth
if(perc > 0.75)
user << "<span class='notice'>It has a few cracks.</span>"
else if(perc > 0.5)
user << "<span class='warning'>It looks slightly damaged.</span>"
else if(perc > 0.25)
user << "<span class='warning'>It looks moderately damaged.</span>"
else
user << "<span class='danger'>It looks heavily damaged.</span>"
if(silicate)
if (silicate < 30)
user << "<span class='notice'>It has a thin layer of silicate.</span>"
else if (silicate < 70)
user << "<span class='notice'>It is covered in silicate.</span>"
else
user << "<span class='notice'>There is a thick layer of silicate covering it.</span>"
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = src.health
src.health = max(0, src.health - damage)
if(src.health <= 0)
src.shatter()
var/initialhealth = health
if(silicate)
damage = damage * (1 - silicate / 200)
health = max(0, health - damage)
if(health <= 0)
shatter()
else
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
if(src.health < src.maxhealth / 4 && initialhealth >= src.maxhealth / 4)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("[src] looks like it's about to shatter!" )
else if(src.health < src.maxhealth / 2 && initialhealth >= src.maxhealth / 2)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message("[src] looks seriously damaged!" )
else if(src.health < src.maxhealth * 3/4 && initialhealth >= src.maxhealth * 3/4)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message("Cracks begin to appear in [src]!" )
return
/obj/structure/window/proc/apply_silicate(var/amount)
if(health < maxhealth) // Mend the damage
health = min(health + amount * 3, maxhealth)
if(health == maxhealth)
visible_message("[src] looks fully repaired." )
else // Reinforce
silicate = min(silicate + amount, 100)
updateSilicate()
/obj/structure/window/proc/updateSilicate()
if (overlays)
overlays.Cut()
var/image/img = image(src.icon, src.icon_state)
img.color = "#ffffff"
img.alpha = silicate * 255 / 100
overlays += img
/obj/structure/window/proc/shatter(var/display_message = 1)
playsound(src, "shatter", 70, 1)
if(display_message)
@@ -251,7 +296,7 @@
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 90))
// updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
@@ -267,27 +312,10 @@
update_nearby_tiles(need_rebuild=1) //Compel updates before
set_dir(turn(dir, 270))
// updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1)
return
/*
/obj/structure/window/proc/updateSilicate()
if(silicateIcon && silicate)
icon = initial(icon)
var/icon/I = icon(icon,icon_state,dir)
var/r = (silicate / 100) + 1
var/g = (silicate / 70) + 1
var/b = (silicate / 50) + 1
I.SetIntensity(r,g,b)
icon = I
silicateIcon = I
*/
/obj/structure/window/New(Loc, start_dir=null, constructed=0)
..()

View File

@@ -25,18 +25,26 @@
/turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj)
// Tasers and stuff? No thanks.
if(Proj.damage_type == HALLOSS)
// Tasers and stuff? No thanks. Also no clone or tox damage crap.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
return
// Emitter blasts are somewhat weaker as emitters have large rate of fire and don't require limited power cell to run
if(istype(Proj, /obj/item/projectile/beam/emitter))
Proj.damage /= 4
//cap the amount of damage, so that things like emitters can't destroy walls in one hit.
var/damage = min(Proj.damage, 100) * armor
take_damage(Proj.damage * armor)
take_damage(damage)
return
/turf/simulated/wall/hitby(AM as mob|obj, var/speed=THROWFORCE_SPEED_DIVISOR)
..()
if(ismob(AM))
return
var/tforce = AM:throwforce * (speed/THROWFORCE_SPEED_DIVISOR)
if (tforce < 15)
return
take_damage(tforce * armor)
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
@@ -265,7 +273,7 @@
user << rotting_touch_message
if(rotting_destroy_touch)
dismantle_wall()
return 1
return 1
if(..()) return 1
@@ -467,6 +475,9 @@
else if(istype(W,/obj/item/weapon/rcd)) //I bitterly resent having to write this. ~Z
return
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
else
return attack_hand(user)

View File

@@ -292,6 +292,9 @@
AH.try_build(src)
return
else if(istype(W, /obj/item/weapon/reagent_containers))
return // They tend to have meaningful afterattack - let them apply it without destroying a rotting wall
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
else if(!d_state)
return attack_hand(user)

View File

@@ -2,6 +2,9 @@
//SS13 Optimized Map loader
//////////////////////////////////////////////////////////////
//global datum that will preload variables on atoms instanciation
var/global/dmm_suite/preloader/_preloader = null
/**
* Construct the model map and control the loading process
@@ -163,7 +166,7 @@
//first instance the /area and remove it from the members list
index = members.len
var/atom/instance
var/dmm_suite/preloader/_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
instance = locate(members[index])
instance.contents.Add(locate(xcrd,ycrd,zcrd))
@@ -191,34 +194,6 @@
T = UT
index++
//Replace the previous part of the code with this if it's unsafe to assume tiles have ALWAYS an /area AND a /turf
/*while(members.len > 0)
var/length = members.len
var/member = members[length]
if(ispath(member,/area))
var/atom/instance
var/dmm_suite/preloader/_preloader = new(members_attributes[length])
instance = locate(member)
instance.contents.Add(locate(xcrd,ycrd,zcrd))
if(_preloader && instance)
_preloader.load(instance)
members.Remove(member)
continue
else if(ispath(member,/turf))
instance_atom(member,members_attributes[length],xcrd,ycrd,zcrd)
members.Remove(member)
continue
else
break
*/
//finally instance all remainings objects/mobs
for(index=1,index < first_turf_index,index++)
instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)
@@ -230,11 +205,11 @@
//Instance an atom at (x,y,z) and gives it the variables in attributes
/dmm_suite/proc/instance_atom(var/path,var/list/attributes, var/x, var/y, var/z)
var/atom/instance
var/dmm_suite/preloader/_preloader = new(attributes)
_preloader = new(attributes, path)
instance = new path (locate(x,y,z), _preloader)//first preloader pass
instance = new path (locate(x,y,z))//first preloader pass
if(_preloader && instance)//second preloader pass, as some variables may have been reset/changed by New()
if(_preloader && instance)//second preloader pass, for those atoms that don't ..() in New()
_preloader.load(instance)
return instance
@@ -242,9 +217,9 @@
//text trimming (both directions) helper proc
//optionally removes quotes before and after the text (for variable name)
/dmm_suite/proc/trim_text(var/what as text,var/trim_quotes=0)
while(length(what) && (findtext(what," ",1,2)))// || findtext(what,quote,1,2)))
while(length(what) && (findtext(what," ",1,2)))
what=copytext(what,2,0)
while(length(what) && (findtext(what," ",length(what),0)))// || findtext(what,quote,length(what),0)))
while(length(what) && (findtext(what," ",length(what),0)))
what=copytext(what,1,length(what))
if(trim_quotes)
while(length(what) && (findtext(what,quote,1,2)))
@@ -298,14 +273,18 @@
else if(isnum(text2num(trim_right)))
trim_right = text2num(trim_right)
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right,2,length(trim_right)))
//Check for null
else if(trim_right == "null")
trim_right = null
//Check for list
else if(copytext(trim_right,1,5) == "list")
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right,2,length(trim_right)))
to_return[trim_left] = trim_right
else//simple var
@@ -323,10 +302,11 @@
placed.opacity = 1
placed.underlays += turfs_underlays
//atom creation method that preloads variables before creation
/atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
if(istype(_dmm_preloader, /dmm_suite/preloader))
_dmm_preloader.load(src)
//atom creation method that preloads variables at creation
/atom/New()
if(_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
_preloader.load(src)
. = ..()
//////////////////
@@ -336,14 +316,17 @@
/dmm_suite/preloader
parent_type = /datum
var/list/attributes
var/target_path
/dmm_suite/preloader/New(list/the_attributes)
/dmm_suite/preloader/New(var/list/the_attributes, var/path)
.=..()
if(!the_attributes.len)
Del()
return
attributes = the_attributes
target_path = path
/dmm_suite/preloader/proc/load(atom/what)
for(var/attribute in attributes)
what.vars[attribute] = attributes[attribute]
Del()
Del()

View File

@@ -144,7 +144,7 @@
syllables = list("rr","rr","tajr","kir","raj","kii","mir","kra","ahk","nal","vah","khaz","jri","ran","darr", \
"mi","jri","dynh","manq","rhe","zar","rrhaz","kal","chur","eech","thaa","dra","jurl","mah","sanu","dra","ii'r", \
"ka","aasi","far","wa","baq","ara","qara","zir","sam","mak","hrar","nja","rir","khan","jun","dar","rik","kah", \
"hal","ket","jurl","mah","tul","cresh","azu","ragh")
"hal","ket","jurl","mah","tul","cresh","azu","ragh", "mro", "mra")
/datum/language/tajaran/get_random_name(var/gender)
@@ -223,7 +223,8 @@
colour = "solcom"
key = "1"
flags = RESTRICTED
syllables = list("tao","shi","tzu","yi","com","be","is","i","op","vi","ed","lec","mo","cle","te","dis","e")
//syllables are at the bottom of the file
/datum/language/human/get_spoken_verb(var/msg_end)
switch(msg_end)
@@ -233,6 +234,15 @@
return ask_verb
return speech_verb
/datum/language/human/get_random_name(var/gender)
if (prob(80))
if(gender==FEMALE)
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
else
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
else
return ..()
// Galactic common languages (systemwide accepted standards).
/datum/language/trader
name = "Tradeband"
@@ -424,4 +434,66 @@
dat += "<b>[L.name] (:[L.key])</b><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
return
//Syllable Lists
/*
This list really long, mainly because I can't make up my mind about which mandarin syllables should be removed,
and the english syllables had to be duplicated so that there is roughly a 50-50 weighting.
Sources:
http://www.sttmedia.com/syllablefrequency-english
http://www.chinahighlights.com/travelguide/learning-chinese/pinyin-syllables.htm
*/
/datum/language/human/syllables = list(
"a", "ai", "an", "ang", "ao", "ba", "bai", "ban", "bang", "bao", "bei", "ben", "beng", "bi", "bian", "biao",
"bie", "bin", "bing", "bo", "bu", "ca", "cai", "can", "cang", "cao", "ce", "cei", "cen", "ceng", "cha", "chai",
"chan", "chang", "chao", "che", "chen", "cheng", "chi", "chong", "chou", "chu", "chua", "chuai", "chuan", "chuang", "chui", "chun",
"chuo", "ci", "cong", "cou", "cu", "cuan", "cui", "cun", "cuo", "da", "dai", "dan", "dang", "dao", "de", "dei",
"den", "deng", "di", "dian", "diao", "die", "ding", "diu", "dong", "dou", "du", "duan", "dui", "dun", "duo", "e",
"ei", "en", "er", "fa", "fan", "fang", "fei", "fen", "feng", "fo", "fou", "fu", "ga", "gai", "gan", "gang",
"gao", "ge", "gei", "gen", "geng", "gong", "gou", "gu", "gua", "guai", "guan", "guang", "gui", "gun", "guo", "ha",
"hai", "han", "hang", "hao", "he", "hei", "hen", "heng", "hm", "hng", "hong", "hou", "hu", "hua", "huai", "huan",
"huang", "hui", "hun", "huo", "ji", "jia", "jian", "jiang", "jiao", "jie", "jin", "jing", "jiong", "jiu", "ju", "juan",
"jue", "jun", "ka", "kai", "kan", "kang", "kao", "ke", "kei", "ken", "keng", "kong", "kou", "ku", "kua", "kuai",
"kuan", "kuang", "kui", "kun", "kuo", "la", "lai", "lan", "lang", "lao", "le", "lei", "leng", "li", "lia", "lian",
"liang", "liao", "lie", "lin", "ling", "liu", "long", "lou", "lu", "luan", "lun", "luo", "ma", "mai", "man", "mang",
"mao", "me", "mei", "men", "meng", "mi", "mian", "miao", "mie", "min", "ming", "miu", "mo", "mou", "mu", "na",
"nai", "nan", "nang", "nao", "ne", "nei", "nen", "neng", "ng", "ni", "nian", "niang", "niao", "nie", "nin", "ning",
"niu", "nong", "nou", "nu", "nuan", "nuo", "o", "ou", "pa", "pai", "pan", "pang", "pao", "pei", "pen", "peng",
"pi", "pian", "piao", "pie", "pin", "ping", "po", "pou", "pu", "qi", "qia", "qian", "qiang", "qiao", "qie", "qin",
"qing", "qiong", "qiu", "qu", "quan", "que", "qun", "ran", "rang", "rao", "re", "ren", "reng", "ri", "rong", "rou",
"ru", "rua", "ruan", "rui", "run", "ruo", "sa", "sai", "san", "sang", "sao", "se", "sei", "sen", "seng", "sha",
"shai", "shan", "shang", "shao", "she", "shei", "shen", "sheng", "shi", "shou", "shu", "shua", "shuai", "shuan", "shuang", "shui",
"shun", "shuo", "si", "song", "sou", "su", "suan", "sui", "sun", "suo", "ta", "tai", "tan", "tang", "tao", "te",
"teng", "ti", "tian", "tiao", "tie", "ting", "tong", "tou", "tu", "tuan", "tui", "tun", "tuo", "wa", "wai", "wan",
"wang", "wei", "wen", "weng", "wo", "wu", "xi", "xia", "xian", "xiang", "xiao", "xie", "xin", "xing", "xiong", "xiu",
"xu", "xuan", "xue", "xun", "ya", "yan", "yang", "yao", "ye", "yi", "yin", "ying", "yong", "you", "yu", "yuan",
"yue", "yun", "za", "zai", "zan", "zang", "zao", "ze", "zei", "zen", "zeng", "zha", "zhai", "zhan", "zhang", "zhao",
"zhe", "zhei", "zhen", "zheng", "zhi", "zhong", "zhou", "zhu", "zhua", "zhuai", "zhuan", "zhuang", "zhui", "zhun", "zhuo", "zi",
"zong", "zou", "zuan", "zui", "zun", "zuo", "zu",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi",
"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it",
"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to",
"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin",
"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi")

View File

@@ -297,11 +297,11 @@ emp_act
return 1
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5)
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)
if(istype(AM,/obj/))
var/obj/O = AM
if(in_throw_mode && !get_active_hand() && speed <= 5) //empty active hand and we're in throw mode
if(in_throw_mode && !get_active_hand() && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
if(canmove && !restrained())
if(isturf(O.loc))
put_in_active_hand(O)
@@ -313,7 +313,7 @@ emp_act
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
var/throw_damage = O.throwforce*(speed/5)
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
var/zone
if (istype(O.thrower, /mob/living))
@@ -375,9 +375,9 @@ emp_act
affecting.embed(I)
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
if(O.throw_source && speed >= THROWNOBJ_KNOCKBACK_SPEED)
var/obj/item/weapon/W = O
var/momentum = speed/2
var/momentum = speed/THROWNOBJ_KNOCKBACK_DIVISOR
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")

View File

@@ -100,14 +100,14 @@
..()
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
dtype = W.damtype
var/throw_damage = O.throwforce*(speed/5)
var/throw_damage = O.throwforce*(speed/THROWFORCE_SPEED_DIVISOR)
var/miss_chance = 15
if (O.throw_source)
@@ -136,9 +136,9 @@
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
if(O.throw_source && speed >= THROWNOBJ_KNOCKBACK_SPEED)
var/obj/item/weapon/W = O
var/momentum = speed/2
var/momentum = speed/THROWNOBJ_KNOCKBACK_DIVISOR
var/dir = get_dir(O.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")

View File

@@ -23,6 +23,11 @@ var/list/robot_verbs_default = list(
var/integrated_light_power = 6
var/datum/wires/robot/wires
//Icon stuff
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
//Hud stuff
var/obj/screen/cells = null
@@ -106,6 +111,8 @@ var/list/robot_verbs_default = list(
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
module_sprites["Basic"] = "robot"
icontype = "Default"
updatename("Default")
updateicon()
@@ -227,11 +234,10 @@ var/list/robot_verbs_default = list(
modules+="Combat"
modtype = input("Please, select a module!", "Robot", null, null) in modules
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
if(module)
return
module_sprites = list()
switch(modtype)
if("Standard")
module = new /obj/item/weapon/robot_module/standard(src)
@@ -958,38 +964,25 @@ var/list/robot_verbs_default = list(
overlays.Cut()
if(stat == 0)
overlays += "eyes"
overlays.Cut()
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
if(opened && custom_sprite == 1) //Custom borgs also have custom panels, heh
if(wiresexposed)
overlays += "[src.ckey]-openpanel +w"
else if(cell)
overlays += "[src.ckey]-openpanel +c"
else
overlays += "[src.ckey]-openpanel -c"
overlays += "eyes-[module_sprites[icontype]]"
if(opened)
var/panelprefix = custom_sprite ? src.ckey : "ov"
if(wiresexposed)
overlays += "ov-openpanel +w"
overlays += "[panelprefix]-openpanel +w"
else if(cell)
overlays += "ov-openpanel +c"
overlays += "[panelprefix]-openpanel +c"
else
overlays += "ov-openpanel -c"
overlays += "[panelprefix]-openpanel -c"
if(module_active && istype(module_active,/obj/item/borg/combat/shield))
overlays += "[icon_state]-shield"
overlays += "[module_sprites[icontype]]-shield"
if(modtype == "Combat")
var/base_icon = ""
base_icon = icon_state
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
icon_state = "[icon_state]-roll"
icon_state = "[module_sprites[icontype]]-roll"
else
icon_state = base_icon
icon_state = module_sprites[icontype]
return
//Call when target overlay should be added/removed
@@ -1222,8 +1215,6 @@ var/list/robot_verbs_default = list(
else
triesleft--
var/icontype
if (custom_sprite == 1)
icontype = "Custom"
triesleft = 0
@@ -1305,4 +1296,4 @@ var/list/robot_verbs_default = list(
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] module change detected: [name] has loaded the [module.name].</span><br>"
if(3) //New Name
if(oldname != newname)
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"

View File

@@ -427,7 +427,7 @@ datum
holder.remove_reagent(src.id, 0.25 * REAGENTS_METABOLISM)
return
/* silicate
silicate
name = "Silicate"
id = "silicate"
description = "A compound that can be used to reinforce glass."
@@ -437,31 +437,9 @@ datum
reaction_obj(var/obj/O, var/volume)
src = null
if(istype(O,/obj/structure/window))
if(O:silicate <= 200)
O:silicate += volume
O:health += volume * 3
if(!O:silicateIcon)
var/icon/I = icon(O.icon,O.icon_state,O.dir)
var/r = (volume / 100) + 1
var/g = (volume / 70) + 1
var/b = (volume / 50) + 1
I.SetIntensity(r,g,b)
O.icon = I
O:silicateIcon = I
else
var/icon/I = O:silicateIcon
var/r = (volume / 100) + 1
var/g = (volume / 70) + 1
var/b = (volume / 50) + 1
I.SetIntensity(r,g,b)
O.icon = I
O:silicateIcon = I
return*/
var/obj/structure/window/W = O
W.apply_silicate(volume)
return
oxygen
name = "Oxygen"

View File

@@ -55,14 +55,14 @@ datum
empulse(location, round(created_volume / 24), round(created_volume / 14), 1)
holder.clear_reagents()
return
/*
silicate
name = "Silicate"
id = "silicate"
result = "silicate"
required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1)
result_amount = 3
*/
stoxin
name = "Soporific"
id = "stoxin"

View File

@@ -21,7 +21,7 @@
..()
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob)
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) \
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart))
return
@@ -46,7 +46,7 @@
user << "<span class='notice'>\The [src] is empty!</span>"
return
Spray_at(A)
Spray_at(A, user, proximity)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
@@ -61,28 +61,39 @@
log_game("[key_name(user)] fired Space lube from \a [src].")
return
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj)
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
if (A.density && proximity)
A.visible_message("[usr] sprays [A] with [src].")
var/obj/D = new/obj()
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
spawn(0)
D.reagents.reaction(A)
sleep(5)
del(D)
else
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
D.create_reagents(amount_per_transfer_from_this)
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
var/turf/A_turf = get_turf(A)//BS12
var/turf/A_turf = get_turf(A)//BS12
spawn(0)
for(var/i=0, i<spray_size, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
spawn(0)
for(var/i=0, i<spray_size, i++)
step_towards(D,A)
D.reagents.reaction(get_turf(D))
for(var/atom/T in get_turf(D))
D.reagents.reaction(T)
// When spraying against the wall, also react with the wall, but
// not its contents. BS12
if(get_dist(D, A_turf) == 1 && A_turf.density)
D.reagents.reaction(A_turf)
sleep(2)
sleep(3)
del(D)
// When spraying against the wall, also react with the wall, but
// not its contents. BS12
if(get_dist(D, A_turf) == 1 && A_turf.density)
D.reagents.reaction(A_turf)
sleep(2)
sleep(3)
del(D)
return

View File

@@ -5,9 +5,9 @@
// Automatically recharges air (unless off), will flush when ready if pre-set
// Can hold items and human size things, no other draggables
// Toilets are a type of disposal bin for small objects only and work on magic. By magic, I mean torque rotation
#define SEND_PRESSURE 50 //kPa
#define SEND_PRESSURE 50 + ONE_ATMOSPHERE //kPa - assume the inside of a dispoal pipe is 1 atm
#define PRESSURE_TANK_VOLUME 70 //L - a 0.3 m diameter * 1 m long cylindrical tank. Happens to be the same volume as the regular oxygen tanks, so seems appropriate.
#define PUMP_MAX_FLOW_RATE 50 //L/s - 8 m/s using a 15 cm by 15 cm inlet
#define PUMP_MAX_FLOW_RATE 100 //L/s - 4 m/s using a 15 cm by 15 cm inlet
/obj/machinery/disposal
name = "disposal unit"

View File

@@ -69,6 +69,9 @@
#define SHOE_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //For gloves
#define SHOE_MAX_HEAT_PROTECTION_TEMPERATURE 1500 //For gloves
#define THROWFORCE_SPEED_DIVISOR 5 //The throwing speed value at which the throwforce multiplier is exactly 1.
#define THROWNOBJ_KNOCKBACK_SPEED 15 //The minumum speed of a thrown object that will cause living mobs it hits to be knocked back.
#define THROWNOBJ_KNOCKBACK_DIVISOR 2 //Affects how much speed the mob is knocked back with
#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
#define MAX_HIGH_PRESSURE_DAMAGE 4 //This used to be 20... I got this much random rage for some retarded decision by polymorph?! Polymorph now lies in a pool of blood with a katana jammed in his spleen. ~Errorage --PS: The katana did less than 20 damage to him :(