Merge branch 'master' into TGUI-3.0

This commit is contained in:
Arturlang
2020-07-16 15:59:37 +03:00
committed by GitHub
14 changed files with 160 additions and 6 deletions

View File

@@ -1269,7 +1269,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
return
var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE, ADMIN_PUNISHMENT_CUSTOM_PIE, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING, ADMIN_PUNISHMENT_ROD)
var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE, ADMIN_PUNISHMENT_CUSTOM_PIE, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING, ADMIN_PUNISHMENT_ROD, ADMIN_PUNISHMENT_PICKLE)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
@@ -1334,7 +1334,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(ADMIN_PUNISHMENT_PIE)
var/obj/item/reagent_containers/food/snacks/pie/cream/nostun/creamy = new(get_turf(target))
creamy.splat(target)
if (ADMIN_PUNISHMENT_CUSTOM_PIE)
if(ADMIN_PUNISHMENT_CUSTOM_PIE)
var/obj/item/reagent_containers/food/snacks/pie/cream/nostun/A = new()
if(!A.reagents)
var/amount = input(usr, "Specify the reagent size of [A]", "Set Reagent Size", 50) as num|null
@@ -1347,6 +1347,8 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
if(amount)
A.reagents.add_reagent(chosen_id, amount)
A.splat(target)
if(ADMIN_PUNISHMENT_PICKLE)
target.turn_into_pickle()
punish_log(target, punishment)

View File

