Fixing various issues. (#12368)

* Fixing various issues.

* Lights.
This commit is contained in:
Ghom
2020-05-28 09:36:57 +02:00
committed by GitHub
parent 8e945bca4d
commit cea958f822
7 changed files with 47 additions and 41 deletions

View File

@@ -391,16 +391,6 @@
/mob/living/carbon/human/proc/hardset_dna(ui, list/mutation_index, newreal_name, newblood_type, datum/species/mrace, newfeatures)
if(newfeatures)
var/old_size = dna.features["body_size"]
dna.features = newfeatures
dna.update_body_size(old_size)
if(mrace)
var/datum/species/newrace = new mrace.type
newrace.copy_properties_from(mrace)
set_species(newrace, icon_update=0)
if(newreal_name)
real_name = newreal_name
dna.generate_unique_enzymes()
@@ -410,7 +400,17 @@
if(ui)
dna.uni_identity = ui
updateappearance(icon_update=0)
updateappearance(icon_update=FALSE)
if(newfeatures)
var/old_size = dna.features["body_size"]
dna.features = newfeatures
dna.update_body_size(old_size)
if(mrace)
var/datum/species/newrace = new mrace.type
newrace.copy_properties_from(mrace)
set_species(newrace, icon_update=FALSE)
if(LAZYLEN(mutation_index))
dna.mutation_index = mutation_index.Copy()

View File

@@ -30,6 +30,7 @@
if(WIRE_POWER1, WIRE_POWER2) // Short for a long while.
if(!A.shorted)
A.shorted = TRUE
A.update()
addtimer(CALLBACK(A, /obj/machinery/power/apc.proc/reset, wire), 1200)
if(WIRE_IDSCAN) // Unlock for a little while.
A.locked = FALSE
@@ -49,6 +50,7 @@
else
A.shorted = TRUE
A.shock(usr, 50)
A.update()
if(WIRE_AI) // Disable AI control.
if(mend)
A.aidisabled = FALSE

View File

@@ -577,11 +577,17 @@
cut_overlays()
add_overlay(frame_overlay)
add_overlay(filling_overlay)
add_overlay(lights_overlay)
if(lights_overlay)
add_overlay(lights_overlay)
var/mutable_appearance/lights_vis = mutable_appearance(lights_overlay.icon, lights_overlay.icon_state)
add_overlay(lights_vis)
add_overlay(panel_overlay)
add_overlay(weld_overlay)
add_overlay(sparks_overlay)
add_overlay(damag_overlay)
if(damag_overlay)
add_overlay(damag_overlay)
var/mutable_appearance/damage_vis = mutable_appearance(damag_overlay.icon, damag_overlay.icon_state)
add_overlay(damage_vis)
add_overlay(note_overlay)
check_unres()

View File

@@ -99,7 +99,7 @@
if(href_list["reset_radio_short"])
pai.unshort_radio()
if(href_list["setlaws"])
var/newlaws = stripped_multiline_input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", MAX_MESSAGE_LEN)
var/newlaws = stripped_multiline_input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", "", MAX_MESSAGE_LEN)
if(newlaws && pai)
pai.add_supplied_law(0,newlaws)
if(href_list["toggle_holo"])

View File

@@ -5,36 +5,30 @@
icon_state = "implant"
activated = 1
var/obj/machinery/abductor/pad/home
var/cooldown = 30
var/next_use = 0
/obj/item/implant/abductor/activate()
. = ..()
if(cooldown == initial(cooldown))
if(next_use <= world.time)
home.Retrieve(imp_in,1)
cooldown = 0
START_PROCESSING(SSobj, src)
next_use = world.time + 60 SECONDS
else
to_chat(imp_in, "<span class='warning'>You must wait [30 - cooldown] seconds to use [src] again!</span>")
/obj/item/implant/abductor/process()
if(cooldown < initial(cooldown))
cooldown++
if(cooldown == initial(cooldown))
STOP_PROCESSING(SSobj, src)
to_chat(imp_in, "<span class='warning'>You must wait [DisplayTimeText(next_use - world.time)] to use [src] again!</span>")
/obj/item/implant/abductor/implant(mob/living/target, mob/user)
if(..())
var/obj/machinery/abductor/console/console
if(ishuman(target))
var/datum/antagonist/abductor/A = target.mind.has_antag_datum(/datum/antagonist/abductor)
if(A)
console = get_abductor_console(A.team.team_number)
home = console.pad
if(!home)
var/list/consoles = list()
for(var/obj/machinery/abductor/console/C in GLOB.machines)
consoles += C
console = pick(consoles)
. = ..()
if(!.)
return
var/obj/machinery/abductor/console/console
if(ishuman(target))
var/datum/antagonist/abductor/A = target.mind.has_antag_datum(/datum/antagonist/abductor)
if(A)
console = get_abductor_console(A.team.team_number)
home = console.pad
return TRUE
if(!home)
var/list/consoles = list()
for(var/obj/machinery/abductor/console/C in GLOB.machines)
consoles += C
console = pick(consoles)
home = console.pad

View File

@@ -1411,6 +1411,7 @@
if(WIRE_POWER1, WIRE_POWER2)
if(!wires.is_cut(WIRE_POWER1) && !wires.is_cut(WIRE_POWER2))
shorted = FALSE
update()
if(WIRE_AI)
if(!wires.is_cut(WIRE_AI))
aidisabled = FALSE

View File

@@ -314,8 +314,11 @@
. = ..()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
if(on && status == LIGHT_OK)
SSvis_overlays.add_vis_overlay(src, overlayicon, base_state, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE, dir, clamp(light_power*250, 30, 200))
var/overlay_alpha = clamp(light_power*250, 30, 200)
SSvis_overlays.add_vis_overlay(src, overlayicon, base_state, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE, dir, overlay_alpha)
var/mutable_appearance/M = mutable_appearance(overlayicon, base_state)
M.alpha = overlay_alpha
. += M
// update the icon_state and luminosity of the light depending on its state
/obj/machinery/light/proc/update(trigger = TRUE)