Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into cache-locality-experiments
This commit is contained in:
@@ -113,8 +113,7 @@
|
||||
if (loc != user)
|
||||
return ..()
|
||||
if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED))
|
||||
ui_interact(user)
|
||||
return
|
||||
INVOKE_ASYNC(src, /datum.proc/ui_interact, user)
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/attack_self(mob/user)
|
||||
if(loc == user)
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
/obj/item/choice_beacon/box/plushie/generate_display_names()
|
||||
var/list/plushie_list = list()
|
||||
//plushie set 1: just subtypes of /obj/item/toy/plush
|
||||
var/list/plushies_set_one = subtypesof(/obj/item/toy/plush) - list(/obj/item/toy/plush/narplush, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random_snowflake, /obj/item/toy/plush/random) //don't allow these special ones (you can still get narplush/hugbox)
|
||||
var/list/plushies_set_one = subtypesof(/obj/item/toy/plush) - list(/obj/item/toy/plush/narplush, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random_snowflake, /obj/item/toy/plush/plushling, /obj/item/toy/plush/random) //don't allow these special ones (you can still get narplush/hugbox)
|
||||
for(var/V in plushies_set_one)
|
||||
var/atom/A = V
|
||||
plushie_list[initial(A.name)] = A
|
||||
@@ -272,4 +272,3 @@
|
||||
icon_state = "skub"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("skubbed")
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
return
|
||||
log_game("[key_name(user)] activated a hidden grenade in [src].")
|
||||
grenade.preprime(user, msg = FALSE, volume = 10)
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plushpet", /datum/mood_event/plushpet)
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plushpet", /datum/mood_event/plushpet)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You try to pet [src], but it has no stuffing. Aww...</span>")
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plush_nostuffing", /datum/mood_event/plush_nostuffing)
|
||||
@@ -754,8 +754,8 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
attack_verb = list("headbutt", "scritched", "bit")
|
||||
squeak_override = list('modular_citadel/sound/voice/nya.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/toy/plush/hairball
|
||||
name = "Hairball"
|
||||
desc = "A bundle of undigested fibers and scales. Yuck."
|
||||
@@ -765,3 +765,78 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
squeak_override = list('sound/misc/splort.ogg'=1)
|
||||
attack_verb = list("sploshed", "splorted", "slushed")
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/plushling
|
||||
name = "peculiar plushie"
|
||||
desc = "An adorable stuffed toy- wait, did it just move?"
|
||||
can_random_spawn = FALSE
|
||||
var/absorb_cooldown = 100 //ticks cooldown between absorbs
|
||||
var/next_absorb = 0 //When can it absorb another plushie
|
||||
var/check_interval = 20
|
||||
var/next_check = 0
|
||||
|
||||
//Overrides parent proc
|
||||
/obj/item/toy/plush/plushling/attack_self(mob/user)
|
||||
if(!user) //hmmmmm
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You try to pet the plushie, but recoil as it bites your hand instead! OW!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT,"plush_bite", /datum/mood_event/plush_bite)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H)
|
||||
return //Type safety.
|
||||
H.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
addtimer(CALLBACK(H, /mob/living/carbon/human.proc/dropItemToGround, src, TRUE), 1)
|
||||
|
||||
/obj/item/toy/plush/plushling/New()
|
||||
var/initial_state = pick("plushie_lizard", "plushie_snake", "plushie_slime", "fox")
|
||||
icon_state = initial_state
|
||||
item_state = initial_state
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/plush/plushling/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/plush/plushling/process()
|
||||
if(world.time < next_absorb || world.time < next_check)
|
||||
return
|
||||
next_check = world.time + check_interval
|
||||
var/obj/item/toy/plush/target
|
||||
for(var/obj/item/toy/plush/possible_target in loc) //First, it tries to get anything in its same location, be it a tile or a backpack
|
||||
if(possible_target == src || istype(possible_target, /obj/item/toy/plush/plushling))
|
||||
continue
|
||||
target = possible_target
|
||||
break
|
||||
if(!target)
|
||||
if(!isturf(loc))
|
||||
return
|
||||
for(var/obj/item/toy/plush/P in oview(1, src)) //If that doesn't work, it hunts for plushies adjacent to its own tile
|
||||
if(istype(P, /obj/item/toy/plush/plushling)) //These do not hunt their own kind
|
||||
continue
|
||||
src.throw_at(P, 1, 2)
|
||||
visible_message("<span class='danger'>[src] leaps at [P]!</span>")
|
||||
break
|
||||
return
|
||||
if(istype(target, /obj/item/toy/plush/plushling)) //These do not consume their own.
|
||||
return
|
||||
next_absorb = world.time + absorb_cooldown
|
||||
plushie_absorb(target)
|
||||
|
||||
/obj/item/toy/plush/plushling/proc/plushie_absorb(obj/item/toy/plush/victim)
|
||||
if(!victim)
|
||||
return
|
||||
visible_message("<span class='warning'>[src] gruesomely mutilliates [victim], leaving nothing more than dust!</span>")
|
||||
name = victim.name
|
||||
desc = victim.desc + " Wait, did it just move..?"
|
||||
icon_state = victim.icon_state
|
||||
item_state = victim.item_state
|
||||
squeak_override = victim.squeak_override
|
||||
attack_verb = victim.attack_verb
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(victim))
|
||||
qdel(victim)
|
||||
|
||||
/obj/item/toy/plush/plushling/love(obj/item/toy/plush/Kisser, mob/living/user) //You shouldn't have come here, poor plush.
|
||||
if(!Kisser)
|
||||
return
|
||||
plushie_absorb(Kisser)
|
||||
|
||||
@@ -281,12 +281,12 @@
|
||||
O.custom_name = created_name
|
||||
O.locked = panel_locked
|
||||
if(!aisync)
|
||||
lawsync = 0
|
||||
O.connected_ai = null
|
||||
lawsync = FALSE
|
||||
O.set_connected_ai(null)
|
||||
else
|
||||
O.notify_ai(NEW_BORG)
|
||||
if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
O.set_connected_ai(forced_ai)
|
||||
if(!lawsync)
|
||||
O.lawupdate = 0
|
||||
if(M.laws.id == DEFAULT_AI_LAWID)
|
||||
@@ -337,10 +337,10 @@
|
||||
|
||||
if(!aisync)
|
||||
lawsync = FALSE
|
||||
O.connected_ai = null
|
||||
O.set_connected_ai(null)
|
||||
else
|
||||
if(forced_ai)
|
||||
O.connected_ai = forced_ai
|
||||
O.set_connected_ai(forced_ai)
|
||||
O.notify_ai(AI_SHELL)
|
||||
if(!lawsync)
|
||||
O.lawupdate = FALSE
|
||||
|
||||
@@ -269,8 +269,8 @@
|
||||
to_chat(user, "<span class='notice'>[M] is at full health.</span>")
|
||||
return FALSE
|
||||
user.visible_message("<span class='green'>[user] applies \the [src] on [M].</span>", "<span class='green'>You apply \the [src] on [M].</span>")
|
||||
return heal_carbon(M, user, heal_brute, heal_burn)
|
||||
|
||||
M.heal_bodypart_damage(heal_brute)
|
||||
return TRUE
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with \the [src]!</span>")
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
|
||||
@@ -636,7 +636,7 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \
|
||||
null, \
|
||||
new/datum/stack_recipe("brass flask", /obj/item/reagent_containers/food/drinks/bottle/holyoil/empty), \
|
||||
new/datum/stack_recipe("brass smith's hammer", /obj/item/melee/smith/hammer/ratvar, 6), \
|
||||
new/datum/stack_recipe("brass ingot", /obj/item/ingot/bronze/ratvar, 6, time = 100), \
|
||||
new/datum/stack_recipe("brass ingot", /obj/item/ingot/ratvar, 6, time = 100), \
|
||||
))
|
||||
|
||||
/obj/item/stack/tile/brass
|
||||
|
||||
@@ -204,9 +204,6 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/obj/proc/acid_processing()
|
||||
. = 1
|
||||
if(!(resistance_flags & ACID_PROOF))
|
||||
for(var/armour_value in armor)
|
||||
if(armour_value != "acid" && armour_value != "fire")
|
||||
armor = armor.modifyAllRatings(0 - round(sqrt(acid_level)*0.1))
|
||||
if(prob(33))
|
||||
playsound(loc, 'sound/items/welder.ogg', 150, 1)
|
||||
take_damage(min(1 + round(sqrt(acid_level)*0.3), 300), BURN, "acid", 0)
|
||||
|
||||
Reference in New Issue
Block a user