* Honkbots 0.9.0 Old code, needs testing. * Honkbots 0.9.1 Small Fixes - Part 1 * Honkbot 0.9.1b Fixes * Honkbots 0.9.2 Added sound cooldown, fixes. * Honkbots 0.9.5 Clown Box & Honkbot Assembly Code * 0.9.5.a oops * Honkbots 1.0.0 Final touches and fixes. Clown Box finished. Assembly functioning. Honkbots tested and ready to go. Its time. * Honkbots 1.0.1 Initialize and . = ..() * Honkbots 1.0.2 Fixes and Changes ==== Nerfed Brute/Thermal Resist Buffed Health (to avoid 1-shot) Added HONK_BOT define * Honkbots 1.0.3 Removed the cardboard assembly from death gibs. Admin Bwoink removed from emagged soundtrack. Honkbot now release an evil laugh when emagged. Fixed strange behaviors on emagged level 1 Added a check against stamping multiple cardboard sheets. Stamping a Clown Box now plays the bike horn, once. Clown Boxes no longer get automatically placed in hands. Various other fixes. * Honkbots 1.0.3a * Honkbots 1.0.3.b Fixes. * Honkbots 1.0.4 *Added an emote ping upon assembly creation. *Enabled either Theatre or Robotics for access. ((fixing needing both)) *Honkbots are now more forgiving after being hit. **Airhorn stun_attack now deals slight ear damage, for about 5 seconds. **Cardboard no longer drops upon death. Robot arms have 50% chance. **Using a new get_sfx() list when emagged. **Optimization and other minor fixes. * Honkbots 1.0.4.a Missed it. * Honkbots 1.0.4.b use(1) and (client) * Honkbots 1.0.4.c Moved proc * Honkbots 1.0.5 *Code Optimization *Renaming w/ Pen (how could I even forget this) *Assembly Defines I'm afraid I'm simply out of my depth with the suggested use(1) rework. * Honkbots 1.0.5.c Reworked cardboard stamping. It now works in the hands and on the ground, either solo or in stacks, and prevent itself being used in backpacks. * Honkbots 1.0.5.d Final * Honkbots 1.0.5.e comment * 1.0.5.f Optimization * Honkbots 1.0.5.g Missed requested stuff * Honkbots 1.0.6 Requested changes. * Honkbots 1.0.6a Oops. * Honkbots 1.0.6.c Bugfix - Prevent building in backpacks. Make sure they spawn on turf. * Honkbots 1.0.7 one less spawn(0) flag optimization else return ..() * Honkbots 1.0.7.a Get rids of a lot of client checks at the cost of automatic AI retoration. * Honkbots 1.0.7.b Added judgment_criteria() changed assess_threat to use judgment * Honkbots 1.0.7.c final = NONE
184 lines
5.8 KiB
Plaintext
184 lines
5.8 KiB
Plaintext
// simple is_type and similar inline helpers
|
|
|
|
#define isdatum(D) (istype(D, /datum))
|
|
|
|
#define islist(L) (istype(L, /list))
|
|
|
|
#define in_range(source, user) (get_dist(source, user) <= 1)
|
|
|
|
#define ismovableatom(A) (istype(A, /atom/movable))
|
|
|
|
#define isatom(A) (istype(A, /atom))
|
|
|
|
//Turfs
|
|
//#define isturf(A) (istype(A, /turf)) This is actually a byond built-in. Added here for completeness sake.
|
|
|
|
#define isopenturf(A) (istype(A, /turf/open))
|
|
|
|
#define isindestructiblefloor(A) (istype(A, /turf/open/indestructible))
|
|
|
|
#define isspaceturf(A) (istype(A, /turf/open/space))
|
|
|
|
#define isfloorturf(A) (istype(A, /turf/open/floor))
|
|
|
|
#define isclosedturf(A) (istype(A, /turf/closed))
|
|
|
|
#define isindestructiblewall(A) (istype(A, /turf/closed/indestructible))
|
|
|
|
#define iswallturf(A) (istype(A, /turf/closed/wall))
|
|
|
|
#define ismineralturf(A) (istype(A, /turf/closed/mineral))
|
|
|
|
#define islava(A) (istype(A, /turf/open/lava))
|
|
|
|
#define isplatingturf(A) (istype(A, /turf/open/floor/plating))
|
|
|
|
//Mobs
|
|
#define isliving(A) (istype(A, /mob/living))
|
|
|
|
#define isbrain(A) (istype(A, /mob/living/brain))
|
|
|
|
//Carbon mobs
|
|
#define iscarbon(A) (istype(A, /mob/living/carbon))
|
|
|
|
#define ishuman(A) (istype(A, /mob/living/carbon/human))
|
|
|
|
//Human sub-species
|
|
#define isabductor(A) (is_species(A, /datum/species/abductor))
|
|
#define isgolem(A) (is_species(A, /datum/species/golem))
|
|
#define islizard(A) (is_species(A, /datum/species/lizard))
|
|
#define isplasmaman(A) (is_species(A, /datum/species/plasmaman))
|
|
#define ispodperson(A) (is_species(A, /datum/species/podperson))
|
|
#define isflyperson(A) (is_species(A, /datum/species/fly))
|
|
#define isslimeperson(A) (is_species(A, /datum/species/jelly/slime))
|
|
#define isshadowperson(A) (is_species(A, /datum/species/shadow))
|
|
#define iszombie(A) (is_species(A, /datum/species/zombie))
|
|
#define ishumanbasic(A) (is_species(A, /datum/species/human))
|
|
|
|
//more carbon mobs
|
|
#define ismonkey(A) (istype(A, /mob/living/carbon/monkey))
|
|
|
|
#define isalien(A) (istype(A, /mob/living/carbon/alien))
|
|
|
|
#define islarva(A) (istype(A, /mob/living/carbon/alien/larva))
|
|
|
|
#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))
|
|
|
|
#define isalienhunter(A) (istype(A, /mob/living/carbon/alien/humanoid/hunter))
|
|
|
|
#define isaliensentinel(A) (istype(A, /mob/living/carbon/alien/humanoid/sentinel))
|
|
|
|
#define isalienroyal(A) (istype(A, /mob/living/carbon/alien/humanoid/royal))
|
|
|
|
#define isalienqueen(A) (istype(A, /mob/living/carbon/alien/humanoid/royal/queen))
|
|
|
|
#define isdevil(A) (istype(A, /mob/living/carbon/true_devil))
|
|
|
|
//Silicon mobs
|
|
#define issilicon(A) (istype(A, /mob/living/silicon))
|
|
|
|
#define iscyborg(A) (istype(A, /mob/living/silicon/robot))
|
|
|
|
#define isAI(A) (istype(A, /mob/living/silicon/ai))
|
|
|
|
#define ispAI(A) (istype(A, /mob/living/silicon/pai))
|
|
|
|
//Simple animals
|
|
#define isanimal(A) (istype(A, /mob/living/simple_animal))
|
|
|
|
#define isrevenant(A) (istype(A, /mob/living/simple_animal/revenant))
|
|
|
|
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
|
|
|
|
#define isbot(A) (istype(A, /mob/living/simple_animal/bot))
|
|
|
|
#define iscrab(A) (istype(A, /mob/living/simple_animal/crab))
|
|
|
|
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
|
|
|
|
#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))
|
|
|
|
#define isslime(A) (istype(A, /mob/living/simple_animal/slime))
|
|
|
|
#define isdrone(A) (istype(A, /mob/living/simple_animal/drone))
|
|
|
|
#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat))
|
|
|
|
#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog))
|
|
|
|
#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi))
|
|
|
|
#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile))
|
|
|
|
#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear))
|
|
|
|
#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp))
|
|
|
|
#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer))
|
|
|
|
#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian))
|
|
|
|
#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork))
|
|
|
|
#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct))
|
|
|
|
#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna))
|
|
|
|
#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
|
|
|
|
//Misc mobs
|
|
#define isobserver(A) (istype(A, /mob/dead/observer))
|
|
|
|
#define isdead(A) (istype(A, /mob/dead))
|
|
|
|
#define isnewplayer(A) (istype(A, /mob/dead/new_player))
|
|
|
|
#define isovermind(A) (istype(A, /mob/camera/blob))
|
|
|
|
#define iscameramob(A) (istype(A, /mob/camera))
|
|
|
|
//Objects
|
|
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs
|
|
|
|
#define isitem(A) (istype(A, /obj/item))
|
|
|
|
#define isstructure(A) (istype(A, /obj/structure))
|
|
|
|
#define ismachinery(A) (istype(A, /obj/machinery))
|
|
|
|
#define ismecha(A) (istype(A, /obj/mecha))
|
|
|
|
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable
|
|
|
|
#define isorgan(A) (istype(A, /obj/item/organ))
|
|
|
|
GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
|
|
/obj/item/pen,
|
|
/obj/item/screwdriver,
|
|
/obj/item/reagent_containers/syringe,
|
|
/obj/item/kitchen/fork)))
|
|
|
|
#define is_pointed(W) (is_type_in_typecache(W, GLOB.pointed_types))
|
|
|
|
#define isbodypart(A) (istype(A, /obj/item/bodypart))
|
|
|
|
//Assemblies
|
|
#define isassembly(O) (istype(O, /obj/item/device/assembly))
|
|
|
|
#define isigniter(O) (istype(O, /obj/item/device/assembly/igniter))
|
|
|
|
#define isinfared(O) (istype(O, /obj/item/device/assembly/infra))
|
|
|
|
#define isprox(O) (istype(O, /obj/item/device/assembly/prox_sensor))
|
|
|
|
#define issignaler(O) (istype(O, /obj/item/device/assembly/signaler))
|
|
|
|
#define istimer(O) (istype(O, /obj/item/device/assembly/timer))
|
|
|
|
GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
|
/obj/item/stack/sheet/glass,
|
|
/obj/item/stack/sheet/rglass,
|
|
/obj/item/stack/sheet/plasmaglass,
|
|
/obj/item/stack/sheet/plasmarglass)))
|
|
|
|
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types)) |