@@ -16,6 +16,8 @@ GLOBAL_LIST_INIT(meta_gas_dangers, meta_gas_danger_list())
GLOBAL_LIST_INIT(meta_gas_ids, meta_gas_id_list())
GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture
/// Never ever set this variable, hooked into vv_get_var for view variables viewing.
var/gas_list_view_only
var/initial_volume = CELL_VOLUME //liters
var/list/reaction_results
var/list/analyzer_results //used for analyzer feedback - not initialized until its used
@@ -29,9 +31,75 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
reaction_results = new
/datum/gas_mixture/vv_edit_var(var_name, var_value)
if(var_name == "_extools_pointer_gasmixture")
if(var_name == NAMEOF(src, _extools_pointer_gasmixture))
return FALSE // please no. segfaults bad.
if(var_name == NAMEOF(src, gas_list_view_only))
return FALSE
return ..()
/datum/gas_mixture/vv_get_var(var_name)
. = ..()
if(var_name == NAMEOF(src, gas_list_view_only))
var/list/dummy = get_gases()
for(var/gas in dummy)
dummy[gas] = get_moles(gas)
return debug_variable("gases (READ ONLY)", dummy, 0, src)
/datum/gas_mixture/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION("", "---")
VV_DROPDOWN_OPTION(VV_HK_PARSE_GASSTRING, "Parse Gas String")
VV_DROPDOWN_OPTION(VV_HK_EMPTY, "Empty")
VV_DROPDOWN_OPTION(VV_HK_SET_MOLES, "Set Moles")
VV_DROPDOWN_OPTION(VV_HK_SET_TEMPERATURE, "Set Temperature")
VV_DROPDOWN_OPTION(VV_HK_SET_VOLUME, "Set Volume")
/datum/gas_mixture/vv_do_topic(list/href_list)
. = ..()
if(!.)
return
if(href_list[VV_HK_PARSE_GASSTRING])
var/gasstring = input(usr, "Input Gas String (WARNING: Advanced. Don't use this unless you know how these work.", "Gas String Parse") as text|null
if(!istext(gasstring))
return
log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set to gas string [gasstring].")
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set to gas string [gasstring].")
parse_gas_string(gasstring)
if(href_list[VV_HK_EMPTY])
log_admin("[key_name(usr)] emptied gas mixture [REF(src)].")
message_admins("[key_name(usr)] emptied gas mixture [REF(src)].")
clear()
if(href_list[VV_HK_SET_MOLES])
var/list/gases = get_gases()
for(var/gas in gases)
gases[gas] = get_moles(gas)
var/gastype = input(usr, "What kind of gas?", "Set Gas") as null|anything in subtypesof(/datum/gas)
if(!ispath(gastype, /datum/gas))
return
var/amount = input(usr, "Input amount", "Set Gas", gases[gastype] || 0) as num|null
if(!isnum(amount))
return
amount = max(0, amount)
log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Set gas type [gastype] to [amount] moles.")
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Set gas type [gastype] to [amount] moles.")
set_moles(gastype, amount)
if(href_list[VV_HK_SET_TEMPERATURE])
var/temp = input(usr, "Set the temperature of this mixture to?", "Set Temperature", return_temperature()) as num|null
if(!isnum(temp))
return
temp = max(2.7, temp)
log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Changed temperature to [temp].")
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed temperature to [temp].")
set_temperature(temp)
if(href_list[VV_HK_SET_VOLUME])
var/volume = input(usr, "Set the volume of this mixture to?", "Set Volume", return_volume()) as num|null
if(!isnum(volume))
return
volume = max(0, volume)
log_admin("[key_name(usr)] modified gas mixture [REF(src)]: Changed volume to [volume].")
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed volume to [volume].")
set_volume(volume)
/*
/datum/gas_mixture/Del()
__gasmixture_unregister()
@@ -169,7 +237,7 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
set_moles(path, text2num(gas[id]))
archive()
return 1
/datum/gas_mixture/react(datum/holder)
. = NO_REACTION
if(!total_moles())

View File

@@ -0,0 +1,29 @@
//funniest shit i've ever seen
/mob/living/simple_animal/pickle
name = "pickle"
desc = "It's a pickle. It might just be the funniest thing you have ever seen."
health = 100
maxHealth = 100
icon = 'icons/mob/32x64.dmi'
icon_state = "pickle"
del_on_death = TRUE
deathmessage = "The pickle implodes into its own existential dread and disappears!"
friendly_verb_continuous = "tickles"
friendly_verb_simple = "tickle"
var/mob/living/original_body
/mob/living/simple_animal/pickle/UnarmedAttack(atom/A)
..() //we want the tickle emote to go before the laugh
if(ismob(A))
var/mob/laugher = A
laugher.emote("laugh")
/mob/living/simple_animal/pickle/Destroy(force, kill_body = TRUE)
if(original_body)
if(kill_body)
original_body.adjustOrganLoss(ORGAN_SLOT_BRAIN, 200) //to be fair, you have to have a very high iq to understand-
original_body.forceMove(get_turf(src))
if(mind)
mind.transfer_to(original_body)
..()

View File

@@ -591,6 +591,7 @@
. = new_mob
qdel(src)
/* Certain mob types have problems and should not be allowed to be controlled by players.
*
* This proc is here to force coders to manually place their mob in this list, hopefully tested.
@@ -631,3 +632,20 @@
return 0
#undef TRANSFORMATION_DURATION
=======
/mob/living/proc/turn_into_pickle()
//if they're already a pickle, turn them back instead
if(istype(src, /mob/living/simple_animal/pickle))
qdel(src, FALSE) //this means the body inside the pickle will be dropped without killing it
else
//make a new pickle on the tile and move their mind into it if possible
var/mob/living/simple_animal/pickle/new_pickle = new /mob/living/simple_animal/pickle(get_turf(src))
new_pickle.original_body = src
if(mind)
mind.transfer_to(new_pickle)
//give them their old access if any
var/obj/item/card/id/mob_access_card = get_idcard()
if(mob_access_card)
new_pickle.access_card = mob_access_card
//move old body inside the pickle for safekeeping (when they die, we'll return the corpse because we're nice)
src.forceMove(new_pickle)

View File

@@ -75,4 +75,9 @@
/obj/item/ammo_casing/energy/shrink
projectile_type = /obj/item/projectile/beam/shrink
select_name = "shrink ray"
e_cost = 200
e_cost = 200
/obj/item/ammo_casing/energy/pickle //ammo for an adminspawn gun
projectile_type = /obj/item/projectile/energy/pickle
select_name = "pickle ray"
e_cost = 0

View File

@@ -329,3 +329,11 @@
add_overlay("emitter_carbine_empty")
else
add_overlay("emitter_carbine")
//the pickle ray
/obj/item/gun/energy/pickle_gun
name = "pickle ray"
desc = "funniest shit i've ever seen"
icon_state = "decloner"
no_pin_required = TRUE
ammo_type = list(/obj/item/ammo_casing/energy/pickle)

View File

@@ -13,3 +13,13 @@
damage_type = TOX
knockdown = 100
range = 7
/obj/item/projectile/energy/pickle //projectile for adminspawn only gun
name = "pickle-izing beam"
icon_state = "declone"
/obj/item/projectile/energy/pickle/on_hit(atom/target)
//we don't care if they blocked it, they're turning into a pickle
if(isliving(target))
var/mob/living/living_target = target
living_target.turn_into_pickle() //yes this is a real proc

View File

@@ -207,7 +207,8 @@
/mob/living/simple_animal/pet/fox,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/pet/cat/cak,
/mob/living/simple_animal/chick)
/mob/living/simple_animal/chick,
/mob/living/simple_animal/pickle)
new_mob = new path(M.loc)
if("humanoid")