mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
var/powernet = null
|
||||
var/list/records = null
|
||||
var/frame_desc = null
|
||||
var/contain_parts = 1
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/message_monitor
|
||||
|
||||
@@ -10,8 +10,23 @@
|
||||
var/obj/item/weapon/circuitboard/circuit = null
|
||||
var/list/components = null
|
||||
var/list/req_components = null
|
||||
var/list/req_component_names = null
|
||||
var/state = 1
|
||||
|
||||
proc/update_desc()
|
||||
var/D
|
||||
if(req_components)
|
||||
D = "Requires "
|
||||
var/first = 1
|
||||
for(var/I in req_components)
|
||||
if(req_components[I] > 0)
|
||||
D += "[first?"":", "][num2text(req_components[I])] [req_component_names[I]]"
|
||||
first = 0
|
||||
if(first) // nothing needs to be added, then
|
||||
D += "nothing"
|
||||
D += "."
|
||||
desc = D
|
||||
|
||||
/obj/machinery/constructable_frame/machine_frame
|
||||
attackby(obj/item/P as obj, mob/user as mob)
|
||||
if(P.crit_fail)
|
||||
@@ -29,11 +44,12 @@
|
||||
user << "\blue You add cables to the frame."
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "\blue You dismantle the frame"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
del(src)
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "\blue You dismantle the frame"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
del(src)
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/circuitboard))
|
||||
var/obj/item/weapon/circuitboard/B = P
|
||||
@@ -49,16 +65,26 @@
|
||||
req_components = circuit.req_components.Copy()
|
||||
for(var/A in circuit.req_components)
|
||||
req_components[A] = circuit.req_components[A]
|
||||
if(circuit.frame_desc) desc = circuit.frame_desc
|
||||
req_component_names = circuit.req_components.Copy()
|
||||
for(var/A in req_components)
|
||||
var/cp = text2path(A)
|
||||
var/obj/ct = new cp() // have to quickly instantiate it get name
|
||||
req_component_names[A] = ct.name
|
||||
if(circuit.frame_desc)
|
||||
desc = circuit.frame_desc
|
||||
else
|
||||
update_desc()
|
||||
user << desc
|
||||
else
|
||||
user << "\red This frame does not accept circuit boards of this type!"
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "\blue You remove the cables."
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "\blue You remove the cables."
|
||||
state = 1
|
||||
icon_state = "box_0"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
A.amount = 5
|
||||
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
@@ -76,44 +102,57 @@
|
||||
req_components = null
|
||||
components = null
|
||||
icon_state = "box_1"
|
||||
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
|
||||
for(var/obj/O in new_machine.component_parts)
|
||||
del(O)
|
||||
new_machine.component_parts = list()
|
||||
for(var/obj/O in src)
|
||||
O.loc = new_machine
|
||||
new_machine.component_parts += O
|
||||
circuit.loc = new_machine
|
||||
new_machine.RefreshParts()
|
||||
del(src)
|
||||
|
||||
if(istype(P, /obj/item/weapon))
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CP = P
|
||||
if(CP.amount > 1)
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
|
||||
CC.amount = 1
|
||||
components += CC
|
||||
else
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
if(req_components[R] > 0)
|
||||
component_check = 0
|
||||
break
|
||||
if(component_check)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
|
||||
for(var/obj/O in new_machine.component_parts)
|
||||
del(O)
|
||||
new_machine.component_parts = list()
|
||||
for(var/obj/O in src)
|
||||
if(circuit.contain_parts) // things like disposal don't want their parts in them
|
||||
O.loc = new_machine
|
||||
else
|
||||
O.loc = null
|
||||
new_machine.component_parts += O
|
||||
if(circuit.contain_parts)
|
||||
circuit.loc = new_machine
|
||||
else
|
||||
circuit.loc = null
|
||||
new_machine.RefreshParts()
|
||||
del(src)
|
||||
else
|
||||
if(istype(P, /obj/item/weapon))
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
var/obj/item/weapon/cable_coil/CP = P
|
||||
if(CP.amount > 1)
|
||||
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
|
||||
CC.amount = camt
|
||||
CC.update_icon()
|
||||
CP.use(camt)
|
||||
components += CC
|
||||
req_components[I] -= camt
|
||||
update_desc()
|
||||
break
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
components += P
|
||||
req_components[I]--
|
||||
update_desc()
|
||||
break
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
components += P
|
||||
req_components[I]--
|
||||
break
|
||||
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
|
||||
user << "\red You cannot add that component to the machine!"
|
||||
user << desc
|
||||
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
|
||||
user << "\red You cannot add that component to the machine!"
|
||||
|
||||
|
||||
//Machine Frame Circuit Boards
|
||||
|
||||
@@ -130,6 +130,30 @@ MASS SPECTROMETER
|
||||
user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1)
|
||||
else if (M.getBrainLoss() >= 10)
|
||||
user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.organs_by_name)
|
||||
var/datum/organ/external/e = H.organs_by_name[name]
|
||||
var/limb = e.getDisplayName()
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED)))
|
||||
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
|
||||
for(var/name in H.organs_by_name)
|
||||
var/datum/organ/external/e = H.organs_by_name[name]
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
if(ishuman(M))
|
||||
if(M:vessel)
|
||||
var/blood_volume = round(M:vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
blood_percent *= 100
|
||||
if(blood_volume <= 448)
|
||||
user.show_message("\red <b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl")
|
||||
else if(blood_volume <= 336)
|
||||
user.show_message("\red <b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")
|
||||
else
|
||||
user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -400,11 +400,11 @@ ZIPPO
|
||||
if(istype(src, /obj/item/weapon/lighter/zippo) )
|
||||
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
|
||||
else
|
||||
if(prob(75))
|
||||
if(prob(90))
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
|
||||
user.adjustFireLoss(5)
|
||||
user.adjustFireLoss(2)
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||
|
||||
user.SetLuminosity(user.luminosity + 2)
|
||||
|
||||
@@ -95,8 +95,8 @@
|
||||
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/suit/armor/hos/jensen
|
||||
name = "armored trenchoat"
|
||||
desc = "A trenchoat augmented with a special alloy for some protection and style"
|
||||
name = "armored trenchcoat"
|
||||
desc = "A trenchcoat augmented with a special alloy for some protection and style."
|
||||
icon_state = "jensencoat"
|
||||
item_state = "jensencoat"
|
||||
flags_inv = 0
|
||||
@@ -420,6 +420,8 @@
|
||||
msg += "<span class = 'deptradio'>Criminal status:</span> <a href='?src=\ref[src];criminal=1'>\[[criminal]\]</a>\n"
|
||||
//msg += "\[Set Hostile Identification\]\n"
|
||||
|
||||
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
|
||||
@@ -327,6 +327,31 @@ var/list/slot_equipment_priority = list( \
|
||||
if (popup)
|
||||
memory()
|
||||
|
||||
/mob/proc/update_flavor_text()
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
usr << "No."
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
flavor_text = msg
|
||||
|
||||
/mob/proc/warn_flavor_changed()
|
||||
if(flavor_text && flavor_text != "") // don't spam people that don't use it!
|
||||
src << "<h2 class='alert'>OOC Warning:</h2>"
|
||||
src << "<span class='alert'>Your flavor text is likely out of date! <a href='byond://?src=\ref[src];flavor_change=1'>Change</a></span>"
|
||||
|
||||
/mob/proc/print_flavor_text()
|
||||
if (flavor_text && flavor_text != "")
|
||||
var/msg = dd_replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
return "\blue [msg]"
|
||||
else
|
||||
return "\blue [copytext(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a>"
|
||||
|
||||
/*
|
||||
/mob/verb/help()
|
||||
set name = "Help"
|
||||
@@ -535,6 +560,12 @@ var/list/slot_equipment_priority = list( \
|
||||
var/t1 = text("window=[href_list["mach_close"]]")
|
||||
machine = null
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["flavor_more"])
|
||||
usr << browse(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", name, dd_replacetext(flavor_text, "\n", "<BR>")), text("window=[];size=500x200", name))
|
||||
onclose(usr, "[name]")
|
||||
if(href_list["flavor_change"])
|
||||
update_flavor_text()
|
||||
// ..()
|
||||
return
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
var/slurring = null //Carbon
|
||||
var/real_name = null
|
||||
// var/original_name = null //Original name is only used in ghost chat! Depracated, now used bb
|
||||
var/flavor_text = ""
|
||||
var/blinded = null
|
||||
var/bhunger = 0 //Carbon
|
||||
var/ajourn = 0
|
||||
|
||||
@@ -1062,6 +1062,8 @@ datum/preferences
|
||||
if(character.dna)
|
||||
character.dna.real_name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
|
||||
character.gender = gender
|
||||
|
||||
character.age = age
|
||||
|
||||
Reference in New Issue
Block a user