Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into turfs

# Conflicts:
#	icons/obj/toy.dmi
This commit is contained in:
Mark van Alphen
2019-05-03 18:31:45 +02:00
149 changed files with 4031 additions and 1043 deletions
+16 -2
View File
@@ -414,8 +414,22 @@
if(has_breathable_mask && istype(belt, /obj/item/tank))
dat += "&nbsp;<A href='?src=[UID()];internal=[slot_belt]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
dat += "</td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>Pockets:</B></td><td><A href='?src=[UID()];pockets=left'>[(l_store && !(l_store.flags&ABSTRACT)) ? "Left (Full)" : "<font color=grey>Left (Empty)</font>"]</A>"
dat += "&nbsp;<A href='?src=[UID()];pockets=right'>[(r_store && !(r_store.flags&ABSTRACT)) ? "Right (Full)" : "<font color=grey>Right (Empty)</font>"]</A></td></tr>"
// Pockets
dat += "<tr><td>&nbsp;&#8627;<B>Pockets:</B></td><td><A href='?src=[UID()];pockets=left'>"
if(l_store && internal && l_store == internal)
dat += "[l_store]"
else if(l_store && !(l_store.flags&ABSTRACT))
dat += "Left (Full)"
else
dat += "<font color=grey>Left (Empty)</font>"
dat += "</A>&nbsp;<A href='?src=[UID()];pockets=right'>"
if(r_store && internal && r_store == internal)
dat += "[r_store]"
else if(r_store && !(r_store.flags&ABSTRACT))
dat += "Right (Full)"
else
dat += "<font color=grey>Right (Empty)</font>"
dat += "</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>ID:</B></td><td><A href='?src=[UID()];item=[slot_wear_id]'>[(wear_id && !(wear_id.flags&ABSTRACT)) ? wear_id : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td>&nbsp;&#8627;<B>PDA:</B></td><td><A href='?src=[UID()];item=[slot_wear_pda]'>[(wear_pda && !(wear_pda.flags&ABSTRACT)) ? wear_pda : "<font color=grey>Empty</font>"]</A></td></tr>"
@@ -659,6 +659,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
remove_overlay(GLASSES_LAYER)
remove_overlay(GLASSES_OVER_LAYER)
remove_overlay(OVER_MASK_LAYER)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses]
@@ -681,7 +682,12 @@ var/global/list/damage_icon_parts = list()
new_glasses = mutable_appearance('icons/mob/eyes.dmi', "[glasses.icon_state]", layer = -GLASSES_LAYER)
var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style]
if(hair_style && hair_style.glasses_over) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value.
var/obj/item/clothing/glasses/G = glasses
if(istype(G) && G.over_mask) //If the user's used the 'wear over mask' verb on the glasses.
new_glasses.layer = -OVER_MASK_LAYER
overlays_standing[OVER_MASK_LAYER] = new_glasses
apply_overlay(OVER_MASK_LAYER)
else if(hair_style && hair_style.glasses_over) //Select which layer to use based on the properties of the hair style. Hair styles with hair that don't overhang the arms of the glasses should have glasses_over set to a positive value.
new_glasses.layer = -GLASSES_OVER_LAYER
overlays_standing[GLASSES_OVER_LAYER] = new_glasses
apply_overlay(GLASSES_OVER_LAYER)
@@ -22,8 +22,11 @@
/datum/robot_component/proc/install()
go_online()
owner.updatehealth("component '[src]' installed")
/datum/robot_component/proc/uninstall()
go_offline()
owner.updatehealth("component '[src]' removed")
/datum/robot_component/proc/destroy()
if(wrapped)
@@ -102,12 +105,6 @@
external_type = /obj/item/robot_parts/robot_component/actuator
max_damage = 50
/datum/robot_component/actuator/go_online()
owner.update_stat()
/datum/robot_component/actuator/go_offline()
owner.update_stat()
/datum/robot_component/cell
name = "power cell"
max_damage = 50
@@ -115,12 +112,6 @@
/datum/robot_component/cell/is_powered()
return ..() && owner.cell
/datum/robot_component/cell/go_online()
owner.update_stat()
/datum/robot_component/cell/go_offline()
owner.update_stat()
/datum/robot_component/cell/destroy()
..()
owner.cell = null
@@ -264,19 +255,25 @@
if(M.timeofdeath && M.stat == DEAD)
to_chat(user, "<span class='notice'>Time of Disable: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]</span>")
var/mob/living/silicon/robot/H = M
var/list/damaged = H.get_damaged_components(1,1,1)
var/list/damaged = H.get_damaged_components(TRUE, TRUE, TRUE) // Get all except the missing ones
var/list/missing = H.get_missing_components()
to_chat(user, "<span class='notice'>Localized Damage:</span>")
if(length(damaged)>0)
for(var/datum/robot_component/org in damaged)
user.show_message(text("<span class='notice'>\t []: [][] - [] - [] - []</span>", \
capitalize(org.name), \
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
else
if(!LAZYLEN(damaged) && !LAZYLEN(missing))
to_chat(user, "<span class='notice'>\t Components are OK.</span>")
else
if(LAZYLEN(damaged))
for(var/datum/robot_component/org in damaged)
user.show_message(text("<span class='notice'>\t []: [][] - [] - [] - []</span>", \
capitalize(org.name), \
(org.installed == -1) ? "<font color='red'><b>DESTROYED</b></font> " :"",\
(org.electronics_damage > 0) ? "<font color='#FFA500'>[org.electronics_damage]</font>" :0, \
(org.brute_damage > 0) ? "<font color='red'>[org.brute_damage]</font>" :0, \
(org.toggled) ? "Toggled ON" : "<font color='red'>Toggled OFF</font>",\
(org.powered) ? "Power ON" : "<font color='red'>Power OFF</font>"),1)
if(LAZYLEN(missing))
for(var/datum/robot_component/org in missing)
user.show_message("<span class='warning'>\t [capitalize(org.name)]: MISSING</span>")
if(H.emagged && prob(5))
to_chat(user, "<span class='warning'>\t ERROR: INTERNAL SYSTEMS COMPROMISED</span>")
@@ -287,22 +284,22 @@
to_chat(user, "<span class='notice'>External prosthetics:</span>")
var/organ_found
if(H.internal_organs.len)
if(LAZYLEN(H.internal_organs))
for(var/obj/item/organ/external/E in H.bodyparts)
if(!E.is_robotic())
continue
organ_found = 1
organ_found = TRUE
to_chat(user, "[E.name]: <font color='red'>[E.brute_dam]</font> <font color='#FFA500'>[E.burn_dam]</font>")
if(!organ_found)
to_chat(user, "<span class='warning'>No prosthetics located.</span>")
to_chat(user, "<hr>")
to_chat(user, "<span class='notice'>Internal prosthetics:</span>")
organ_found = null
if(H.internal_organs.len)
if(LAZYLEN(H.internal_organs))
for(var/obj/item/organ/internal/O in H.internal_organs)
if(!O.is_robotic())
continue
organ_found = 1
organ_found = TRUE
to_chat(user, "[capitalize(O.name)]: <font color='red'>[O.damage]</font>")
if(!organ_found)
to_chat(user, "<span class='warning'>No prosthetics located.</span>")
+16 -7
View File
@@ -157,6 +157,7 @@ var/list/robot_verbs_default = list(
var/datum/robot_component/cell_component = components["power cell"]
cell_component.wrapped = cell
cell_component.installed = 1
cell_component.install()
diag_hud_set_borgcell()
scanner = new(src)
@@ -438,8 +439,10 @@ var/list/robot_verbs_default = list(
var/dat = "<HEAD><TITLE>[src.name] Self-Diagnosis Report</TITLE></HEAD><BODY>\n"
for(var/V in components)
var/datum/robot_component/C = components[V]
dat += "<b>[C.name]</b><br><table><tr><td>Brute Damage:</td><td>[C.brute_damage]</td></tr><tr><td>Electronics Damage:</td><td>[C.electronics_damage]</td></tr><tr><td>Powered:</td><td>[C.is_powered() ? "Yes" : "No"]</td></tr><tr><td>Toggled:</td><td>[ C.toggled ? "Yes" : "No"]</td></table><br>"
if(C.installed == 0)
dat += "<b>[C.name]</b><br>MISSING<br>"
else
dat += "<b>[C.name]</b>[C.installed == -1 ? "<br>DESTROYED" : ""]<br><table><tr><td>Brute Damage:</td><td>[C.brute_damage]</td></tr><tr><td>Electronics Damage:</td><td>[C.electronics_damage]</td></tr><tr><td>Powered:</td><td>[C.is_powered() ? "Yes" : "No"]</td></tr><tr><td>Toggled:</td><td>[ C.toggled ? "Yes" : "No"]</td></table><br>"
return dat
/mob/living/silicon/robot/verb/self_diagnosis_verb()
@@ -591,6 +594,9 @@ var/list/robot_verbs_default = list(
if(!getBruteLoss())
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
else if(!getBruteLoss(TRUE))
to_chat(user, "<span class='warning'>The damaged components are beyond saving!</span>")
return
var/obj/item/weldingtool/WT = W
user.changeNext_move(CLICK_CD_MELEE)
if(WT.remove_fuel(0))
@@ -603,11 +609,14 @@ var/list/robot_verbs_default = list(
return
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src, /mob/living/silicon/robot/drone)))
user.changeNext_move(CLICK_CD_MELEE)
if(!getFireLoss())
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
else if(!getFireLoss(TRUE))
to_chat(user, "<span class='warning'>The damaged components are beyond saving!</span>")
return
var/obj/item/stack/cable_coil/coil = W
adjustFireLoss(-30)
updatehealth()
@@ -654,10 +663,10 @@ var/list/robot_verbs_default = list(
I.burn = C.electronics_damage
I.loc = src.loc
if(C.installed == 1)
C.uninstall()
var/was_installed = C.installed
C.installed = 0
if(was_installed == 1)
C.uninstall()
else
if(locked)
@@ -1362,7 +1371,7 @@ var/list/robot_verbs_default = list(
..()
var/brute = 1000
var/burn = 1000
var/list/datum/robot_component/borked_parts = get_damaged_components(brute,burn,1)
var/list/datum/robot_component/borked_parts = get_damaged_components(TRUE, TRUE, TRUE, TRUE)
for(var/datum/robot_component/borked_part in borked_parts)
brute = borked_part.brute_damage
burn = borked_part.electronics_damage
@@ -8,18 +8,20 @@
handle_hud_icons_health()
diag_hud_set_health()
/mob/living/silicon/robot/getBruteLoss()
/mob/living/silicon/robot/getBruteLoss(repairable_only = FALSE)
var/amount = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed != 0) amount += C.brute_damage
if(C.installed != 0 && (!repairable_only || C.installed != -1)) // Installed ones only and if repair only remove the borked ones
amount += C.brute_damage
return amount
/mob/living/silicon/robot/getFireLoss()
/mob/living/silicon/robot/getFireLoss(repairable_only = FALSE)
var/amount = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed != 0) amount += C.electronics_damage
if(C.installed != 0 && (!repairable_only || C.installed != -1)) // Installed ones only and if repair only remove the borked ones
amount += C.electronics_damage
return amount
/mob/living/silicon/robot/adjustBruteLoss(amount, updating_health = TRUE)
@@ -36,11 +38,19 @@
heal_overall_damage(0, -amount, updating_health)
return STATUS_UPDATE_HEALTH
/mob/living/silicon/robot/proc/get_damaged_components(var/brute, var/burn, var/get_all)
/mob/living/silicon/robot/proc/get_damaged_components(get_brute, get_burn, get_borked = FALSE, get_missing = FALSE)
var/list/datum/robot_component/parts = list()
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 1 || get_all) if((brute && C.brute_damage) || (burn && C.electronics_damage))
if((C.installed == 1 || (get_borked && C.installed == -1) || (get_missing && C.installed == 0)) && ((get_brute && C.brute_damage) || (get_burn && C.electronics_damage)))
parts += C
return parts
/mob/living/silicon/robot/proc/get_missing_components()
var/list/datum/robot_component/parts = list()
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 0)
parts += C
return parts
@@ -48,41 +58,43 @@
var/list/rval = new
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.installed == 1) rval += C
if(C.installed == 1)
rval += C
return rval
/mob/living/silicon/robot/proc/get_armour()
if(!components.len) return 0
if(!LAZYLEN(components))
return 0
var/datum/robot_component/C = components["armour"]
if(C && C.installed == 1)
return C
return 0
/mob/living/silicon/robot/heal_organ_damage(brute, burn, updating_health = TRUE)
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
if(!parts.len) return
var/list/datum/robot_component/parts = get_damaged_components(brute, burn)
if(!LAZYLEN(parts))
return
var/datum/robot_component/picked = pick(parts)
picked.heal_damage(brute,burn, updating_health)
picked.heal_damage(brute, burn, updating_health)
/mob/living/silicon/robot/take_organ_damage(brute = 0, burn = 0, updating_health = TRUE, sharp = 0, edge = 0)
var/list/components = get_damageable_components()
if(!components.len)
if(!LAZYLEN(components))
return
//Combat shielding absorbs a percentage of damage directly into the cell.
var/obj/item/borg/combat/shield/shield
if(module_state_1 && istype(module_state_1,/obj/item/borg/combat/shield))
if(module_state_1 && istype(module_state_1, /obj/item/borg/combat/shield))
shield = module_state_1
else if(module_state_2 && istype(module_state_2,/obj/item/borg/combat/shield))
else if(module_state_2 && istype(module_state_2, /obj/item/borg/combat/shield))
shield = module_state_2
else if(module_state_3 && istype(module_state_3,/obj/item/borg/combat/shield))
else if(module_state_3 && istype(module_state_3, /obj/item/borg/combat/shield))
shield = module_state_3
if(shield)
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn)*100
var/absorb_brute = brute * shield.shield_level
var/absorb_burn = burn * shield.shield_level
var/cost = (absorb_brute+absorb_burn) * 100
cell.charge -= cost
if(cell.charge <= 0)
@@ -102,9 +114,9 @@
C.take_damage(brute, burn, sharp, updating_health)
/mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn, updating_health = TRUE)
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
var/list/datum/robot_component/parts = get_damaged_components(brute, burn)
while(parts.len && (brute>0 || burn>0) )
while(LAZYLEN(parts) && (brute > 0 || burn > 0) )
var/datum/robot_component/picked = pick(parts)
var/brute_was = picked.brute_damage
@@ -112,8 +124,8 @@
picked.heal_damage(brute,burn, updating_health)
brute -= (brute_was-picked.brute_damage)
burn -= (burn_was-picked.electronics_damage)
brute -= (brute_was - picked.brute_damage)
burn -= (burn_was - picked.electronics_damage)
parts -= picked
@@ -126,17 +138,17 @@
//Combat shielding absorbs a percentage of damage directly into the cell.
var/obj/item/borg/combat/shield/shield
if(module_state_1 && istype(module_state_1,/obj/item/borg/combat/shield))
if(module_state_1 && istype(module_state_1, /obj/item/borg/combat/shield))
shield = module_state_1
else if(module_state_2 && istype(module_state_2,/obj/item/borg/combat/shield))
else if(module_state_2 && istype(module_state_2, /obj/item/borg/combat/shield))
shield = module_state_2
else if(module_state_3 && istype(module_state_3,/obj/item/borg/combat/shield))
else if(module_state_3 && istype(module_state_3, /obj/item/borg/combat/shield))
shield = module_state_3
if(shield)
//Shields absorb a certain percentage of damage based on their power setting.
var/absorb_brute = brute*shield.shield_level
var/absorb_burn = burn*shield.shield_level
var/cost = (absorb_brute+absorb_burn)*100
var/absorb_brute = brute * shield.shield_level
var/absorb_burn = burn * shield.shield_level
var/cost = (absorb_brute+absorb_burn) * 100
cell.charge -= cost
if(cell.charge <= 0)
@@ -152,7 +164,7 @@
A.take_damage(brute, burn, sharp)
return
while(parts.len && (brute>0 || burn>0) )
while(LAZYLEN(parts) && (brute > 0 || burn > 0) )
var/datum/robot_component/picked = pick(parts)
var/brute_was = picked.brute_damage
@@ -46,7 +46,9 @@
user.put_in_active_hand(cell)
to_chat(user, "<span class='notice'>You remove \the [cell].</span>")
cell = null
update_stat()
var/datum/robot_component/C = components["power cell"]
C.installed = 0
C.uninstall()
diag_hud_set_borgcell()
if(!opened)
@@ -1,11 +1,8 @@
/mob/living/simple_animal/hostile/carp
name = "space carp"
desc = "A ferocious, fang-bearing creature that resembles a fish."
icon = 'icons/mob/carp.dmi'
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
@@ -16,7 +13,6 @@
speed = 0
maxHealth = 25
health = 25
harm_intent_damage = 8
obj_damage = 50
melee_damage_lower = 15
@@ -30,12 +26,27 @@
minbodytemp = 0
maxbodytemp = 1500
faction = list("carp")
flying = 1
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
var/carp_color = "carp" //holder for icon set
var/list/icon_sets = list("carp", "blue", "yellow", "grape", "rust", "teal", "purple")
/mob/living/simple_animal/hostile/carp/Initialize(mapload)
. = ..()
carp_randomify()
update_icons()
/mob/living/simple_animal/hostile/carp/proc/carp_randomify()
if(prob(1))
carp_color = pick("white", "black")
else
carp_color = pick(icon_sets)
icon_state = "[carp_color]"
icon_living = "[carp_color]"
icon_dead = "[carp_color]_dead"
/mob/living/simple_animal/hostile/carp/Process_Spacemove(var/movement_dir = 0)
return 1 //No drifting in space for space carp! //original comments do not steal
@@ -50,7 +61,6 @@
var/mob/living/carbon/human/H = target
H.adjustStaminaLoss(8)
/mob/living/simple_animal/hostile/carp/holocarp
icon_state = "holocarp"
icon_living = "holocarp"
@@ -58,6 +68,8 @@
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
del_on_death = 1
/mob/living/simple_animal/hostile/carp/holocarp/carp_randomify()
return
/mob/living/simple_animal/hostile/carp/megacarp
icon = 'icons/mob/alienqueen.dmi'
@@ -73,4 +85,7 @@
mob_size = MOB_SIZE_LARGE
obj_damage = 80
melee_damage_lower = 20
melee_damage_upper = 20
melee_damage_upper = 20
/mob/living/simple_animal/hostile/carp/megacarp/carp_randomify()
return
@@ -2,9 +2,8 @@
/mob/living/simple_animal/hostile/retaliate/carp
name = "sea carp"
desc = "A large fish bearing similarities to a certain space-faring menace."
icon = 'icons/mob/carp.dmi'
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
@@ -15,20 +14,33 @@
speed = 0
maxHealth = 25
health = 25
retreat_distance = 6
vision_range = 5
harm_intent_damage = 8
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("gnashes")
faction = list("carp")
flying = 1
var/carp_color = "carp" //holder for icon set
var/list/icon_sets = list("carp", "blue", "yellow", "grape", "rust", "teal", "purple")
/mob/living/simple_animal/hostile/retaliate/carp/Initialize(mapload)
. = ..()
carp_randomify()
update_icons()
/mob/living/simple_animal/hostile/retaliate/carp/proc/carp_randomify()
if(prob(1))
carp_color = pick("white", "black")
else
carp_color = pick(icon_sets)
icon_state = "[carp_color]"
icon_living = "[carp_color]"
icon_dead = "[carp_color]_dead"
/mob/living/simple_animal/hostile/retaliate/carp/koi
name = "space koi"
@@ -50,18 +62,17 @@
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
/mob/living/simple_animal/hostile/retaliate/carp/koi/New()
..()
/mob/living/simple_animal/hostile/retaliate/carp/koi/Initialize(mapload)
. = ..()
var/koinum = rand(1, 4)
icon_state = "koi[koinum]"
icon_living = "koi[koinum]"
icon_dead = "koi[koinum]-dead"
/mob/living/simple_animal/hostile/retaliate/carp/koi/Process_Spacemove(var/movement_dir)
return TRUE
/mob/living/simple_animal/hostile/retaliate/carp/koi/honk
icon_state = "koi5"
icon_living = "koi5"
icon_dead = "koi5-dead"
icon_dead = "koi5-dead"
+1
View File
@@ -981,6 +981,7 @@ var/list/slot_equipment_priority = list( \
stat("CPU:", "[world.cpu]")
stat("Instances:", "[num2text(world.contents.len, 10)]")
GLOB.stat_entry()
stat("Server Time:", time_stamp())
stat(null)
if(Master)
Master.stat_entry()