Merge pull request #2580 from Citadel-Station-13/MirrorF
Manual Mirror of missed PRs
This commit is contained in:
+10
-3
@@ -315,9 +315,16 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define APPEARANCE_CONSIDER_ALPHA ~RESET_ALPHA
|
||||
#define APPEARANCE_LONG_GLIDE LONG_GLIDE
|
||||
|
||||
// Consider these images/atoms as part of the UI/HUD
|
||||
#define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA
|
||||
#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR
|
||||
#ifndef PIXEL_SCALE
|
||||
#define PIXEL_SCALE 0
|
||||
#if DM_VERSION >= 512
|
||||
#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Consider these images/atoms as part of the UI/HUD
|
||||
#define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE
|
||||
#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR
|
||||
|
||||
//Just space
|
||||
#define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||
|
||||
+14
-15
@@ -25,7 +25,7 @@
|
||||
* If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
|
||||
* Passing through in this case ignores anything with the LETPASSTHROW pass flag, such as tables, racks, and morgue trays.
|
||||
*/
|
||||
/turf/Adjacent(atom/neighbor, atom/target = null, atom/movable/mover = null)
|
||||
/turf/Adjacent(atom/neighbor, atom/target = null, atom/movable/mover = null)
|
||||
var/turf/T0 = get_turf(neighbor)
|
||||
|
||||
if(T0 == src) //same turf
|
||||
@@ -37,7 +37,7 @@
|
||||
// Non diagonal case
|
||||
if(T0.x == x || T0.y == y)
|
||||
// Check for border blockages
|
||||
return T0.ClickCross(get_dir(T0,src), border_only = 1, target_atom = target, mover = mover) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, mover = mover)
|
||||
return T0.ClickCross(get_dir(T0,src), border_only = 1, target_atom = target, mover = mover) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, mover = mover)
|
||||
|
||||
// Diagonal case
|
||||
var/in_dir = get_dir(T0,src) // eg. northwest (1+8) = 9 (00001001)
|
||||
@@ -45,16 +45,16 @@
|
||||
var/d2 = in_dir&12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000)
|
||||
|
||||
for(var/d in list(d1,d2))
|
||||
if(!T0.ClickCross(d, border_only = 1, target_atom = target, mover = mover))
|
||||
if(!T0.ClickCross(d, border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not leave T0 in that direction
|
||||
|
||||
var/turf/T1 = get_step(T0,d)
|
||||
if(!T1 || T1.density)
|
||||
continue
|
||||
if(!T1.ClickCross(get_dir(T1,src), border_only = 0, target_atom = target, mover = mover) || !T1.ClickCross(get_dir(T1,T0), border_only = 0, target_atom = target, mover = mover))
|
||||
if(!T1 || T1.density)
|
||||
continue
|
||||
if(!T1.ClickCross(get_dir(T1,src), border_only = 0, target_atom = target, mover = mover) || !T1.ClickCross(get_dir(T1,T0), border_only = 0, target_atom = target, mover = mover))
|
||||
continue // couldn't enter or couldn't leave T1
|
||||
|
||||
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
|
||||
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not enter src
|
||||
|
||||
return 1 // we don't care about our own density
|
||||
@@ -70,7 +70,7 @@
|
||||
return TRUE
|
||||
if(!isturf(loc))
|
||||
return FALSE
|
||||
if(loc.Adjacent(neighbor,target = neighbor, mover = src))
|
||||
if(loc.Adjacent(neighbor,target = neighbor, mover = src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -85,20 +85,19 @@
|
||||
|
||||
/*
|
||||
This checks if you there is uninterrupted airspace between that turf and this one.
|
||||
This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW.
|
||||
This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW.
|
||||
The border_only flag allows you to not objects (for source and destination squares)
|
||||
*/
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null)
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null)
|
||||
for(var/obj/O in src)
|
||||
if((mover && O.CanPass(mover,get_step(src,target_dir))) || (!mover && !O.density))
|
||||
continue
|
||||
if(O == target_atom || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf
|
||||
if((mover && O.CanPass(mover,get_step(src,target_dir))) || (!mover && !O.density))
|
||||
continue
|
||||
if(O == target_atom || O == mover || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf
|
||||
continue // LETPASSTHROW is used for anything you can click through (or the firedoor special case, see above)
|
||||
|
||||
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
|
||||
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
|
||||
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
|
||||
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
|
||||
|
||||
else if( !border_only ) // dense, not on border, cannot pass over
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -26,7 +26,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/savefile/secret_satchels = new /savefile("data/npc_saves/SecretSatchels.sav")
|
||||
var/sav_text
|
||||
secret_satchels[SSmapping.config.map_name] >> sav_text
|
||||
fdel(secret_satchels)
|
||||
fdel("data/npc_saves/SecretSatchels.sav")
|
||||
if(sav_text)
|
||||
old_secret_satchels = splittext(sav_text,"#")
|
||||
if(old_secret_satchels.len >= 20)
|
||||
@@ -79,7 +79,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
if(!saved_json)
|
||||
return
|
||||
saved_messages = json_decode(saved_json)
|
||||
fdel(chisel_messages_sav)
|
||||
fdel("data/npc_saves/ChiselMessages.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json")
|
||||
if(!fexists(json_file))
|
||||
@@ -124,7 +124,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
if(!saved_json)
|
||||
return
|
||||
saved_trophies = json_decode(saved_json)
|
||||
fdel(S)
|
||||
fdel("data/npc_saves/TrophyItems.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/TrophyItems.json")
|
||||
if(!fexists(json_file))
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
|
||||
#ifndef PIXEL_SCALE
|
||||
#define PIXEL_SCALE 0
|
||||
#if DM_VERSION >= 512
|
||||
#error HEY, PIXEL_SCALE probably exists now, remove this gross ass shim.
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/atom/movable
|
||||
layer = OBJ_LAYER
|
||||
var/last_move = null
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
target = safepick(view(3,target))
|
||||
if(!target)
|
||||
return
|
||||
if(!target.Adjacent(src))
|
||||
if(!Adjacent(target))
|
||||
if(selected && selected.is_ranged())
|
||||
if(selected.action(target,params))
|
||||
selected.start_cooldown()
|
||||
|
||||
+4
-1
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
/atom/movable/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE)
|
||||
//This proc uses text() because it is faster than appending strings. Thanks BYOND.
|
||||
//Basic span
|
||||
var/spanpart1 = "<span class='[radio_freq ? get_radio_span(radio_freq) : "game say"]'>"
|
||||
@@ -54,6 +54,9 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
var/freqpart = radio_freq ? "\[[get_radio_name(radio_freq)]\] " : ""
|
||||
//Speaker name
|
||||
var/namepart = "[speaker.GetVoice()][speaker.get_alt_name()]"
|
||||
if(face_name && ishuman(speaker))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
namepart = "[H.get_face_name()]" //So "fake" speaking like in hallucinations does not give the speaker away if disguised
|
||||
//End name span.
|
||||
var/endspanpart = "</span>"
|
||||
|
||||
|
||||
@@ -759,7 +759,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
||||
people += H
|
||||
if(person) //Basic talk
|
||||
var/image/speech_overlay = image('icons/mob/talk.dmi', person, "default0", layer = ABOVE_MOB_LAYER)
|
||||
var/message = target.compose_message(person,understood_language,pick(speak_messages),null,person.get_spans())
|
||||
var/message = target.compose_message(person,understood_language,pick(speak_messages),null,person.get_spans(),face_name = TRUE)
|
||||
feedback_details += "Type: Talk, Source: [person.real_name], Message: [message]"
|
||||
to_chat(target, message)
|
||||
if(target.client)
|
||||
@@ -771,7 +771,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
humans += H
|
||||
person = pick(humans)
|
||||
var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans())
|
||||
var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans(),face_name = TRUE)
|
||||
feedback_details += "Type: Radio, Source: [person.real_name], Message: [message]"
|
||||
to_chat(target, message)
|
||||
qdel(src)
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/punpun/proc/Read_Memory()
|
||||
if(fexists("data/npc_saves/Punpun.sav"))
|
||||
if(fexists("data/npc_saves/Punpun.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
|
||||
S["ancestor_name"] >> ancestor_name
|
||||
S["ancestor_chain"] >> ancestor_chain
|
||||
S["relic_hat"] >> relic_hat
|
||||
S["relic_mask"] >> relic_mask
|
||||
fdel(S)
|
||||
fdel("data/npc_saves/Punpun.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Punpun.json")
|
||||
if(!fexists(json_file))
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if(fexists("data/npc_saves/Runtime.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Runtime.sav")
|
||||
S["family"] >> family
|
||||
fdel(S)
|
||||
fdel("data/npc_saves/Runtime.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Runtime.json")
|
||||
if(!fexists(json_file))
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
S["age"] >> age
|
||||
S["record_age"] >> record_age
|
||||
S["saved_head"] >> saved_head
|
||||
fdel(S)
|
||||
fdel("data/npc_saves/Ian.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Ian.json")
|
||||
if(!fexists(json_file))
|
||||
|
||||
@@ -292,7 +292,7 @@ Difficulty: Very Hard
|
||||
if(fexists("data/npc_saves/Blackbox.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Blackbox.sav")
|
||||
S["stored_items"] >> stored_items
|
||||
fdel(S)
|
||||
fdel("data/npc_saves/Blackbox.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Blackbox.json")
|
||||
if(!fexists(json_file))
|
||||
|
||||
@@ -930,7 +930,7 @@
|
||||
S["roundssurvived"] >> rounds_survived
|
||||
S["longestsurvival"] >> longest_survival
|
||||
S["longestdeathstreak"] >> longest_deathstreak
|
||||
fdel(S)
|
||||
fdel("data/npc_saves/Poly.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Poly.json")
|
||||
if(!fexists(json_file))
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
if(active)
|
||||
for(var/obj/item/I in owner.held_items)
|
||||
if(!(I.flags_1 & NODROP_1))
|
||||
flags_1 += I
|
||||
stored_items += I
|
||||
|
||||
var/list/L = owner.get_empty_held_indexes()
|
||||
if(LAZYLEN(L) == owner.held_items.len)
|
||||
|
||||
Reference in New Issue
Block a user