mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge branch 'master' into list-memory-optimization
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
|
||||
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
/mob/living/carbon/alien/humanoid/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_CLAW
|
||||
..()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
step_away(src, user, 15)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
/mob/living/carbon/alien/larva/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!no_effect && !visual_effect_icon)
|
||||
visual_effect_icon = ATTACK_EFFECT_BITE
|
||||
..()
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
var/canEnterVentWith = "/obj/item/implant=0&/obj/item/clothing/mask/facehugger=0&/obj/item/radio/borg=0&/obj/machinery/camera=0"
|
||||
var/datum/middleClickOverride/middleClickOverride = null
|
||||
|
||||
/mob/living/carbon/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.carbon_list += src
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
// This clause is here due to items falling off from limb deletion
|
||||
for(var/obj/item in get_all_slots())
|
||||
@@ -14,6 +18,7 @@
|
||||
if(B)
|
||||
B.leave_host()
|
||||
qdel(B)
|
||||
GLOB.carbon_list -= src
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/handle_atom_del(atom/A)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
visible_message("<span class='warning'>[src] catches [AM]!</span>")
|
||||
throw_mode_off()
|
||||
return TRUE
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/water_act(volume, temperature, source, method = REAGENT_TOUCH)
|
||||
. = ..()
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
sync_organ_dna(1)
|
||||
|
||||
UpdateAppearance()
|
||||
GLOB.human_list += src
|
||||
|
||||
/mob/living/carbon/human/OpenCraftingMenu()
|
||||
handcrafting.ui_interact(src)
|
||||
@@ -60,6 +61,7 @@
|
||||
SSmobs.cubemonkeys -= src
|
||||
QDEL_LIST(bodyparts)
|
||||
splinted_limbs.Cut()
|
||||
GLOB.human_list -= src
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
var/O2_partialpressure = (breath.oxygen/breath.total_moles())*breath_pressure
|
||||
var/Toxins_partialpressure = (breath.toxins/breath.total_moles())*breath_pressure
|
||||
var/CO2_partialpressure = (breath.carbon_dioxide/breath.total_moles())*breath_pressure
|
||||
|
||||
var/SA_partialpressure = (breath.sleeping_agent/breath.total_moles())*breath_pressure
|
||||
|
||||
//OXYGEN
|
||||
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
|
||||
@@ -168,16 +168,14 @@
|
||||
clear_alert("too_much_tox")
|
||||
|
||||
//TRACE GASES
|
||||
if(breath.trace_gases.len)
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_partialpressure = (SA.moles/breath.total_moles())*breath_pressure
|
||||
if(SA_partialpressure > SA_para_min)
|
||||
Paralyse(3)
|
||||
if(SA_partialpressure > SA_sleep_min)
|
||||
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_partialpressure > 0.01)
|
||||
if(prob(20))
|
||||
emote(pick("giggle","laugh"))
|
||||
if(breath.sleeping_agent)
|
||||
if(SA_partialpressure > SA_para_min)
|
||||
Paralyse(3)
|
||||
if(SA_partialpressure > SA_sleep_min)
|
||||
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_partialpressure > 0.01)
|
||||
if(prob(20))
|
||||
emote(pick("giggle","laugh"))
|
||||
|
||||
//BREATH TEMPERATURE
|
||||
handle_breath_temperature(breath)
|
||||
|
||||
@@ -740,7 +740,8 @@
|
||||
clear_alert("weightless")
|
||||
else
|
||||
throw_alert("weightless", /obj/screen/alert/weightless)
|
||||
float(!has_gravity)
|
||||
if(!flying)
|
||||
float(!has_gravity)
|
||||
|
||||
/mob/living/proc/float(on)
|
||||
if(throwing)
|
||||
@@ -825,8 +826,7 @@
|
||||
spawn_dust()
|
||||
gib()
|
||||
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
end_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
/mob/living/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
|
||||
if(!used_item)
|
||||
used_item = get_active_hand()
|
||||
..()
|
||||
|
||||
@@ -336,7 +336,8 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
var/datum/multilingual_say_piece/S = message_pieces // Yay BYOND's hilarious typecasting
|
||||
S.speaking.broadcast(src, S.message)
|
||||
return 1
|
||||
|
||||
// Log it here since it skips the default way say handles it
|
||||
create_log(SAY_LOG, "(whisper) '[message]'")
|
||||
whisper_say(message_pieces)
|
||||
|
||||
// for weird circumstances where you're inside an atom that is also you, like pai's
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status
|
||||
O.mode = 2
|
||||
|
||||
if(istype(loc, /obj/item/aicard))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/silicon/ai/Logout()
|
||||
..()
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status
|
||||
O.mode = 0
|
||||
src.view_core()
|
||||
return
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
if(!.)
|
||||
return FALSE
|
||||
icon_state = "ai-crash"
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status
|
||||
if(atoms_share_level(O, src))
|
||||
O.mode = 2
|
||||
gib()
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
user.visible_message("<span class='warning'>\the [user] swipes [user.p_their()] ID card through [src], attempting to reboot it.</span>", "<span class='warning'>You swipe your ID card through [src], attempting to reboot it.</span>")
|
||||
last_reboot = world.time / 10
|
||||
var/drones = 0
|
||||
for(var/mob/living/silicon/robot/drone/D in world)
|
||||
for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
|
||||
if(D.key && D.client)
|
||||
drones++
|
||||
if(drones < config.max_maint_drones)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
var/dat
|
||||
dat += "<B>Maintenance Units</B><BR>"
|
||||
|
||||
for(var/mob/living/silicon/robot/drone/D in world)
|
||||
for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
|
||||
dat += "<BR>[D.real_name] ([D.stat == 2 ? "<font color='red'>INACTIVE" : "<font color='green'>ACTIVE"]</FONT>)"
|
||||
dat += "<font dize = 9><BR>Cell charge: [D.cell.charge]/[D.cell.maxcharge]."
|
||||
dat += "<BR>Currently located in: [get_area(D)]."
|
||||
@@ -74,7 +74,7 @@
|
||||
else if(href_list["ping"])
|
||||
|
||||
to_chat(usr, "<span class='notice'>You issue a maintenance request for all active drones, highlighting [drone_call_area].</span>")
|
||||
for(var/mob/living/silicon/robot/drone/D in world)
|
||||
for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
|
||||
if(D.client && D.stat == 0)
|
||||
to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].")
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/machinery/drone_fabricator/proc/count_drones()
|
||||
var/drones = 0
|
||||
for(var/mob/living/silicon/robot/drone/D in world)
|
||||
for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
|
||||
if(D.key && D.client)
|
||||
drones++
|
||||
return drones
|
||||
@@ -142,7 +142,7 @@
|
||||
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)
|
||||
for(var/obj/machinery/drone_fabricator/DF in GLOB.machines)
|
||||
if(DF.stat & NOPOWER || !DF.produce_drones)
|
||||
continue
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
/mob/living/simple_animal/blob_act(obj/structure/blob/B)
|
||||
adjustBruteLoss(20)
|
||||
|
||||
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
/mob/living/simple_animal/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect)
|
||||
if(!no_effect && !visual_effect_icon && melee_damage_upper)
|
||||
if(melee_damage_upper < 10)
|
||||
visual_effect_icon = ATTACK_EFFECT_PUNCH
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
/mob/living/simple_animal/hostile/poison/bees/New()
|
||||
..()
|
||||
generate_bee_visuals()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/mob/living/simple_animal/hostile/poison/bees/Destroy()
|
||||
beegent = null
|
||||
|
||||
@@ -452,6 +452,7 @@ Difficulty: Hard
|
||||
else
|
||||
burst_range = 3
|
||||
INVOKE_ASYNC(src, .proc/burst, get_turf(src), 0.25) //melee attacks on living mobs cause it to release a fast burst if on cooldown
|
||||
OpenFire()
|
||||
else
|
||||
devour(L)
|
||||
else
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize(mapload)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/death), 100)
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
|
||||
|
||||
//Jiggle the whole worm forwards towards the next segment
|
||||
/mob/living/simple_animal/hostile/spaceWorm/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
/mob/living/simple_animal/hostile/spaceWorm/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect)
|
||||
..()
|
||||
if(previousWorm)
|
||||
previousWorm.do_attack_animation(src)
|
||||
|
||||
@@ -349,7 +349,8 @@
|
||||
icon = 'icons/mob/critter.dmi'
|
||||
icon_state = "viscerator_attack"
|
||||
icon_living = "viscerator_attack"
|
||||
pass_flags = PASSTABLE
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
a_intent = INTENT_HARM
|
||||
health = 15
|
||||
maxHealth = 15
|
||||
obj_damage = 0
|
||||
@@ -365,3 +366,7 @@
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
del_on_death = 1
|
||||
deathmessage = "is smashed into pieces!"
|
||||
|
||||
/mob/living/simple_animal/hostile/viscerator/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
. += "<span class='warning'>[src] appears to be having trouble staying afloat!</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/possessed_object/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect, end_pixel_y)
|
||||
/mob/living/simple_animal/possessed_object/do_attack_animation(atom/A, visual_effect_icon, used_item, no_effect)
|
||||
..()
|
||||
animate_ghostly_presence(src, -1, 20, 1) // Restart the floating animation after the attack animation, as it will be cancelled.
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
t+= "<span class='notice'>Oxygen: [environment.oxygen] \n</span>"
|
||||
t+= "<span class='notice'>Plasma : [environment.toxins] \n</span>"
|
||||
t+= "<span class='notice'>Carbon Dioxide: [environment.carbon_dioxide] \n</span>"
|
||||
for(var/datum/gas/trace_gas in environment.trace_gases)
|
||||
to_chat(usr, "<span class='notice'>[trace_gas.type]: [trace_gas.moles] \n</span>")
|
||||
t+= "<span class='notice'>N2O: [environment.sleeping_agent] \n</span>"
|
||||
t+= "<span class='notice'>Agent B: [environment.agent_b] \n</span>"
|
||||
|
||||
usr.show_message(t, 1)
|
||||
|
||||
@@ -765,7 +765,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
var/list/namecounts = list()
|
||||
var/list/creatures = list()
|
||||
|
||||
for(var/obj/O in world) //EWWWWWWWWWWWWWWWWWWWWWWWW ~needs to be optimised
|
||||
for(var/obj/O in GLOB.poi_list)
|
||||
if(!O.loc)
|
||||
continue
|
||||
if(istype(O, /obj/item/disk/nuclear))
|
||||
@@ -1099,7 +1099,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
var/mob/living/simple_animal/mouse/host
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
|
||||
var/list/found_vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in SSair.atmos_machinery)
|
||||
if(!v.welded && v.z == src.z)
|
||||
found_vents.Add(v)
|
||||
if(found_vents.len)
|
||||
|
||||
Reference in New Issue
Block a user