Merge remote-tracking branch 'upstream/master' into wires-tgui

This commit is contained in:
SteelSlayer
2020-09-14 08:51:32 -05:00
236 changed files with 8002 additions and 1576 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
if(!(flags & CALTROP_BYPASS_SHOES) && (H.shoes || feetCover))
return
if((H.flying) || H.buckled)
if(H.flying || H.floating || H.buckled)
return
var/damage = rand(min_damage, max_damage)
+1 -1
View File
@@ -51,6 +51,6 @@
Additionally calls the parent's `after_slip()` proc on the `victim`.
*/
/datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim)
if(istype(victim) && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
if(istype(victim) && !victim.flying && prob(slip_chance) && victim.slip(description, stun, weaken, slip_tiles, walking_is_safe, slip_always, slip_verb))
var/atom/movable/owner = parent
owner.after_slip(victim)
+8
View File
@@ -67,6 +67,14 @@
var/obj/item/projectile/P = AM
if(P.original != parent)
return
if(ismob(AM))
var/mob/M = AM
if(M.flying)
return
if(isliving(AM))
var/mob/living/L = M
if(L.floating)
return
var/atom/current_parent = parent
if(isturf(current_parent.loc))
play_squeak()
+8 -4
View File
@@ -3,8 +3,8 @@
var/raw_time // When did this happen?
var/what // What happened
var/who // Who did it
var/target // Who/what was targeted (can be a string)
var/turf/where // Where did it happen
var/target // Who/what was targeted
var/where // Where did it happen
/datum/log_record/New(_log_type, _who, _what, _target, _where, _raw_time)
log_type = _log_type
@@ -12,9 +12,13 @@
who = get_subject_text(_who, _log_type)
what = _what
target = get_subject_text(_target, _log_type)
if(!_where)
if(!istext(_where) && !isturf(_where))
_where = get_turf(_who)
where = _where
if(isturf(_where))
var/turf/T = _where
where = ADMIN_COORDJMP(T)
else
where = _where
if(!_raw_time)
_raw_time = world.time
raw_time = _raw_time
+26 -9
View File
@@ -4,6 +4,9 @@ if(!result || result.ckey != __ckey){\
selected_ckeys_mobs[__ckey] = result;\
}
#define RECORD_WARN_LIMIT 1000
#define RECORD_HARD_LIMIT 2500
/datum/log_viewer
var/time_from = 0
var/time_to = 4 HOURS // 4 Hours should be enough. INFINITY would screw the UI up
@@ -23,7 +26,7 @@ if(!result || result.ckey != __ckey){\
log_records.Cut()
return
/datum/log_viewer/proc/search()
/datum/log_viewer/proc/search(user)
log_records.Cut() // Empty the old results
var/list/invalid_mobs = list()
var/list/ckeys = selected_ckeys.Copy()
@@ -47,8 +50,8 @@ if(!result || result.ckey != __ckey){\
continue
log_records.Add(logs.Copy(start_index, end_index + 1))
if(invalid_mobs.len)
to_chat(usr, "<span class='warning'>The search criteria contained invalid mobs. They have been removed from the criteria.</span>")
if(length(invalid_mobs))
to_chat(user, "<span class='warning'>The search criteria contained invalid mobs. They have been removed from the criteria.</span>")
for(var/i in invalid_mobs)
selected_mobs -= i // Cleanup
@@ -103,13 +106,13 @@ if(!result || result.ckey != __ckey){\
return 0
/datum/log_viewer/proc/add_mobs(list/mob/mobs)
if(!mobs?.len)
if(!length(mobs))
return
for(var/i in mobs)
add_mob(usr, i, FALSE)
/datum/log_viewer/proc/add_ckey(mob/user, ckey)
if(!user || !user)
if(!user || !ckey)
return
selected_ckeys |= ckey
UPDATE_CKEY_MOB(ckey)
@@ -127,7 +130,7 @@ if(!result || result.ckey != __ckey){\
var/all_log_types = ALL_LOGS
var/trStyleTop = "border-top:2px solid; border-bottom:2px solid; padding-top: 5px; padding-bottom: 5px;"
var/trStyle = "border-top:1px solid; border-bottom:1px solid; padding-top: 5px; padding-bottom: 5px;"
var/dat
var/list/dat = list()
dat += "<head><meta http-equiv='X-UA-Compatible' content='IE=edge'><style>.adminticket{border:2px solid} td{border:1px solid grey;} th{border:1px solid grey;} span{float:left;width:150px;}</style></head>"
dat += "<div style='min-height:100px'>"
dat += "<span>Time Search Range:</span> <a href='?src=[UID()];start_time=1'>[gameTimestamp(wtime = time_from)]</a>"
@@ -184,13 +187,12 @@ if(!result || result.ckey != __ckey){\
dat +="<tr style='[trStyle]'><td style='[tdStyleTime]'>[time]</td><td style='[tdStyleType]background: [get_logtype_color(L.log_type)]'>[L.log_type]</td>\
<td style='[tdStyleWho]'>[L.who]</td><td style='background: [get_logtype_color(L.log_type)];'>[L.what]</td>\
<td style='[tdStyleWho]'>[L.target]</td><td style='[tdStyleWhere]'>[ADMIN_COORDJMP(L.where)]</td></tr>"
<td style='[tdStyleWho]'>[L.target]</td><td style='[tdStyleWhere]'>[L.where]</td></tr>"
dat += "</table>"
dat += "</div>"
var/datum/browser/popup = new(user, "Log Viewer", "Log Viewer", 1500, 600)
popup.set_content(dat)
popup.set_content(dat.Join())
popup.open()
/datum/log_viewer/Topic(href, href_list)
@@ -219,6 +221,19 @@ if(!result || result.ckey != __ckey){\
return
if(href_list["search"])
search(usr)
var/records_len = length(log_records)
if(records_len > RECORD_WARN_LIMIT)
var/datum/log_record/last_record = log_records[RECORD_WARN_LIMIT]
var/last_time = gameTimestamp(wtime = last_record.raw_time - 9.99)
var/answer = alert(usr, "More than [RECORD_WARN_LIMIT] records were found. continuing will take a long time. This won't cause much lag for the server. Time at the [RECORD_WARN_LIMIT]th record '[last_time]'", "Warning", "Continue", "Limit to [RECORD_WARN_LIMIT]", "Cancel")
if(answer == "Limit to [RECORD_WARN_LIMIT]")
log_records.Cut(RECORD_WARN_LIMIT)
else if(answer == "Cancel")
log_records.Cut()
else
if(records_len > RECORD_HARD_LIMIT)
to_chat(usr, "<span class='warning'>Record limit reached. Limiting to [RECORD_HARD_LIMIT].</span>")
log_records.Cut(RECORD_HARD_LIMIT)
show_ui(usr)
return
if(href_list["clear_all"])
@@ -300,3 +315,5 @@ if(!result || result.ckey != __ckey){\
return get_display_name(M)
#undef UPDATE_CKEY_MOB
#undef RECORD_WARN_LIMIT
#undef RECORD_HARD_LIMIT
+26
View File
@@ -248,3 +248,29 @@
allow_duplicates = FALSE // I dont even want to think about what happens if you have 2 shuttles with the same ID. Likely scary stuff.
always_place = TRUE // Its designed to make exploring other space ruins more accessible
cost = 0 // Force spawned so shouldnt have a cost
/datum/map_template/ruin/space/syndiecakesfactory
id = "Syndiecakes Factory"
suffix = "syndiecakesfactory.dmm"
name = "Syndicakes Factory"
description = "Syndicate used to get funds selling corgi cakes produced here. Was it hit by meteors or by a Nanotrasen comando?"
allow_duplicates = FALSE
cost = 2 //telecomms + multiple mobs
/datum/map_template/ruin/space/debris1
id = "debris1"
suffix = "debris1.dmm"
name = "Debris field 1"
description = "A bunch of metal chunks, wires and space waste"
/datum/map_template/ruin/space/debris2
id = "debris2"
suffix = "debris2.dmm"
name = "Debris field 2"
description = "A bunch of metal chunks, wires and space waste that used to be some kind of secure storage facility"
/datum/map_template/ruin/space/debris3
id = "debris3"
suffix = "debris3.dmm"
name = "Debris field 3"
description = "A bunch of metal chunks, wires and space waste. It used to be an arcade."
+5
View File
@@ -133,3 +133,8 @@
suffix = "admin"
name = "NTV Argos"
description = "Default Admin ship. An older ship used for special operations."
/datum/map_template/shuttle/admin/armory
suffix = "armory"
name = "NRV Sparta"
description = "Armory Shuttle, with plenty of guns to hand out and some general supplies."
+2 -3
View File
@@ -1173,11 +1173,10 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY
containername = "fox crate"
/datum/supply_packs/organic/butterfly
name = "Butterflies Crate"
name = "Butterfly Crate"
cost = 50
containertype = /obj/structure/closet/critter/butterfly
containername = "butterflies crate"
contraband = 1
containername = "butterfly crate"
/datum/supply_packs/organic/deer
name = "Deer Crate"
+2 -2
View File
@@ -1725,8 +1725,8 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
U.purchase_log += "<BIG>[bicon(C)]</BIG>"
for(var/item in bought_items)
new item(C)
U.purchase_log += "<BIG>[bicon(item)]</BIG>"
var/obj/purchased = new item(C)
U.purchase_log += "<BIG>[bicon(purchased)]</BIG>"
log_game("[key_name(usr)] purchased a surplus crate with [jointext(itemlog, ", ")]")
/datum/uplink_item/bundles_TC/telecrystal
@@ -35,6 +35,8 @@
return
if(!L.client) //Only sentient people are going along with it!
return
if(L.flying)
return
L.adjustFireLoss(3)
/datum/weather/floor_is_lava/fake
+4 -4
View File
@@ -47,8 +47,8 @@
A.apply_mode()
if(WIRE_AALARM)
if(A.alarm_area.atmosalert(2, A))
A.post_alert(2)
if(A.alarm_area.atmosalert(ATMOS_ALARM_DANGER, A))
A.post_alert(ATMOS_ALARM_DANGER)
A.update_icon()
..()
@@ -85,7 +85,7 @@
A.apply_mode()
if(WIRE_AALARM)
if(A.alarm_area.atmosalert(0, A))
A.post_alert(0)
if(A.alarm_area.atmosalert(ATMOS_ALARM_NONE, A))
A.post_alert(ATMOS_ALARM_NONE)
A.update_icon()
..()