Merge branch 'master' into ServerAPI

This commit is contained in:
LetterJay
2017-12-18 17:22:10 -06:00
committed by GitHub
50 changed files with 2601 additions and 62 deletions
@@ -32,7 +32,7 @@
mid_sounds = list('sound/machines/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/fryer/deep_fryer_2.ogg' = 1)
mid_length = 2
end_sound = 'sound/machines/fryer/deep_fryer_emerge.ogg'
volume = 25
volume = 15
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -10,12 +10,15 @@
for(var/obj/effect/clockwork/sigil/transmission/T in GLOB.all_clockwork_objects)
T.update_icon()
var/power_overwhelming = GLOB.clockwork_power
var/unlock_message
if(power_overwhelming >= SCRIPT_UNLOCK_THRESHOLD && !GLOB.script_scripture_unlocked)
GLOB.script_scripture_unlocked = TRUE
hierophant_message("<span class='large_brass bold'>The Ark swells as a key power threshold is reached. Script scriptures are now available.</span>")
unlock_message = "<span class='large_brass bold'>The Ark swells as a key power threshold is reached. Script scriptures are now available.</span>"
if(power_overwhelming >= APPLICATION_UNLOCK_THRESHOLD && !GLOB.application_scripture_unlocked)
GLOB.application_scripture_unlocked = TRUE
hierophant_message("<span class='large_brass bold'>The Ark surges as a key power threshold is reached. Application scriptures are now available.</span>")
unlock_message = "<span class='large_brass bold'>The Ark surges as a key power threshold is reached. Application scriptures are now available.</span>"
if(GLOB.servants_active)
hierophant_message(unlock_message)
return TRUE
/proc/can_access_clockwork_power(atom/movable/access_point, amount) //Returns true if the access point has access to clockwork power (and optionally, a number of watts for it)
@@ -11,6 +11,8 @@
//reports to servants when scripture is locked or unlocked
/proc/scripture_unlock_alert(list/previous_states)
if(!GLOB.servants_active)
return
. = scripture_unlock_check()
for(var/i in .)
if(.[i] != previous_states[i])
+2
View File
@@ -459,6 +459,8 @@
var/sound/song_played = sound(selection.song_path)
for(var/mob/M in range(10,src))
if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
continue
if(!(M in rangers))
rangers[M] = TRUE
M.playsound_local(get_turf(M), null, 100, channel = CHANNEL_JUKEBOX, S = song_played)
+36 -15
View File
@@ -33,7 +33,7 @@
add_logs(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
/obj/item/borg/cyborghug
name = "Hugging Module"
name = "hugging module"
icon_state = "hugmodule"
desc = "For when a someone really needs a hug."
var/mode = 0 //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH
@@ -336,6 +336,10 @@
cooldown = world.time + 600
log_game("[user.ckey]([user]) used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
#define DISPENSE_LOLLIPOP_MODE 1
#define THROW_LOLLIPOP_MODE 2
#define THROW_GUMBALL_MODE 3
/obj/item/borg/lollipop
name = "lollipop fabricator"
desc = "Reward good humans with this. Toggle in-module to switch between dispensing and high velocity ejection modes."
@@ -343,8 +347,9 @@
var/candy = 30
var/candymax = 30
var/charge_delay = 10
var/charging = 0
var/mode = 1
var/charging = FALSE
var/mode = DISPENSE_LOLLIPOP_MODE
var/firedelay = 0
var/hitspeed = 2
var/hitdamage = 0
@@ -379,10 +384,22 @@
var/obj/O = A
if(O.density)
return FALSE
new /obj/item/reagent_containers/food/snacks/lollipop(T)
var/obj/item/reagent_containers/food/snacks/lollipop/L = new(T)
var/into_hands = FALSE
if(ismob(A))
var/mob/M = A
into_hands = M.put_in_hands(L)
candy--
check_amount()
to_chat(user, "<span class='notice'>Dispensing lollipop...</span>")
if(into_hands)
user.visible_message("<span class='notice'>[user] dispenses a lollipop into the hands of [A].</span>", "<span class='notice'>You dispense a lollipop into the hands of [A].</span>", "<span class='italics'>You hear a click.</span>")
else
user.visible_message("<span class='notice'>[user] dispenses a lollipop.</span>", "<span class='notice'>You dispense a lollipop.</span>", "<span class='italics'>You hear a click.</span>")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
return TRUE
@@ -427,29 +444,33 @@
if(R.emagged)
hitdamage = emaggedhitdamage
switch(mode)
if(1)
if(DISPENSE_LOLLIPOP_MODE)
if(!proximity)
return FALSE
dispense(target, user)
if(2)
if(THROW_LOLLIPOP_MODE)
shootL(target, user, click_params)
if(3)
if(THROW_GUMBALL_MODE)
shootG(target, user, click_params)
hitdamage = initial(hitdamage)
/obj/item/borg/lollipop/attack_self(mob/living/user)
switch(mode)
if(1)
mode++
if(DISPENSE_LOLLIPOP_MODE)
mode = THROW_LOLLIPOP_MODE
to_chat(user, "<span class='notice'>Module is now throwing lollipops.</span>")
if(2)
mode++
if(THROW_LOLLIPOP_MODE)
mode = THROW_GUMBALL_MODE
to_chat(user, "<span class='notice'>Module is now blasting gumballs.</span>")
if(3)
mode = 1
if(THROW_GUMBALL_MODE)
mode = DISPENSE_LOLLIPOP_MODE
to_chat(user, "<span class='notice'>Module is now dispensing lollipops.</span>")
..()
#undef DISPENSE_LOLLIPOP_MODE
#undef THROW_LOLLIPOP_MODE
#undef THROW_GUMBALL_MODE
/obj/item/ammo_casing/caseless/gumball
name = "Gumball"
desc = "Why are you seeing this?!"
@@ -655,7 +676,7 @@
/obj/item/borg/sight/xray
name = "\proper x-ray Vision"
name = "\proper x-ray vision"
icon = 'icons/obj/decals.dmi'
icon_state = "securearea"
sight_mode = BORGXRAY
+1 -1
View File
@@ -182,7 +182,7 @@
src.add_fingerprint(user)
if (src.bullets < 1)
user.show_message("<span class='warning'>*click*</span>", 2)
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
return
playsound(user, 'sound/weapons/gunshot.ogg', 100, 1)
src.bullets--
+9 -1
View File
@@ -182,7 +182,15 @@
if("bullet_miss")
soundin = pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg')
if("gun_dry_fire")
soundin = pick('sound/weapons/dry_fire_1.ogg', 'sound/weapons/dry_fire_2.ogg', 'sound/weapons/dry_fire_3.ogg', 'sound/weapons/dry_fire_4.ogg')
soundin = pick('sound/weapons/gun_dry_fire_1.ogg', 'sound/weapons/gun_dry_fire_2.ogg', 'sound/weapons/gun_dry_fire_3.ogg', 'sound/weapons/gun_dry_fire_4.ogg')
if("gun_insert_empty_magazine")
soundin = pick('sound/weapons/gun_magazine_insert_empty_1.ogg', 'sound/weapons/gun_magazine_insert_empty_2.ogg', 'sound/weapons/gun_magazine_insert_empty_3.ogg', 'sound/weapons/gun_magazine_insert_empty_4.ogg')
if("gun_insert_full_magazine")
soundin = pick('sound/weapons/gun_magazine_insert_full_1.ogg', 'sound/weapons/gun_magazine_insert_full_2.ogg', 'sound/weapons/gun_magazine_insert_full_3.ogg', 'sound/weapons/gun_magazine_insert_full_4.ogg', 'sound/weapons/gun_magazine_insert_full_5.ogg')
if("gun_remove_empty_magazine")
soundin = pick('sound/weapons/gun_magazine_remove_empty_1.ogg', 'sound/weapons/gun_magazine_remove_empty_2.ogg', 'sound/weapons/gun_magazine_remove_empty_3.ogg', 'sound/weapons/gun_magazine_remove_empty_4.ogg')
if("gun_slide_lock")
soundin = pick('sound/weapons/gun_slide_lock_1.ogg', 'sound/weapons/gun_slide_lock_2.ogg', 'sound/weapons/gun_slide_lock_3.ogg', 'sound/weapons/gun_slide_lock_4.ogg', 'sound/weapons/gun_slide_lock_5.ogg')
if("law")
soundin = pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg')
if("honkbot_e")
+1 -1
View File
@@ -12,7 +12,7 @@
for(var/speciestype in subtypesof(/datum/species))
var/datum/species/S = new speciestype()
if(!S.dangerous_existence)
if(!S.dangerous_existence && !S.blacklisted)
all_species += speciestype
var/datum/species/new_species = pick(all_species)
@@ -277,9 +277,9 @@
operating = FALSE // Turn it off again aferwards
icon_state = "mw"
updateUsrDialog()
soundloop.stop()
/obj/machinery/microwave/proc/stop()
soundloop.stop()
abort()
/obj/machinery/microwave/proc/dispose()
@@ -293,7 +293,6 @@
icon_state = "mwbloody1" // Make it look dirty!!
/obj/machinery/microwave/proc/muck_finish()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
visible_message("<span class='warning'>The microwave gets covered in muck!</span>")
dirty = 100 // Make it dirty so it can't be used util cleaned
icon_state = "mwbloody" // Make it look dirty too
@@ -303,6 +302,7 @@
if(prob(50))
new /obj/item/reagent_containers/food/snacks/badrecipe(src)
qdel(S)
soundloop.stop()
/obj/machinery/microwave/proc/broke()
var/datum/effect_system/spark_spread/s = new
@@ -314,6 +314,7 @@
flags_1 = null //So you can't add condiments
operating = FALSE // Turn it off again aferwards
updateUsrDialog()
soundloop.stop()
/obj/machinery/microwave/Topic(href, href_list)
if(..() || panel_open)
@@ -38,6 +38,19 @@ img.icon {
vertical-align: bottom;
}
.r:before { /* "repeated" badge class for combined messages */
content: 'x';
}
.r {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: 700;
line-height: 1;
color: #f00;
}
a {color: #0000ff;}
a.visited {color: #ff00ff;}
a:visited {color: #ff00ff;}
@@ -39,6 +39,7 @@
<a href="#" class="subCell togglePing" id="togglePing"><span>Toggle ping display</span> <i class="icon-circle"></i></a>
<a href="#" class="subCell highlightTerm" id="highlightTerm"><span>Highlight string</span> <i class="icon-tag"></i></a>
<a href="#" class="subCell saveLog" id="saveLog"><span>Save chat log</span> <i class="icon-save"></i></a>
<a href="#" class="subCell toggleCombine" id="toggleCombine"><span>Toggle line combining</span> <i class="icon-filter"></i></a>
<a href="#" class="subCell clearMessages" id="clearMessages"><span>Clear all messages</span> <i class="icon-eraser"></i></a>
</div>
<div class="sub" id="subAudio">
@@ -22,7 +22,7 @@ window.onerror = function(msg, url, line, col, error) {
//Globals
window.status = 'Output';
var $messages, $subOptions, $subAudio, $selectedSub, $contextMenu, $filterMessages;
var $messages, $subOptions, $subAudio, $selectedSub, $contextMenu, $filterMessages, $last_message;
var opts = {
//General
'messageCount': 0, //A count...of messages...
@@ -68,6 +68,8 @@ var opts = {
'defaultMusicVolume': 25,
'messageCombining': true,
};
function clamp(val, min, max) {
@@ -294,27 +296,54 @@ function output(message, flag) {
opts.messageCount--; //I guess the count should only ever equal the limit
}
//Actually append the message
var entry = document.createElement('div');
entry.className = 'entry';
if (filteredOut) {
entry.className += ' hidden';
entry.setAttribute('data-filter', filteredOut);
var handled = false;
var trimmed_message = message.trim()
var lastmessages = $messages.children('div.entry:last-child');
if (opts.messageCombining && lastmessages.length && $last_message)
{
if($last_message == trimmed_message)
{
if(lastmessages.children('span.r').length)
{
var current_value = parseInt(lastmessages.children('span.r').text())
lastmessages.children('span.r').text(current_value+1)
}
else
{
lastmessages.append($('<span/>', { 'class': 'r', 'text': 2}));
}
if(parseInt(lastmessages.css("font-size")) < 24) //Completely arbitrary max size
lastmessages.css("font-size","+=2")
opts.messageCount--;
handled = true;
}
}
if(!handled)
{
//Actually append the message
var entry = document.createElement('div');
entry.className = 'entry';
if (filteredOut) {
entry.className += ' hidden';
entry.setAttribute('data-filter', filteredOut);
}
$last_message = trimmed_message;
entry.innerHTML = trimmed_message;
$messages[0].appendChild(entry);
$(entry).find("img.icon").error(iconError);
//Actually do the snap
//Stuff we can do after the message shows can go here, in the interests of responsiveness
if (opts.highlightTerms && opts.highlightTerms.length > 0) {
highlightTerms(entry);
}
}
entry.innerHTML = message.trim();
$messages[0].appendChild(entry);
$(entry).find("img.icon").error(iconError);
//Actually do the snap
if (!filteredOut && atBottom) {
$('body,html').scrollTop($messages.outerHeight());
}
//Stuff we can do after the message shows can go here, in the interests of responsiveness
if (opts.highlightTerms && opts.highlightTerms.length > 0) {
highlightTerms(entry);
}
}
function internalOutput(message, flag)
@@ -568,6 +597,7 @@ $(function() {
'shighlightTerms': getCookie('highlightterms'),
'shighlightColor': getCookie('highlightcolor'),
'smusicVolume': getCookie('musicVolume'),
'smessagecombining': getCookie('messagecombining'),
};
if (savedConfig.sfontSize) {
@@ -606,7 +636,15 @@ $(function() {
opts.updatedVolume = newVolume;
sendVolumeUpdate();
internalOutput('<span class="internal boldnshit">Loaded music volume of: '+savedConfig.smusicVolume+'</span>', 'internal');
} else {
}
if (savedConfig.smessagecombining) {
if (savedConfig.smessagecombining == 'false') {
opts.messageCombining = false;
} else {
opts.messageCombining = true;
}
}
else {
$('#adminMusic').prop('volume', opts.defaultMusicVolume / 100);
}
@@ -922,6 +960,11 @@ $(function() {
}
});
$('#toggleCombine').click(function(e) {
opts.messageCombining = !opts.messageCombining;
setCookie('messagecombining', (opts.messageCombining ? 'true' : 'false'), 365);
});
$('img.icon').error(iconError);
@@ -59,6 +59,14 @@ Doesn't work on other aliens/AI.*/
return 0
return 1
/obj/effect/proc_holder/alien/proc/check_vent_block(mob/living/user)
var/obj/machinery/atmospherics/components/unary/atmos_thing = locate() in user.loc
if(atmos_thing)
var/rusure = alert(user, "Laying eggs and shaping resin here would block access to [atmos_thing]. Do you want to continue?", "Blocking Atmospheric Component", "Yes", "No")
if(rusure != "No")
return FALSE
return TRUE
/obj/effect/proc_holder/alien/plant
name = "Plant Weeds"
desc = "Plants some alien weeds."
@@ -243,7 +251,7 @@ Doesn't work on other aliens/AI.*/
name = "Secrete Resin"
desc = "Secrete tough malleable resin."
plasma_cost = 55
check_turf = 1
check_turf = TRUE
var/list/structures = list(
"resin wall" = /obj/structure/alien/resin/wall,
"resin membrane" = /obj/structure/alien/resin/membrane,
@@ -254,18 +262,22 @@ Doesn't work on other aliens/AI.*/
/obj/effect/proc_holder/alien/resin/fire(mob/living/carbon/user)
if(locate(/obj/structure/alien/resin) in user.loc)
to_chat(user, "<span class='danger'>There is already a resin structure there.</span>")
return 0
return FALSE
if(!check_vent_block(user))
return FALSE
var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in structures
if(!choice)
return 0
return FALSE
if (!cost_check(check_turf,user))
return 0
return FALSE
to_chat(user, "<span class='notice'>You shape a [choice].</span>")
user.visible_message("<span class='notice'>[user] vomits up a thick purple substance and begins to shape it.</span>")
choice = structures[choice]
new choice(user.loc)
return 1
return TRUE
/obj/effect/proc_holder/alien/regurgitate
name = "Regurgitate"
@@ -79,16 +79,20 @@
name = "Lay Egg"
desc = "Lay an egg to produce huggers to impregnate prey with."
plasma_cost = 75
check_turf = 1
check_turf = TRUE
action_icon_state = "alien_egg"
/obj/effect/proc_holder/alien/lay_egg/fire(mob/living/carbon/user)
if(locate(/obj/structure/alien/egg) in get_turf(user))
to_chat(user, "There's already an egg here.")
return 0
to_chat(user, "<span class='alertalien'>There's already an egg here.</span>")
return FALSE
if(!check_vent_block(user))
return FALSE
user.visible_message("<span class='alertalien'>[user] has laid an egg!</span>")
new /obj/structure/alien/egg(user.loc)
return 1
return TRUE
//Button to let queen choose her praetorian.
/obj/effect/proc_holder/alien/royal/queen/promote
@@ -25,7 +25,7 @@
limbs_id = "zombie"
mutanthands = /obj/item/zombie_hand
armor = 20 // 120 damage to KO a zombie, which kills it
speedmod = 2
speedmod = 1.6
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
var/regen_cooldown = 0
@@ -34,7 +34,7 @@
/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount)
. = min(2, amount)
. = min(20, amount)
/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H)
. = ..()
+2 -2
View File
@@ -87,7 +87,7 @@
if(num_loaded)
if(!silent)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
playsound(user, 'sound/weapons/bulletinsert.ogg', 60, 1)
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
A.update_icon()
update_icon()
@@ -98,7 +98,7 @@
if(A)
user.put_in_hands(A)
to_chat(user, "<span class='notice'>You remove a round from \the [src]!</span>")
playsound(user, 'sound/weapons/bulletremove.ogg', 60, 1)
playsound(A, 'sound/weapons/bulletremove.ogg', 60, 1)
update_icon()
/obj/item/ammo_box/update_icon()
+1 -1
View File
@@ -107,7 +107,7 @@
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "<span class='danger'>*click*</span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
/obj/item/gun/proc/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
+16 -3
View File
@@ -30,8 +30,9 @@
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(istype(AC)) //there's a chambered round
if(casing_ejector)
AC.forceMove(get_turf(src)) //Eject casing onto ground.
AC.forceMove(drop_location()) //Eject casing onto ground.
AC.SpinAnimation(10, 1) //next gen special effects
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered = null
else if(empty_chamber)
chambered = null
@@ -58,7 +59,13 @@
if(user.transferItemToLoc(AM, src))
magazine = AM
to_chat(user, "<span class='notice'>You load a new magazine into \the [src].</span>")
chamber_round()
if(magazine.ammo_count())
playsound(src, "gun_insert_full_magazine", 70, 1)
if(!chambered)
chamber_round()
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/gun_chamber_round.ogg', 100, 1), 3)
else
playsound(src, "gun_insert_empty_magazine", 70, 1)
A.update_icon()
update_icon()
return 1
@@ -110,13 +117,19 @@
magazine.forceMove(drop_location())
user.put_in_hands(magazine)
magazine.update_icon()
if(magazine.ammo_count())
playsound(src, "sound/weapons/gun_magazine_remove_full.ogg", 70, 1)
else
playsound(src, "gun_remove_empty_magazine", 70, 1)
magazine = null
to_chat(user, "<span class='notice'>You pull the magazine out of \the [src].</span>")
else if(chambered)
AC.forceMove(drop_location())
AC.SpinAnimation(10, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered = null
to_chat(user, "<span class='notice'>You unload the round from \the [src]'s chamber.</span>")
playsound(src, "gun_slide_lock", 70, 1)
else
to_chat(user, "<span class='notice'>There's no magazine in \the [src].</span>")
update_icon()
@@ -162,7 +175,7 @@
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brain[user.p_s()] out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
return (OXYLOSS)
#undef BRAINS_BLOWN_THROW_SPEED
#undef BRAINS_BLOWN_THROW_RANGE
@@ -42,10 +42,10 @@
CB.forceMove(drop_location())
CB.SpinAnimation(10, 1)
CB.update_icon()
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, CB, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
playsound(user, 'sound/weapons/bulletremove.ogg', 60, 1)
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
@@ -229,7 +229,7 @@
return
user.visible_message("<span class='danger'>*click*</span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
user.apply_damage(300, BRUTE, affecting)
@@ -57,7 +57,8 @@
/obj/item/gun/ballistic/shotgun/proc/pump_unload(mob/M)
if(chambered)//We have a shell in the chamber
chambered.forceMove(drop_location())//Eject casing
chambered.SpinAnimation(5, 1)
chambered.SpinAnimation(10, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, chambered, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered = null
/obj/item/gun/ballistic/shotgun/proc/pump_reload(mob/M)
+1 -1
View File
@@ -175,7 +175,7 @@
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brains out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
return (OXYLOSS)