mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge branch 'master' into var/const-to-define
This commit is contained in:
@@ -30,12 +30,10 @@
|
||||
|
||||
// All mobs should have custom emote, really..
|
||||
/mob/proc/custom_emote(var/m_type=EMOTE_VISUAL,var/message = null)
|
||||
|
||||
if(stat || !use_me && usr == src)
|
||||
if(usr)
|
||||
to_chat(usr, "You are unable to emote.")
|
||||
return
|
||||
|
||||
var/muzzled = is_muzzled()
|
||||
if(muzzled)
|
||||
var/obj/item/clothing/mask/muzzle/M = wear_mask
|
||||
@@ -57,7 +55,10 @@
|
||||
|
||||
if(message)
|
||||
log_emote(message, src)
|
||||
|
||||
if(isliving(src)) //isliving because these are defined on the mob/living level not mob
|
||||
var/mob/living/L = src
|
||||
L.say_log += "EMOTE: [input]" //say log too so it is easier on admins instead of having to merge the two with timestamps etc
|
||||
L.emote_log += input //emote only log if an admin wants to search just for emotes they don't have to sift through the say
|
||||
// Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
valid_species += current_species_name
|
||||
|
||||
return valid_species
|
||||
return sortTim(valid_species, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_hairstyles()
|
||||
var/list/valid_hairstyles = new()
|
||||
@@ -351,7 +351,7 @@
|
||||
if(H.dna.species.name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
|
||||
valid_hairstyles += hairstyle
|
||||
|
||||
return valid_hairstyles
|
||||
return sortTim(valid_hairstyles, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_facial_hairstyles()
|
||||
var/list/valid_facial_hairstyles = new()
|
||||
@@ -380,7 +380,7 @@
|
||||
if(H.dna.species.name in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
|
||||
valid_facial_hairstyles += facialhairstyle
|
||||
|
||||
return valid_facial_hairstyles
|
||||
return sortTim(valid_facial_hairstyles, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_head_accessories()
|
||||
var/list/valid_head_accessories = new()
|
||||
@@ -395,7 +395,7 @@
|
||||
continue
|
||||
valid_head_accessories += head_accessory
|
||||
|
||||
return valid_head_accessories
|
||||
return sortTim(valid_head_accessories, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_markings(var/location = "body")
|
||||
var/list/valid_markings = new()
|
||||
@@ -433,7 +433,7 @@
|
||||
continue
|
||||
valid_markings += marking
|
||||
|
||||
return valid_markings
|
||||
return sortTim(valid_markings, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_body_accessories()
|
||||
var/list/valid_body_accessories = new()
|
||||
@@ -448,7 +448,7 @@
|
||||
if(dna.species.name in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list.
|
||||
valid_body_accessories += B
|
||||
|
||||
return valid_body_accessories
|
||||
return sortTim(valid_body_accessories, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_alt_heads()
|
||||
var/list/valid_alt_heads = list()
|
||||
@@ -463,7 +463,7 @@
|
||||
|
||||
valid_alt_heads += alternate_head
|
||||
|
||||
return valid_alt_heads
|
||||
return sortTim(valid_alt_heads, /proc/cmp_text_asc)
|
||||
|
||||
/mob/living/carbon/human/proc/scramble_appearance()
|
||||
scramble(1, src, 100)
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
if(C.reagents)
|
||||
C.reagents.clear_reagents()
|
||||
QDEL_LIST(C.reagents.addiction_list)
|
||||
C.reagents.addiction_threshold_accumulated.Cut()
|
||||
|
||||
// rejuvenate: Called by `revive` to get the mob into a revivable state
|
||||
// the admin "rejuvenate" command calls `revive`, not this proc.
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
var/tesla_ignore = FALSE
|
||||
|
||||
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
|
||||
var/list/emote_log = list() //like say_log but for emotes
|
||||
|
||||
var/list/recent_tastes = list()
|
||||
var/blood_volume = 0 //how much blood the mob has
|
||||
|
||||
@@ -10,15 +10,11 @@
|
||||
var/max_damage = 30
|
||||
var/component_disabled = 0
|
||||
var/mob/living/silicon/robot/owner
|
||||
|
||||
// The actual device object that has to be installed for this.
|
||||
/datum/robot_component/var/external_type = null
|
||||
|
||||
// The wrapped device(e.g. radio), only set if external_type isn't null
|
||||
/datum/robot_component/var/obj/item/wrapped = null
|
||||
var/external_type = null // The actual device object that has to be installed for this.
|
||||
var/obj/item/wrapped = null // The wrapped device(e.g. radio), only set if external_type isn't null
|
||||
|
||||
/datum/robot_component/New(mob/living/silicon/robot/R)
|
||||
src.owner = R
|
||||
owner = R
|
||||
|
||||
/datum/robot_component/proc/install()
|
||||
go_online()
|
||||
@@ -109,6 +105,13 @@
|
||||
name = "power cell"
|
||||
max_damage = 50
|
||||
|
||||
/datum/robot_component/cell/New(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
// sets `external_type` to the borg's currently installed cell type
|
||||
if(owner.cell)
|
||||
var/obj/item/stock_parts/cell/C = owner.cell
|
||||
external_type = C.type
|
||||
|
||||
/datum/robot_component/cell/is_powered()
|
||||
return ..() && owner.cell
|
||||
|
||||
|
||||
@@ -142,6 +142,9 @@ var/list/robot_verbs_default = list(
|
||||
mmi = new /obj/item/mmi/robotic_brain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a robotic brain, but it works)
|
||||
mmi.icon_state = "boris"
|
||||
|
||||
if(!cell) // Make sure a new cell gets created *before* executing initialize_components(). The cell component needs an existing cell for it to get set up properly
|
||||
cell = new /obj/item/stock_parts/cell/high(src)
|
||||
|
||||
initialize_components()
|
||||
//if(!unfinished)
|
||||
// Create all the robot parts.
|
||||
@@ -150,9 +153,6 @@ var/list/robot_verbs_default = list(
|
||||
C.installed = 1
|
||||
C.wrapped = new C.external_type
|
||||
|
||||
if(!cell)
|
||||
cell = new /obj/item/stock_parts/cell/high(src)
|
||||
|
||||
..()
|
||||
|
||||
add_robot_verbs()
|
||||
@@ -602,7 +602,8 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/W, mob/user, params)
|
||||
if(opened) // Are they trying to insert something?
|
||||
// Check if the user is trying to insert another component like a radio, actuator, armor etc.
|
||||
if(istype(W, /obj/item/robot_parts/robot_component) && opened)
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
if(!C.installed && istype(W, C.external_type))
|
||||
@@ -637,7 +638,7 @@ var/list/robot_verbs_default = list(
|
||||
user.visible_message("<span class='alert'>\The [user] fixes some of the burnt wires on \the [src] with \the [coil].</span>")
|
||||
|
||||
else if(istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
var/datum/robot_component/C = components["power cell"]
|
||||
var/datum/robot_component/cell/C = components["power cell"]
|
||||
if(wiresexposed)
|
||||
to_chat(user, "Close the panel first.")
|
||||
else if(cell)
|
||||
@@ -651,6 +652,7 @@ var/list/robot_verbs_default = list(
|
||||
C.installed = 1
|
||||
C.wrapped = W
|
||||
C.install()
|
||||
C.external_type = W.type // Update the cell component's `external_type` to the path of new cell
|
||||
//This will mean that removing and replacing a power cell will repair the mount, but I don't care at this point. ~Z
|
||||
C.brute_damage = 0
|
||||
C.electronics_damage = 0
|
||||
@@ -1419,6 +1421,8 @@ var/list/robot_verbs_default = list(
|
||||
burn = borked_part.electronics_damage
|
||||
borked_part.installed = 1
|
||||
borked_part.wrapped = new borked_part.external_type
|
||||
if(ispath(borked_part.external_type, /obj/item/stock_parts/cell)) // is the broken part a cell?
|
||||
cell = new borked_part.external_type // borgs that have their cell destroyed have their `cell` var set to null. we need create a new cell for them based on their old cell type.
|
||||
borked_part.heal_damage(brute,burn)
|
||||
borked_part.install()
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
|
||||
/obj/item/robot_module/New()
|
||||
..()
|
||||
modules += new /obj/item/flash/cyborg(src)
|
||||
emag = new /obj/item/toy/sword(src)
|
||||
emag.name = "Placeholder Emag Item"
|
||||
@@ -505,6 +506,7 @@
|
||||
)
|
||||
|
||||
/obj/item/robot_module/alien/hunter/New()
|
||||
..()
|
||||
modules += new /obj/item/melee/energy/alien/claws(src)
|
||||
modules += new /obj/item/flash/cyborg/alien(src)
|
||||
var/obj/item/reagent_containers/spray/alien/stun/S = new /obj/item/reagent_containers/spray/alien/stun(src)
|
||||
@@ -538,6 +540,7 @@
|
||||
)
|
||||
|
||||
/obj/item/robot_module/drone/New()
|
||||
..()
|
||||
modules += new /obj/item/weldingtool/largetank/cyborg(src)
|
||||
modules += new /obj/item/screwdriver/cyborg(src)
|
||||
modules += new /obj/item/wrench/cyborg(src)
|
||||
|
||||
@@ -148,8 +148,10 @@
|
||||
// This prevents someone from aggroing a depot mob, then hiding in a locker, perfectly safe, while the mob stands there getting killed by their friends.
|
||||
LoseTarget()
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/handle_automated_movement()
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/handle_automated_action()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!istype(depotarea))
|
||||
return
|
||||
if(seen_enemy)
|
||||
@@ -184,6 +186,10 @@
|
||||
else
|
||||
scan_cycles++
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/AIShouldSleep(var/list/possible_targets)
|
||||
FindTarget(possible_targets, 1)
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/proc/raise_alert(var/reason)
|
||||
if(istype(depotarea) && (!raised_alert || seen_revived_enemy) && !depotarea.used_self_destruct)
|
||||
raised_alert = TRUE
|
||||
|
||||
Reference in New Issue
Block a user