Iiiiit's merge conflict time!

Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into space_allocation
This commit is contained in:
Crazylemon64
2016-08-07 23:42:02 -07:00
100 changed files with 1166 additions and 700 deletions
+4
View File
@@ -3,5 +3,9 @@
if(ghostimage)
ghostimage.icon_state = src.icon_state
updateghostimages()
if(non_respawnable_keys[ckey])
can_reenter_corpse = 0
respawnable_list -= src
update_interface()
+24 -5
View File
@@ -129,11 +129,15 @@ Works together with spawning an observer, noted above.
/mob/proc/ghostize(var/flags = GHOST_CAN_REENTER)
if(key)
if(non_respawnable_keys[ckey])
flags &= ~GHOST_CAN_REENTER
var/mob/dead/observer/ghost = new(src, flags) //Transfer safety to observer spawning proc.
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
respawnable_list -= src
if(ghost.can_reenter_corpse)
respawnable_list += ghost
else
non_respawnable_keys[ckey] = 1
ghost.key = key
if(!(ghost.client && ghost.client.holder) && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
@@ -148,12 +152,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc = "Relinquish your life and enter the land of the dead."
var/mob/M = src
var/warningmsg = null
var/obj/machinery/cryopod/P = istype(loc, /obj/machinery/cryopod) && loc
if(stat == DEAD)
if(P)
if(TOO_EARLY_TO_GHOST)
warningmsg = "It's too early in the shift to enter cryo"
// If it's not too early, we'll skip straight to ghosting out without penalty
else if(suiciding && TOO_EARLY_TO_GHOST)
warningmsg = "You have committed suicide too early in the round"
else if(stat != DEAD)
warningmsg = "You are alive"
else if(non_respawnable_keys[ckey])
warningmsg = "You have lost your right to respawn"
if(!warningmsg)
ghostize(1)
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
var/response
var/alertmsg = "Are you -sure- you want to ghost?\n([warningmsg]. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)"
response = alert(src, alertmsg,"Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost")
return //didn't want to ghost after-all
resting = 1
var/mob/dead/observer/ghost = ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
@@ -162,8 +182,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
Morgue = M.loc
if(Morgue)
Morgue.update()
if(istype(M.loc, /obj/machinery/cryopod))
var/obj/machinery/cryopod/P = M.loc
if(P)
if(!P.control_computer)
P.find_control_computer(urgent=1)
if(P.control_computer)
@@ -13,6 +13,7 @@
req_access = list(access_robotics)
mecha = null//This does not appear to be used outside of reference in mecha.dm.
var/silenced = 0 //if set to 1, they can't talk.
var/next_ping_at = 0
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
@@ -53,6 +54,8 @@
return 0
if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept"))
return 0
if(!O.can_reenter_corpse)
return 0
if(O.client)
return 1
return 0
@@ -190,7 +193,11 @@
/obj/item/device/mmi/posibrain/attack_ghost(var/mob/dead/observer/O)
if(searching)
volunteer(O)
else
return
if(brainmob && brainmob.key)
return // No point pinging a posibrain with a player already inside
if(check_observer(O) && (world.time >= next_ping_at))
next_ping_at = world.time + (20 SECONDS)
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/M in viewers(T))
M.show_message("\blue The positronic brain pings softly.")
@@ -2,7 +2,7 @@
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
if(eyes)
eyes.update_colour()
regenerate_icons()
update_body()
/mob/living/carbon/human/var/list/organs = list()
/mob/living/carbon/human/var/list/organs_by_name = list() // map organ names to organs
@@ -614,6 +614,8 @@
H.clear_alert("high")
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
if(!H.client)
return
if(H.healths)
if(H.stat == DEAD)
H.healths.icon_state = "health7"
@@ -633,11 +635,15 @@
else H.healths.icon_state = "health6"
if(H.healthdoll)
H.healthdoll.overlays.Cut()
if(H.stat == DEAD)
H.healthdoll.icon_state = "healthdoll_DEAD"
if(H.healthdoll.overlays.len)
H.healthdoll.overlays.Cut()
else
H.healthdoll.icon_state = "healthdoll_OVERLAY"
var/list/new_overlays = list()
var/list/cached_overlays = H.healthdoll.cached_healthdoll_overlays
// Use the dead health doll as the base, since we have proper "healthy" overlays now
H.healthdoll.icon_state = "healthdoll_DEAD"
for(var/obj/item/organ/external/O in H.organs)
var/damage = O.burn_dam + O.brute_dam
var/comparison = (O.max_damage/5)
@@ -652,8 +658,10 @@
icon_num = 4
if(damage > (comparison*4))
icon_num = 5
if(icon_num)
H.healthdoll.overlays += image('icons/mob/screen_gen.dmi',"[O.limb_name][icon_num]")
new_overlays += "[O.limb_name][icon_num]"
H.healthdoll.overlays += (new_overlays - cached_overlays)
H.healthdoll.overlays -= (cached_overlays - new_overlays)
H.healthdoll.cached_healthdoll_overlays = new_overlays
switch(H.nutrition)
if(NUTRITION_LEVEL_FULL to INFINITY)
@@ -107,17 +107,7 @@ Please contact me on #coderbus IRC. ~Carn x
var/list/overlays_standing[TOTAL_LAYERS]
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
var/icon/skeleton
/mob/living/carbon/human/proc/apply_overlay(cache_index)
var/image/I = overlays_standing[cache_index]
if(I)
overlays += I
/mob/living/carbon/human/proc/remove_overlay(cache_index)
if(overlays_standing[cache_index])
overlays -= overlays_standing[cache_index]
overlays_standing[cache_index] = null
var/list/cached_standing_overlays = list() // List of everything currently in a human's actual overlays
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
@@ -125,6 +115,7 @@ Please contact me on #coderbus IRC. ~Carn x
/mob/living/carbon/human/update_icons()
var/stealth = 0
var/obj/item/clothing/suit/armor/abductor/vest/V // Begin the most snowflakey bullshit code I've ever written. I'm so sorry, but there was no other way.
for(V in list(wear_suit))
if(V.stealth_active)
stealth = 1
@@ -133,6 +124,7 @@ Please contact me on #coderbus IRC. ~Carn x
if(stealth)
icon = V.disguise.icon //if the suit is active, reference the suit's current loaded icon and overlays; this does not include hand overlays
overlays.Cut()
cached_standing_overlays.Cut() // Make sure the cache gets rebuilt once the disguise is gone
for(var/thing in V.disguise.overlays)
if(thing)
@@ -146,10 +138,28 @@ Please contact me on #coderbus IRC. ~Carn x
overlays += I
else
icon = stand_icon
overlays.Cut()
var/list/new_overlays = list()
var/list/old_overlays = cached_standing_overlays
for(var/thing in overlays_standing)
if(thing) overlays += thing
// Totally regenerate if something touched our overlays
if(overlays.len != old_overlays.len)
overlays.Cut()
old_overlays.Cut()
for(var/i in 1 to TOTAL_LAYERS)
var/image/I = overlays_standing[i]
if(I)
if(istype(I))
// Since we avoid full overlay rebuilds, we have to reorganize the layers manually
I.layer = (-2 - (TOTAL_LAYERS - i)) // Highest layer gets -2, each prior layer is 1 lower
new_overlays += I
if(frozen) // Admin freeze overlay
new_overlays += frozen
overlays += (new_overlays - old_overlays)
overlays -= (old_overlays - new_overlays)
cached_standing_overlays = new_overlays
update_transform()
@@ -538,12 +548,13 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_fire()
remove_overlay(FIRE_LAYER)
if(on_fire)
overlays_standing[FIRE_LAYER] = image("icon"=fire_dmi, "icon_state"=fire_sprite, "layer"=-FIRE_LAYER)
if(!overlays_standing[FIRE_LAYER])
overlays_standing[FIRE_LAYER] = image("icon"=fire_dmi, "icon_state"=fire_sprite)
update_icons()
else
overlays_standing[FIRE_LAYER] = null
apply_overlay(FIRE_LAYER)
update_icons()
/* --------------------------------------- */
//For legacy support.
@@ -574,11 +585,12 @@ var/global/list/damage_icon_parts = list()
update_inv_legcuffed(0)
update_inv_pockets(0)
update_inv_wear_pda(0)
UpdateDamageIcon()
update_icons()
update_fire()
UpdateDamageIcon(0)
force_update_limbs()
update_tail_layer(0)
overlays.Cut() // Force all overlays to regenerate
update_fire()
update_icons()
/* --------------------------------------- */
//vvvvvv UPDATE_INV PROCS vvvvvv
-16
View File
@@ -89,22 +89,6 @@
/mob/living/proc/calculate_affecting_pressure(var/pressure)
return 0
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
/mob/living/proc/burn_skin(burn_amount)
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
var/divided_damage = (burn_amount)/(H.organs.len)
var/extradam = 0 //added to when organ is at max dam
for(var/obj/item/organ/external/affecting in H.organs)
if(!affecting) continue
if(affecting.take_damage(0, divided_damage+extradam)) //TODO: fix the extradam stuff. Or, ebtter yet...rewrite this entire proc ~Carn
H.UpdateDamageIcon()
H.updatehealth()
return 1
else if(istype(src, /mob/living/silicon/ai))
return 0
/mob/living/proc/adjustBodyTemp(actual, desired, incrementboost)
var/temperature = actual
var/difference = abs(actual-desired) //get difference
+105 -42
View File
@@ -810,54 +810,117 @@ var/list/ai_verbs_default = list(
custom_hologram = 1 // option is given in hologram menu
var/input
if(alert("Would you like to select a hologram based on a crew member or switch to unique avatar?",,"Crew Member","Unique")=="Crew Member")
switch(alert("Would you like to select a hologram based on a crew member, an animal, or switch to a unique avatar?",,"Crew Member","Unique","Animal"))
if("Crew Member")
var/personnel_list[] = list()
var/personnel_list[] = list()
for(var/datum/data/record/t in data_core.locked)//Look in data core locked.
personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image.
for(var/datum/data/record/t in data_core.locked)//Look in data core locked.
personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image.
if(personnel_list.len)
input = input("Select a crew member:") as null|anything in personnel_list
var/icon/character_icon = personnel_list[input]
if(character_icon)
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
holo_icon = getHologramIcon(icon(character_icon))
else
alert("No suitable records found. Aborting.")
if("Animal")
var/icon_list[] = list(
"Bear",
"Carp",
"Chicken",
"Corgi",
"Cow",
"Crab",
"Deer",
"Fox",
"Goat",
"Goose",
"Kitten",
"Kitten2",
"Pig",
"Poly",
"Pug",
"Seal",
"Spider",
"Turkey"
)
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
qdel(holo_icon)
switch(input)
if("Bear")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"bear"))
if("Carp")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"carp"))
if("Chicken")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"chicken_brown"))
if("Corgi")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"corgi"))
if("Cow")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"cow"))
if("Crab")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"crab"))
if("Deer")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"deer"))
if("Fox")
holo_icon = getHologramIcon(icon('icons/mob/pets.dmi',"fox"))
if("Goat")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"goat"))
if("Goose")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"goose"))
if("Kitten")
holo_icon = getHologramIcon(icon('icons/mob/pets.dmi',"cat"))
if("Kitten2")
holo_icon = getHologramIcon(icon('icons/mob/pets.dmi',"cat2"))
if("Pig")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"pig"))
if("Poly")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"parrot_fly"))
if("Pug")
holo_icon = getHologramIcon(icon('icons/mob/pets.dmi',"pug"))
if("Seal")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"seal"))
if("Spider")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"guard"))
if("Turkey")
holo_icon = getHologramIcon(icon('icons/mob/animal.dmi',"turkey"))
if(personnel_list.len)
input = input("Select a crew member:") as null|anything in personnel_list
var/icon/character_icon = personnel_list[input]
if(character_icon)
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
holo_icon = getHologramIcon(icon(character_icon))
else
alert("No suitable records found. Aborting.")
var/icon_list[] = list(
"default",
"floating face",
"xeno queen",
"eldritch",
"ancient machine"
)
if(custom_hologram) //insert custom hologram
icon_list.Add("custom")
else
var/icon_list[] = list(
"default",
"floating face",
"xeno queen",
"eldritch",
"ancient machine"
)
if(custom_hologram) //insert custom hologram
icon_list.Add("custom")
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
qdel(holo_icon)
switch(input)
if("default")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
if("floating face")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
if("xeno queen")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
if("eldritch")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo4"))
if("ancient machine")
holo_icon = getHologramIcon(icon('icons/mob/ancient_machine.dmi', "ancient_machine"))
if("custom")
if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic.dmi', "[ckey]-ai-holo"))
else if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic64.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic64.dmi', "[ckey]-ai-holo"))
else
input = input("Please select a hologram:") as null|anything in icon_list
if(input)
qdel(holo_icon)
switch(input)
if("default")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
if("floating face")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo2"))
if("xeno queen")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
if("eldritch")
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo4"))
if("ancient machine")
holo_icon = getHologramIcon(icon('icons/mob/ancient_machine.dmi', "ancient_machine"))
if("custom")
if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic.dmi', "[ckey]-ai-holo"))
else if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic64.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic64.dmi', "[ckey]-ai-holo"))
else
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
return
@@ -113,7 +113,7 @@
if(istype(src,/mob/dead/observer))
var/mob/dead/observer/G = src
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
to_chat(usr, "\blue <B>Upon using the antagHUD you forfeited the ability to join the round.</B>")
to_chat(usr, "<span class='warning'>Upon using the antagHUD you forfeited the ability to join the round.</span>")
return
if(G.started_as_observer == 1)
joinedasobserver = 1
@@ -133,6 +133,9 @@
to_chat(usr, "<span class='warning'>You must wait 10 minutes to respawn as a drone!</span>")
return
if(alert("Are you sure you want to respawn as a drone?", "Are you sure?", "Yes", "No") != "Yes")
return
for(var/obj/machinery/drone_fabricator/DF in world)
if(DF.stat & NOPOWER || !DF.produce_drones)
continue
@@ -6,7 +6,7 @@
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
gender = MALE
gender = NEUTER
health = 30
maxHealth = 30
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
@@ -33,6 +33,8 @@
..()
default_atmos_requirements = src.atmos_requirements
regenerate_icons()
if(gender == NEUTER)
gender = pick(MALE, FEMALE)
/mob/living/simple_animal/pet/corgi/Life()
. = ..()
+1 -1
View File
@@ -22,7 +22,7 @@
*/
var/obj/screen/zone_sel/zone_sel = null
var/obj/screen/leap_icon = null
var/obj/screen/healthdoll = null
var/obj/screen/healthdoll/healthdoll = null
var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
var/damageoverlaytemp = 0