Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into upstream-merge-26720

This commit is contained in:
LetterJay
2017-05-02 11:36:27 -05:00
349 changed files with 14689 additions and 9184 deletions
+31 -1
View File
@@ -2,6 +2,11 @@
INITIALIZE_IMMEDIATE(/mob/dead)
/mob/dead/Initialize()
. = ..()
if(config.cross_allowed)
verbs += /mob/dead/proc/server_hop
/mob/dead/dust() //ghosts can't be vaporised.
return
@@ -9,4 +14,29 @@ INITIALIZE_IMMEDIATE(/mob/dead)
return
/mob/dead/ConveyorMove() //lol
return
return
/mob/dead/proc/server_hop()
set category = "OOC"
set name = "Server Hop!"
set desc= "Jump to the other server"
if(notransform)
return
if(!config.cross_allowed)
verbs -= /mob/dead/proc/server_hop
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
return
if (alert(src, "Jump to server running at [config.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
return 0
if (client && config.cross_allowed)
to_chat(src, "<span class='notice'>Sending you to [config.cross_address].</span>")
new /obj/screen/splash(client)
notransform = TRUE
sleep(29) //let the animation play
notransform = FALSE
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
client << link(config.cross_address + "?server_hop=[key]")
else
to_chat(src, "<span class='error'>There is no other server configured!</span>")
@@ -149,7 +149,7 @@
return 1
if(href_list["late_join"])
if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING)
if(!SSticker || !SSticker.IsRoundInProgress())
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
return
@@ -1,9 +0,0 @@
diff a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm (rejected hunks)
@@ -30,6 +30,7 @@
loc = pick(newplayer_start)
else
loc = locate(1,1,1)
+ return INITIALIZE_HINT_NORMAL
/mob/dead/new_player/proc/new_player_panel()
@@ -58,9 +58,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
verbs += /mob/dead/observer/proc/dead_tele
if(config.cross_allowed)
verbs += /mob/dead/observer/proc/server_hop
if(icon_state in GLOB.ghost_forms_with_directions_list)
ghostimage_default = image(src.icon,src,src.icon_state + "_nodir")
else
@@ -590,29 +587,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
target.faction = list("neutral")
return 1
/mob/dead/observer/proc/server_hop()
set category = "Ghost"
set name = "Server Hop!"
set desc= "Jump to the other server"
if(notransform)
return
if(!config.cross_allowed)
verbs -= /mob/dead/observer/proc/server_hop
to_chat(src, "<span class='notice'>Server Hop has been disabled.</span>")
return
if (alert(src, "Jump to server running at [config.cross_address]?", "Server Hop", "Yes", "No") != "Yes")
return 0
if (client && config.cross_allowed)
to_chat(src, "<span class='notice'>Sending you to [config.cross_address].</span>")
new /obj/screen/splash(client)
notransform = TRUE
sleep(29) //let the animation play
notransform = FALSE
winset(src, null, "command=.options") //other wise the user never knows if byond is downloading resources
client << link(config.cross_address + "?server_hop=[key]")
else
to_chat(src, "<span class='error'>There is no other server configured!</span>")
/proc/show_server_hop_transfer_screen(expected_key)
//only show it to incoming ghosts
for(var/mob/dead/observer/O in GLOB.player_list)
+1 -1
View File
@@ -73,7 +73,7 @@
name = "Man-Machine Interface: [brainmob.real_name]"
update_icon()
feedback_inc("cyborg_mmis_filled",1)
SSblackbox.inc("cyborg_mmis_filled",1)
else if(brainmob)
O.attack(brainmob, user) //Oh noooeeeee
+4 -1
View File
@@ -50,7 +50,8 @@
if(C.has_brain_worms())
var/mob/living/simple_animal/borer/B = C.has_brain_worms()
B.leave_victim() //Should remove borer if the brain is removed - RR
transfer_identity(C)
if(!gc_destroyed || (owner && !owner.gc_destroyed))
transfer_identity(C)
C.update_hair()
/obj/item/organ/brain/prepare_eat()
@@ -60,6 +61,8 @@
name = "[L.name]'s brain"
if(brainmob || decoy_override)
return
if(!L.mind)
return
brainmob = new(src)
brainmob.name = L.real_name
brainmob.real_name = L.real_name
+1 -1
View File
@@ -728,7 +728,7 @@
/mob/living/carbon/can_be_revived()
. = ..()
if(!getorgan(/obj/item/organ/brain))
if(!getorgan(/obj/item/organ/brain) && (!mind || !mind.changeling))
return 0
/mob/living/carbon/harvest(mob/living/user)
+5 -1
View File
@@ -24,7 +24,8 @@
if(!no_bodyparts)
if(no_organs)//so the organs don't get transfered inside the bodyparts we'll drop.
for(var/X in internal_organs)
qdel(X)
if(no_brain || !istype(X, /obj/item/organ/brain))
qdel(X)
else //we're going to drop all bodyparts except chest, so the only organs that needs spilling are those inside it.
for(var/X in internal_organs)
var/obj/item/organ/O = X
@@ -42,6 +43,9 @@
if(no_brain && istype(I, /obj/item/organ/brain))
qdel(I)
continue
if(no_organs && !istype(I, /obj/item/organ/brain))
qdel(I)
continue
I.Remove(src)
I.forceMove(get_turf(src))
I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
@@ -33,7 +33,7 @@
dna.species.spec_death(gibbed, src)
if(SSticker && SSticker.mode)
sql_report_death(src)
SSblackbox.ReportDeath(src)
if(mind && mind.devilinfo)
INVOKE_ASYNC(mind.devilinfo, /datum/devilinfo.proc/beginResurrectionCheck, src)
@@ -177,8 +177,8 @@
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected)) //what we're actually ending up trying to hit.
var/target_area = parse_zone(check_zone(user.zone_selected)) //our intended target
feedback_add_details("item_used_for_combat","[I.type]|[I.force]")
feedback_add_details("zone_targeted","[target_area]")
SSblackbox.add_details("item_used_for_combat","[I.type]|[I.force]")
SSblackbox.add_details("zone_targeted","[target_area]")
// the attacked_by code varies among species
return dna.species.spec_attacked_by(I, user, affecting, a_intent, src)
+5 -6
View File
@@ -1,10 +1,9 @@
/mob/living/carbon/human/say_quote(input, spans, message_mode)
/mob/living/carbon/human/say_mod(input, message_mode)
verb_say = dna.species.say_mod
. = ..()
if(src.slurring)
input = attach_spans(input, spans)
return "slurs, \"[input]\""
if(slurring)
return "slurs"
else
. = ..()
/mob/living/carbon/human/treat_message(message)
message = dna.species.handle_speech(message,src)
+7
View File
@@ -29,6 +29,13 @@
med_hud_set_status()
/mob/living/Destroy()
if(LAZYLEN(status_effects))
for(var/s in status_effects)
var/datum/status_effect/S = s
if(S.on_remove_on_mob_delete) //the status effect calls on_remove when its mob is deleted
qdel(S)
else
S.be_replaced()
if(ranged_ability)
ranged_ability.remove_ranged_ability(src)
if(buckled)
+12 -13
View File
@@ -423,18 +423,17 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return 3
return 0
/mob/living/say_quote(input, list/spans, message_mode)
var/tempinput = attach_spans(input, spans)
/mob/living/say_mod(input, message_mode)
if(message_mode == MODE_WHISPER)
return "[verb_whisper], \"[tempinput]\""
if(message_mode == MODE_WHISPER_CRIT)
return "[verb_whisper] in [p_their()] last breath, \"[tempinput]\""
if (stuttering)
return "stammers, \"[tempinput]\""
if (getBrainLoss() >= 60)
return "gibbers, \"[tempinput]\""
return ..()
. = verb_whisper
else if(message_mode == MODE_WHISPER_CRIT)
. = "[verb_whisper] in [p_their()] last breath"
else if(stuttering)
. = "stammers"
else if(getBrainLoss() >= 60)
. = "gibbers"
else
. = ..()
/mob/living/get_default_language()
if(selected_default_language)
@@ -448,5 +447,5 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
/mob/living/proc/open_language_menu(mob/user)
language_menu.ui_interact(user)
/mob/living/whisper(message as text)
say("#[message]")
/mob/living/whisper(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null)
say("#[message]", bubble_type, spans, sanitize, language)
@@ -32,4 +32,4 @@
unbuckle_all_mobs(TRUE)
sql_report_death(src)
SSblackbox.ReportDeath(src)
@@ -222,7 +222,7 @@
if(R.hud_used)
R.hud_used.update_robot_modules_display()
if(feedback_key && !did_feedback)
feedback_inc(feedback_key, 1)
SSblackbox.inc(feedback_key, 1)
/obj/item/weapon/robot_module/standard
name = "Standard"
@@ -271,6 +271,7 @@
/obj/item/roller/robo,
/obj/item/borg/cyborghug/medical,
/obj/item/stack/medical/gauze/cyborg,
/obj/item/weapon/organ_storage,
/obj/item/borg/lollipop)
emag_modules = list(/obj/item/weapon/reagent_containers/borghypo/hacked)
ratvar_modules = list(
@@ -14,7 +14,8 @@
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/punch1.ogg'
see_in_dark = 7
see_in_dark = 7
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
@@ -83,7 +84,11 @@
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
return 0
/mob/living/simple_animal/hostile/construct/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(updating_health)
update_health_hud()
/////////////////Juggernaut///////////////
/mob/living/simple_animal/hostile/construct/armored
@@ -268,3 +273,22 @@
/mob/living/simple_animal/hostile/construct/harvester/hostile //actually hostile, will move around, hit things
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
/////////////////////////////ui stuff/////////////////////////////
/mob/living/simple_animal/hostile/construct/update_health_hud()
if(hud_used)
if(health >= maxHealth)
hud_used.healths.icon_state = "[icon_state]_health0"
else if(health > maxHealth*0.8)
hud_used.healths.icon_state = "[icon_state]_health2"
else if(health > maxHealth*0.6)
hud_used.healths.icon_state = "[icon_state]_health3"
else if(health > maxHealth*0.4)
hud_used.healths.icon_state = "[icon_state]_health4"
else if(health > maxHealth*0.2)
hud_used.healths.icon_state = "[icon_state]_health5"
else
hud_used.healths.icon_state = "[icon_state]_health6"
@@ -16,7 +16,7 @@
var/toggle = FALSE
/mob/living/simple_animal/hostile/guardian/healer/Initialize()
..()
. = ..()
var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medsensor.add_hud_to(src)
@@ -149,8 +149,8 @@
duration = 18
randomdir = FALSE
/obj/effect/overlay/temp/paperwiz_dying/New()
..()
/obj/effect/overlay/temp/paperwiz_dying/Initialize()
. = ..()
visible_message("<span class='boldannounce'>The wizard cries out in pain as a gate appears behind him, sucking him in!</span>")
playsound(get_turf(src),'sound/magic/MandSwap.ogg', 50, 1, 1)
playsound(get_turf(src),'sound/hallucinations/wail.ogg', 50, 1, 1)
@@ -187,8 +187,9 @@ Difficulty: Medium
animate(src, transform = matrix()*0.9, time = 3, easing = BOUNCE_EASING)
for(var/i in 1 to 3)
sleep(1)
if(QDELETED(src)) //we got hit and died, rip us
if(QDELETED(src) || stat == DEAD) //we got hit and died, rip us
qdel(F)
swooping &= ~SWOOP_DAMAGEABLE
return
animate(src, transform = matrix()*0.7, time = 7)
swooping |= SWOOP_INVULNERABLE
@@ -426,8 +426,8 @@ Difficulty: Hard
layer = BELOW_MOB_LAYER
var/mob/living/caster //who made this, anyway
/obj/effect/overlay/temp/hierophant/New(loc, new_caster)
..()
/obj/effect/overlay/temp/hierophant/Initialize(mapload, new_caster)
. = ..()
if(new_caster)
caster = new_caster
@@ -437,13 +437,13 @@ Difficulty: Hard
light_range = 1
randomdir = FALSE
/obj/effect/overlay/temp/hierophant/squares/New(loc, new_caster)
..()
/obj/effect/overlay/temp/hierophant/squares/Initialize(mapload, new_caster)
. = ..()
if(ismineralturf(loc))
var/turf/closed/mineral/M = loc
M.gets_drilled(caster)
/obj/effect/overlay/temp/hierophant/wall //smoothing and pooling are not friends. TODO: figure this out
/obj/effect/overlay/temp/hierophant/wall //smoothing and pooling were not friends, but pooling is dead.
name = "vortex wall"
icon = 'icons/turf/walls/hierophant_wall_temp.dmi'
icon_state = "wall"
@@ -451,15 +451,14 @@ Difficulty: Hard
duration = 100
smooth = SMOOTH_TRUE
/obj/effect/overlay/temp/hierophant/wall/New(loc, new_caster)
..()
/obj/effect/overlay/temp/hierophant/wall/Initialize(mapload, new_caster)
. = ..()
queue_smooth_neighbors(src)
queue_smooth(src)
/obj/effect/overlay/temp/hierophant/wall/Destroy()
queue_smooth_neighbors(src)
..()
return QDEL_HINT_QUEUE
return ..()
/obj/effect/overlay/temp/hierophant/wall/CanPass(atom/movable/mover, turf/target, height = 0)
if(mover == caster)
@@ -480,8 +479,8 @@ Difficulty: Hard
var/currently_seeking = FALSE
var/friendly_fire_check = FALSE //if blasts produced apply friendly fire
/obj/effect/overlay/temp/hierophant/chaser/New(loc, new_caster, new_target, new_speed, is_friendly_fire)
..()
/obj/effect/overlay/temp/hierophant/chaser/Initialize(mapload, new_caster, new_target, new_speed, is_friendly_fire)
. = ..()
target = new_target
friendly_fire_check = is_friendly_fire
if(new_speed)
@@ -558,8 +557,8 @@ Difficulty: Hard
var/friendly_fire_check = FALSE
var/bursting = FALSE //if we're bursting and need to hit anyone crossing us
/obj/effect/overlay/temp/hierophant/blast/New(loc, new_caster, friendly_fire)
..()
/obj/effect/overlay/temp/hierophant/blast/Initialize(mapload, new_caster, friendly_fire)
. = ..()
friendly_fire_check = friendly_fire
if(new_caster)
hit_things += new_caster
@@ -53,7 +53,7 @@
return
else
if(!admin_spawned)
feedback_set_details("megafauna_kills","[initial(name)]")
SSblackbox.set_details("megafauna_kills","[initial(name)]")
if(!elimination) //used so the achievment only occurs for the last legion to die.
grant_achievement(medal_type,score_type)
..()
@@ -48,7 +48,7 @@
..()
/mob/living/simple_animal/hostile/asteroid/death(gibbed)
feedback_add_details("mobs_killed_mining","[src.type]")
SSblackbox.add_details("mobs_killed_mining","[src.type]")
..(gibbed)
/mob/living/simple_animal/hostile/asteroid/basilisk
@@ -266,15 +266,15 @@
update_icon()
if(implanted)
feedback_add_details("hivelord_core", "[type]|implanted")
SSblackbox.add_details("hivelord_core", "[type]|implanted")
else
feedback_add_details("hivelord_core", "[type]|stabilizer")
SSblackbox.add_details("hivelord_core", "[type]|stabilizer")
/obj/item/organ/hivelord_core/proc/go_inert()
inert = TRUE
desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested."
feedback_add_details("hivelord_core", "[src.type]|inert")
SSblackbox.add_details("hivelord_core", "[src.type]|inert")
update_icon()
/obj/item/organ/hivelord_core/ui_action_click()
@@ -298,10 +298,10 @@
return
if(H != user)
H.visible_message("[user] forces [H] to apply [src]... [H.p_they()] quickly regenerate all injuries!")
feedback_add_details("hivelord_core","[src.type]|used|other")
SSblackbox.add_details("hivelord_core","[src.type]|used|other")
else
to_chat(user, "<span class='notice'>You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.</span>")
feedback_add_details("hivelord_core","[src.type]|used|self")
SSblackbox.add_details("hivelord_core","[src.type]|used|self")
H.revive(full_heal = 1)
qdel(src)
..()
@@ -220,7 +220,7 @@
else
target.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
name = "Toggle Nightvision \[ON]"
target.update_sight()
target.update_sight()
/mob/living/simple_animal/hostile/statue/sentience_act()
faction -= "neutral"
@@ -254,10 +254,10 @@
if(icon_gib)
new /obj/effect/overlay/temp/gib_animation/animal(loc, icon_gib)
/mob/living/simple_animal/say_quote(input, list/spans)
/mob/living/simple_animal/say_mod(input, message_mode)
if(speak_emote && speak_emote.len)
verb_say = pick(speak_emote)
return ..()
. = ..()
/mob/living/simple_animal/emote(act, m_type=1, message = null)
if(stat)
@@ -340,7 +340,7 @@
. = 1
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || SSticker.current_state != GAME_STATE_PLAYING)
if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress())
return
next_scan_time = world.time + 400
var/alone = 1
@@ -166,7 +166,7 @@
M.Friends = Friends.Copy()
babies += M
M.mutation_chance = Clamp(mutation_chance+(rand(5,-5)),0,100)
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
SSblackbox.add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
var/mob/living/simple_animal/slime/new_slime = pick(babies)
new_slime.a_intent = INTENT_HARM
+2
View File
@@ -3,6 +3,7 @@
GLOB.dead_mob_list -= src
GLOB.living_mob_list -= src
GLOB.all_clockwork_mobs -= src
GLOB.mob_directory -= tag
if(observers && observers.len)
for(var/M in observers)
var/mob/dead/observe = M
@@ -22,6 +23,7 @@
/mob/Initialize()
tag = "mob_[next_mob_id++]"
GLOB.mob_list += src
GLOB.mob_directory[tag] = src
if(stat == DEAD)
GLOB.dead_mob_list += src
else
+27 -16
View File
@@ -13,12 +13,6 @@
stored_implants += IMP
IMP.removed(src, 1, 1)
if (tr_flags & TR_KEEPORGANS)
for(var/X in internal_organs)
var/obj/item/organ/I = X
int_organs += I
I.Remove(src, 1)
var/list/missing_bodyparts_zones = get_missing_limbs()
var/obj/item/cavity_object
@@ -92,10 +86,21 @@
var/obj/item/weapon/implant/IMP = Y
IMP.implant(O, null, 1)
//re-add organs to new mob
//re-add organs to new mob. this order prevents moving the mind to a brain at any point
if(tr_flags & TR_KEEPORGANS)
for(var/X in O.internal_organs)
qdel(X)
var/obj/item/organ/I = X
I.Remove(O, 1)
if(mind)
mind.transfer_to(O)
if(O.mind.changeling)
O.mind.changeling.purchasedpowers += new /obj/effect/proc_holder/changeling/humanform(null)
for(var/X in internal_organs)
var/obj/item/organ/I = X
int_organs += I
I.Remove(src, 1)
for(var/X in int_organs)
var/obj/item/organ/I = X
@@ -118,7 +123,7 @@
qdel(G) //we lose the organs in the missing limbs
qdel(BP)
//transfer mind and delete old mob
//transfer mind if we didn't yet
if(mind)
mind.transfer_to(O)
if(O.mind.changeling)
@@ -154,12 +159,6 @@
stored_implants += IMP
IMP.removed(src, 1, 1)
if (tr_flags & TR_KEEPORGANS)
for(var/X in internal_organs)
var/obj/item/organ/I = X
int_organs += I
I.Remove(src, 1)
var/list/missing_bodyparts_zones = get_missing_limbs()
var/obj/item/cavity_object
@@ -244,7 +243,19 @@
if(tr_flags & TR_KEEPORGANS)
for(var/X in O.internal_organs)
qdel(X)
var/obj/item/organ/I = X
I.Remove(O, 1)
if(mind)
mind.transfer_to(O)
if(O.mind.changeling)
for(var/obj/effect/proc_holder/changeling/humanform/HF in O.mind.changeling.purchasedpowers)
mind.changeling.purchasedpowers -= HF
for(var/X in internal_organs)
var/obj/item/organ/I = X
int_organs += I
I.Remove(src, 1)
for(var/X in int_organs)
var/obj/item/organ/I = X