mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Makes our codebase 1641 ready (#26151)
* Makes our codebase 1641 ready * Store variable * Renames var
This commit is contained in:
@@ -343,17 +343,17 @@
|
||||
*/
|
||||
/datum/proc/GetExactComponent(datum/component/c_type)
|
||||
RETURN_TYPE(c_type)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED || initial(c_type.dupe_mode) == COMPONENT_DUPE_SELECTIVE)
|
||||
var/initial_type_mode = initial(c_type.dupe_mode)
|
||||
if(initial_type_mode == COMPONENT_DUPE_ALLOWED || initial_type_mode == COMPONENT_DUPE_SELECTIVE)
|
||||
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
var/list/all_components = datum_components
|
||||
if(!all_components)
|
||||
return null
|
||||
var/datum/component/C = dc[c_type]
|
||||
if(C)
|
||||
if(length(C))
|
||||
C = C[1]
|
||||
if(C.type == c_type)
|
||||
return C
|
||||
var/datum/component/potential_component
|
||||
if(length(all_components))
|
||||
potential_component = all_components[c_type]
|
||||
if(potential_component?.type == c_type)
|
||||
return potential_component
|
||||
return null
|
||||
|
||||
/**
|
||||
|
||||
@@ -463,11 +463,12 @@
|
||||
var/header
|
||||
if(DA)
|
||||
if(islist(DA))
|
||||
var/list/debug_list = DA
|
||||
var/index = name
|
||||
if(value)
|
||||
name = DA[name] // name is really the index until this line
|
||||
name = debug_list[name] // name is really the index until this line
|
||||
else
|
||||
value = DA[name]
|
||||
value = debug_list[name]
|
||||
header = "<li style='backgroundColor:white'>(<a href='byond://?_src_=vars;listedit=\ref[DA];index=[index]'>E</a>) (<a href='byond://?_src_=vars;listchange=\ref[DA];index=[index]'>C</a>) (<a href='byond://?_src_=vars;listremove=\ref[DA];index=[index]'>-</a>) "
|
||||
else
|
||||
header = "<li style='backgroundColor:white'>(<a href='byond://?_src_=vars;datumedit=[DA.UID()];varnameedit=[name]'>E</a>) (<a href='byond://?_src_=vars;datumchange=[DA.UID()];varnamechange=[name]'>C</a>) (<a href='byond://?_src_=vars;datummass=[DA.UID()];varnamemass=[name]'>M</a>) "
|
||||
|
||||
@@ -483,16 +483,16 @@ AI MODULES
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "AI"
|
||||
origin_tech = "programming=6;materials=5;syndicate=6"
|
||||
laws = list("")
|
||||
var/ion_law = ""
|
||||
|
||||
/obj/item/aiModule/toyAI/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
|
||||
//..()
|
||||
to_chat(target, "<span class='warning'>KRZZZT</span>")
|
||||
target.add_ion_law(laws[1])
|
||||
return laws[1]
|
||||
target.add_ion_law(ion_law)
|
||||
return ion_law
|
||||
|
||||
/obj/item/aiModule/toyAI/attack_self(mob/user)
|
||||
laws[1] = generate_ion_law()
|
||||
ion_law = generate_ion_law()
|
||||
to_chat(user, "<span class='notice'>You press the button on [src].</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 20, 1)
|
||||
src.loc.visible_message("<span class='warning'>[bicon(src)] [laws[1]]</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 20, TRUE)
|
||||
visible_message("<span class='warning'>[bicon(src)] [ion_law]</span>")
|
||||
|
||||
Reference in New Issue
Block a user