mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into BookClub
# Conflicts: # code/game/machinery/doors/airlock.dm
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
var/atom/movable/mob_container
|
||||
mob_container = M
|
||||
mob_container.forceMove(get_turf(src))
|
||||
M.reset_view()
|
||||
M.reset_perspective()
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ Doesn't work on other aliens/AI.*/
|
||||
A.xo = U.x - T.x
|
||||
A.fire()
|
||||
A.newtonian_move(get_dir(U, T))
|
||||
newtonian_move(get_dir(U, T))
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/humanoid/proc/resin() // -- TLE
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
if(!isturf(loc))
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
return
|
||||
@@ -31,21 +31,31 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/update_sight()
|
||||
if(stat == DEAD || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
sight = SEE_MOBS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != DEAD)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs)
|
||||
sight |= E.vision_flags
|
||||
if(E.dark_view)
|
||||
see_in_dark = max(see_in_dark, E.dark_view)
|
||||
if(E.see_invisible)
|
||||
see_invisible = min(see_invisible, E.see_invisible)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
@@ -62,22 +62,5 @@
|
||||
|
||||
. = 1
|
||||
|
||||
/mob/living/carbon/brain/handle_vision()
|
||||
..()
|
||||
|
||||
if(stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
handle_hud_icons_health()
|
||||
|
||||
/mob/living/carbon/brain/breathe()
|
||||
return
|
||||
|
||||
@@ -537,6 +537,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
thrown_thing = throwable_mob
|
||||
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
|
||||
var/turf/end_T = get_turf(target)
|
||||
throwable_mob.forceMove(start_T)
|
||||
if(start_T && end_T)
|
||||
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
|
||||
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
|
||||
@@ -1038,3 +1039,49 @@ so that different stomachs can handle things in different ways VB*/
|
||||
/mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0)
|
||||
if(hud_used && hud_used.internals)
|
||||
hud_used.internals.icon_state = "internal[internal_state]"
|
||||
|
||||
//to recalculate and update the mob's total tint from tinted equipment it's wearing.
|
||||
/mob/living/carbon/proc/update_tint()
|
||||
if(!tinted_weldhelh)
|
||||
return
|
||||
var/tinttotal = get_total_tint()
|
||||
if(tinttotal >= TINT_BLIND)
|
||||
overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
|
||||
else if(tinttotal >= TINT_IMPAIR)
|
||||
overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
clear_fullscreen("tint", 0)
|
||||
|
||||
/mob/living/carbon/proc/get_total_tint()
|
||||
. = 0
|
||||
if(istype(head, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/HT = head
|
||||
. += HT.tint
|
||||
if(wear_mask)
|
||||
. += wear_mask.tint
|
||||
|
||||
/mob/living/carbon/human/get_total_tint()
|
||||
. = ..()
|
||||
if(glasses)
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
. += G.tint
|
||||
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a mask.
|
||||
/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
update_inv_wear_mask()
|
||||
|
||||
/mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_inv_wear_mask()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a headgear.
|
||||
/mob/living/carbon/proc/head_update(obj/item/I, forced)
|
||||
if(istype(I, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = I
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
if(I.flags_inv & HIDEMASK || forced)
|
||||
update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
H.h_style = hair_style
|
||||
|
||||
update_hair()
|
||||
update_inv_glasses()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style)
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
dna.real_name = real_name
|
||||
sync_organ_dna(1)
|
||||
|
||||
if(species)
|
||||
species.handle_dna(src)
|
||||
|
||||
UpdateAppearance()
|
||||
|
||||
/mob/living/carbon/human/OpenCraftingMenu()
|
||||
@@ -724,6 +721,17 @@
|
||||
if(istype(id))
|
||||
return id
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
species.update_sight(src)
|
||||
|
||||
//Removed the horrible safety parameter. It was only being used by ninja code anyways.
|
||||
//Now checks siemens_coefficient of the affected area by default
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0)
|
||||
@@ -1594,6 +1602,7 @@
|
||||
dna.real_name = real_name
|
||||
|
||||
species.handle_post_spawn(src)
|
||||
species.handle_dna(src) //Give them whatever special dna business they got.
|
||||
|
||||
spawn(0)
|
||||
overlays.Cut()
|
||||
|
||||
@@ -111,6 +111,13 @@
|
||||
update_inv_gloves()
|
||||
else if(I == glasses)
|
||||
glasses = null
|
||||
var/obj/item/clothing/glasses/G = I
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.prescription)
|
||||
clear_fullscreen("nearsighted")
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
|
||||
update_sight()
|
||||
update_inv_glasses()
|
||||
else if(I == head)
|
||||
head = null
|
||||
@@ -118,6 +125,12 @@
|
||||
update_hair() //rebuild hair
|
||||
update_fhair()
|
||||
update_head_accessory()
|
||||
// Bandanas and paper hats go on the head but are not head clothing
|
||||
if(istype(I,/obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = I
|
||||
if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view)
|
||||
update_sight()
|
||||
head_update(I)
|
||||
update_inv_head()
|
||||
else if(I == r_ear)
|
||||
r_ear = null
|
||||
@@ -140,6 +153,7 @@
|
||||
if(internal)
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
wear_mask_update(I, toggle_off = FALSE)
|
||||
sec_hud_set_ID()
|
||||
update_inv_wear_mask()
|
||||
else if(I == wear_id)
|
||||
@@ -203,6 +217,7 @@
|
||||
update_head_accessory(redraw_mob)
|
||||
if(hud_list.len)
|
||||
sec_hud_set_ID()
|
||||
wear_mask_update(W, toggle_off = TRUE)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
handcuffed = W
|
||||
@@ -247,6 +262,14 @@
|
||||
update_inv_ears(redraw_mob)
|
||||
if(slot_glasses)
|
||||
glasses = W
|
||||
var/obj/item/clothing/glasses/G = W
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.prescription)
|
||||
if(disabilities & NEARSIGHTED)
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
|
||||
update_sight()
|
||||
update_inv_glasses(redraw_mob)
|
||||
if(slot_gloves)
|
||||
gloves = W
|
||||
@@ -257,6 +280,12 @@
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_fhair(redraw_mob)
|
||||
update_head_accessory(redraw_mob)
|
||||
// paper + bandanas
|
||||
if(istype(W, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = W
|
||||
if(hat.vision_flags || hat.darkness_view || hat.helmet_goggles_invis_view)
|
||||
update_sight()
|
||||
head_update(W)
|
||||
update_inv_head(redraw_mob)
|
||||
if(slot_shoes)
|
||||
shoes = W
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
|
||||
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
|
||||
|
||||
/mob/living/carbon/human
|
||||
|
||||
var/pressure_alert = 0
|
||||
@@ -12,11 +9,9 @@
|
||||
var/exposedtimenow = 0
|
||||
var/firstexposed = 0
|
||||
var/heartbeat = 0
|
||||
var/tinttotal = 0 // Total level of visually impairing items
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
|
||||
tinttotal = tintcheck() //here as both hud updates and status updates call it
|
||||
life_tick++
|
||||
|
||||
in_stasis = 0
|
||||
@@ -899,7 +894,7 @@
|
||||
|
||||
/mob/living/carbon/human/handle_vision()
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
if(!machine.check_eye(src)) reset_perspective(null)
|
||||
else
|
||||
var/isRemoteObserve = 0
|
||||
if((REMOTE_VIEW in mutations) && remoteview_target)
|
||||
@@ -924,7 +919,7 @@
|
||||
|
||||
if(!isRemoteObserve && client && !client.adminobs)
|
||||
remoteview_target = null
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
|
||||
species.handle_vision(src)
|
||||
|
||||
|
||||
@@ -395,6 +395,7 @@ var/global/list/damage_icon_parts = list()
|
||||
/mob/living/carbon/human/proc/update_head_accessory(var/update_icons=1)
|
||||
//Reset our head accessory
|
||||
overlays_standing[HEAD_ACCESSORY_LAYER] = null
|
||||
overlays_standing[HEAD_ACC_OVER_LAYER] = null
|
||||
|
||||
var/obj/item/organ/external/head/head_organ = get_organ("head")
|
||||
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
|
||||
@@ -408,9 +409,8 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
//base icons
|
||||
var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
|
||||
|
||||
if(head_organ.ha_style && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY))
|
||||
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style]
|
||||
var/datum/sprite_accessory/head_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style]
|
||||
if(head_accessory_style && head_accessory_style.species_allowed)
|
||||
if(head_organ.species.name in head_accessory_style.species_allowed)
|
||||
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
|
||||
@@ -418,11 +418,14 @@ var/global/list/damage_icon_parts = list()
|
||||
head_accessory_s.Blend(rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc), ICON_ADD)
|
||||
head_accessory_standing = head_accessory_s //head_accessory_standing.Blend(head_accessory_s, ICON_OVERLAY)
|
||||
//Having it this way preserves animations. Useful for animated antennae.
|
||||
|
||||
if(head_accessory_style.over_hair) //Select which layer to use based on the properties of the head accessory style.
|
||||
overlays_standing[HEAD_ACC_OVER_LAYER] = image(head_accessory_standing)
|
||||
else
|
||||
overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing)
|
||||
else
|
||||
//warning("Invalid ha_style for [species.name]: [ha_style]")
|
||||
|
||||
overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing)
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
@@ -446,7 +449,7 @@ var/global/list/damage_icon_parts = list()
|
||||
//var/icon/debrained_s = new /icon("icon"='icons/mob/human_face.dmi', "icon_state" = "debrained_s")
|
||||
|
||||
if(head_organ.h_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic())))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[head_organ.h_style]
|
||||
var/datum/sprite_accessory/hair/hair_style = hair_styles_list[head_organ.h_style]
|
||||
//if(!src.get_int_organ(/obj/item/organ/internal/brain) && src.get_species() != "Machine" )//make it obvious we have NO BRAIN
|
||||
// hair_standing.Blend(debrained_s, ICON_OVERLAY)
|
||||
if(hair_style && hair_style.species_allowed)
|
||||
@@ -477,7 +480,8 @@ var/global/list/damage_icon_parts = list()
|
||||
//FACIAL HAIR OVERLAY
|
||||
/mob/living/carbon/human/proc/update_fhair(var/update_icons=1)
|
||||
//Reset our facial hair
|
||||
overlays_standing[FHAIR_LAYER] = null
|
||||
overlays_standing[FHAIR_LAYER] = null
|
||||
overlays_standing[FHAIR_OVER_LAYER] = null
|
||||
|
||||
var/obj/item/organ/external/head/head_organ = get_organ("head")
|
||||
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED))
|
||||
@@ -493,7 +497,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")
|
||||
|
||||
if(head_organ.f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
|
||||
var/datum/sprite_accessory/facial_hair/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
|
||||
if(facial_hair_style && facial_hair_style.species_allowed)
|
||||
if((head_organ.species.name in facial_hair_style.species_allowed) || (head_organ.species.flags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
|
||||
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
@@ -509,11 +513,14 @@ var/global/list/damage_icon_parts = list()
|
||||
facial_s.Blend(facial_secondary_s, ICON_OVERLAY)
|
||||
|
||||
face_standing.Blend(facial_s, ICON_OVERLAY)
|
||||
|
||||
if(facial_hair_style.over_hair) //Select which layer to use based on the properties of the facial hair style.
|
||||
overlays_standing[FHAIR_OVER_LAYER] = image(face_standing)
|
||||
else
|
||||
overlays_standing[FHAIR_LAYER] = image(face_standing)
|
||||
else
|
||||
//warning("Invalid f_style for [species.name]: [f_style]")
|
||||
|
||||
overlays_standing[FHAIR_LAYER] = image(face_standing)
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_mutations(var/update_icons=1)
|
||||
@@ -736,6 +743,8 @@ var/global/list/damage_icon_parts = list()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_glasses(var/update_icons=1)
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
overlays_standing[GLASSES_OVER_LAYER] = null
|
||||
|
||||
if(client && hud_used)
|
||||
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_glasses]
|
||||
@@ -743,20 +752,26 @@ var/global/list/damage_icon_parts = list()
|
||||
inv.update_icon()
|
||||
|
||||
if(glasses)
|
||||
var/image/new_glasses
|
||||
var/obj/item/organ/external/head/head_organ = get_organ("head")
|
||||
if(client && hud_used && hud_used.hud_shown)
|
||||
if(hud_used.inventory_shown) //if the inventory is open ...
|
||||
glasses.screen_loc = ui_glasses //...draw the item in the inventory screen
|
||||
client.screen += glasses //Either way, add the item to the HUD
|
||||
|
||||
if(glasses.icon_override)
|
||||
overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
|
||||
else if(glasses.sprite_sheets && glasses.sprite_sheets[species.name])
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.name], "icon_state" = "[glasses.icon_state]")
|
||||
new_glasses = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
|
||||
else if(glasses.sprite_sheets && glasses.sprite_sheets[head_organ.species.name])
|
||||
new_glasses = image("icon" = glasses.sprite_sheets[head_organ.species.name], "icon_state" = "[glasses.icon_state]")
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
|
||||
new_glasses = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
|
||||
|
||||
var/datum/sprite_accessory/hair/hair_style = hair_styles_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.
|
||||
overlays_standing[GLASSES_OVER_LAYER] = new_glasses
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER] = new_glasses
|
||||
|
||||
else
|
||||
overlays_standing[GLASSES_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/update_inv_ears(var/update_icons=1)
|
||||
|
||||
@@ -409,27 +409,33 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
if(XRAY in mutations)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
else
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
if(XRAY in mutations)
|
||||
grant_xray_vision()
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs)
|
||||
sight |= E.vision_flags
|
||||
if(E.dark_view)
|
||||
see_in_dark = max(see_in_dark,E.dark_view)
|
||||
if(E.see_invisible)
|
||||
see_invisible = min(see_invisible, E.see_invisible)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
|
||||
/mob/living/carbon/handle_hud_icons()
|
||||
|
||||
@@ -236,14 +236,32 @@
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src))
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
else
|
||||
if(!remote_view && !client.adminobs)
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
|
||||
/mob/living/proc/update_sight()
|
||||
return
|
||||
|
||||
// Gives a mob the vision of being dead
|
||||
/mob/living/proc/grant_death_vision()
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
|
||||
// See through walls, dark, etc.
|
||||
// basically the same as death vision except you can't
|
||||
// see ghosts
|
||||
/mob/living/proc/grant_xray_vision()
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
/mob/living/proc/handle_hud_icons()
|
||||
handle_hud_icons_health()
|
||||
return
|
||||
|
||||
@@ -42,6 +42,8 @@ var/list/ai_verbs_default = list(
|
||||
density = 1
|
||||
status_flags = CANSTUN|CANPARALYSE|CANPUSH
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
|
||||
see_in_dark = 8
|
||||
can_strip = 0
|
||||
var/list/network = list("SS13","Telecomms","Research Outpost","Mining Outpost")
|
||||
var/obj/machinery/camera/current = null
|
||||
@@ -427,7 +429,7 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
|
||||
if(!current)
|
||||
return null
|
||||
user.reset_view(current)
|
||||
user.reset_perspective(current)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
@@ -606,15 +608,18 @@ var/list/ai_verbs_default = list(
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_view(atom/A)
|
||||
if(current)
|
||||
current.set_light(0)
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
if(camera_light_on)
|
||||
light_cameras()
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
current = A
|
||||
..()
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
if(camera_light_on) A.set_light(AI_CAMERA_LUMINOSITY)
|
||||
else A.set_light(0)
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
if(!A && isturf(loc) && eyeobj)
|
||||
client.eye = eyeobj
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
eyeobj.get_remote_view_fullscreens(src)
|
||||
|
||||
/mob/living/silicon/ai/proc/botcall()
|
||||
set category = "AI Commands"
|
||||
@@ -1163,4 +1168,4 @@ var/list/ai_verbs_default = list(
|
||||
to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.")
|
||||
view_core() //A BYOND bug requires you to be viewing your core before your verbs update
|
||||
verbs += /mob/living/silicon/ai/proc/choose_modules
|
||||
malf_picker = new /datum/module_picker
|
||||
malf_picker = new /datum/module_picker
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#define POWER_RESTORATION_OFF 0
|
||||
#define POWER_RESTORATION_START 1
|
||||
#define POWER_RESTORATION_SEARCH_APC 2
|
||||
#define POWER_RESTORATION_APC_FOUND 3
|
||||
|
||||
/mob/living/silicon/ai/Life()
|
||||
//doesn't call parent because it's a horrible mess
|
||||
if(stat == DEAD)
|
||||
@@ -6,7 +11,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(stat != CONSCIOUS) //ai's fucked
|
||||
cameraFollow = null
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
unset_machine()
|
||||
|
||||
updatehealth()
|
||||
@@ -16,11 +21,16 @@
|
||||
death()
|
||||
return 0
|
||||
|
||||
if(malfhack)
|
||||
if(malfhack.aidisabled)
|
||||
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
|
||||
malfhacking = 0
|
||||
malfhack = null
|
||||
if(!eyeobj || qdeleted(eyeobj) || !eyeobj.loc)
|
||||
view_core()
|
||||
|
||||
if(machine)
|
||||
machine.check_eye(src)
|
||||
|
||||
if(malfhack && malfhack.aidisabled)
|
||||
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
|
||||
malfhacking = 0
|
||||
malfhack = null
|
||||
|
||||
if(aiRestorePowerRoutine)
|
||||
adjustOxyLoss(1)
|
||||
@@ -29,22 +39,9 @@
|
||||
|
||||
handle_stunned()
|
||||
|
||||
var/is_blind = 0 //THIS WAS JUST FUCKING 'blind' WHICH CONFLICTED WITH A NORMAL VARIABLE
|
||||
var/area/my_area = get_area(src)
|
||||
if(istype(my_area))
|
||||
if(!my_area.power_equip && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
is_blind = 1 //HOW THE FUCK DID THAT EVEN COMPILE JESUS CHRIST
|
||||
|
||||
if(!is_blind)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
if(!lacks_power())
|
||||
|
||||
if(aiRestorePowerRoutine == 2)
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
@@ -57,18 +54,12 @@
|
||||
|
||||
|
||||
else
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
see_in_dark = 0
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(((!my_area.power_equip) || istype(T, /turf/space)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
if(lacks_power())
|
||||
if(!aiRestorePowerRoutine)
|
||||
aiRestorePowerRoutine = 1
|
||||
update_sight()
|
||||
to_chat(src, "<span class='danger'>You have lost power!</span>")
|
||||
if(!is_special_character(src))
|
||||
set_zeroth_law("")
|
||||
@@ -78,7 +69,7 @@
|
||||
sleep(50)
|
||||
my_area = get_area(src)
|
||||
T = get_turf(src)
|
||||
if(my_area && my_area.power_equip && !istype(T, /turf/space))
|
||||
if(!lacks_power())
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
return
|
||||
@@ -115,12 +106,11 @@
|
||||
aiRestorePowerRoutine = 2
|
||||
return
|
||||
|
||||
if(my_area.power_equip)
|
||||
if(!istype(T, /turf/space))
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
return
|
||||
if(!lacks_power())
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
return
|
||||
|
||||
switch(PRP)
|
||||
if(1)
|
||||
@@ -170,4 +160,17 @@
|
||||
if(client)
|
||||
var/client/C = client
|
||||
for(var/mob/living/carbon/human/H in view(eyeobj, 14))
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
|
||||
/mob/living/silicon/ai/update_sight()
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
if(aiRestorePowerRoutine)
|
||||
sight = sight&~SEE_TURFS
|
||||
sight = sight&~SEE_MOBS
|
||||
sight = sight&~SEE_OBJS
|
||||
see_in_dark = 0
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
@@ -2,9 +2,5 @@
|
||||
..()
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
O.mode = 0
|
||||
if(!isturf(loc))
|
||||
if(client)
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
src.view_core()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
/mob/living/silicon/pai/check_eye(var/mob/user as mob)
|
||||
if(!src.current)
|
||||
return null
|
||||
user.reset_view(src.current)
|
||||
user.reset_perspective(src.current)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/blob_act()
|
||||
@@ -261,7 +261,7 @@
|
||||
usr:cameraFollow = null
|
||||
if(!C)
|
||||
src.unset_machine()
|
||||
src.reset_view(null)
|
||||
src.reset_perspective(null)
|
||||
return 0
|
||||
if(stat == 2 || !C.status || !(src.network in C.network)) return 0
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
|
||||
src.set_machine(src)
|
||||
src:current = C
|
||||
src.reset_view(C)
|
||||
src.reset_perspective(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/verb/reset_record_view()
|
||||
@@ -288,7 +288,7 @@
|
||||
/mob/living/silicon/pai/cancel_camera()
|
||||
set category = "pAI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
src.reset_view(null)
|
||||
src.reset_perspective(null)
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
/mob/living/silicon/pai/proc/pai_network_change()
|
||||
set category = "pAI Commands"
|
||||
set name = "Change Camera Network"
|
||||
src.reset_view(null)
|
||||
src.reset_perspective(null)
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
var/cameralist[0]
|
||||
@@ -363,9 +363,6 @@
|
||||
var/obj/item/device/pda/holder = card.loc
|
||||
holder.pai = null
|
||||
|
||||
if(client)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = src
|
||||
forceMove(get_turf(card))
|
||||
|
||||
card.forceMove(src)
|
||||
@@ -487,9 +484,7 @@
|
||||
visible_message("<span class=notice>[src] neatly folds inwards, compacting down to a rectangular card.</span>", "<span class=notice>You neatly fold inwards, compacting down to a rectangular card.</span>")
|
||||
|
||||
stop_pulling()
|
||||
if(client)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = card
|
||||
reset_perspective(card)
|
||||
|
||||
// If we are being held, handle removing our holder from their inv.
|
||||
var/obj/item/weapon/holder/H = loc
|
||||
|
||||
@@ -37,19 +37,23 @@ var/global/list/default_pai_software = list()
|
||||
|
||||
ui_interact(src)
|
||||
|
||||
/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
if(user != src)
|
||||
if(ui) ui.set_status(STATUS_CLOSE, 0)
|
||||
return
|
||||
|
||||
/mob/living/silicon/pai/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, datum/topic_state/state = self_state)
|
||||
if(ui_key != "main")
|
||||
var/datum/pai_software/S = software[ui_key]
|
||||
if(S && !S.toggle)
|
||||
S.on_ui_interact(src, ui, force_open)
|
||||
else
|
||||
if(ui) ui.set_status(STATUS_CLOSE, 0)
|
||||
if(ui)
|
||||
ui.set_status(STATUS_CLOSE, 0)
|
||||
return
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600, state = state)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/mob/living/silicon/pai/ui_data(mob/user, datum/topic_state/state = self_state)
|
||||
var/data[0]
|
||||
|
||||
// Software we have bought
|
||||
@@ -84,12 +88,7 @@ var/global/list/default_pai_software = list()
|
||||
data["emotions"] = emotions
|
||||
data["current_emotion"] = card.current_emotion
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
return data
|
||||
|
||||
/mob/living/silicon/pai/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -122,4 +121,4 @@ var/global/list/default_pai_software = list()
|
||||
var/img = text2num(href_list["image"])
|
||||
if(1 <= img && img <= 9)
|
||||
card.setEmotion(img)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
update_sight()
|
||||
|
||||
if(client)
|
||||
client.screen -= O
|
||||
@@ -52,6 +53,7 @@
|
||||
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
|
||||
to_chat(src, "Not enough power to activate [B.name]!")
|
||||
return
|
||||
var/activated_thingy = null
|
||||
if(!module_state_1)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_1 = O
|
||||
@@ -59,8 +61,7 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv1.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
activated_thingy = O
|
||||
else if(!module_state_2)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_2 = O
|
||||
@@ -68,8 +69,7 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv2.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_2:sight_mode
|
||||
activated_thingy = O
|
||||
else if(!module_state_3)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_3 = O
|
||||
@@ -77,11 +77,12 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv3.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
activated_thingy = O
|
||||
else
|
||||
to_chat(src, "You need to disable a module first!")
|
||||
src.update_icons()
|
||||
if(istype(activated_thingy,/obj/item/borg/sight))
|
||||
update_sight()
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
@@ -120,32 +120,38 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/update_sight()
|
||||
if(stat == DEAD || sight_mode & BORGXRAY)
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
if(sight_mode & BORGMESON)
|
||||
sight |= SEE_TURFS
|
||||
see_invisible = min(see_invisible, SEE_INVISIBLE_MINIMUM)
|
||||
see_in_dark = 1
|
||||
|
||||
if(sight_mode & BORGXRAY)
|
||||
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
see_in_dark = 8
|
||||
|
||||
if(sight_mode & BORGTHERM)
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_invisible = min(see_invisible, SEE_INVISIBLE_LIVING)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
see_in_dark = 8
|
||||
if(sight_mode & BORGMESON && sight_mode & BORGTHERM)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(sight_mode & BORGMESON)
|
||||
sight |= SEE_TURFS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
see_in_dark = 1
|
||||
else if(sight_mode & BORGTHERM)
|
||||
sight |= SEE_MOBS
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != DEAD)
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
/mob/living/silicon/robot/handle_hud_icons()
|
||||
update_items()
|
||||
|
||||
@@ -84,7 +84,7 @@ var/list/robot_verbs_default = list(
|
||||
var/ionpulse = 0 // Jetpack-like effect.
|
||||
var/ionpulse_on = 0 // Jetpack-like effect.
|
||||
var/datum/effect/system/ion_trail_follow/ion_trail // Ionpulse effect.
|
||||
|
||||
|
||||
var/datum/action/item_action/toggle_research_scanner/scanner = null
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0, var/alien = 0)
|
||||
@@ -960,11 +960,11 @@ var/list/robot_verbs_default = list(
|
||||
/mob/living/silicon/robot/proc/allowed(obj/item/I)
|
||||
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob
|
||||
dummy.req_access = req_access
|
||||
|
||||
|
||||
if(dummy.check_access(I))
|
||||
qdel(dummy)
|
||||
return 1
|
||||
|
||||
|
||||
qdel(dummy)
|
||||
return 0
|
||||
|
||||
@@ -1456,3 +1456,15 @@ var/list/robot_verbs_default = list(
|
||||
disable_component("comms", 160)
|
||||
if(2)
|
||||
disable_component("comms", 60)
|
||||
/mob/living/silicon/robot/rejuvenate()
|
||||
..()
|
||||
var/brute = 1000
|
||||
var/burn = 1000
|
||||
var/list/datum/robot_component/borked_parts = get_damaged_components(brute,burn,1)
|
||||
for(var/datum/robot_component/borked_part in borked_parts)
|
||||
brute = borked_part.brute_damage
|
||||
burn = borked_part.electronics_damage
|
||||
borked_part.installed = 1
|
||||
borked_part.wrapped = new borked_part.external_type
|
||||
borked_part.heal_damage(brute,burn)
|
||||
borked_part.install()
|
||||
@@ -26,6 +26,7 @@
|
||||
var/mob/living/carbon/oldpatient = null
|
||||
var/oldloc = null
|
||||
var/last_found = 0
|
||||
var/last_warning = 0
|
||||
var/last_newpatient_speak = 0 //Don't spam the "HEY I'M COMING" messages
|
||||
var/injection_amount = 15 //How much reagent do we inject at a time?
|
||||
var/heal_threshold = 10 //Start healing when they have this much damage in a category
|
||||
@@ -253,6 +254,12 @@
|
||||
oldpatient = user
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/process_scan(mob/living/carbon/human/H)
|
||||
if(buckled)
|
||||
if((last_warning + 300) < world.time)
|
||||
speak("<span class='danger'>Movement restrained! Unit on standby!</span>")
|
||||
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
last_warning = world.time
|
||||
return
|
||||
if(H.stat == 2)
|
||||
return
|
||||
|
||||
|
||||
@@ -393,9 +393,8 @@
|
||||
passenger = M
|
||||
load = M
|
||||
can_buckle = FALSE
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
// Not sure why this is done
|
||||
reset_perspective(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -423,9 +422,7 @@
|
||||
|
||||
if(ismob(load))
|
||||
var/mob/M = load
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
M.reset_perspective(null)
|
||||
unbuckle_mob()
|
||||
|
||||
if(load)
|
||||
@@ -452,9 +449,7 @@
|
||||
AM.pixel_y = initial(AM.pixel_y)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
M.reset_perspective(null)
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/call_bot()
|
||||
..()
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
/mob/living/simple_animal/hostile/winter/snowman
|
||||
name = "snowman"
|
||||
desc = "A very angry snowman. Doesn't look like it wants to play around..."
|
||||
maxHealth = 75 //slightly beefier to account for it's need to get in your face
|
||||
health = 75
|
||||
icon_state = "snowman"
|
||||
icon_living = "snowman"
|
||||
icon_dead = "snowman-dead"
|
||||
@@ -34,7 +36,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/winter/snowman/death(gibbed)
|
||||
if(prob(50)) //50% chance to drop weapon on death, if it has one to drop
|
||||
if(prob(50) && !ranged) //50% chance to drop candy cane sword on death, if it has one to drop
|
||||
loot = list(/obj/item/weapon/melee/candy_sword)
|
||||
if(prob(20)) //chance to become a stationary snowman structure instead of a corpse
|
||||
loot.Add(/obj/structure/snowman)
|
||||
@@ -45,6 +47,8 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/winter/snowman/ranged
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
ranged = 1
|
||||
retreat_distance = 5
|
||||
minimum_distance = 5
|
||||
@@ -57,7 +61,8 @@
|
||||
icon_living = "reindeer"
|
||||
icon_dead = "reindeer-dead"
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 3)
|
||||
|
||||
maxHealth = 80
|
||||
health = 80
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
|
||||
@@ -83,17 +88,21 @@
|
||||
qdel(src) //hide the body
|
||||
|
||||
/mob/living/simple_animal/hostile/winter/santa/stage_1 //stage 1: slow melee
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
desc = "GET THE FAT MAN!"
|
||||
next_stage = /mob/living/simple_animal/hostile/winter/santa/stage_2
|
||||
death_message = "<span class='danger'>HO HO HO! YOU THOUGHT IT WOULD BE THIS EASY?!?</span>"
|
||||
speed = 2
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 15
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 20
|
||||
|
||||
/mob/living/simple_animal/hostile/winter/santa/stage_2 //stage 2: slow ranged
|
||||
desc = "GET THE FAT MAN AGAIN!"
|
||||
next_stage = /mob/living/simple_animal/hostile/winter/santa/stage_3
|
||||
death_message = "<span class='danger'>YOU'VE BEEN VERY NAUGHTY! PREPARE TO DIE!</span>"
|
||||
maxHealth = 200 //DID YOU REALLY BELIEVE IT WOULD BE THIS EASY!??!!
|
||||
health = 200
|
||||
ranged = 1
|
||||
projectiletype = /obj/item/projectile/ornament
|
||||
retreat_distance = 5
|
||||
@@ -103,6 +112,8 @@
|
||||
desc = "WHY WON'T HE DIE ALREADY!?"
|
||||
next_stage = /mob/living/simple_animal/hostile/winter/santa/stage_4
|
||||
death_message = "<span class='danger'>FACE MY FINAL FORM AND KNOW DESPAIR!</span>"
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
ranged = 1
|
||||
rapid = 1
|
||||
speed = 0 //he's lost some weight from the fighting
|
||||
@@ -113,13 +124,13 @@
|
||||
/mob/living/simple_animal/hostile/winter/santa/stage_4 //stage 4: fast spinebreaker
|
||||
name = "Final Form Santa"
|
||||
desc = "WHAT THE HELL IS HE!?! WHY WON'T HE STAY DEAD!?!"
|
||||
maxHealth = 200
|
||||
health = 200
|
||||
maxHealth = 300 //YOU FACE JARAX- I MEAN SANTA!
|
||||
health = 300
|
||||
speed = 0 //he's lost some weight from the fighting
|
||||
|
||||
environment_smash = 2 //naughty walls must be punished too
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 25 //that's gonna leave a mark, for sure
|
||||
melee_damage_lower = 20
|
||||
melee_damage_upper = 30 //that's gonna leave a mark, for sure
|
||||
|
||||
/mob/living/simple_animal/hostile/winter/santa/stage_4/death(gibbed)
|
||||
to_chat(world, "<span class='notice'><hr></span>")
|
||||
|
||||
@@ -706,6 +706,22 @@
|
||||
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/SetEarDamage()
|
||||
return
|
||||
|
||||
|
||||
@@ -43,12 +43,7 @@
|
||||
sight |= SEE_SELF
|
||||
..()
|
||||
|
||||
if(loc && !isturf(loc))
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
else
|
||||
client.eye = src
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
reset_perspective(loc)
|
||||
|
||||
|
||||
if(ckey in deadmins)
|
||||
|
||||
+29
-3
@@ -487,7 +487,8 @@ var/list/slot_equipment_priority = list( \
|
||||
return 0 //Unsupported slot
|
||||
//END HUMAN
|
||||
|
||||
/mob/proc/reset_view(atom/A)
|
||||
// If you're looking for `reset_perspective`, that's a synonym for this proc.
|
||||
/mob/proc/reset_perspective(atom/A)
|
||||
if(client)
|
||||
if(istype(A, /atom/movable))
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
@@ -499,8 +500,33 @@ var/list/slot_equipment_priority = list( \
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/reset_perspective(atom/A)
|
||||
. = ..()
|
||||
if(.)
|
||||
// Above check means the mob has a client
|
||||
update_sight()
|
||||
if(client.eye != src)
|
||||
var/atom/AT = client.eye
|
||||
AT.get_remote_view_fullscreens(src)
|
||||
else
|
||||
clear_fullscreen("remote_view", 0)
|
||||
update_pipe_vision()
|
||||
|
||||
/mob/dead/reset_perspective(atom/A)
|
||||
if(client)
|
||||
if(ismob(client.eye) && (client.eye != src))
|
||||
// Note to self: Use `client.eye` for ghost following in place
|
||||
// of periodic ghost updates
|
||||
var/mob/target = client.eye
|
||||
target.following_mobs -= src
|
||||
. = ..()
|
||||
if(.)
|
||||
// Allows sharing HUDs with ghosts
|
||||
if(hud_used)
|
||||
client.screen = list()
|
||||
hud_used.show_hud(hud_used.hud_version)
|
||||
|
||||
/mob/proc/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
@@ -793,7 +819,7 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/verb/cancel_camera()
|
||||
set name = "Cancel Camera View"
|
||||
set category = "OOC"
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
unset_machine()
|
||||
if(istype(src, /mob/living))
|
||||
if(src:cameraFollow)
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
view = world.view //Reset the view
|
||||
winset(src, "mapwindow.map", "icon-size=[src.reset_stretch]")
|
||||
viewingCanvas = 0
|
||||
mob.reset_view()
|
||||
mob.reset_perspective()
|
||||
if(mob.hud_used)
|
||||
mob.hud_used.show_hud(HUD_STYLE_STANDARD)
|
||||
|
||||
|
||||
@@ -65,19 +65,23 @@
|
||||
|
||||
/datum/sprite_accessory/hair
|
||||
icon = 'icons/mob/human_face.dmi' // default icon for all hairs
|
||||
var/glasses_over //Hair styles with hair that don't overhang the arms of glasses should have glasses_over set to a positive value.
|
||||
|
||||
/datum/sprite_accessory/hair/bald
|
||||
name = "Bald"
|
||||
icon_state = "bald"
|
||||
species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton", "Vulpkanin", "Tajaran")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/short
|
||||
name = "Short Hair" // try to capatilize the names please~
|
||||
icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/cut
|
||||
name = "Cut Hair"
|
||||
icon_state = "hair_c"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/long
|
||||
name = "Shoulder-length Hair"
|
||||
@@ -123,6 +127,7 @@
|
||||
name = "Ponytail male"
|
||||
icon_state = "hair_ponytailm"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/ponytail2
|
||||
name = "Ponytail female"
|
||||
@@ -132,16 +137,19 @@
|
||||
/datum/sprite_accessory/hair/ponytail3
|
||||
name = "Ponytail alt"
|
||||
icon_state = "hair_ponytail3"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/sideponytail
|
||||
name = "Side Ponytail"
|
||||
icon_state = "hair_stail"
|
||||
gender = FEMALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/highponytail
|
||||
name = "High Ponytail"
|
||||
icon_state = "hair_highponytail"
|
||||
gender = FEMALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/wisp
|
||||
name = "Wisp"
|
||||
@@ -157,11 +165,13 @@
|
||||
icon_state = "hair_pompadour"
|
||||
gender = MALE
|
||||
species_allowed = list("Human", "Slime People", "Unathi")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/quiff
|
||||
name = "Quiff"
|
||||
icon_state = "hair_quiff"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/bedhead
|
||||
name = "Bedhead"
|
||||
@@ -197,6 +207,7 @@
|
||||
name = "Bowl"
|
||||
icon_state = "hair_bowlcut"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/braid2
|
||||
name = "Long Braid"
|
||||
@@ -219,20 +230,24 @@
|
||||
icon_state = "hair_buzzcut"
|
||||
gender = MALE
|
||||
species_allowed = list("Human", "Slime People", "Unathi")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/crew
|
||||
name = "Crewcut"
|
||||
icon_state = "hair_crewcut"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/combover
|
||||
name = "Combover"
|
||||
icon_state = "hair_combover"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/devillock
|
||||
name = "Devil Lock"
|
||||
icon_state = "hair_devilock"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/dreadlocks
|
||||
name = "Dreadlocks"
|
||||
@@ -249,6 +264,7 @@
|
||||
/datum/sprite_accessory/hair/afro2
|
||||
name = "Afro 2"
|
||||
icon_state = "hair_afro2"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/afro_large
|
||||
name = "Big Afro"
|
||||
@@ -259,6 +275,7 @@
|
||||
name = "Flat Top"
|
||||
icon_state = "hair_sergeant"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/emo
|
||||
name = "Emo"
|
||||
@@ -276,31 +293,37 @@
|
||||
name = "Hitop"
|
||||
icon_state = "hair_hitop"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/mohawk
|
||||
name = "Mohawk"
|
||||
icon_state = "hair_d"
|
||||
species_allowed = list("Human", "Slime People", "Unathi")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/jensen
|
||||
name = "Adam Jensen Hair"
|
||||
icon_state = "hair_jensen"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/cia
|
||||
name = "CIA"
|
||||
icon_state = "hair_cia"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/mulder
|
||||
name = "Mulder"
|
||||
icon_state = "hair_mulder"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/gelled
|
||||
name = "Gelled Back"
|
||||
icon_state = "hair_gelled"
|
||||
gender = FEMALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/gentle
|
||||
name = "Gentle"
|
||||
@@ -311,6 +334,7 @@
|
||||
name = "Spiky"
|
||||
icon_state = "hair_spikey"
|
||||
species_allowed = list("Human", "Slime People", "Unathi")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/kusanagi
|
||||
name = "Kusanagi Hair"
|
||||
@@ -320,6 +344,7 @@
|
||||
name = "Pigtails"
|
||||
icon_state = "hair_kagami"
|
||||
gender = FEMALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/himecut
|
||||
name = "Hime Cut"
|
||||
@@ -335,6 +360,7 @@
|
||||
name = "Odango"
|
||||
icon_state = "hair_odango"
|
||||
gender = FEMALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/ombre
|
||||
name = "Ombre"
|
||||
@@ -349,11 +375,13 @@
|
||||
/datum/sprite_accessory/hair/skinhead
|
||||
name = "Skinhead"
|
||||
icon_state = "hair_skinhead"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/balding
|
||||
name = "Balding Hair"
|
||||
icon_state = "hair_e"
|
||||
gender = MALE // turnoff!
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/longemo
|
||||
name = "Long Emo"
|
||||
@@ -385,6 +413,7 @@
|
||||
name = "Unshaven Mohawk"
|
||||
icon_state = "hair_unshavenmohawk"
|
||||
gender = MALE
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/drills
|
||||
name = "Twincurls"
|
||||
@@ -401,6 +430,7 @@
|
||||
|
||||
/datum/sprite_accessory/hair/ipc
|
||||
species_allowed = list("Machine")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/ipc/ipc_screen_pink
|
||||
name = "Pink IPC Screen"
|
||||
@@ -547,6 +577,7 @@
|
||||
|
||||
/datum/sprite_accessory/hair/unathi
|
||||
species_allowed = list("Unathi")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/unathi/una_horns
|
||||
name = "Unathi Horns"
|
||||
@@ -593,6 +624,7 @@
|
||||
|
||||
/datum/sprite_accessory/hair/tajara
|
||||
species_allowed = list("Tajaran")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_clean
|
||||
name = "Tajara Clean"
|
||||
@@ -601,11 +633,13 @@
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_bangs
|
||||
name = "Tajara Bangs"
|
||||
icon_state = "hair_bangs"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_braid
|
||||
name = "Tajara Braid"
|
||||
icon_state = "hair_tbraid"
|
||||
secondary_theme = "beads"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_shaggy
|
||||
name = "Tajara Shaggy"
|
||||
@@ -642,22 +676,27 @@
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_curls
|
||||
name = "Tajara Curly"
|
||||
icon_state = "hair_curly"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_retro
|
||||
name = "Tajaran Ladies' Retro"
|
||||
icon_state = "hair_ladies_retro"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_victory
|
||||
name = "Tajara Victory Curls"
|
||||
icon_state = "hair_victory"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_bob
|
||||
name = "Tajara Bob"
|
||||
icon_state = "hair_tbob"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/tajara/taj_hair_fingercurl
|
||||
name = "Tajara Finger Curls"
|
||||
icon_state = "hair_fingerwave"
|
||||
glasses_over = null
|
||||
|
||||
/datum/sprite_accessory/hair/vulpkanin
|
||||
species_allowed = list("Vulpkanin")
|
||||
@@ -694,6 +733,7 @@
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_bun
|
||||
name = "Bun"
|
||||
icon_state = "bun"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_jagged
|
||||
name = "Jagged"
|
||||
@@ -706,6 +746,7 @@
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_hawk
|
||||
name = "Hawk"
|
||||
icon_state = "hawk"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_anita
|
||||
name = "Anita"
|
||||
@@ -718,6 +759,7 @@
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_spike
|
||||
name = "Spike"
|
||||
icon_state = "spike"
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_braided
|
||||
name = "Braided"
|
||||
@@ -726,6 +768,7 @@
|
||||
|
||||
/datum/sprite_accessory/hair/vox
|
||||
species_allowed = list("Vox")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/vox/vox_quills_short
|
||||
name = "Short Vox Quills"
|
||||
@@ -787,6 +830,7 @@
|
||||
|
||||
/datum/sprite_accessory/hair/wryn
|
||||
species_allowed = list("Wryn")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/wryn/wry_antennae_default
|
||||
name = "Antennae"
|
||||
@@ -794,6 +838,7 @@
|
||||
|
||||
/datum/sprite_accessory/hair/nucleation
|
||||
species_allowed = list("Nucleation")
|
||||
glasses_over = 1
|
||||
|
||||
/datum/sprite_accessory/hair/nucleation/nuc_crystals
|
||||
name = "Nucleation Crystals"
|
||||
@@ -835,6 +880,7 @@
|
||||
/datum/sprite_accessory/facial_hair
|
||||
icon = 'icons/mob/human_face.dmi'
|
||||
gender = MALE // barf (unless you're a dorf, dorfs dig chix /w beards :P)
|
||||
var/over_hair
|
||||
|
||||
/datum/sprite_accessory/facial_hair/shaved
|
||||
name = "Shaved"
|
||||
@@ -1024,6 +1070,7 @@
|
||||
/datum/sprite_accessory/facial_hair/unathi
|
||||
species_allowed = list("Unathi")
|
||||
gender = NEUTER
|
||||
over_hair = 1
|
||||
|
||||
/datum/sprite_accessory/facial_hair/unathi/una_spines_long
|
||||
name = "Long Spines"
|
||||
@@ -1594,6 +1641,7 @@
|
||||
icon = 'icons/mob/body_accessory.dmi'
|
||||
species_allowed = list("Unathi", "Vulpkanin", "Tajaran", "Machine")
|
||||
icon_state = "accessory_none"
|
||||
var/over_hair
|
||||
|
||||
/datum/sprite_accessory/head_accessory/none
|
||||
name = "None"
|
||||
@@ -1602,6 +1650,7 @@
|
||||
|
||||
/datum/sprite_accessory/head_accessory/unathi
|
||||
species_allowed = list("Unathi")
|
||||
over_hair = 1
|
||||
|
||||
/datum/sprite_accessory/head_accessory/unathi/simple
|
||||
name = "Simple"
|
||||
@@ -1701,6 +1750,7 @@
|
||||
|
||||
/datum/sprite_accessory/head_accessory/ipc
|
||||
species_allowed = list("Machine")
|
||||
over_hair = 1
|
||||
|
||||
/datum/sprite_accessory/head_accessory/ipc/ipc_antennae
|
||||
name = "Antennae"
|
||||
|
||||
Reference in New Issue
Block a user