mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Merge remote-tracking branch 'upstream/master' into SPIN_ME_RIGHT_ROUND
# Conflicts: # paradise.dme
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
|
||||
/datum/autopsy_data
|
||||
var/weapon = null
|
||||
var/pretend_weapon = null
|
||||
var/damage = 0
|
||||
var/hits = 0
|
||||
var/time_inflicted = 0
|
||||
@@ -35,44 +34,35 @@
|
||||
/datum/autopsy_data/proc/copy()
|
||||
var/datum/autopsy_data/W = new()
|
||||
W.weapon = weapon
|
||||
W.pretend_weapon = pretend_weapon
|
||||
W.damage = damage
|
||||
W.hits = hits
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
|
||||
/obj/item/autopsy_scanner/proc/add_data(obj/item/organ/external/O)
|
||||
if(!O.autopsy_data.len && !O.trace_chemicals.len)
|
||||
return
|
||||
/obj/item/autopsy_scanner/proc/add_data(obj/item/organ/O)
|
||||
if(O.autopsy_data.len)
|
||||
for(var/V in O.autopsy_data)
|
||||
var/datum/autopsy_data/W = O.autopsy_data[V]
|
||||
|
||||
for(var/V in O.autopsy_data)
|
||||
var/datum/autopsy_data/W = O.autopsy_data[V]
|
||||
var/datum/autopsy_data_scanner/D = wdata[V]
|
||||
if(!D)
|
||||
D = new()
|
||||
D.weapon = W.weapon
|
||||
wdata[V] = D
|
||||
|
||||
if(!W.pretend_weapon)
|
||||
if(1)
|
||||
W.pretend_weapon = W.weapon
|
||||
else
|
||||
W.pretend_weapon = pick("mechanical toolbox", "wirecutters", "revolver", "crowbar", "fire extinguisher", "tomato soup", "oxygen tank", "emergency oxygen tank", "laser", "bullet")
|
||||
if(!D.organs_scanned[O.name])
|
||||
if(D.organ_names == "")
|
||||
D.organ_names = O.name
|
||||
else
|
||||
D.organ_names += ", [O.name]"
|
||||
|
||||
qdel(D.organs_scanned[O.name])
|
||||
D.organs_scanned[O.name] = W.copy()
|
||||
|
||||
var/datum/autopsy_data_scanner/D = wdata[V]
|
||||
if(!D)
|
||||
D = new()
|
||||
D.weapon = W.weapon
|
||||
wdata[V] = D
|
||||
|
||||
if(!D.organs_scanned[O.name])
|
||||
if(D.organ_names == "")
|
||||
D.organ_names = O.name
|
||||
else
|
||||
D.organ_names += ", [O.name]"
|
||||
|
||||
qdel(D.organs_scanned[O.name])
|
||||
D.organs_scanned[O.name] = W.copy()
|
||||
|
||||
for(var/V in O.trace_chemicals)
|
||||
if(O.trace_chemicals[V] > 0 && !chemtraces.Find(V))
|
||||
chemtraces += V
|
||||
if(O.trace_chemicals.len)
|
||||
for(var/V in O.trace_chemicals)
|
||||
if(O.trace_chemicals[V] > 0 && !chemtraces.Find(V))
|
||||
chemtraces += V
|
||||
|
||||
/obj/item/autopsy_scanner/attackby(obj/item/P, mob/user)
|
||||
if(istype(P, /obj/item/pen))
|
||||
@@ -90,71 +80,55 @@
|
||||
user.put_in_hands(R)
|
||||
|
||||
/obj/item/autopsy_scanner/attack_self(mob/user)
|
||||
if(!wdata.len && !chemtraces.len)
|
||||
return
|
||||
|
||||
var/scan_data = ""
|
||||
|
||||
if(timeofdeath)
|
||||
scan_data += "<b>Time of death:</b> [station_time_timestamp("hh:mm:ss", timeofdeath)]<br><br>"
|
||||
else
|
||||
scan_data += "<b>Time of death:</b> Unknown / Still alive<br><br>"
|
||||
|
||||
var/n = 1
|
||||
for(var/wdata_idx in wdata)
|
||||
var/datum/autopsy_data_scanner/D = wdata[wdata_idx]
|
||||
var/total_hits = 0
|
||||
var/total_score = 0
|
||||
var/list/weapon_chances = list() // maps weapon names to a score
|
||||
var/age = 0
|
||||
if(wdata.len)
|
||||
var/n = 1
|
||||
for(var/wdata_idx in wdata)
|
||||
var/datum/autopsy_data_scanner/D = wdata[wdata_idx]
|
||||
var/total_hits = 0
|
||||
var/total_score = 0
|
||||
var/age = 0
|
||||
|
||||
for(var/wound_idx in D.organs_scanned)
|
||||
var/datum/autopsy_data/W = D.organs_scanned[wound_idx]
|
||||
total_hits += W.hits
|
||||
|
||||
var/wname = W.pretend_weapon
|
||||
|
||||
if(wname in weapon_chances)
|
||||
weapon_chances[wname] += W.damage
|
||||
else
|
||||
weapon_chances[wname] = max(W.damage, 1)
|
||||
total_score+=W.damage
|
||||
for(var/wound_idx in D.organs_scanned)
|
||||
var/datum/autopsy_data/W = D.organs_scanned[wound_idx]
|
||||
total_hits += W.hits
|
||||
total_score+=W.damage
|
||||
|
||||
|
||||
var/wound_age = W.time_inflicted
|
||||
age = max(age, wound_age)
|
||||
var/wound_age = W.time_inflicted
|
||||
age = max(age, wound_age)
|
||||
|
||||
var/damage_desc
|
||||
var/damage_desc
|
||||
// total score happens to be the total damage
|
||||
switch(total_score)
|
||||
if(1 to 5)
|
||||
damage_desc = "<font color='green'>negligible</font>"
|
||||
if(5 to 15)
|
||||
damage_desc = "<font color='green'>light</font>"
|
||||
if(15 to 30)
|
||||
damage_desc = "<font color='orange'>moderate</font>"
|
||||
if(30 to 1000)
|
||||
damage_desc = "<font color='red'>severe</font>"
|
||||
else
|
||||
damage_desc = "Unknown"
|
||||
|
||||
var/damaging_weapon = (total_score != 0)
|
||||
var/damaging_weapon = (total_score != 0)
|
||||
scan_data += "<b>Weapon #[n]</b><br>"
|
||||
if(damaging_weapon)
|
||||
scan_data += "Severity: [damage_desc]<br>"
|
||||
scan_data += "Hits by weapon: [total_hits]<br>"
|
||||
scan_data += "Approximate time of wound infliction: [station_time_timestamp("hh:mm", age)]<br>"
|
||||
scan_data += "Affected limbs: [D.organ_names]<br>"
|
||||
scan_data += "Weapon: [D.weapon]<br>"
|
||||
scan_data += "<br>"
|
||||
|
||||
// total score happens to be the total damage
|
||||
switch(total_score)
|
||||
if(0)
|
||||
damage_desc = "Unknown"
|
||||
if(1 to 5)
|
||||
damage_desc = "<font color='green'>negligible</font>"
|
||||
if(5 to 15)
|
||||
damage_desc = "<font color='green'>light</font>"
|
||||
if(15 to 30)
|
||||
damage_desc = "<font color='orange'>moderate</font>"
|
||||
if(30 to 1000)
|
||||
damage_desc = "<font color='red'>severe</font>"
|
||||
|
||||
if(!total_score)
|
||||
total_score = D.organs_scanned.len
|
||||
|
||||
scan_data += "<b>Weapon #[n]</b><br>"
|
||||
if(damaging_weapon)
|
||||
scan_data += "Severity: [damage_desc]<br>"
|
||||
scan_data += "Hits by weapon: [total_hits]<br>"
|
||||
scan_data += "Approximate time of wound infliction: [station_time_timestamp("hh:mm", age)]<br>"
|
||||
scan_data += "Affected limbs: [D.organ_names]<br>"
|
||||
scan_data += "Possible weapons:<br>"
|
||||
for(var/weapon_name in weapon_chances)
|
||||
scan_data += "\t[100*weapon_chances[weapon_name]/total_score]% [weapon_name]<br>"
|
||||
|
||||
scan_data += "<br>"
|
||||
|
||||
n++
|
||||
n++
|
||||
|
||||
if(chemtraces.len)
|
||||
scan_data += "<b>Trace Chemicals: </b><br>"
|
||||
|
||||
@@ -242,6 +242,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
|
||||
|
||||
var/global/list/datum/stack_recipe/titanium_recipes = list (
|
||||
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20),
|
||||
new/datum/stack_recipe("surgical tray", /obj/structure/table/tray, 2, one_per_turf = 1, on_floor = 1),
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/titanium/New(loc, amount=null)
|
||||
|
||||
@@ -407,6 +407,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_sel.selecting]
|
||||
|
||||
if(!S)
|
||||
return
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/reagent_containers/food/drinks/oilcan(src)
|
||||
new /obj/item/reagent_containers/food/drinks/oilcan(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "research director's locker"
|
||||
|
||||
@@ -70,9 +70,9 @@ FLOOR SAFES
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tum2 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_1_open && turns_total == 1) // You cant hear tumblers if you spin fast!
|
||||
if(tumbler_1_pos == tumbler_1_open && turns_total == 1 && tum1) // You cant hear tumblers if you spin fast!
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>")
|
||||
if(tumbler_2_pos == tumbler_2_open && turns_total == 1 ) // You cant hear tumblers if you spin fast!
|
||||
if(tumbler_2_pos == tumbler_2_open && turns_total == 1 && tum2) // You cant hear tumblers if you spin fast!
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||
if(unlocked)
|
||||
if(user)
|
||||
|
||||
@@ -82,6 +82,10 @@
|
||||
new /obj/structure/table/reinforced/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/do_climb(mob/living/user)
|
||||
. = ..()
|
||||
item_placed(user)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
..()
|
||||
if(climber)
|
||||
@@ -91,6 +95,9 @@
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/item_placed(item)
|
||||
return
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return 1
|
||||
@@ -181,6 +188,7 @@
|
||||
return 0
|
||||
G.affecting.forceMove(get_turf(src))
|
||||
G.affecting.Weaken(2)
|
||||
item_placed(G.affecting)
|
||||
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
|
||||
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
|
||||
add_attack_logs(G.assailant, G.affecting, "Pushed onto a table")
|
||||
@@ -221,6 +229,7 @@
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
item_placed(I)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -545,6 +554,72 @@
|
||||
/obj/structure/table/reinforced/brass/ratvar_act()
|
||||
obj_integrity = max_integrity
|
||||
|
||||
/obj/structure/table/tray
|
||||
name = "surgical tray"
|
||||
desc = "A small metal tray with wheels."
|
||||
anchored = FALSE
|
||||
smooth = SMOOTH_FALSE
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "tray"
|
||||
buildstack = /obj/item/stack/sheet/mineral/titanium
|
||||
buildstackamount = 2
|
||||
var/list/typecache_can_hold = list(/mob, /obj/item)
|
||||
var/list/held_items = list()
|
||||
|
||||
/obj/structure/table/tray/Initialize()
|
||||
. = ..()
|
||||
verbs -= /obj/structure/table/verb/do_flip
|
||||
typecache_can_hold = typecacheof(typecache_can_hold)
|
||||
for(var/atom/movable/held in get_turf(src))
|
||||
if(is_type_in_typecache(held, typecache_can_hold))
|
||||
held_items += held.UID()
|
||||
|
||||
/obj/structure/table/tray/Move(NewLoc, direct)
|
||||
var/atom/OldLoc = loc
|
||||
|
||||
. = ..()
|
||||
if(!.) // ..() will return 0 if we didn't actually move anywhere.
|
||||
return .
|
||||
|
||||
if(direct & (direct - 1)) // This represents a diagonal movement, which is split into multiple cardinal movements. We'll handle moving the items on the cardinals only.
|
||||
return .
|
||||
|
||||
playsound(loc, pick('sound/items/cartwheel1.ogg', 'sound/items/cartwheel2.ogg'), 100, 1, ignore_walls = FALSE)
|
||||
|
||||
var/atom/movable/held
|
||||
for(var/held_uid in held_items)
|
||||
held = locateUID(held_uid)
|
||||
if(!held)
|
||||
held_items -= held_uid
|
||||
continue
|
||||
if(OldLoc != held.loc)
|
||||
held_items -= held_uid
|
||||
continue
|
||||
held.forceMove(NewLoc)
|
||||
|
||||
/obj/structure/table/tray/item_placed(atom/movable/item)
|
||||
. = ..()
|
||||
if(is_type_in_typecache(item, typecache_can_hold))
|
||||
held_items += item.UID()
|
||||
|
||||
/obj/structure/table/tray/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/tray/deconstruction_hints(mob/user)
|
||||
to_chat(user, "<span class='notice'>It is held together by some <b>screws</b> and <b>bolts</b>.</span>")
|
||||
|
||||
/obj/structure/table/tray/flip()
|
||||
return 0
|
||||
|
||||
/obj/structure/table/tray/narsie_act()
|
||||
return 0
|
||||
|
||||
/obj/structure/table/tray/ratvar_act()
|
||||
return 0
|
||||
|
||||
/*
|
||||
* Racks
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user