Merge branch 'master' into upstream-merge-26760

This commit is contained in:
LetterJay
2017-05-14 01:02:26 -04:00
committed by GitHub
531 changed files with 5863 additions and 3439 deletions
+1 -1
View File
@@ -180,7 +180,7 @@
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(loc, laws, brain.brainmob)
if(brain.force_replace_ai_name)
A.fully_replace_character_name(A.name, brain.replacement_ai_name())
feedback_inc("cyborg_ais_created",1)
SSblackbox.inc("cyborg_ais_created",1)
qdel(src)
else
state = AI_READY_CORE
+1 -1
View File
@@ -298,7 +298,7 @@
else
for(var/mob/M in range(1,src))
if(CanHug(M))
child.Attach(M)
child.Leap(M)
break
/obj/structure/alien/egg/obj_break(damage_flag)
+127 -17
View File
@@ -11,32 +11,31 @@
max_integrity = 200
integrity_failure = 50
var/obj/item/showpiece = null
var/alert = 0
var/open = 0
var/alert = TRUE
var/open = FALSE
var/openable = TRUE
var/obj/item/weapon/electronics/airlock/electronics
var/start_showpiece_type = null //add type for items on display
/obj/structure/displaycase/New()
..()
/obj/structure/displaycase/Initialize()
. = ..()
if(start_showpiece_type)
showpiece = new start_showpiece_type (src)
update_icon()
/obj/structure/displaycase/Destroy()
if(electronics)
qdel(electronics)
electronics = null
QDEL_NULL(electronics)
if(showpiece)
qdel(showpiece)
showpiece = null
QDEL_NULL(showpiece)
return ..()
/obj/structure/displaycase/examine(mob/user)
..()
if(showpiece)
to_chat(user, "<span class='notice'>There's [showpiece] inside.</span>")
if(alert)
to_chat(user, "<span class='notice'>Hooked up with an anti-theft system.</span>")
if(showpiece)
to_chat(user, "<span class='notice'>There's [showpiece] inside.</span>")
/obj/structure/displaycase/proc/dump()
@@ -83,8 +82,8 @@
try
getFlatIcon(A,defdir=4)
catch
return 0
return 1
return FALSE
return TRUE
/obj/structure/displaycase/proc/get_flat_icon_directional(atom/A)
//Get flatIcon even if dir is mismatched for directionless icons
@@ -115,7 +114,7 @@
return
/obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params)
if(W.GetID() && !broken)
if(W.GetID() && !broken && openable)
if(allowed(user))
to_chat(user, "<span class='notice'>You [open ? "close":"open"] the [src]</span>")
toggle_lock(user)
@@ -134,7 +133,7 @@
else
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
return
else if(!alert && istype(W,/obj/item/weapon/crowbar)) //Only applies to the lab cage and player made display cases
else if(!alert && istype(W,/obj/item/weapon/crowbar) && openable) //Only applies to the lab cage and player made display cases
if(broken)
if(showpiece)
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
@@ -147,8 +146,7 @@
to_chat(user, "<span class='notice'>You [open ? "close":"open"] the [src]</span>")
toggle_lock(user)
else if(open && !showpiece)
if(user.drop_item())
W.loc = src
if(user.transferItemToLoc(W, src))
showpiece = W
to_chat(user, "<span class='notice'>You put [W] on display</span>")
update_icon()
@@ -176,8 +174,8 @@
/obj/structure/displaycase/attack_hand(mob/user)
user.changeNext_move(CLICK_CD_MELEE)
if (showpiece && (broken || open))
dump()
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
dump()
src.add_fingerprint(user)
update_icon()
return
@@ -249,3 +247,115 @@
desc = "A glass lab container for storing interesting creatures."
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
req_access = list(GLOB.access_rd)
/obj/structure/displaycase/trophy
name = "trophy display case"
desc = "Store your trophies of accomplishment in here, and they will stay forever."
var/trophy_message = ""
var/placer_key = ""
var/added_roundstart = TRUE
var/is_locked = TRUE
alert = TRUE
integrity_failure = 0
openable = FALSE
/obj/structure/displaycase/trophy/Initialize()
. = ..()
GLOB.trophy_cases += src
/obj/structure/displaycase/trophy/Destroy()
GLOB.trophy_cases -= src
return ..()
/obj/structure/displaycase/trophy/examine(mob/user)
..()
if(trophy_message)
to_chat(user, "The plaque reads:")
to_chat(user, trophy_message)
/obj/structure/displaycase/trophy/attackby(obj/item/weapon/W, mob/user, params)
if(!user.Adjacent(src)) //no TK museology
return
if(user.a_intent == INTENT_HARM)
return ..()
if(user.is_holding_item_of_type(/obj/item/key/displaycase))
if(added_roundstart)
is_locked = !is_locked
to_chat(user, "You [!is_locked ? "un" : ""]lock the case.")
else
to_chat(user, "<span class='danger'>The lock is stuck shut!</span>")
return
if(is_locked)
to_chat(user, "<span class='danger'>The case is shut tight with an old fashioned physical lock. Maybe you should ask the curator for the key?</span>")
return
if(!added_roundstart)
to_chat(user, "You've already put something new in this case.")
return
if(is_type_in_typecache(W, GLOB.blacklisted_cargo_types))
to_chat(user, "<span class='danger'>The case rejects the [W].</span>")
return
for(var/a in W.GetAllContents())
if(is_type_in_typecache(a, GLOB.blacklisted_cargo_types))
to_chat(user, "<span class='danger'>The case rejects the [W].</span>")
return
if(user.transferItemToLoc(W, src))
if(showpiece)
to_chat(user, "You press a button, and [showpiece] descends into the floor of the case.")
QDEL_NULL(showpiece)
to_chat(user, "You insert [W] into the case.")
showpiece = W
added_roundstart = FALSE
update_icon()
placer_key = user.ckey
trophy_message = W.desc //default value
var/chosen_plaque = stripped_input(user, "What would you like the plaque to say? Default value is item's description.", "Trophy Plaque")
if(chosen_plaque)
if(user.Adjacent(src))
trophy_message = chosen_plaque
to_chat(user, "You set the plaque's text.")
else
to_chat(user, "You are too far to set the plaque's text.")
SSpersistence.SaveTrophy(src)
return TRUE
else
to_chat(user, "<span class='warning'>\The [W] is stuck to your hand, you can't put it in the [src.name]!</span>")
return
/obj/structure/displaycase/trophy/dump()
if (showpiece)
if(added_roundstart)
visible_message("<span class='danger'>The [showpiece] crumbles to dust!</span>")
new /obj/effect/decal/cleanable/ash(loc)
QDEL_NULL(showpiece)
else
..()
/obj/item/key/displaycase
name = "display case key"
desc = "The key to the curator's display cases."
/obj/item/showpiece_dummy
name = "Cheap replica"
/obj/item/showpiece_dummy/Initialize(mapload, path)
. = ..()
var/obj/item/I = path
name = initial(I.name)
icon = initial(I.icon)
icon_state = initial(I.icon_state)
+1 -1
View File
@@ -88,7 +88,7 @@
pixel_y = -20
/obj/structure/flora/tree/jungle/Initialize()
icon_state = "[icon_state][rand(1, 3)]"
icon_state = "[icon_state][rand(1, 6)]"
..()
//grass
@@ -101,6 +101,7 @@
death = FALSE
anchored = 0
density = 0
var/can_transfer = TRUE //if golems can switch bodies to this new shell
var/mob/living/owner = null //golem's owner if it has one
flavour_text = "<font size=3><b>Y</b></font><b>ou are a Free Golem. Your family worships <span class='danger'>The Liberator</span>. In his infinite and divine wisdom, he set your clan free to \
travel the stars with a single declaration: \"Yeah go do whatever.\" Though you are bound to the one who created you, it is customary in your society to repeat those same words to newborn \
@@ -119,7 +120,7 @@
Serve [creator], and assist [creator.p_them()] in completing [creator.p_their()] goals at any cost."
owner = creator
/obj/effect/mob_spawn/human/golem/special(mob/living/new_spawn)
/obj/effect/mob_spawn/human/golem/special(mob/living/new_spawn, name)
var/datum/species/golem/X = mob_species
to_chat(new_spawn, "[initial(X.info_text)]")
if(!owner)
@@ -132,14 +133,29 @@
if(ishuman(new_spawn))
var/mob/living/carbon/human/H = new_spawn
H.set_cloned_appearance()
H.real_name = H.dna.species.random_name()
if(!name)
H.real_name = H.dna.species.random_name()
else
H.real_name = name
/obj/effect/mob_spawn/human/golem/attack_hand(mob/user)
if(isgolem(user) && can_transfer)
var/transfer = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No")
if(!transfer)
return
log_game("[user.ckey] golem-swapped into [src]")
user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
create(ckey = user.ckey, flavour = FALSE, name = user.real_name)
user.death()
return
..()
/obj/effect/mob_spawn/human/golem/adamantine
name = "dust-caked golem shell"
desc = "A humanoid shape, empty, lifeless, and full of potential."
mob_name = "a free golem"
anchored = 1
density = 1
can_transfer = FALSE
mob_species = /datum/species/golem/adamantine
//Malfunctioning cryostasis sleepers: Spawns in makeshift shelters in lavaland. Ghosts become hermits with knowledge of how they got to where they are now.