mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-03-23 12:12:56 +00:00
* These two are easy * !!!runlevel_flags the fact it was global.runlevel_flags.len has me a bit...iffy on this. * !!!json_cache Same as above. used global. * player_list & observer_mob_list * mechas_list * this wasn't even used * surgery_steps * event_triggers * landmarks_list * dead_mob_list * living_mob_list * ai_list * cable_list * cleanbot_reserved_turfs * listening_objects * silicon_mob_list * human_mob_list * Update global_lists.dm * joblist * mob_list * Update global_lists.dm * holomap_markers * mapping_units * mapping_beacons * hair_styles_list * facial_hair_styles_list * Update global_lists.dm * facial_hair_styles_male_list * facial_hair_styles_female_list * body_marking_styles_list * body_marking_nopersist_list * ear_styles_list * hair_styles_male_list * tail_styles_list * wing_styles_list * escape_list & rune_list & endgame_exits these were all really small * endgame_safespawns * stool_cache * emotes_by_key * random_maps & map_count * item_tf_spawnpoints * narsie_list * active_radio_jammers * unused * paikeys * pai_software_by_key & default_pai_software * plant_seed_sprites * magazine_icondata_keys & magazine_icondata_states * unused * ashtray_cache * light_type_cache * HOLIDAY!!! this one was annoying * faction stuff (red?!) * Update preferences_factions.dm * vs edit removal * backbaglist, pdachoicelist, exclude_jobs * item_digestion_blacklist, edible_tech, blacklisted_artifact_effect, selectable_footstep, hexNums, syndicate_access * string_slot_flags and hexdigits->hexNums * possible_changeling_IDs * vr_mob_tf_options * vr_mob_spawner_options * pipe_colors * vr_mob_spawner_options * common_tools * newscaster_standard_feeds * Update periodic_news.dm * changeling_fabricated_clothing * semirandom_mob_spawner_decisions * id_card_states * Update syndicate_ids.dm * overlay_cache & gear_distributed_to * more * radio_channels_by_freq * Update global_lists.dm * proper * default_medbay_channels & default_internal_channels default_internal_channels is weird as it has a mapbased proc() but that proc is never called... * valid_ringtones * move this * possible_plants * more * separate these moves xeno2chemlist from a hook to a new global list. * tube_dir_list * valid_bloodreagents & monitor_states * Junk * valid_bloodtypes * breach_burn_descriptors & burn * more!! appliance_available_recipes seems uber cursed, re-look at later * Appliance code is cursed * wide_chassis & flying_chassis * allows_eye_color * all_tooltip_styles * direction_table * gun_choices * severity_to_string * old event_viruses * description_icons * MOVE_KEY_MAPPINGS * more more * pai & robot modules * Update global_lists.dm * GEOSAMPLES Also swaps a .len to LAZYLEN() * shieldgens * reagent recipies * global ammo types * rad collector * old file and unused global * nif_look_messages * FESH * nifsoft * chamelion * the death of sortAtom * globulins * lazylen that * Update global_lists.dm * LAZY * Theese too * quick fix --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
158 lines
5.7 KiB
Plaintext
158 lines
5.7 KiB
Plaintext
//DO NOT ADD MORE TO THIS FILE.
|
|
//Use vv_do_topic() for datums!
|
|
/client/proc/view_var_Topic(href, href_list, hsrc)
|
|
if(!check_rights_for(src, R_VAREDIT) || !holder.CheckAdminHref(href, href_list))
|
|
return
|
|
var/target = GET_VV_TARGET
|
|
vv_do_basic(target, href_list, href)
|
|
if(isdatum(target))
|
|
var/datum/D = target
|
|
D.vv_do_topic(href_list)
|
|
else if(islist(target))
|
|
vv_do_list(target, href_list)
|
|
if(href_list["Vars"])
|
|
var/datum/vars_target = locate(href_list["Vars"])
|
|
if(href_list["special_varname"]) // Some special vars can't be located even if you have their ref, you have to use this instead
|
|
vars_target = vars_target.vars[href_list["special_varname"]]
|
|
debug_variables(vars_target)
|
|
|
|
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
|
if(href_list["rename"])
|
|
|
|
var/mob/M = locate(href_list["rename"]) in GLOB.mob_list
|
|
if(!istype(M))
|
|
to_chat(usr, "This can only be used on instances of type /mob", confidential = TRUE)
|
|
return
|
|
|
|
var/new_name = stripped_input(usr,"What would you like to name this mob?","Input a name",M.real_name,MAX_NAME_LEN)
|
|
|
|
// If the new name is something that would be restricted by IC chat filters,
|
|
// give the admin a warning but allow them to do it anyway if they want.
|
|
//if(is_ic_filtered(new_name) || is_soft_ic_filtered(new_name) && tgui_alert(usr, "Your selected name contains words restricted by IC chat filters. Confirm this new name?", "IC Chat Filter Conflict", list("Confirm", "Cancel")) == "Cancel")
|
|
// return
|
|
|
|
if( !new_name || !M )
|
|
return
|
|
|
|
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
|
M.fully_replace_character_name(M.real_name,new_name)
|
|
vv_update_display(M, "name", new_name)
|
|
vv_update_display(M, "real_name", M.real_name || "No real name")
|
|
|
|
else if(href_list["rotatedatum"])
|
|
|
|
var/atom/A = locate(href_list["rotatedatum"])
|
|
if(!istype(A))
|
|
to_chat(usr, "This can only be done to instances of type /atom", confidential = TRUE)
|
|
return
|
|
|
|
switch(href_list["rotatedir"])
|
|
if("right")
|
|
A.set_dir(turn(A.dir, -45))
|
|
if("left")
|
|
A.set_dir(turn(A.dir, 45))
|
|
vv_update_display(A, "dir", dir2text(A.dir))
|
|
|
|
|
|
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
|
|
|
var/mob/living/L = locate(href_list["mobToDamage"]) in GLOB.mob_list
|
|
if(!istype(L))
|
|
return
|
|
|
|
var/Text = href_list["adjustDamage"]
|
|
|
|
var/amount = tgui_input_number(src, "Deal how much damage to mob? (Negative values here heal)", "Adjust [Text]loss", 0, min_value=-INFINITY, round_value=FALSE)
|
|
|
|
if (isnull(amount))
|
|
return
|
|
|
|
if(!L)
|
|
to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE)
|
|
return
|
|
|
|
var/newamt
|
|
switch(Text)
|
|
if("brute")
|
|
L.adjustBruteLoss(amount)
|
|
newamt = L.getBruteLoss()
|
|
if("fire")
|
|
L.adjustFireLoss(amount)
|
|
newamt = L.getFireLoss()
|
|
if("toxin")
|
|
L.adjustToxLoss(amount)
|
|
newamt = L.getToxLoss()
|
|
if("oxygen")
|
|
L.adjustOxyLoss(amount)
|
|
newamt = L.getOxyLoss()
|
|
if("brain")
|
|
L.adjustBrainLoss(amount)
|
|
newamt = L.getBrainLoss()
|
|
if("clone")
|
|
L.adjustCloneLoss(amount)
|
|
newamt = L.getCloneLoss()
|
|
//if("brain")
|
|
// L.adjustOrganLoss(ORGAN_SLOT_BRAIN, amount)
|
|
// newamt = L.get_organ_loss(ORGAN_SLOT_BRAIN)
|
|
//if("stamina")
|
|
// L.adjustStaminaLoss(amount, forced = TRUE)
|
|
// newamt = L.getStaminaLoss()
|
|
else
|
|
to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]", confidential = TRUE)
|
|
return
|
|
|
|
if(amount != 0)
|
|
var/log_msg = "[key_name(usr)] dealt [amount] amount of [Text] damage to [key_name(L)]"
|
|
message_admins("[key_name(usr)] dealt [amount] amount of [Text] damage to [ADMIN_LOOKUPFLW(L)]")
|
|
log_admin(log_msg)
|
|
admin_ticket_log(L, "<font color='blue'>[log_msg]</font>")
|
|
vv_update_display(L, Text, "[newamt]")
|
|
|
|
else if(href_list["item_to_tweak"] && href_list["var_tweak"])
|
|
|
|
var/obj/item/editing = locate(href_list["item_to_tweak"])
|
|
if(!istype(editing) || QDELING(editing))
|
|
return
|
|
|
|
var/existing_val = -1
|
|
switch(href_list["var_tweak"])
|
|
if("damtype")
|
|
existing_val = editing.damtype
|
|
if("force")
|
|
existing_val = editing.force
|
|
//if("wound")
|
|
// existing_val = editing.wound_bonus
|
|
//if("bare wound")
|
|
// existing_val = editing.exposed_wound_bonus
|
|
else
|
|
CRASH("Invalid var_tweak passed to item vv set var: [href_list["var_tweak"]]")
|
|
|
|
var/new_val
|
|
if(href_list["var_tweak"] == "damtype")
|
|
//new_val = tgui_input_list(usr, "Enter the new damage type for [editing]", "Set Damtype", list(BRUTE, BURN, TOX, OXY, STAMINA, BRAIN), existing_val)
|
|
new_val = tgui_input_list(usr, "Enter the new damage type for [editing]","Set Damtype", list(BRUTE, BURN, TOX, OXY, CLONE, HALLOSS, ELECTROCUTE, BIOACID, SEARING, ELECTROMAG), existing_val)
|
|
else
|
|
new_val = tgui_input_number(usr, "Enter the new value for [editing]'s [href_list["var_tweak"]]","Set [href_list["var_tweak"]]", existing_val)
|
|
if(isnull(new_val) || new_val == existing_val || QDELETED(editing) || !check_rights(R_VAREDIT))
|
|
return
|
|
|
|
switch(href_list["var_tweak"])
|
|
if("damtype")
|
|
editing.damtype = new_val
|
|
if("force")
|
|
editing.force = new_val
|
|
//if("wound")
|
|
// editing.wound_bonus = new_val
|
|
//if("bare wound")
|
|
// editing.exposed_wound_bonus = new_val
|
|
|
|
message_admins("[key_name(usr)] set [editing]'s [href_list["var_tweak"]] to [new_val] (was [existing_val])")
|
|
log_admin("[key_name(usr)] set [editing]'s [href_list["var_tweak"]] to [new_val] (was [existing_val])")
|
|
vv_update_display(editing, href_list["var_tweak"], istext(new_val) ? uppertext(new_val) : new_val)
|
|
|
|
//Finally, refresh if something modified the list.
|
|
if(href_list[VV_HK_DATUM_REFRESH])
|
|
var/datum/DAT = locate(href_list[VV_HK_DATUM_REFRESH])
|
|
if(isdatum(DAT) || istype(DAT, /client) || islist(DAT))
|
|
debug_variables(DAT)
|