diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index 0e8272fa9f..dfcbf73374 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -138,6 +138,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define INIT_ORDER_ALARM 16 // Must initialize before atoms. #define INIT_ORDER_TRANSCORE 15 #define INIT_ORDER_ATOMS 14 +#define INIT_ORDER_POIS 13 #define INIT_ORDER_MACHINES 10 #define INIT_ORDER_SHUTTLES 3 #define INIT_ORDER_TIMER 1 @@ -181,6 +182,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G #define FIRE_PRIORITY_AI 10 #define FIRE_PRIORITY_GARBAGE 15 #define FIRE_PRIORITY_ASSETS 20 +#define FIRE_PRIORITY_POIS 20 #define FIRE_PRIORITY_ALARM 20 #define FIRE_PRIORITY_CHARSETUP 25 #define FIRE_PRIORITY_AIRFLOW 30 diff --git a/code/controllers/subsystems/pois.dm b/code/controllers/subsystems/pois.dm new file mode 100644 index 0000000000..e5bfbbecf0 --- /dev/null +++ b/code/controllers/subsystems/pois.dm @@ -0,0 +1,87 @@ +GLOBAL_LIST_EMPTY(global_used_pois) +SUBSYSTEM_DEF(points_of_interest) + name = "Points of Interest" + wait = 1 SECONDS + priority = FIRE_PRIORITY_POIS + init_order = INIT_ORDER_POIS + runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT //POIs can be loaded mid-round. + var/list/obj/effect/landmark/poi_loader/poi_queue = list() + +/datum/controller/subsystem/points_of_interest/Initialize() + while (poi_queue.len) + load_next_poi() + to_world_log("Initializing POIs") + admin_notice(span_danger("Initializing POIs"), R_DEBUG) + return SS_INIT_SUCCESS + +/datum/controller/subsystem/points_of_interest/fire(resumed = FALSE) + while (poi_queue.len) + load_next_poi() + + if (MC_TICK_CHECK) + return + +/// We select and fire the next PoI in the list. +/datum/controller/subsystem/points_of_interest/proc/load_next_poi() + var/obj/effect/landmark/poi_loader/poi_to_load = poi_queue[1] + poi_queue -= poi_to_load + //We then fire it! + load_poi(poi_to_load) + +/datum/controller/subsystem/points_of_interest/proc/get_turfs_to_clean(obj/effect/landmark/poi_loader/poi_to_load) + return block(locate(poi_to_load.x, poi_to_load.y, poi_to_load.z), locate((poi_to_load.x + poi_to_load.size_x - 1), (poi_to_load.y + poi_to_load.size_y - 1), poi_to_load.z)) + +/datum/controller/subsystem/points_of_interest/proc/annihilate_bounds(obj/effect/landmark/poi_loader/poi_to_load) + //var/deleted_atoms = 0 + //admin_notice(span_danger("Annihilating objects in poi loading location."), R_DEBUG) + var/list/turfs_to_clean = get_turfs_to_clean(poi_to_load) + if(turfs_to_clean.len) + for(var/x in 1 to 2) // Requires two passes to get everything. + for(var/turf/T in turfs_to_clean) + for(var/atom/movable/AM in T) + //++deleted_atoms + qdel(AM) + //admin_notice(span_danger("Annihilated [deleted_atoms] objects."), R_DEBUG) + +/datum/controller/subsystem/points_of_interest/proc/load_poi(obj/effect/landmark/poi_loader/poi_to_load) + if(!poi_to_load) + return + var/turf/T = get_turf(poi_to_load) + if(!isturf(T)) + to_world_log("[log_info_line(poi_to_load)] not on a turf! Cannot place poi template.") + return + + // Choose a poi + if(!poi_to_load.poi_type) + return + + if(!(GLOB.global_used_pois.len) || !(GLOB.global_used_pois[poi_to_load.poi_type])) + GLOB.global_used_pois[poi_to_load.poi_type] = list() + var/list/poi_list = GLOB.global_used_pois[poi_to_load.poi_type] + for(var/map in SSmapping.map_templates) + var/template = SSmapping.map_templates[map] + if(istype(template, poi_to_load.poi_type)) + poi_list += template + + var/datum/map_template/template_to_use = null + + var/list/our_poi_list = GLOB.global_used_pois[poi_to_load.poi_type] + + if(!our_poi_list.len) + return + else + template_to_use = pick(our_poi_list) + + if(!template_to_use) + return + + //admin_notice(span_danger("Chosen Predefined PoI Map: [chosen_type.name]"), R_DEBUG) + + if(poi_to_load.remove_from_pool) + GLOB.global_used_pois[poi_to_load.poi_type] -= template_to_use + + // Annihilate movable atoms + annihilate_bounds(poi_to_load) + // Actually load it + template_to_use.load(T) + qdel(poi_to_load) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 905832118f..e61f52af4b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -92,6 +92,7 @@ // Other parameters are passed from New (excluding loc), this does not happen if mapload is TRUE // Must return an Initialize hint. Defined in code/__defines/subsystems.dm /atom/proc/Initialize(mapload, ...) + SHOULD_NOT_SLEEP(TRUE) SHOULD_CALL_PARENT(TRUE) if(QDELETED(src)) stack_trace("GC: -- [type] had initialize() called after qdel() --") diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index c2e0e554a1..80e43c2100 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -186,37 +186,38 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages signal.data["level"] = map_levels if(signal.data["slow"] > 0) - sleep(signal.data["slow"]) // simulate the network lag if necessary + addtimer(CALLBACK(src, PROC_REF(broadcast_signal), signal), signal.data["slow"], TIMER_DELETE_ME) - /* ###### Broadcast a message using signal.data ###### */ - var/datum/radio_frequency/connection = signal.data["connection"] +/obj/machinery/telecomms/allinone/proc/broadcast_signal(datum/signal/signal) + /* ###### Broadcast a message using signal.data ###### */ + var/datum/radio_frequency/connection = signal.data["connection"] - var/list/forced_radios - for(var/datum/weakref/wr in linked_radios_weakrefs) - var/obj/item/radio/R = wr.resolve() - if(istype(R)) - LAZYDISTINCTADD(forced_radios, R) + var/list/forced_radios + for(var/datum/weakref/wr in linked_radios_weakrefs) + var/obj/item/radio/R = wr.resolve() + if(istype(R)) + LAZYDISTINCTADD(forced_radios, R) - Broadcast_Message( - signal.data["connection"], - signal.data["mob"], - signal.data["vmask"], - signal.data["vmessage"], - signal.data["radio"], - signal.data["message"], - signal.data["name"], - signal.data["job"], - signal.data["realname"], - signal.data["vname"], - DATA_NORMAL, - signal.data["compression"], - signal.data["level"], - connection.frequency, - signal.data["verb"], - signal.data["language"], - forced_radios - ) + Broadcast_Message( + signal.data["connection"], + signal.data["mob"], + signal.data["vmask"], + signal.data["vmessage"], + signal.data["radio"], + signal.data["message"], + signal.data["name"], + signal.data["job"], + signal.data["realname"], + signal.data["vname"], + DATA_NORMAL, + signal.data["compression"], + signal.data["level"], + connection.frequency, + signal.data["verb"], + signal.data["language"], + forced_radios + ) //Antag version with unlimited range (doesn't even check) and uses no power, to enable antag comms to work anywhere. /obj/machinery/telecomms/allinone/antag @@ -244,35 +245,37 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages //signal.data["level"] = using_map.contact_levels.Copy() if(signal.data["slow"] > 0) - sleep(signal.data["slow"]) // simulate the network lag if necessary + addtimer(CALLBACK(src, PROC_REF(broadcast_signal), signal), signal.data["slow"], TIMER_DELETE_ME) - /* ###### Broadcast a message using signal.data ###### */ +/obj/machinery/telecomms/allinone/antag/broadcast_signal(datum/signal/signal) + /* ###### Broadcast a message using signal.data ###### */ - var/datum/radio_frequency/connection = signal.data["connection"] + var/datum/radio_frequency/connection = signal.data["connection"] - var/list/forced_radios - for(var/datum/weakref/wr in linked_radios_weakrefs) - var/obj/item/radio/R = wr.resolve() - if(istype(R)) - LAZYDISTINCTADD(forced_radios, R) + var/list/forced_radios + for(var/datum/weakref/wr in linked_radios_weakrefs) + var/obj/item/radio/R = wr.resolve() + if(istype(R)) + LAZYDISTINCTADD(forced_radios, R) - if(connection.frequency in ANTAG_FREQS) // if antag broadcast, just + if(connection.frequency in ANTAG_FREQS) // if antag broadcast, just + Broadcast_Message(signal.data["connection"], signal.data["mob"], + signal.data["vmask"], signal.data["vmessage"], + signal.data["radio"], signal.data["message"], + signal.data["name"], signal.data["job"], + signal.data["realname"], signal.data["vname"], DATA_NORMAL, + signal.data["compression"], list(0), connection.frequency, + signal.data["verb"], forced_radios) + else + if(intercept) Broadcast_Message(signal.data["connection"], signal.data["mob"], - signal.data["vmask"], signal.data["vmessage"], - signal.data["radio"], signal.data["message"], - signal.data["name"], signal.data["job"], - signal.data["realname"], signal.data["vname"], DATA_NORMAL, - signal.data["compression"], list(0), connection.frequency, - signal.data["verb"], forced_radios) - else - if(intercept) - Broadcast_Message(signal.data["connection"], signal.data["mob"], - signal.data["vmask"], signal.data["vmessage"], - signal.data["radio"], signal.data["message"], - signal.data["name"], signal.data["job"], - signal.data["realname"], signal.data["vname"], DATA_ANTAG, - signal.data["compression"], list(0), connection.frequency, - signal.data["verb"], forced_radios) + signal.data["vmask"], signal.data["vmessage"], + signal.data["radio"], signal.data["message"], + signal.data["name"], signal.data["job"], + signal.data["realname"], signal.data["vname"], DATA_ANTAG, + signal.data["compression"], list(0), connection.frequency, + signal.data["verb"], forced_radios) + /** diff --git a/code/game/machinery/telecomms/broadcaster_ch.dm b/code/game/machinery/telecomms/broadcaster_ch.dm index 5148b22df1..bfbe99abf9 100644 --- a/code/game/machinery/telecomms/broadcaster_ch.dm +++ b/code/game/machinery/telecomms/broadcaster_ch.dm @@ -39,34 +39,4 @@ signal.data["compression"] = 0 // decompress since we're a processor if(signal.data["slow"] > 0) - sleep(signal.data["slow"]) // simulate the network lag if necessary - - /* ###### Broadcast a message using signal.data ###### */ - - var/datum/radio_frequency/connection = signal.data["connection"] - - var/list/forced_radios - for(var/datum/weakref/wr in linked_radios_weakrefs) - var/obj/item/radio/R = wr.resolve() - if(istype(R)) - LAZYDISTINCTADD(forced_radios, R) - - Broadcast_Message( - signal.data["connection"], - signal.data["mob"], - signal.data["vmask"], - signal.data["vmessage"], - signal.data["radio"], - signal.data["message"], - signal.data["name"], - signal.data["job"], - signal.data["realname"], - signal.data["vname"], - DATA_NORMAL, - signal.data["compression"], - signal.data["level"], - connection.frequency, - signal.data["verb"], - signal.data["language"], - forced_radios - ) + addtimer(CALLBACK(src, PROC_REF(broadcast_signal), signal), signal.data["slow"], TIMER_DELETE_ME) diff --git a/code/game/objects/effects/landmarks_poi_vr.dm b/code/game/objects/effects/landmarks_poi_vr.dm index 9f037220b0..389bd28a7b 100644 --- a/code/game/objects/effects/landmarks_poi_vr.dm +++ b/code/game/objects/effects/landmarks_poi_vr.dm @@ -1,7 +1,3 @@ -var/global/list/global_used_pois = list() - - - /obj/effect/landmark/poi_loader name = "PoI Loader" var/size_x @@ -12,61 +8,5 @@ var/global/list/global_used_pois = list() INITIALIZE_IMMEDIATE(/obj/effect/landmark/poi_loader) /obj/effect/landmark/poi_loader/Initialize(mapload) - src.load_poi() + SSpoints_of_interest.poi_queue += src return ..() - -/obj/effect/landmark/poi_loader/proc/get_turfs_to_clean() - return block(locate(src.x, src.y, src.z), locate((src.x + size_x - 1), (src.y + size_y - 1), src.z)) - -/obj/effect/landmark/poi_loader/proc/annihilate_bounds() - //var/deleted_atoms = 0 - //admin_notice(span_danger("Annihilating objects in poi loading location."), R_DEBUG) - var/list/turfs_to_clean = get_turfs_to_clean() - if(turfs_to_clean.len) - for(var/x in 1 to 2) // Requires two passes to get everything. - for(var/turf/T in turfs_to_clean) - for(var/atom/movable/AM in T) - //++deleted_atoms - qdel(AM) - //admin_notice(span_danger("Annihilated [deleted_atoms] objects."), R_DEBUG) - -/obj/effect/landmark/poi_loader/proc/load_poi() - var/turf/T = get_turf(src) - if(!isturf(T)) - to_world_log("[log_info_line(src)] not on a turf! Cannot place poi template.") - return - - // Choose a poi - if(!poi_type) - return - - if(!(global_used_pois.len) || !(global_used_pois[poi_type])) - global_used_pois[poi_type] = list() - var/list/poi_list = global_used_pois[poi_type] - for(var/map in SSmapping.map_templates) - var/template = SSmapping.map_templates[map] - if(istype(template, poi_type)) - poi_list += template - - var/datum/map_template/template_to_use = null - - var/list/our_poi_list = global_used_pois[poi_type] - - if(!our_poi_list.len) - return - else - template_to_use = pick(our_poi_list) - - if(!template_to_use) - return - - //admin_notice(span_danger("Chosen Predefined PoI Map: [chosen_type.name]"), R_DEBUG) - - if(remove_from_pool) - global_used_pois[poi_type] -= template_to_use - - // Annihilate movable atoms - annihilate_bounds() - //CHECK_TICK //Don't let anything else happen for now - // Actually load it - template_to_use.load(T) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index cc5f02542b..76500af122 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -90,11 +90,9 @@ var/turf/T = M.loc if(istype(T, /turf)) if(!M.moved_recently && M.last_move) - M.moved_recently = 1 + M.moved_recently = TRUE step(M, M.last_move) - sleep(50) - if(M) - M.moved_recently = 0 + addtimer(VARSET_CALLBACK(M, moved_recently, FALSE), 5 SECONDS, TIMER_DELETE_ME) to_chat(M, span_danger("You feel a sharp shock!")) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, M) diff --git a/code/game/objects/items/sahoc_ch.dm b/code/game/objects/items/sahoc_ch.dm index c4465fa3b7..39e37e4d02 100644 --- a/code/game/objects/items/sahoc_ch.dm +++ b/code/game/objects/items/sahoc_ch.dm @@ -19,19 +19,19 @@ /obj/item/buttonofnormal/attack_self(mob/user) if(colorindex) nonrandom() - sleep(10) - capsuleowner.resize(sizetouse) - sizetouse = rand(25,200)/100 //randmization occurs after press + addtimer(CALLBACK(src, PROC_REF(do_size_effect), capsuleowner), 10, TIMER_DELETE_ME) /obj/item/buttonofnormal/throw_impact(atom/A, speed, mob/user) ..() if(isliving(A)) if(colorindex) nonrandom() - sleep(5) - var/mob/living/capsulehit = A - capsulehit.resize(sizetouse) - sizetouse = rand(25,200)/100 //randmization occurs after press + addtimer(CALLBACK(src, PROC_REF(do_size_effect), A), 5, TIMER_DELETE_ME) + +/obj/item/buttonofnormal/proc/do_size_effect(atom/A) + var/mob/living/capsulehit = A + capsulehit.resize(sizetouse) + sizetouse = rand(25,200)/100 //randmization occurs after press /obj/item/buttonofnormal/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/pen)) diff --git a/code/modules/emotes/custom_emote.dm b/code/modules/emotes/custom_emote.dm index 1ccd078ec1..e02afa3d50 100644 --- a/code/modules/emotes/custom_emote.dm +++ b/code/modules/emotes/custom_emote.dm @@ -11,7 +11,7 @@ input = sanitize(tgui_input_text(src,"Choose an emote to display.")) else input = message - process_emote(m_type, message, input, range) + process_normal_emote(m_type, message, input, range) /// This is the custom_emote that you'll want to use if you're forcing something to custom emote with no input from the mob. /// By default, we have a visible message, our range is world.view, and we do NOT check the stat. @@ -19,10 +19,10 @@ if(check_stat && (src && stat)) return var/input = message - process_emote(m_type, message, input, range) + process_automatic_emote(m_type, message, input, range) //The actual meat and potatoes of the emote processing. -/mob/proc/process_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/input, var/range = world.view) +/mob/proc/process_normal_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/input, var/range = world.view) var/list/formatted var/runemessage if(input) @@ -36,56 +36,72 @@ else return + log_the_emote(m_type, message, input, range, runemessage) + +/mob/proc/format_the_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/input, var/range = world.view) + + + +/mob/proc/process_automatic_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/input, var/range = world.view) + var/list/formatted + var/runemessage if(input) - log_emote(message,src) //Log before we add junk - if(client) - message = span_emote(span_bold("[src]") + " [input]") - else - message = span_npc_emote(span_bold("[src]") + " [input]") + formatted = format_emote(src, message) + if(!islist(formatted)) + return + message = formatted["pretext"] + formatted["nametext"] + formatted["subtext"] + runemessage = formatted["subtext"] + // This is just personal preference (but I'm objectively right) that custom emotes shouldn't have periods at the end in runechat + runemessage = replacetext(runemessage,".","",length(runemessage),length(runemessage)+1) else return + build_the_emote(m_type, message, input, range, runemessage) + +/mob/proc/log_the_emote(m_type, message, input, range, runemessage) + log_emote(message,src) //Log before we add junk + build_the_emote(m_type, message, input, range, runemessage) + +/mob/proc/build_the_emote(m_type, message, input, range, runemessage) + if(client) + message = span_emote(span_bold("[src]") + " [input]") + else + message = span_npc_emote(span_bold("[src]") + " [input]") + if(message) - message = encode_html_emphasis(message) + send_the_emote(m_type, message, input, range, runemessage) - /* CHOMPRemove - Not needed if you set your defaults right - var/ourfreq = null - if(isliving(src)) - var/mob/living/L = src - if(L.voice_freq > 0 ) - ourfreq = L.voice_freq - */ +/mob/proc/send_the_emote(m_type, message, input, range, runemessage) - // Hearing gasp and such every five seconds is not good emotes were not global for a reason. - // Maybe some people are okay with that. - var/turf/T = get_turf(src) + message = encode_html_emphasis(message) + var/turf/T = get_turf(src) - if(!T) return + if(!T) return - if(client) - playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = voice_freq, ignore_walls = TRUE, preference = /datum/preference/toggle/emote_sounds) //CHOMPEdit - use say prefs instead //ChompEDIT - also ignore walls + if(client) + playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = voice_freq, ignore_walls = TRUE, preference = /datum/preference/toggle/emote_sounds) //CHOMPEdit - use say prefs instead //ChompEDIT - also ignore walls - var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE) - var/list/m_viewers = in_range["mobs"] - var/list/o_viewers = in_range["objs"] + var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE) + var/list/m_viewers = in_range["mobs"] + var/list/o_viewers = in_range["objs"] - for(var/mob/M as anything in m_viewers) - if(M) - var/final_message = message - if(isobserver(M)) - final_message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]") - if(src.client && M && !(get_z(src) == get_z(M))) - final_message = span_multizsay("[final_message]") - // If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind - if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M))) - M.show_message(final_message) - else - M.show_message(final_message, m_type) - M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE)) + for(var/mob/M as anything in m_viewers) + if(M) + var/final_message = message + if(isobserver(M)) + final_message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]") + if(src.client && M && !(get_z(src) == get_z(M))) + final_message = span_multizsay("[final_message]") + // If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind + if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M))) + M.show_message(final_message) + else + M.show_message(final_message, m_type) + M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE)) - for(var/obj/O as anything in o_viewers) - if(O) - var/final_message = message - if(src.client && O && !(get_z(src) == get_z(O))) - final_message = span_multizsay("[final_message]") - O.see_emote(src, final_message, m_type) + for(var/obj/O as anything in o_viewers) + if(O) + var/final_message = message + if(src.client && O && !(get_z(src) == get_z(O))) + final_message = span_multizsay("[final_message]") + O.see_emote(src, final_message, m_type) diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index 3e36c8140c..ee56806aee 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -108,12 +108,16 @@ return INITIALIZE_HINT_QDEL humanform = H - updatehealth() + calculate_health() /mob/living/simple_mob/slime/promethean/updatehealth() if(!humanform) return ..() + calculate_health() + if((stat < DEAD) && (health <= 0)) + death() +/mob/living/simple_mob/slime/promethean/proc/calculate_health() //Set the max maxHealth = humanform.getMaxHealth()*2 //HUMANS, and their 'double health', bleh. //Set us to their health, but, human health ignores robolimbs so we do it 'the hard way' @@ -121,10 +125,6 @@ human_burn = humanform.getActualFireLoss() health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - human_brute - human_burn - //Alive, becoming dead - if((stat < DEAD) && (health <= 0)) - death() - //Overhealth if(health > getMaxHealth()) health = getMaxHealth() diff --git a/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm index b35af674b7..40a2c62041 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean/protean_blob.dm @@ -75,7 +75,7 @@ return INITIALIZE_HINT_QDEL humanform = H - updatehealth() + calculate_health() refactory = locate() in humanform.internal_organs // add_verb(src,/mob/living/proc/ventcrawl) // CHOMPRemove add_verb(src,/mob/living/proc/usehardsuit) @@ -207,19 +207,21 @@ return if(humanform.nano_dead_check(src)) return + calculate_health() + //Alive, becoming dead + if((stat < DEAD) && (health <= 0)) + humanform.death() +/mob/living/simple_mob/protean_blob/proc/calculate_health() //Set the max maxHealth = humanform.getMaxHealth()*2 //HUMANS, and their 'double health', bleh. human_brute = humanform.getActualBruteLoss() human_burn = humanform.getActualFireLoss() health = maxHealth - humanform.getOxyLoss() - humanform.getToxLoss() - humanform.getCloneLoss() - humanform.getBruteLoss() - humanform.getFireLoss() - //Alive, becoming dead - if((stat < DEAD) && (health <= 0)) - humanform.death() - nutrition = humanform.nutrition + //Overhealth if(health > getMaxHealth()) health = getMaxHealth() diff --git a/modular_chomp/maps/submaps/surface_submaps/wilderness/frostoasis.dmm b/modular_chomp/maps/submaps/surface_submaps/wilderness/frostoasis.dmm index 3847a3238e..56c46c1231 100644 --- a/modular_chomp/maps/submaps/surface_submaps/wilderness/frostoasis.dmm +++ b/modular_chomp/maps/submaps/surface_submaps/wilderness/frostoasis.dmm @@ -2,14 +2,14 @@ "am" = ( /obj/random/obstruction, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "bB" = ( /obj/structure/closet/cabinet, /obj/item/stolenpackage, /obj/item/stolenpackage, /obj/item/storage/belt/holding, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "cm" = ( /obj/effect/decal/cleanable/dirt, @@ -27,9 +27,7 @@ "fh" = ( /obj/effect/floor_decal/stairs/wood_stairs, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/outdoors/dirt{ - outdoors = 0 - }, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "fj" = ( /turf/simulated/floor/outdoors/ice, @@ -51,7 +49,7 @@ /obj/item/flame/candle/candelabra/everburn{ pixel_y = 7 }, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "jN" = ( /mob/living/simple_mob/animal/sif/glitterfly{ @@ -63,7 +61,7 @@ "kr" = ( /obj/item/a_gift, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "ll" = ( /obj/random/obstruction, @@ -135,7 +133,7 @@ "tv" = ( /obj/item/a_gift, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "tT" = ( /obj/effect/landmark/loot_spawn, @@ -156,7 +154,7 @@ "vK" = ( /obj/item/a_gift, /obj/item/clothing/ears/earring/dangle/glass, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "xI" = ( /turf/simulated/floor/outdoors/dirt{ @@ -168,7 +166,7 @@ /turf/simulated/floor/outdoors/snow, /area/submap/FrostOasis) "zI" = ( -/turf/simulated/wall/sifwood, +/turf/simulated/wall/sifwood/turfpack/sif, /area/submap/FrostOasis) "Aj" = ( /mob/living/simple_mob/animal/sif/savik{ @@ -191,7 +189,7 @@ "EW" = ( /obj/structure/table/standard, /obj/item/gift, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "Fl" = ( /obj/structure/curtain/open/bed, @@ -209,7 +207,7 @@ /obj/structure/window/reinforced/tinted/frosted{ dir = 4 }, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "It" = ( /obj/effect/decal/cleanable/dirt, @@ -222,7 +220,7 @@ /obj/item/a_gift, /obj/random/junk, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "Ka" = ( /obj/random/obstruction, @@ -283,7 +281,7 @@ /obj/structure/table/bench/padded, /obj/random/junk, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/wood, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "TD" = ( /obj/structure/flora/tree/winter, @@ -297,13 +295,11 @@ /area/submap/FrostOasis) "Vz" = ( /obj/random/obstruction, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "Wk" = ( /obj/effect/floor_decal/stairs/wood_stairs, -/turf/simulated/floor/outdoors/dirt{ - outdoors = 0 - }, +/turf/simulated/floor/wood/turfpack/sif, /area/submap/FrostOasis) "Xf" = ( /obj/effect/decal/cleanable/dirt, @@ -316,7 +312,7 @@ faction = "diyaab" }, /obj/effect/decal/cleanable/dirt, -/turf/simulated/floor/wood/broken, +/turf/simulated/floor/wood/broken/turfpack/sif, /area/submap/FrostOasis) "ZD" = ( /obj/structure/flora/grass/brown, diff --git a/modular_chomp/maps/~turfpacks/unsim_turfs/unsim_turfs_outdoors.dm b/modular_chomp/maps/~turfpacks/unsim_turfs/unsim_turfs_outdoors.dm index 92279392af..bae3f5de1b 100644 --- a/modular_chomp/maps/~turfpacks/unsim_turfs/unsim_turfs_outdoors.dm +++ b/modular_chomp/maps/~turfpacks/unsim_turfs/unsim_turfs_outdoors.dm @@ -108,7 +108,9 @@ desc = "Dark rock that has been smoothened to be perfectly even. It's coated in a layer of slippey ice" /turf/unsimulated/floor/outdoors/ice/Entered(var/mob/living/M) - sleep(1 * world.tick_lag) + addtimer(CALLBACK(src, PROC_REF(do_slip), M), (1 * world.tick_lag), TIMER_DELETE_ME) + +/turf/unsimulated/floor/outdoors/ice/proc/do_slip(var/mob/living/M) if(istype(M, /mob/living)) if(M.stunned == 0) to_chat(M, span_warning("You slide across the ice!")) diff --git a/vorestation.dme b/vorestation.dme index 485924ea7f..eebfc7b8d5 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -425,6 +425,7 @@ #include "code\controllers\subsystems\planets.dm" #include "code\controllers\subsystems\plants.dm" #include "code\controllers\subsystems\player_tips.dm" +#include "code\controllers\subsystems\pois.dm" #include "code\controllers\subsystems\radiation.dm" #include "code\controllers\subsystems\reflect_ch.dm" #include "code\controllers\subsystems\robot_sprites.dm"