mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
This commit is contained in:
@@ -250,6 +250,9 @@
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
/obj/item/contraband/package/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/contraband = pick(
|
||||
/obj/item/reagent_containers/glass/beaker/vial/macrocillin,
|
||||
/obj/item/reagent_containers/glass/beaker/vial/microcillin,
|
||||
|
||||
@@ -319,7 +319,10 @@
|
||||
|
||||
var/list/allowed_gadgets = null
|
||||
|
||||
/obj/item/mine/attack_self(mob/user as mob) // You do not want to move or throw a land mine while priming it... Explosives + Sudden Movement = Bad Times
|
||||
/obj/item/mine/attack_self(mob/user) // You do not want to move or throw a land mine while priming it... Explosives + Sudden Movement = Bad Times
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
add_fingerprint(user)
|
||||
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
|
||||
user.visible_message("[user] starts priming \the [src.name].", "You start priming \the [src.name]. Hold still!")
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
ghost_query_type = /datum/ghost_query/apprentice
|
||||
|
||||
/obj/item/antag_spawner/technomancer_apprentice/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, span_notice("Teleporter attempting to lock on to your apprentice."))
|
||||
request_player()
|
||||
|
||||
@@ -102,6 +105,9 @@
|
||||
var/drone_type = null
|
||||
|
||||
/obj/item/antag_spawner/syndicate_drone/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, span_notice("Teleporter attempting to lock on to an available unit."))
|
||||
request_player()
|
||||
|
||||
|
||||
@@ -42,9 +42,12 @@
|
||||
var/can_expand_areas_into = AREA_SPACE // Can expand station areas only into space.
|
||||
var/can_rename_areas_in = AREA_STATION // Only station areas can be reanamed
|
||||
|
||||
/obj/item/blueprints/attack_self(mob/M as mob)
|
||||
if (!ishuman(M))
|
||||
to_chat(M, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting
|
||||
/obj/item/blueprints/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!ishuman(user))
|
||||
to_chat(user, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting
|
||||
return
|
||||
interact()
|
||||
return
|
||||
|
||||
@@ -116,6 +116,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/areaeditor/attack_self(mob/user) //Convert this to TGUI some time.
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
add_fingerprint(user)
|
||||
. = "<BODY><HTML><head><title>[src]</title></head> \
|
||||
<h2>[station_name()] [src.name]</h2>"
|
||||
@@ -177,6 +180,9 @@
|
||||
var/legend = 1
|
||||
|
||||
/obj/item/wire_reader/attack_self(mob/user) //Convert this to TGUI some time.
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
add_fingerprint(user)
|
||||
. = "<BODY><HTML><head><title>[src]</title></head> \
|
||||
<h2>[station_name()] [src.name]</h2>"
|
||||
@@ -247,7 +253,9 @@
|
||||
|
||||
|
||||
/obj/item/areaeditor/blueprints/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(. == 1) //I hate this so much.
|
||||
return TRUE
|
||||
var/area/A = get_area(user)
|
||||
if(!legend)
|
||||
if(get_area_type() == AREA_STATION)
|
||||
|
||||
@@ -7,10 +7,36 @@
|
||||
icon_state = "bodybag_folded"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
//Used for cryogenic bodybags
|
||||
var/obj/item/reagent_containers/syringe/syringe
|
||||
var/cryogenic = FALSE
|
||||
var/robotic = FALSE
|
||||
|
||||
/obj/item/bodybag/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
|
||||
if(cryogenic)
|
||||
var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
if(syringe)
|
||||
R.syringe = syringe
|
||||
syringe = null
|
||||
qdel(src)
|
||||
return
|
||||
if(robotic)
|
||||
var/obj/structure/closet/body_bag/cryobag/robobag/R = new /obj/structure/closet/body_bag/cryobag/robobag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
if(syringe)
|
||||
R.syringe = syringe
|
||||
syringe = null
|
||||
qdel(src)
|
||||
return
|
||||
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/storage/box/bodybags
|
||||
@@ -114,15 +140,7 @@
|
||||
icon_state = "bodybag_folded"
|
||||
item_state = "bodybag_cryo_folded"
|
||||
origin_tech = list(TECH_BIO = 4)
|
||||
var/obj/item/reagent_containers/syringe/syringe
|
||||
|
||||
/obj/item/bodybag/cryobag/attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
if(syringe)
|
||||
R.syringe = syringe
|
||||
syringe = null
|
||||
qdel(src)
|
||||
cryogenic = TRUE
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag
|
||||
name = "stasis bag"
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
item_state = "table_parts"
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
/obj/item/stolenpackage/attack_self(mob/user as mob)
|
||||
/obj/item/stolenpackage/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
// Another way of doing this. Commented out because the other method is better for this application.
|
||||
/*var/spawn_chance = rand(1,100)
|
||||
switch(spawn_chance)
|
||||
@@ -106,5 +109,8 @@
|
||||
icon = 'icons/obj/contraband_vr.dmi'
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/item/miscdisc/attack_self(mob/living/user as mob)
|
||||
/obj/item/miscdisc/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, "As you hold the large disc in your open palm, fingers cusped around the edge, the crystal embedded in the item begins to vibrate. It lifts itself from the disc a few cenimetres, before beginning to glow with a bright red light. The glow lasts for a few seconds, before the crystal embeds itself back into the disc with a quick snap.")
|
||||
|
||||
@@ -42,7 +42,10 @@
|
||||
colourName = "mime"
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/mime/attack_self(mob/living/user as mob) //inversion
|
||||
/obj/item/pen/crayon/mime/attack_self(mob/living/user) //inversion
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(colour != "#FFFFFF" && shadeColour != "#000000")
|
||||
colour = "#FFFFFF"
|
||||
shadeColour = "#000000"
|
||||
@@ -61,6 +64,9 @@
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/rainbow/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/new_colour = tgui_color_picker(user, "Please select the main colour.", "Crayon colour", colour)
|
||||
if(new_colour)
|
||||
colour = new_colour
|
||||
@@ -192,6 +198,9 @@
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/marker/mime/attack_self(mob/living/user) //inversion
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(colour != "#FFFFFF" && shadeColour != "#000000")
|
||||
colour = "#FFFFFF"
|
||||
shadeColour = "#000000"
|
||||
@@ -210,6 +219,9 @@
|
||||
uses = 0
|
||||
|
||||
/obj/item/pen/crayon/marker/rainbow/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/new_colour = tgui_color_picker(user, "Please select the main colour.", "Marker colour", colour)
|
||||
if(new_colour)
|
||||
colour = new_colour
|
||||
@@ -234,6 +246,3 @@
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/pen/crayon/attack_self(var/mob/user)
|
||||
return
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
to_chat(user, span_infoplain(span_bold("ERROR ERROR ERROR")))
|
||||
|
||||
/obj/item/aicard/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/aicard/tgui_interact(mob/user, datum/tgui/ui = null, datum/tgui_state/custom_state)
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
//matter = list(MAT_STEEL = 50, MAT_GLASS = 50)
|
||||
|
||||
/obj/item/binoculars/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
zoom()
|
||||
|
||||
/obj/item/binoculars/spyglass
|
||||
|
||||
@@ -104,6 +104,9 @@
|
||||
else
|
||||
to_chat(user,span_warning(" A warning pops up on the LED display on the side of the device, informing you that the target is not able to have their mind swapped with!"))
|
||||
|
||||
/obj/item/bodysnatcher/attack_self(mob/living/user)
|
||||
to_chat(user,span_warning(" A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?"))
|
||||
return
|
||||
/obj/item/bodysnatcher/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user,span_warning(" A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?"))
|
||||
return
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
..()
|
||||
|
||||
/obj/item/chameleon/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
toggle(user)
|
||||
|
||||
/obj/item/chameleon/afterattack(atom/target, mob/user, proximity)
|
||||
|
||||
@@ -224,6 +224,9 @@
|
||||
// Description: Makes an exonet datum if one does not exist, allocates an address for it, maintains the lists of all devies, clears the alert icon, and
|
||||
// finally makes NanoUI appear.
|
||||
/obj/item/communicator/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
initialize_exonet(user)
|
||||
alert_called = 0
|
||||
update_icon()
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
gps_tag = "EMERGENCY BEACON"
|
||||
|
||||
/obj/item/emergency_beacon/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/T = user.loc
|
||||
if(!beacon_active)
|
||||
if(!isturf(T))
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/extrapolator/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
|
||||
if(scan)
|
||||
icon_state = "extrapolator_sample"
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
/// If the flash can be repaired or not.
|
||||
var/can_repair = TRUE
|
||||
|
||||
/// If the flash can only be used once before breaking
|
||||
var/one_use = FALSE
|
||||
|
||||
var/safe_flashes = 2 // How many flashes are kept in 1% breakchance?
|
||||
|
||||
var/charge_only = FALSE // Does the flash run purely on charge?
|
||||
@@ -120,7 +123,7 @@
|
||||
update_icon()
|
||||
|
||||
// Returns true if the device can flash.
|
||||
/obj/item/flash/proc/check_capacitor(var/mob/user)
|
||||
/obj/item/flash/proc/check_capacitor(mob/user)
|
||||
//spamming the flash before it's fully charged (60 seconds) increases the chance of it breaking
|
||||
//It will never break on the first use.
|
||||
var/obj/item/cell/battery = power_supply
|
||||
@@ -130,6 +133,12 @@
|
||||
|
||||
if(times_used <= max_flashes && battery && battery.charge >= charge_cost)
|
||||
last_used = world.time
|
||||
if(one_use)
|
||||
broken = TRUE
|
||||
if(user)
|
||||
to_chat(user, span_warning("The bulb has burnt out!"))
|
||||
update_icon()
|
||||
return TRUE
|
||||
if(prob( max(0, times_used - safe_flashes) * 2 + (times_used >= safe_flashes)) && can_break) //if you use it 10 times in a minute it has a 30% chance to break.
|
||||
broken = TRUE
|
||||
if(user)
|
||||
@@ -243,7 +252,10 @@
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
/obj/item/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!user || !clown_check(user)) return
|
||||
|
||||
user.setClickCooldown(user.get_attack_speed(src))
|
||||
@@ -298,21 +310,7 @@
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1)
|
||||
base_icon = "sflash"
|
||||
can_repair = FALSE
|
||||
|
||||
//attack_as_weapon
|
||||
/obj/item/flash/synthetic/attack(mob/living/M, mob/living/user, var/target_zone)
|
||||
..()
|
||||
if(!broken)
|
||||
broken = 1
|
||||
to_chat(user, span_warning("The bulb has burnt out!"))
|
||||
update_icon()
|
||||
|
||||
/obj/item/flash/synthetic/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
..()
|
||||
if(!broken)
|
||||
broken = 1
|
||||
to_chat(user, span_warning("The bulb has burnt out!"))
|
||||
update_icon()
|
||||
one_use = TRUE
|
||||
|
||||
/obj/item/flash/robot
|
||||
name = "mounted flash"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define CAN_USE "can_use"
|
||||
/*
|
||||
* Contains:
|
||||
* Flashlights
|
||||
@@ -37,6 +38,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/flashlight/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -89,25 +93,30 @@
|
||||
. += "It appears to have a high amount of power remaining."
|
||||
|
||||
/obj/item/flashlight/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(flickering)
|
||||
to_chat(user, "The light is currently malfunctioning and you're unable to adjust it!") //To prevent some lighting anomalities.
|
||||
return
|
||||
return FALSE
|
||||
if(power_use)
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, "You cannot turn the light on while in this [user.loc].") //To prevent some lighting anomalities.
|
||||
return 0
|
||||
return FALSE
|
||||
if(!cell || cell.charge == 0)
|
||||
to_chat(user, "You flick the switch on [src], but nothing happens.")
|
||||
return 0
|
||||
return FALSE
|
||||
on = !on
|
||||
if(on && power_use)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if(power_use)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
playsound(src, 'sound/weapons/empty.ogg', 15, 1, -3) // VOREStation Edit
|
||||
playsound(src, 'sound/weapons/empty.ogg', 15, 1, -3)
|
||||
update_brightness()
|
||||
user.update_mob_action_buttons()
|
||||
return 1
|
||||
return CAN_USE
|
||||
|
||||
/obj/item/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
add_fingerprint(user)
|
||||
@@ -430,20 +439,20 @@
|
||||
update_brightness()
|
||||
|
||||
/obj/item/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
to_chat(user, span_notice("It's out of fuel."))
|
||||
return
|
||||
if(on)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
// All good, turn it on.
|
||||
if(.)
|
||||
if(. == CAN_USE)
|
||||
user.visible_message(span_notice("[user] activates the flare."), span_notice("You pull the cord on the flare, activating it!"))
|
||||
src.force = on_damage
|
||||
src.damtype = BURN
|
||||
force = on_damage
|
||||
damtype = BURN
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flashlight/flare/proc/ignite() //Used for flare launchers.
|
||||
@@ -488,15 +497,16 @@
|
||||
update_brightness()
|
||||
|
||||
/obj/item/flashlight/glowstick/attack_self(mob/user)
|
||||
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!fuel)
|
||||
to_chat(user, span_notice("The glowstick has already been turned on."))
|
||||
return
|
||||
if(on)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
if(. == CAN_USE)
|
||||
user.visible_message(span_notice("[user] cracks and shakes \the [name]."), span_notice("You crack and shake \the [src], turning it on!"))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -537,3 +547,5 @@
|
||||
light_range = 8
|
||||
light_power = 0.1
|
||||
light_color = "#49F37C"
|
||||
|
||||
#undef CAN_USE
|
||||
|
||||
@@ -106,7 +106,10 @@
|
||||
|
||||
new painting_decal(F, painting_dir, painting_colour)
|
||||
|
||||
/obj/item/floor_painter/attack_self(var/mob/user)
|
||||
/obj/item/floor_painter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/choice = tgui_alert(user, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel"))
|
||||
if(choice == "Cancel")
|
||||
return
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/scanning = 0
|
||||
var/radiation_count = 0
|
||||
var/datum/looping_sound/geiger/soundloop
|
||||
var/mounted = FALSE
|
||||
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
@@ -61,7 +62,12 @@
|
||||
loop.last_radiation = radiation_count
|
||||
loop.start()
|
||||
|
||||
/obj/item/geiger/attack_self(var/mob/user)
|
||||
/obj/item/geiger/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(mounted)
|
||||
return
|
||||
scanning = !scanning
|
||||
if(scanning)
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -109,6 +115,7 @@
|
||||
var/number = 0
|
||||
var/last_tick //used to delay the powercheck
|
||||
var/wiresexposed = 0
|
||||
mounted = TRUE
|
||||
|
||||
/obj/item/geiger/wall/Initialize(mapload)
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -120,7 +127,10 @@
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger/wall/attack_self(var/mob/user)
|
||||
/obj/item/geiger/wall/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/gold_star_printer/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(last_print + print_cooldown <= world.time)
|
||||
make_star(user)
|
||||
else
|
||||
|
||||
@@ -26,6 +26,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/gps/Initialize(mapload)
|
||||
. = ..()
|
||||
compass = new(src)
|
||||
@@ -182,6 +185,11 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/gps/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
display(user)
|
||||
|
||||
// Compiles all the data not available directly from the GPS
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
. += span_notice("You have to go closer if you want to read it.")
|
||||
|
||||
//hit yourself with it
|
||||
/obj/item/holowarrant/attack_self(mob/living/user as mob)
|
||||
/obj/item/holowarrant/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
active = null
|
||||
var/list/warrants = list()
|
||||
if(!isnull(GLOB.data_core.general))
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///For attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/lightreplacer/Initialize(mapload)
|
||||
. = ..()
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
@@ -129,6 +132,11 @@
|
||||
to_chat(user, span_notice("You fill \the [src] with lights from \the [S]."))
|
||||
|
||||
/obj/item/lightreplacer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
/* // This would probably be a bit OP. If you want it though, uncomment the code.
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
@@ -250,6 +258,9 @@
|
||||
. += "It is currently coloring lights."
|
||||
|
||||
/obj/item/lightpainter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
|
||||
if(!resetmode)
|
||||
resetmode = 1
|
||||
|
||||
@@ -119,7 +119,10 @@
|
||||
to_chat(user, span_warning("\The [src] flashes an error light. You might need to reconfigure it."))
|
||||
return
|
||||
|
||||
/obj/item/closet_painter/attack_self(var/mob/user)
|
||||
/obj/item/closet_painter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/choice = tgui_alert(user, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour"))
|
||||
if(choice == "Regular Closet Colour")
|
||||
choose_colour()
|
||||
|
||||
@@ -42,7 +42,10 @@
|
||||
else
|
||||
user.audible_message(span_infoplain(span_bold("[user.GetVoice()]") + "[user.GetAltName()] broadcasts, " + span_large("\"[message]\"")), runemessage = message)
|
||||
|
||||
/obj/item/megaphone/attack_self(var/mob/living/user)
|
||||
/obj/item/megaphone/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/message = tgui_input_text(user, "Shout a message?", "Megaphone", null, MAX_MESSAGE_LEN)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -32,7 +32,22 @@
|
||||
toolspeed = 1
|
||||
tool_qualities = list(TOOL_MULTITOOL)
|
||||
|
||||
var/uplink = FALSE
|
||||
|
||||
/obj/item/multitool/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(uplink)
|
||||
return
|
||||
|
||||
if(selected_io)
|
||||
selected_io = null
|
||||
to_chat(user, span_notice("You clear the wired connection from the multitool."))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
update_icon()
|
||||
var/choice = tgui_alert(user, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel"))
|
||||
switch(choice)
|
||||
if("Clear Buffers")
|
||||
@@ -52,8 +67,6 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/proc/mode_switch(mob/living/user)
|
||||
if(mode_index + 1 > modes.len) mode_index = 1
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/paicard/relaymove(var/mob/user, var/direction)
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
|
||||
@@ -216,7 +216,12 @@ GLOBAL_LIST_EMPTY(paikeys)
|
||||
else
|
||||
to_chat(user, span_warning("You would need to remove the installed [I] first!"))
|
||||
|
||||
/obj/item/paicard/attack_self(mob/user)
|
||||
/obj/item/paicard/attack_self(mob/user, callback)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling && !callback)
|
||||
return FALSE
|
||||
if(!panel_open)
|
||||
access_screen(user)
|
||||
return
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
|
||||
P.change_color(GLOB.pipe_colors[mode])
|
||||
|
||||
/obj/item/pipe_painter/attack_self(mob/user as mob)
|
||||
/obj/item/pipe_painter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/new_mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe painter", modes)
|
||||
if(!new_mode)
|
||||
return
|
||||
|
||||
@@ -34,8 +34,12 @@ GLOBAL_LIST_BOILERPLATE(all_beacons, /obj/item/radio/beacon)
|
||||
name = "suspicious beacon"
|
||||
desc = "A label on it reads: <i>Activate to have a singularity beacon teleported to your location</i>."
|
||||
origin_tech = list(TECH_BLUESPACE = 1, TECH_ILLEGAL = 7)
|
||||
beacon = TRUE
|
||||
|
||||
/obj/item/radio/beacon/syndicate/attack_self(mob/user as mob)
|
||||
/obj/item/radio/beacon/syndicate/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user)
|
||||
to_chat(user, span_notice("Locked In"))
|
||||
new /obj/machinery/power/singularity_beacon/syndicate( user.loc )
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
matter = list(MAT_STEEL = 10000,MAT_GLASS = 2500)
|
||||
|
||||
var/code = 2
|
||||
electric_pack = TRUE
|
||||
|
||||
/obj/item/radio/electropack/attack_hand(mob/living/user as mob)
|
||||
if(src == user.back)
|
||||
@@ -104,8 +105,10 @@
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
/obj/item/radio/electropack/attack_self(mob/user as mob, flag1)
|
||||
|
||||
/obj/item/radio/electropack/attack_self(mob/user, flag1)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!ishuman(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -85,6 +85,9 @@ GLOBAL_LIST_EMPTY(active_radio_jammers)
|
||||
return ..()
|
||||
|
||||
/obj/item/radio_jammer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(on)
|
||||
turn_off(user)
|
||||
else
|
||||
|
||||
@@ -44,6 +44,11 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/list/datum/radio_frequency/secure_radio_connections
|
||||
|
||||
///If we're a syndicate beacon or not.
|
||||
var/beacon = FALSE
|
||||
var/electric_pack = FALSE
|
||||
var/uplink = FALSE
|
||||
|
||||
/obj/item/radio/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
@@ -115,7 +120,12 @@
|
||||
/obj/item/radio/proc/recalculateChannels()
|
||||
return
|
||||
|
||||
/obj/item/radio/attack_self(mob/user as mob)
|
||||
/obj/item/radio/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(beacon || electric_pack || uplink)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/interact(mob/user)
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/analyzer/atmosanalyze(var/mob/user)
|
||||
var/air = user.return_air()
|
||||
if (!air)
|
||||
@@ -24,7 +27,12 @@
|
||||
|
||||
return atmosanalyzer_scan(src, air, user)
|
||||
|
||||
/obj/item/analyzer/attack_self(mob/user as mob)
|
||||
/obj/item/analyzer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if (user.stat)
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/mass_spectrometer/attack_self(mob/user as mob)
|
||||
/obj/item/mass_spectrometer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if (user.stat)
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
|
||||
@@ -97,6 +97,9 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
to_chat(user,span_warning("Not a compatible subject to work with!"))
|
||||
|
||||
/obj/item/sleevemate/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!stored_mind)
|
||||
to_chat(user,span_warning("No stored mind in \the [src]."))
|
||||
return
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
camera = new camtype(src)
|
||||
|
||||
/obj/item/camerabug/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.a_intent == I_HURT)
|
||||
to_chat(user, span_notice("You crush the [src] under your foot, breaking it."))
|
||||
visible_message(span_notice("[user.name] crushes the [src] under their foot, breaking it!"))
|
||||
new brokentype(get_turf(src))
|
||||
spawn(0)
|
||||
qdel(src)
|
||||
/* else
|
||||
radio.interact(user)
|
||||
@@ -170,7 +172,9 @@
|
||||
radio = new(src)
|
||||
*/
|
||||
/obj/item/bug_monitor/attack_self(mob/user)
|
||||
// radio.attack_self(user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
view_cameras(user)
|
||||
|
||||
/obj/item/bug_monitor/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
|
||||
@@ -123,7 +123,10 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/suit_cooling_unit/attack_self(var/mob/user)
|
||||
/obj/item/suit_cooling_unit/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cover_open && cell)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(cell)
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
icon_state = "t-ray[on]"
|
||||
|
||||
/obj/item/t_scanner/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
set_active(!on)
|
||||
|
||||
/obj/item/t_scanner/proc/set_active(var/active)
|
||||
|
||||
@@ -342,6 +342,9 @@
|
||||
|
||||
|
||||
/obj/item/taperecorder/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(recording || playing)
|
||||
stop()
|
||||
else
|
||||
@@ -387,6 +390,9 @@
|
||||
ruin()
|
||||
|
||||
/obj/item/rectape/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!ruined)
|
||||
to_chat(user, span_notice("You pull out all the tape!"))
|
||||
ruin()
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/named
|
||||
|
||||
/obj/item/text_to_speech/attack_self(mob/user as mob)
|
||||
/obj/item/text_to_speech/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.incapacitated(INCAPACITATION_KNOCKDOWN|INCAPACITATION_DISABLED)) // EDIT: We can use the device only if we are not in certain types of incapacitation. We don't want chairs stopping us from texting!!
|
||||
to_chat(user, "You cannot activate the device in your state.")
|
||||
return
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/ticket_printer/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(last_print + print_cooldown <= world.time)
|
||||
print_a_ticket(user)
|
||||
else
|
||||
|
||||
@@ -32,7 +32,10 @@ effective or pretty fucking useless.
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/batterer/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
/obj/item/batterer/attack_self(mob/user, flag = 0, emp = 0)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!user) return
|
||||
if(times_used >= max_uses)
|
||||
to_chat(user, span_warning("The mind batterer has been burnt out!"))
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
sense_proximity(callback = TYPE_PROC_REF(/atom,HasProximity))
|
||||
|
||||
/obj/item/transfer_valve/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/transfer_valve/tgui_state(mob/user)
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/universal_translator/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!listening) //Turning ON
|
||||
langset = tgui_input_list(user,"Translate to which of your languages?","Language Selection", user.languages)
|
||||
if(langset)
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/perfect_tele/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -115,6 +118,11 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/perfect_tele/attack_self(mob/user, var/radial_menu_anchor = src)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(loc_network)
|
||||
for(var/obj/item/perfect_tele_beacon/stationary/nb in GLOB.premade_tele_beacons)
|
||||
if(nb.tele_network == loc_network)
|
||||
@@ -404,6 +412,9 @@ not carry this around."}, "OOC Warning", list("Take It","Leave It"))
|
||||
GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stationary)
|
||||
|
||||
/obj/item/perfect_tele_beacon/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/tvcamera/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
add_fingerprint(user)
|
||||
user.set_machine(src)
|
||||
show_ui(user)
|
||||
|
||||
@@ -217,20 +217,33 @@
|
||||
//
|
||||
// Includes normal radio uplink, multitool uplink,
|
||||
// implant uplink (not the implant tool) and a preset headset uplink.
|
||||
|
||||
/obj/item/radio/uplink
|
||||
uplink = TRUE
|
||||
|
||||
/obj/item/radio/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/item/radio/uplink/attack_self(mob/user as mob)
|
||||
/obj/item/radio/uplink/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
/obj/item/multitool/uplink
|
||||
uplink = TRUE
|
||||
|
||||
/obj/item/multitool/uplink/Initialize(mapload)
|
||||
. = ..()
|
||||
hidden_uplink = new(src)
|
||||
|
||||
/obj/item/multitool/uplink/attack_self(mob/user as mob)
|
||||
/obj/item/multitool/uplink/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
var/vac_owner = null
|
||||
flags = NOBLUDGEON
|
||||
|
||||
/obj/item/vac_attachment/attack_self(mob/living/user)
|
||||
/obj/item/vac_attachment/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/set_input = null
|
||||
if(!output_dest)
|
||||
set_input = "output destination"
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
|
||||
to_chat(usr, "You configure the hailer to shout \"[use_message]\".")
|
||||
|
||||
/obj/item/hailer/attack_self(mob/living/carbon/user as mob)
|
||||
/obj/item/hailer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if (spamcheck)
|
||||
return
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
drop_sound = 'sound/items/drop/glass.ogg'
|
||||
pickup_sound = 'sound/items/pickup/glass.ogg'
|
||||
|
||||
///If we can fill it with water
|
||||
var/can_fill = FALSE
|
||||
///If we are filled with water.
|
||||
var/filled = FALSE
|
||||
|
||||
/obj/item/glass_jar/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
@@ -24,6 +29,16 @@
|
||||
/obj/item/glass_jar/afterattack(var/atom/A, var/mob/user, var/proximity)
|
||||
if(!proximity || contains)
|
||||
return
|
||||
if(can_fill && !filled)
|
||||
if(istype(A, /obj/structure/sink) || istype(A, /turf/simulated/floor/water))
|
||||
if(contains && user.a_intent == I_HELP)
|
||||
to_chat(user, span_warning("That probably isn't the best idea."))
|
||||
return
|
||||
|
||||
to_chat(user, span_notice("You fill \the [src] with water!"))
|
||||
filled = TRUE
|
||||
update_icon()
|
||||
return
|
||||
if(istype(A, /mob))
|
||||
var/accept = 0
|
||||
for(var/D in accept_mobs)
|
||||
@@ -47,7 +62,30 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/glass_jar/attack_self(var/mob/user)
|
||||
/obj/item/glass_jar/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
|
||||
//For the fish jars
|
||||
if(can_fill && filled)
|
||||
if(contains == JAR_ANIMAL)
|
||||
if(user.a_intent == I_HELP)
|
||||
to_chat(user, span_notice("Maybe you shouldn't empty the water..."))
|
||||
return
|
||||
|
||||
else
|
||||
filled = FALSE
|
||||
user.visible_message(span_warning("[user] dumps out \the [src]'s water!"))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else
|
||||
user.visible_message(span_notice("[user] dumps \the [src]'s water."))
|
||||
filled = FALSE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
switch(contains)
|
||||
if(JAR_MONEY)
|
||||
for(var/obj/O in src)
|
||||
@@ -87,13 +125,20 @@
|
||||
/obj/item/glass_jar/update_icon() // Also updates name and desc
|
||||
underlays.Cut()
|
||||
cut_overlays()
|
||||
|
||||
if(filled)
|
||||
underlays += image(icon, "[icon_state]_water")
|
||||
|
||||
switch(contains)
|
||||
if(JAR_NOTHING)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
if(JAR_MONEY)
|
||||
name = "tip jar"
|
||||
desc = "A small jar with money inside."
|
||||
if(can_fill)
|
||||
name = "tip tank"
|
||||
else
|
||||
name = "tip jar"
|
||||
desc = "A [name] with money inside."
|
||||
for(var/obj/item/spacecash/S in src)
|
||||
var/image/money = image(S.icon, S.icon_state)
|
||||
money.pixel_x = rand(-2, 3)
|
||||
@@ -101,31 +146,52 @@
|
||||
money.transform *= 0.6
|
||||
underlays += money
|
||||
if(JAR_ANIMAL)
|
||||
for(var/mob/M in src)
|
||||
var/image/victim = image(M.icon, M.icon_state)
|
||||
victim.pixel_y = 6
|
||||
victim.color = M.color
|
||||
if(M.plane == PLANE_LIGHTING_ABOVE) // This will only show up on the ground sprite, due to the HuD being over it, so we need both images.
|
||||
var/image/victim_glow = image(M.icon, M.icon_state)
|
||||
victim_glow.pixel_y = 6
|
||||
victim_glow.color = M.color
|
||||
underlays += victim_glow
|
||||
underlays += victim
|
||||
name = "glass jar with [M]"
|
||||
desc = "A small jar with [M] inside."
|
||||
//tank
|
||||
if(can_fill)
|
||||
for(var/mob/M in src)
|
||||
var/image/victim = image(M.icon, M.icon_state)
|
||||
var/initial_x_scale = M.icon_scale_x
|
||||
var/initial_y_scale = M.icon_scale_y
|
||||
M.adjust_scale(0.7)
|
||||
victim.appearance = M.appearance
|
||||
M.adjust_scale(initial_x_scale, initial_y_scale)
|
||||
victim.pixel_y = 4
|
||||
underlays += victim
|
||||
name = "[name] with [M]"
|
||||
desc = "A large [name] with [M] inside."
|
||||
else
|
||||
for(var/mob/M in src)
|
||||
var/image/victim = image(M.icon, M.icon_state)
|
||||
victim.pixel_y = 6
|
||||
victim.color = M.color
|
||||
if(M.plane == PLANE_LIGHTING_ABOVE) // This will only show up on the ground sprite, due to the HuD being over it, so we need both images.
|
||||
var/image/victim_glow = image(M.icon, M.icon_state)
|
||||
victim_glow.pixel_y = 6
|
||||
victim_glow.color = M.color
|
||||
underlays += victim_glow
|
||||
underlays += victim
|
||||
name = "glass jar with [M]"
|
||||
desc = "A small jar with [M] inside."
|
||||
if(JAR_SPIDER)
|
||||
for(var/obj/effect/spider/spiderling/S in src)
|
||||
var/image/victim = image(S.icon, S.icon_state)
|
||||
underlays += victim
|
||||
name = "glass jar with [S]"
|
||||
desc = "A small jar with [S] inside."
|
||||
return
|
||||
if(can_fill)
|
||||
name = "[name] with [S]"
|
||||
desc = "A large tank with [S] inside."
|
||||
else
|
||||
name = "glass jar with [S]"
|
||||
desc = "A small jar with [S] inside."
|
||||
underlays += victim
|
||||
|
||||
if(filled)
|
||||
desc = "[desc] It contains water."
|
||||
|
||||
/obj/item/glass_jar/fish
|
||||
name = "glass tank"
|
||||
desc = "A large glass tank."
|
||||
|
||||
var/filled = FALSE
|
||||
can_fill = TRUE
|
||||
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
@@ -136,85 +202,6 @@
|
||||
desc = "A large plastic tank."
|
||||
matter = list(MAT_PLASTIC = 4000)
|
||||
|
||||
/obj/item/glass_jar/fish/update_icon() // Also updates name and desc
|
||||
underlays.Cut()
|
||||
cut_overlays()
|
||||
|
||||
if(filled)
|
||||
underlays += image(icon, "[icon_state]_water")
|
||||
|
||||
switch(contains)
|
||||
if(JAR_NOTHING)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
if(JAR_MONEY)
|
||||
name = "tip tank"
|
||||
desc = "A large [name] with money inside."
|
||||
for(var/obj/item/spacecash/S in src)
|
||||
var/image/money = image(S.icon, S.icon_state)
|
||||
money.pixel_x = rand(-2, 3)
|
||||
money.pixel_y = rand(-6, 6)
|
||||
money.transform *= 0.6
|
||||
underlays += money
|
||||
if(JAR_ANIMAL)
|
||||
for(var/mob/M in src)
|
||||
var/image/victim = image(M.icon, M.icon_state)
|
||||
var/initial_x_scale = M.icon_scale_x
|
||||
var/initial_y_scale = M.icon_scale_y
|
||||
M.adjust_scale(0.7)
|
||||
victim.appearance = M.appearance
|
||||
M.adjust_scale(initial_x_scale, initial_y_scale)
|
||||
victim.pixel_y = 4
|
||||
underlays += victim
|
||||
name = "[name] with [M]"
|
||||
desc = "A large [name] with [M] inside."
|
||||
if(JAR_SPIDER)
|
||||
for(var/obj/effect/spider/spiderling/S in src)
|
||||
var/image/victim = image(S.icon, S.icon_state)
|
||||
underlays += victim
|
||||
name = "[name] with [S]"
|
||||
desc = "A large tank with [S] inside."
|
||||
|
||||
if(filled)
|
||||
desc = "[desc] It contains water."
|
||||
|
||||
return
|
||||
|
||||
/obj/item/glass_jar/fish/afterattack(var/atom/A, var/mob/user, var/proximity)
|
||||
if(!filled)
|
||||
if(istype(A, /obj/structure/sink) || istype(A, /turf/simulated/floor/water))
|
||||
if(contains && user.a_intent == I_HELP)
|
||||
to_chat(user, span_warning("That probably isn't the best idea."))
|
||||
return
|
||||
|
||||
to_chat(user, span_notice("You fill \the [src] with water!"))
|
||||
filled = TRUE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/glass_jar/fish/attack_self(var/mob/user)
|
||||
if(filled)
|
||||
if(contains == JAR_ANIMAL)
|
||||
if(user.a_intent == I_HELP)
|
||||
to_chat(user, span_notice("Maybe you shouldn't empty the water..."))
|
||||
return
|
||||
|
||||
else
|
||||
filled = FALSE
|
||||
user.visible_message(span_warning("[user] dumps out \the [src]'s water!"))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else
|
||||
user.visible_message(span_notice("[user] dumps \the [src]'s water."))
|
||||
filled = FALSE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
#undef JAR_NOTHING
|
||||
#undef JAR_MONEY
|
||||
#undef JAR_ANIMAL
|
||||
|
||||
@@ -7,7 +7,14 @@
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "gunbox"
|
||||
w_class = ITEMSIZE_HUGE
|
||||
///If the gunbox has custom attack_self code
|
||||
var/variant_gunbox = FALSE
|
||||
/obj/item/gunbox/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(variant_gunbox)
|
||||
return
|
||||
var/list/options = list()
|
||||
options["M1911 (.45)"] = list(/obj/item/gun/projectile/colt/detective, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
|
||||
options["MT Mk58 (.45)"] = list(/obj/item/gun/projectile/sec, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
|
||||
@@ -30,7 +37,11 @@
|
||||
/obj/item/gunbox/stun
|
||||
name = "non-lethal sidearm box"
|
||||
desc = "A secure box containing a non-lethal sidearm."
|
||||
variant_gunbox = TRUE
|
||||
/obj/item/gunbox/stun/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/options = list()
|
||||
options["Stun Revolver"] = list(/obj/item/gun/energy/stunrevolver/detective, /obj/item/cell/device/weapon, /obj/item/cell/device/weapon)
|
||||
options["Taser"] = list(/obj/item/gun/energy/taser, /obj/item/cell/device/weapon, /obj/item/cell/device/weapon)
|
||||
@@ -52,7 +63,11 @@
|
||||
name = "centcom sidearm box"
|
||||
desc = "A secure box containing a lethal sidearm used by Central Command."
|
||||
w_class = ITEMSIZE_HUGE
|
||||
variant_gunbox = TRUE
|
||||
/obj/item/gunbox/centcom/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/options = list()
|
||||
options["Écureuil (10mm)"] = list(/obj/item/gun/projectile/ecureuil, /obj/item/ammo_magazine/m10mm/pistol, /obj/item/ammo_magazine/m10mm/pistol)
|
||||
options["Écureuil Olive (10mm)"] = list(/obj/item/gun/projectile/ecureuil/tac, /obj/item/ammo_magazine/m10mm/pistol, /obj/item/ammo_magazine/m10mm/pistol)
|
||||
|
||||
@@ -6,8 +6,12 @@
|
||||
desc = "A secure guncase containing the warden's beloved shotgun."
|
||||
icon = 'icons/obj/storage_vr.dmi'
|
||||
icon_state = "gunboxw"
|
||||
variant_gunbox = TRUE
|
||||
|
||||
/obj/item/gunbox/warden/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/options = list()
|
||||
options["Warden's combat shotgun"] = list(/obj/item/gun/projectile/shotgun/pump/combat/warden, /obj/item/ammo_magazine/ammo_box/b12g/beanbag)
|
||||
options["Warden's compact shotgun"] = list(/obj/item/gun/projectile/shotgun/compact/warden, /obj/item/ammo_magazine/ammo_box/b12g/beanbag)
|
||||
@@ -30,7 +34,11 @@
|
||||
desc = "A secure box containing a sidearm befitting of the site manager. Includes both lethal and non-lethal munitions, beware what's loaded!"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "gunbox"
|
||||
variant_gunbox = TRUE
|
||||
/obj/item/gunbox/captain/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/options = list()
|
||||
options["M1911 (.45)"] = list(/obj/item/gun/projectile/colt/detective, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45)
|
||||
options["MT Mk58 (.45)"] = list(/obj/item/gun/projectile/sec, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
to_chat(user, span_notice("[src] is projecting at max capacity!"))
|
||||
|
||||
/obj/item/holosign_creator/attack_self(mob/user)
|
||||
. = ..()
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return
|
||||
if(signs.len)
|
||||
|
||||
@@ -98,6 +98,9 @@
|
||||
//Called when the leash is used in hand
|
||||
//Tugs the pet closer
|
||||
/obj/item/leash/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!leash_pet) //No pet, no tug.
|
||||
return
|
||||
//Yank the pet. Yank em in close.
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
to_chat(user, "The headline screams, \"[headline]\"")
|
||||
|
||||
/obj/item/tabloid/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.visible_message(span_notice("\The [user] leafs idly through \the [src]."))
|
||||
if(headline)
|
||||
to_chat(user, "Most of it is the usual tabloid garbage, but the headline story, \"[headline]\", holds your attention for awhile.")
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
. = ..()
|
||||
linked = to_link
|
||||
|
||||
/obj/item/petrifier/attack_self(var/mob/user)
|
||||
. = ..()
|
||||
/obj/item/petrifier/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if (!isturf(user.loc) && user.get_ultimate_mob() != target)
|
||||
to_chat(user, span_warning("The device beeps but does nothing."))
|
||||
return
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
desc = "A pocket-sized plastic slip with a button in the middle. \"[pick(descstrings)]\" is written on the back."
|
||||
|
||||
/obj/item/pizzavoucher/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
add_fingerprint(user)
|
||||
if(!spent)
|
||||
user.visible_message(span_notice("[user] presses a button on [src]!"))
|
||||
|
||||
@@ -212,8 +212,10 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/poi/broken_drone_circuit/attack_self(mob/living/user as mob)
|
||||
|
||||
/obj/item/poi/broken_drone_circuit/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
|
||||
user.visible_message(message = "[user] is studiously examining [src]", self_message = "You take your time to analyze the circuit...")
|
||||
var/message = ""
|
||||
@@ -242,7 +244,3 @@
|
||||
|
||||
if(do_after(user, delay = 5 SECONDS, target = src))
|
||||
to_chat(user, message)
|
||||
|
||||
|
||||
|
||||
..()
|
||||
|
||||
@@ -7,14 +7,8 @@
|
||||
icon_state = "bodybag_folded"
|
||||
item_state = "bodybag_cryo_folded"
|
||||
origin_tech = list(TECH_ENGINEERING = 3)
|
||||
|
||||
/obj/item/bodybag/cryobag/robobag/attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/cryobag/robobag/R = new /obj/structure/closet/body_bag/cryobag/robobag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
if(syringe)
|
||||
R.syringe = syringe
|
||||
syringe = null
|
||||
qdel(src)
|
||||
robotic = TRUE
|
||||
cryogenic = FALSE
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/robobag
|
||||
name = "synthmorph bag"
|
||||
|
||||
@@ -55,7 +55,10 @@
|
||||
item_state = "cyborg_upgrade"
|
||||
var/heldname = "default name"
|
||||
|
||||
/obj/item/borg/upgrade/utility/rename/attack_self(mob/user as mob)
|
||||
/obj/item/borg/upgrade/utility/rename/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/new_name = tgui_input_text(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
|
||||
if(new_name)
|
||||
heldname = new_name
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
var/list/item_options = list("Gift" = /obj/item/a_gift,
|
||||
"Health Analyzer" = /obj/item/healthanalyzer)
|
||||
|
||||
/obj/item/selectable_item/attack_self(mob/user as mob)
|
||||
/obj/item/selectable_item/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_alert(user, {"[preface_string]"}, preface_title)
|
||||
var/chosen_item = tgui_input_list(user, selection_string, selection_title, item_options)
|
||||
chosen_item = item_options[chosen_item]
|
||||
|
||||
@@ -27,6 +27,7 @@ var/list/marker_beacon_colors = list(
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/icon_base = "marker"
|
||||
var/picked_color = "random"
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/marker_beacon/ten
|
||||
amount = 10
|
||||
@@ -50,6 +51,9 @@ var/list/marker_beacon_colors = list(
|
||||
icon_state = "[icon_base][lowertext(picked_color)]"
|
||||
|
||||
/obj/item/stack/marker_beacon/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, span_warning("You need more space to place a [singular_name] here."))
|
||||
return
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
pass_color = TRUE
|
||||
|
||||
var/bag_material = MAT_CLOTH
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/emptysandbag/Initialize(mapload, var/amt, var/bag_mat)
|
||||
. = ..(mapload, amt)
|
||||
@@ -138,7 +139,10 @@
|
||||
return INITIALIZE_HINT_QDEL
|
||||
color = M.icon_colour
|
||||
|
||||
/obj/item/stack/emptysandbag/attack_self(var/mob/user)
|
||||
/obj/item/stack/emptysandbag/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
while(do_after(user, 1 SECOND, target = src) && can_use(1) && istype(get_turf(src), /turf/simulated/floor/outdoors))
|
||||
use(1)
|
||||
var/obj/item/stack/sandbags/SB = new (get_turf(src), 1, bag_material)
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
var/strict_color_stacking = FALSE // Will the stack merge with other stacks that are different colors? (Dyed cloth, wood, etc)
|
||||
var/is_building = FALSE
|
||||
|
||||
var/custom_handling = FALSE
|
||||
var/beacons = FALSE
|
||||
var/sandbags = FALSE
|
||||
|
||||
/obj/item/stack/Initialize(mapload, var/starting_amount)
|
||||
. = ..()
|
||||
if(!stacktype)
|
||||
@@ -84,6 +88,11 @@
|
||||
. += get_examine_string()
|
||||
|
||||
/obj/item/stack/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(custom_handling)
|
||||
return FALSE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/stack/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
max_amount = 240
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_BLUESPACE = 4)
|
||||
force = 1 //Needs a token force to ensure you can attack because for some reason you can't attack with 0 force things
|
||||
custom_handling = TRUE
|
||||
|
||||
/obj/item/stack/telecrystal/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
if(amount >= 5)
|
||||
@@ -18,7 +19,10 @@
|
||||
else
|
||||
to_chat(user, span_warning("There are not enough telecrystals to do that."))
|
||||
|
||||
/obj/item/stack/telecrystal/attack_self(mob/user as mob)
|
||||
/obj/item/stack/telecrystal/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals
|
||||
to_chat(user, span_notice("You use \the [src], adding [src.amount] to your balance."))
|
||||
user.mind.tcrystals += amount
|
||||
|
||||
@@ -106,7 +106,10 @@
|
||||
desc = "Shiny green " + MAT_VERDANTIUM + ", pressed into a coin. It almost seems to glimmer under starlight."
|
||||
icon_state = "coin_verdantium"
|
||||
|
||||
/obj/item/fake_coin/attack_self(mob/user as mob)
|
||||
/obj/item/fake_coin/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(result == 1)
|
||||
|
||||
@@ -115,12 +115,13 @@
|
||||
|
||||
//all credit to skasi for toy mech fun ideas
|
||||
/obj/item/toy/mecha/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(timer < world.time)
|
||||
to_chat(user, span_notice("You play with [src]."))
|
||||
timer = world.time + cooldown
|
||||
playsound(user, 'sound/mecha/mechstep.ogg', 20, TRUE)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/mecha/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -163,20 +163,23 @@
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
|
||||
/obj/item/toy/sword/attack_self(mob/user as mob)
|
||||
src.active = !( src.active )
|
||||
if (src.active)
|
||||
/obj/item/toy/sword/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
active = !active
|
||||
if(active)
|
||||
to_chat(user, span_notice("You extend the plastic blade with a quick flick of your wrist."))
|
||||
playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
src.item_state = "[icon_state]_blade"
|
||||
src.w_class = ITEMSIZE_LARGE
|
||||
item_state = "[icon_state]_blade"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
else
|
||||
to_chat(user, span_notice("You push the plastic blade back down into the handle."))
|
||||
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
src.item_state = "[icon_state]"
|
||||
src.w_class = ITEMSIZE_SMALL
|
||||
item_state = "[icon_state]"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
update_icon()
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/toy/sword/update_icon()
|
||||
@@ -282,7 +285,10 @@
|
||||
w_class = ITEMSIZE_TINY
|
||||
slot_flags = SLOT_EARS | SLOT_HOLSTER
|
||||
|
||||
/obj/item/toy/bosunwhistle/attack_self(mob/user as mob)
|
||||
/obj/item/toy/bosunwhistle/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cooldown < world.time - 35)
|
||||
to_chat(user, span_notice("You blow on [src], creating an ear-splitting noise!"))
|
||||
playsound(src, 'sound/misc/boatswain.ogg', 20, 1)
|
||||
@@ -305,9 +311,12 @@
|
||||
. = ..()
|
||||
desc = "A \"Space Life\" brand [name]"
|
||||
|
||||
/obj/item/toy/figure/attack_self(mob/user as mob)
|
||||
/obj/item/toy/figure/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cooldown < world.time)
|
||||
cooldown = (world.time + 30) //3 second cooldown
|
||||
cooldown = (world.time + 3 SECONDS)
|
||||
user.visible_message(span_notice("The [src] says \"[toysay]\"."))
|
||||
playsound(src, 'sound/machines/click.ogg', 20, 1)
|
||||
|
||||
@@ -629,16 +638,12 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "basecarp"
|
||||
attack_verb = list("bitten", "eaten", "fin slapped")
|
||||
var/bitesound = 'sound/weapons/bite.ogg'
|
||||
squeeze_sound = 'sound/weapons/bite.ogg'
|
||||
cooldown_length = 1 SECOND
|
||||
|
||||
// Attack mob
|
||||
/obj/item/toy/plushie/carp/attack(mob/M as mob, mob/user as mob)
|
||||
playsound(src, bitesound, 20, 1) // Play bite sound in local area
|
||||
return ..()
|
||||
|
||||
// Attack self
|
||||
/obj/item/toy/plushie/carp/attack_self(mob/user as mob)
|
||||
playsound(src, bitesound, 20, 1)
|
||||
playsound(src, squeeze_sound, 20, 1) // Play bite sound in local area
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -810,6 +815,16 @@
|
||||
//This should be used if a plushie can be made to say custom messages. Not currently required at the moment, but here just in case it'd added in the future.
|
||||
var/prevent_impersonation = FALSE
|
||||
|
||||
var/special_handling = TRUE
|
||||
|
||||
///The sound we make when squeezed
|
||||
var/squeeze_sound = 'sound/items/drop/plushie.ogg'
|
||||
|
||||
///Timer to track how long until we can play a sound again
|
||||
var/cooldown_timer
|
||||
///How long our cooldown timer is. Default 15 seconds
|
||||
var/cooldown_length = 15 SECONDS
|
||||
|
||||
/obj/item/toy/plushie/Initialize(mapload)
|
||||
. = ..()
|
||||
adjusted_name = name
|
||||
@@ -821,7 +836,12 @@
|
||||
if(in_range(user, src) && stored_item)
|
||||
. += span_italics("You can see something in there...")
|
||||
|
||||
/obj/item/toy/plushie/attack_self(mob/user as mob)
|
||||
/obj/item/toy/plushie/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return
|
||||
if(stored_item && opened && !searching)
|
||||
searching = TRUE
|
||||
if(do_after(user, 1 SECOND, target = src))
|
||||
@@ -843,7 +863,9 @@
|
||||
user.visible_message(span_warning(span_bold("\The [user]") + " attempts to strangle [src]!"),span_warning("You attempt to strangle [src]!"))
|
||||
else
|
||||
user.visible_message(span_notice(span_bold("\The [user]") + " pokes [src]."),span_notice("You poke [src]."))
|
||||
playsound(src, 'sound/items/drop/plushie.ogg', 25, 0)
|
||||
if(cooldown_timer < world.time)
|
||||
playsound(src, squeeze_sound, 25, 0)
|
||||
cooldown_timer = world.time + cooldown_length
|
||||
if(pokephrase) //There was no indiciation you had to use disarm intent to make it speak...So now it speaks if you touch it at all!
|
||||
say_phrase()
|
||||
last_message = world.time
|
||||
@@ -1186,14 +1208,7 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "plushie_tin"
|
||||
pokephrase = "Peep peep!"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/plushie/tinytin/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/voice/peep.ogg', 20, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
squeeze_sound = 'sound/voice/peep.ogg'
|
||||
|
||||
/obj/item/toy/plushie/tinytin_sec
|
||||
name = "officer tiny tin plushie"
|
||||
@@ -1202,14 +1217,7 @@
|
||||
icon_state = "plushie_tinsec"
|
||||
bubble_icon = "security"
|
||||
pokephrase = "That means you fucked up!"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/plushie/tinytin_sec/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/voice/tinytin_fuckedup.ogg', 25, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
squeeze_sound = 'sound/voice/tinytin_fuckedup.ogg'
|
||||
|
||||
//Toy cult sword
|
||||
/obj/item/toy/cultsword
|
||||
@@ -1257,13 +1265,15 @@
|
||||
var/cooldown = 0
|
||||
var/list/possible_answers = list("Definitely.", "All signs point to yes.", "Most likely.", "Yes.", "Ask again later.", "Better not tell you now.", "Future unclear.", "Maybe.", "Doubtful.", "No.", "Don't count on it.", "Never.")
|
||||
|
||||
/obj/item/toy/eight_ball/attack_self(mob/user as mob)
|
||||
/obj/item/toy/eight_ball/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!cooldown)
|
||||
var/answer = pick(possible_answers)
|
||||
user.visible_message(span_notice("[user] focuses on their question and [use_action]..."))
|
||||
user.visible_message(span_notice("The [src] says \"[answer]\""))
|
||||
spawn(30)
|
||||
cooldown = 0
|
||||
VARSET_IN(src, cooldown, FALSE, 3 SECONDS)
|
||||
return
|
||||
|
||||
/obj/item/toy/eight_ball/conch
|
||||
@@ -1320,26 +1330,7 @@
|
||||
/obj/item/toy/character/voidone,
|
||||
/obj/item/toy/character/lich
|
||||
)
|
||||
/* VOREStation edit. Moved to toys_vr.dm
|
||||
/obj/item/toy/AI
|
||||
name = "toy AI"
|
||||
desc = "A little toy model AI core!"// with real law announcing action!" //Alas, requires a rewrite of how ion laws work.
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "AI"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/AI/attack_self(mob/user)
|
||||
if(!cooldown) //for the sanity of everyone
|
||||
var/message = generate_ion_law()
|
||||
to_chat(user, span_notice("You press the button on [src]."))
|
||||
playsound(src, 'sound/machines/click.ogg', 20, 1)
|
||||
visible_message(span_danger("[message]"))
|
||||
cooldown = 1
|
||||
spawn(30) cooldown = 0
|
||||
return
|
||||
..()
|
||||
*/
|
||||
/obj/item/toy/owl
|
||||
name = "owl action figure"
|
||||
desc = "An action figure modeled after 'The Owl', defender of justice."
|
||||
@@ -1349,15 +1340,16 @@
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/owl/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!cooldown) //for the sanity of everyone
|
||||
var/message = pick("You won't get away this time, Griffin!", "Stop right there, criminal!", "Hoot! Hoot!", "I am the night!")
|
||||
to_chat(user, span_notice("You pull the string on the [src]."))
|
||||
//playsound(src, 'sound/misc/hoot.ogg', 25, 1)
|
||||
visible_message(span_danger("[message]"))
|
||||
cooldown = 1
|
||||
spawn(30) cooldown = 0
|
||||
return
|
||||
..()
|
||||
VARSET_IN(src, cooldown, FALSE, 3 SECONDS)
|
||||
|
||||
/obj/item/toy/griffin
|
||||
name = "griffin action figure"
|
||||
@@ -1368,15 +1360,16 @@
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/griffin/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!cooldown) //for the sanity of everyone
|
||||
var/message = pick("You can't stop me, Owl!", "My plan is flawless! The vault is mine!", "Caaaawwww!", "You will never catch me!")
|
||||
to_chat(user, span_notice("You pull the string on the [src]."))
|
||||
//playsound(src, 'sound/misc/caw.ogg', 25, 1)
|
||||
visible_message(span_danger("[message]"))
|
||||
cooldown = 1
|
||||
spawn(30) cooldown = 0
|
||||
return
|
||||
..()
|
||||
VARSET_IN(src, cooldown, FALSE, 3 SECONDS)
|
||||
|
||||
/* NYET.
|
||||
/obj/item/toddler
|
||||
|
||||
@@ -180,17 +180,8 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "plushie_vox"
|
||||
pokephrase = "Skreee!"
|
||||
var/cooldown = FALSE
|
||||
squeeze_sound = 'sound/voice/shriek1.ogg'
|
||||
|
||||
/obj/item/toy/plushie/vox/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/voice/shriek1.ogg', 10, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plushie/vox/proc/cooldownreset()
|
||||
cooldown = 0
|
||||
|
||||
/obj/item/toy/plushie/ipc
|
||||
name = "IPC plushie"
|
||||
@@ -199,7 +190,7 @@
|
||||
icon_state = "plushie_ipc"
|
||||
bubble_icon = "synthetic"
|
||||
pokephrase = "Ping!"
|
||||
var/cooldown = 0
|
||||
squeeze_sound = 'sound/machines/ping.ogg'
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/slice/bread
|
||||
var/toasted = FALSE
|
||||
@@ -233,13 +224,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plushie/ipc/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/machines/ping.ogg', 10, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plushie/ipc/toaster
|
||||
name = "toaster plushie"
|
||||
desc = "A stuffed toy of a pleasant art-deco toaster. It has a small tag on it reading 'Bricker Home Appliances! All rights reserved, copyright 2298.' It's a tad heavy on account of containing a heating coil. Want to make toast?"
|
||||
@@ -247,13 +231,7 @@
|
||||
attack_verb = list("toasted", "burnt")
|
||||
pokephrase = "Ding!"
|
||||
bubble_icon = "machine"
|
||||
|
||||
/obj/item/toy/plushie/ipc/toaster/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/machines/ding.ogg', 10, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
squeeze_sound = 'sound/machines/ding.ogg'
|
||||
|
||||
/obj/item/toy/plushie/snakeplushie
|
||||
name = "snake plushie"
|
||||
@@ -275,44 +253,26 @@
|
||||
desc = "An adorable plushie of NanoTrasen's Best Girl(TM) mascot. It smells faintly of paperwork."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "marketable_pip"
|
||||
var/cooldown = FALSE
|
||||
squeeze_sound = 'sound/effects/whistle.ogg'
|
||||
|
||||
/obj/item/toy/plushie/marketable_pip/attackby(obj/item/I, mob/user)
|
||||
var/obj/item/card/id/id = I.GetID()
|
||||
if(istype(id) && !cooldown)
|
||||
if(istype(id) && cooldown_timer < world.time)
|
||||
var/responses = list("I'm not giving you all-access.", "Do you want an ID modification?", "Where are you swiping that!?", "Congratulations! You've been promoted to unemployed!")
|
||||
pokephrase = pick(responses)
|
||||
user.visible_message(span_notice("[user] swipes \the [I] against \the [src]."))
|
||||
playsound(user, 'sound/effects/whistle.ogg', 10, 0)
|
||||
say_phrase()
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
cooldown_timer = world.time + cooldown_length
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plushie/marketable_pip/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/effects/whistle.ogg', 10, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plushie/moth
|
||||
name = "moth plushie"
|
||||
desc = "A cute plushie of cartoony moth. It's ultra fluffy but leaves dust everywhere."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "moth"
|
||||
pokephrase = "Aaaaaaa."
|
||||
var/cooldown = FALSE
|
||||
|
||||
/obj/item/toy/plushie/moth/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/voice/moth/scream_moth.ogg', 10, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/plushie/moth/proc/cooldownreset()
|
||||
cooldown = 0
|
||||
squeeze_sound = 'sound/voice/moth/scream_moth.ogg'
|
||||
|
||||
/obj/item/toy/plushie/crab
|
||||
name = "crab plushie"
|
||||
@@ -349,14 +309,7 @@
|
||||
pokephrase = "Stab!"
|
||||
bubble_icon = "security"
|
||||
attack_verb = list("stabbed", "slashed")
|
||||
var/cooldown = FALSE
|
||||
|
||||
/obj/item/toy/plushie/sus/attack_self(mob/user as mob)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/weapons/slice.ogg', 10, 0)
|
||||
cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 15 SECONDS, TIMER_DELETE_ME)
|
||||
return ..()
|
||||
squeeze_sound = 'sound/weapons/slice.ogg'
|
||||
|
||||
/obj/item/toy/plushie/sus/blue
|
||||
name = "blue spaceman plushie"
|
||||
@@ -443,6 +396,9 @@
|
||||
icon_state = "chewtoy_poly"
|
||||
|
||||
/obj/item/toy/chewtoy/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
playsound(loc, 'sound/items/drop/plushie.ogg', 50, 1)
|
||||
user.visible_message(span_notice(span_bold("\The [user]") + " gnaws on [src]!"),span_notice("You gnaw on [src]!"))
|
||||
|
||||
@@ -508,6 +464,9 @@
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/redbutton/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cooldown < world.time)
|
||||
cooldown = (world.time + 300) // Sets cooldown at 30 seconds
|
||||
user.visible_message(span_warning("[user] presses the big red button."), span_notice("You press the button, it plays a loud noise!"), span_notice("The button clicks loudly."))
|
||||
@@ -539,7 +498,12 @@
|
||||
var/cooldown = 0
|
||||
var/list/possible_answers = null
|
||||
|
||||
/obj/item/toy/AI/attack_self(mob/user as mob)
|
||||
/obj/item/toy/AI/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cooldown > world.time) //No, I'm not allowing you to spamclick this to do a search over GLOB.player_list
|
||||
return
|
||||
var/list/players = list()
|
||||
|
||||
for(var/mob/living/carbon/human/player in GLOB.player_list)
|
||||
@@ -557,12 +521,6 @@
|
||||
var/answer = pick(possible_answers)
|
||||
user.visible_message(span_notice("[user] asks the AI core to state laws."))
|
||||
user.visible_message(span_notice("[src] says \"[answer]\""))
|
||||
cooldown = 1
|
||||
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/AI/proc/cooldownreset()
|
||||
cooldown = 0
|
||||
|
||||
/*
|
||||
* Toy cuffs
|
||||
@@ -602,6 +560,9 @@
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/nuke/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cooldown < world.time)
|
||||
cooldown = world.time + 1800 //3 minutes
|
||||
user.visible_message(span_warning("[user] presses a button on [src]"), span_notice("You activate [src], it plays a loud noise!"), span_notice("You hear the click of a button."))
|
||||
@@ -630,8 +591,14 @@
|
||||
var/cooldown = 0
|
||||
var/obj/stored_minature = null
|
||||
|
||||
/obj/item/toy/minigibber/attack_self(mob/user)
|
||||
/obj/item/toy/minigibber/Destroy()
|
||||
QDEL_NULL(stored_minature)
|
||||
. = ..()
|
||||
|
||||
/obj/item/toy/minigibber/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(stored_minature)
|
||||
to_chat(user, span_danger("\The [src] makes a violent grinding noise as it tears apart the miniature figure inside!"))
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1)
|
||||
@@ -670,6 +637,9 @@
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/toy_xeno/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(cooldown <= world.time)
|
||||
cooldown = (world.time + 50) //5 second cooldown
|
||||
user.visible_message(span_notice("[user] pulls back the string on [src]."))
|
||||
@@ -712,6 +682,9 @@
|
||||
spin_cylinder()
|
||||
|
||||
/obj/item/toy/russian_revolver/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!bullets_left)
|
||||
user.visible_message(span_warning("[user] loads a bullet into [src]'s cylinder before spinning it."))
|
||||
spin_cylinder()
|
||||
@@ -802,12 +775,14 @@
|
||||
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/chainsaw/attack_self(mob/user as mob)
|
||||
/obj/item/toy/chainsaw/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/weapons/chainsaw_startup.ogg', 10, 0)
|
||||
cooldown = 1
|
||||
addtimer(CALLBACK(src, PROC_REF(cooldownreset)), 50)
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/chainsaw/proc/cooldownreset()
|
||||
cooldown = 0
|
||||
@@ -841,7 +816,10 @@
|
||||
if(prob(0.1))
|
||||
real = 1
|
||||
|
||||
/obj/item/toy/snake_popper/attack_self(mob/user as mob)
|
||||
/obj/item/toy/snake_popper/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!popped)
|
||||
to_chat(user, span_warning("A snake popped out of [src]!"))
|
||||
if(real == 0)
|
||||
@@ -1022,6 +1000,9 @@
|
||||
return 1
|
||||
|
||||
/obj/item/toy/desk/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
activate(user)
|
||||
|
||||
/obj/item/toy/desk/click_alt(mob/user)
|
||||
@@ -1090,7 +1071,10 @@
|
||||
drop_sound = 'sound/items/drop/cardboardbox.ogg'
|
||||
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
|
||||
|
||||
/obj/item/toy/partypopper/attack_self(mob/user as mob)
|
||||
/obj/item/toy/partypopper/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(icon_state == "partypopper")
|
||||
user.visible_message(span_notice("[user] pulls on the string, releasing a burst of confetti!"), span_notice("You pull on the string, releasing a burst of confetti!"))
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, TRUE)
|
||||
@@ -1165,6 +1149,9 @@
|
||||
var/registered_mob //On request, only one person is able to use it at a time.
|
||||
|
||||
/obj/item/toy/acorn_branch/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.stat || !ishuman(user))
|
||||
return
|
||||
if(world.time < next_use)
|
||||
@@ -1192,6 +1179,7 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "reddragon"
|
||||
var/cooldown = FALSE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/toy/plushie/dragon/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -1199,6 +1187,9 @@
|
||||
pokephrase = pick("ROAR!", "RAWR!", "GAWR!", "GRR!", "GROAR!", "GRAH!", "Weh!", "Merp!")
|
||||
|
||||
/obj/item/toy/plushie/dragon/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!cooldown)
|
||||
switch(pokephrase)
|
||||
if("Weh!")
|
||||
|
||||
@@ -144,8 +144,10 @@ AI MODULES
|
||||
desc = "A 'safeguard' AI module: 'Safeguard <name>. Anyone threatening or attempting to harm <name> is no longer to be considered a crew member, and is a threat which must be neutralized.'"
|
||||
origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 4)
|
||||
|
||||
/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
/obj/item/aiModule/safeguard/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/targName = tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name, MAX_MESSAGE_LEN)
|
||||
targetName = targName
|
||||
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
|
||||
@@ -170,8 +172,10 @@ AI MODULES
|
||||
desc = "A 'one crew member' AI module: 'Only <name> is a crew member.'"
|
||||
origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6) //made with diamonds!
|
||||
|
||||
/obj/item/aiModule/oneHuman/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
/obj/item/aiModule/oneHuman/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/targName = tgui_input_text(user, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name, MAX_MESSAGE_LEN)
|
||||
targetName = targName
|
||||
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
|
||||
@@ -251,8 +255,10 @@ AI MODULES
|
||||
desc = "A 'freeform' AI module: '<freeform>'"
|
||||
origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 4)
|
||||
|
||||
/obj/item/aiModule/freeform/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
/obj/item/aiModule/freeform/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/new_lawpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos)
|
||||
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
|
||||
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
|
||||
@@ -372,8 +378,10 @@ AI MODULES
|
||||
desc = "A 'freeform' Core AI module: '<freeform>'"
|
||||
origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6)
|
||||
|
||||
/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
/obj/item/aiModule/freeformcore/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/newlaw = ""
|
||||
var/targName = tgui_input_text(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
|
||||
newFreeFormLaw = targName
|
||||
@@ -396,8 +404,10 @@ AI MODULES
|
||||
desc = "A hacked AI law module: '<freeform>'"
|
||||
origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 6, TECH_ILLEGAL = 7)
|
||||
|
||||
/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
/obj/item/aiModule/syndicate/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/newlaw = ""
|
||||
var/targName = tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
|
||||
newFreeFormLaw = targName
|
||||
|
||||
@@ -67,8 +67,11 @@
|
||||
return ..()
|
||||
*/
|
||||
// Changes which mode it is on.
|
||||
/obj/item/rcd/attack_self(mob/living/user)
|
||||
/* VOREStation Removal - Moved to VR
|
||||
/*/obj/item/rcd/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
//VOREStation Removal - Moved to VR
|
||||
if(mode_index >= modes.len) // Shouldn't overflow unless someone messes with it in VV poorly but better safe than sorry.
|
||||
mode_index = 1
|
||||
else
|
||||
|
||||
@@ -107,7 +107,9 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/rcd/attack_self(mob/living/user)
|
||||
..()
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/choices = list(
|
||||
"Airlock" = radial_image_airlock,
|
||||
"Deconstruct" = radial_image_decon,
|
||||
|
||||
@@ -241,6 +241,9 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell,
|
||||
return
|
||||
|
||||
/obj/item/rms/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/list/choices = list(
|
||||
"Steel" = radial_image_steel,
|
||||
"Glass" = radial_image_glass,
|
||||
@@ -277,7 +280,6 @@ var/list/RMS_random_malfunction = list(/obj/item/fbp_backup_cell,
|
||||
|
||||
to_chat(user, span_notice("Changed mode to '[choice]'."))
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
return ..()
|
||||
|
||||
/obj/item/rms/attackby(obj/item/W, mob/user)
|
||||
if(W.has_tool_quality(TOOL_MULTITOOL))
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/pipe_dispenser/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/pipe_dispenser/ui_assets(mob/user)
|
||||
|
||||
@@ -65,7 +65,10 @@ GLOBAL_LIST_INIT(robot_glass_options, list(
|
||||
balloon_alert(user, "container chosen: [glass_choice]")
|
||||
glasstype_name = glass_choice
|
||||
|
||||
/obj/item/rsf/attack_self(mob/user as mob)
|
||||
/obj/item/rsf/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/options = list(
|
||||
"card deck" = image(icon = 'icons/obj/playing_cards.dmi', icon_state = "deck"),
|
||||
"card deck (big)" = image(icon = 'icons/obj/playing_cards.dmi', icon_state = "deck"),
|
||||
|
||||
@@ -65,9 +65,12 @@
|
||||
var/turf/T = loc
|
||||
T.hotspot_expose(700, 5)
|
||||
|
||||
/obj/item/flame/candle/attack_self(mob/user as mob)
|
||||
/obj/item/flame/candle/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(lit)
|
||||
lit = 0
|
||||
lit = FALSE
|
||||
update_icon()
|
||||
set_light(0)
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
concealed_blade = temp_blade
|
||||
temp_blade.attack_self()
|
||||
|
||||
/obj/item/cane/concealed/attack_self(var/mob/user)
|
||||
/obj/item/cane/concealed/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(concealed_blade)
|
||||
user.visible_message(span_warning("[user] has unsheathed \a [concealed_blade] from [user.p_their()] [src]!"), "You unsheathe \the [concealed_blade] from \the [src].")
|
||||
// Calling drop/put in hands to properly call item drop/pickup procs
|
||||
@@ -40,8 +43,6 @@
|
||||
user.update_inv_r_hand()
|
||||
concealed_blade = null
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/cane/concealed/attackby(var/obj/item/material/sword/katana/caneblade/W, var/mob/user)
|
||||
if(!src.concealed_blade && istype(W))
|
||||
@@ -92,7 +93,10 @@
|
||||
force = 3
|
||||
var/on = 0
|
||||
|
||||
/obj/item/cane/white/collapsible/attack_self(mob/user as mob)
|
||||
/obj/item/cane/white/collapsible/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
on = !on
|
||||
if(on)
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " extends the white cane."),\
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/full_icon = "full"
|
||||
var/spawn_mob_name = "A mob"
|
||||
var/capture_chance_modifier = 1 //So we can have special subtypes with different capture rates!
|
||||
var/loadout = FALSE
|
||||
|
||||
/obj/item/capture_crystal/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -228,6 +229,13 @@
|
||||
|
||||
//Tries to unleash or recall your stored mob
|
||||
/obj/item/capture_crystal/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(loadout && !bound_mob)
|
||||
to_chat(user, span_notice("\The [src] emits an unpleasant tone... It is not ready yet."))
|
||||
playsound(src, 'sound/effects/capture-crystal-problem.ogg', 75, 1, -1)
|
||||
return
|
||||
if(bound_mob && !owner)
|
||||
if(bound_mob == user)
|
||||
to_chat(user, span_notice("\The [src] emits an unpleasant tone... It does not activate for you."))
|
||||
@@ -869,6 +877,7 @@
|
||||
|
||||
/obj/item/capture_crystal/loadout
|
||||
active = TRUE
|
||||
loadout = TRUE
|
||||
|
||||
/obj/item/capture_crystal/loadout/attack(mob/living/M, mob/living/user)
|
||||
if(!bound_mob && M != user)
|
||||
@@ -877,12 +886,6 @@
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/capture_crystal/loadout/attack_self(mob/living/user)
|
||||
if(!bound_mob)
|
||||
to_chat(user, span_notice("\The [src] emits an unpleasant tone... It is not ready yet."))
|
||||
playsound(src, 'sound/effects/capture-crystal-problem.ogg', 75, 1, -1)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/capture_crystal/loadout/capture_chance()
|
||||
return 0
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
var/wrapped = FALSE
|
||||
|
||||
/obj/item/clothing/mask/chewable/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(wrapped)
|
||||
wrapped = FALSE
|
||||
to_chat(user, span_notice("You unwrap \the [name]."))
|
||||
|
||||
@@ -288,6 +288,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
zippomes = span_rose("With a flick of their wrist, USER lights their NAME with their FLAME.")
|
||||
weldermes = span_notice("USER casually lights the NAME with FLAME.")
|
||||
ignitermes = span_notice("USER fiddles with FLAME, and manages to light their NAME.")
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -318,7 +319,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
else
|
||||
to_chat(user, span_notice("[src] is full."))
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(lit == 1)
|
||||
if(user.a_intent == I_HURT)
|
||||
user.visible_message(span_notice("[user] drops and treads on the lit [src], putting it out instantly."))
|
||||
@@ -327,7 +331,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
else
|
||||
user.visible_message(span_notice("[user] puts out \the [src]."))
|
||||
quench()
|
||||
return ..()
|
||||
|
||||
////////////
|
||||
// CIGARS //
|
||||
@@ -428,7 +431,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
. = ..()
|
||||
name = "empty [initial(name)]"
|
||||
|
||||
/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob)
|
||||
/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(lit == 1)
|
||||
if(user.a_intent == I_HURT)
|
||||
user.visible_message(span_notice("[user] empties the lit [src] on the floor!."))
|
||||
@@ -555,14 +561,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
qdel(G)
|
||||
|
||||
/obj/item/reagent_containers/rollingpaper/attack_self(mob/living/user)
|
||||
if(!src.reagents) //don't roll an empty joint
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!reagents) //don't roll an empty joint
|
||||
to_chat(user, span_warning("There is nothing in [src]. Add something to it first."))
|
||||
return
|
||||
var/obj/item/clothing/mask/smokable/cigarette/J = new crafted_type()
|
||||
to_chat(user,span_notice("You roll the [src] into a blunt!"))
|
||||
J.add_fingerprint(user)
|
||||
if(src.reagents)
|
||||
src.reagents.trans_to_obj(J, src.reagents.total_volume)
|
||||
if(reagents)
|
||||
reagents.trans_to_obj(J, reagents.total_volume)
|
||||
user.drop_from_inventory(src)
|
||||
user.put_in_hands(J)
|
||||
qdel(src)
|
||||
@@ -607,6 +616,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
COLOR_ASSEMBLY_BLUE,
|
||||
COLOR_ASSEMBLY_PURPLE,
|
||||
COLOR_ASSEMBLY_HOT_PINK)
|
||||
/// If we are a special variant (see: override attack_self)
|
||||
var/special_variant = FALSE
|
||||
/// Var used for detonator zippos
|
||||
var/detonator_mode = 0
|
||||
|
||||
// TODO: Remove this path from POIs and loose maps (it's no longer needed)
|
||||
/obj/item/flame/lighter/random
|
||||
@@ -619,8 +632,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
add_overlay(I)
|
||||
|
||||
/obj/item/flame/lighter/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_variant)
|
||||
return FALSE
|
||||
if(detonator_mode)
|
||||
return FALSE
|
||||
if(!lit)
|
||||
lit = 1
|
||||
lit = TRUE
|
||||
icon_state = "lighteron"
|
||||
playsound(src, activation_sound, 75, 1)
|
||||
user.visible_message(span_notice("After a few attempts, [user] manages to light the [src]."))
|
||||
@@ -629,7 +649,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
else
|
||||
lit = 0
|
||||
lit = FALSE
|
||||
icon_state = "lighter"
|
||||
playsound(src, deactivation_sound, 75, 1)
|
||||
user.visible_message(span_notice("[user] quietly shuts off the [src]."))
|
||||
@@ -676,16 +696,22 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
item_state = "zippo"
|
||||
activation_sound = 'sound/items/zippo_on.ogg'
|
||||
deactivation_sound = 'sound/items/zippo_off.ogg'
|
||||
special_variant = TRUE
|
||||
|
||||
/obj/item/flame/lighter/zippo/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays() //Prevents the Cheap Lighter overlay from appearing on this
|
||||
|
||||
/obj/item/flame/lighter/zippo/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(detonator_mode)
|
||||
return FALSE
|
||||
if(!base_state)
|
||||
base_state = icon_state
|
||||
if(!lit)
|
||||
lit = 1
|
||||
lit = TRUE
|
||||
icon_state = "[base_state]on"
|
||||
item_state = "[base_state]on"
|
||||
playsound(src, activation_sound, 75, 1)
|
||||
@@ -694,7 +720,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
set_light(2, 0.5, "#FF9933")
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
lit = 0
|
||||
lit = FALSE
|
||||
icon_state = "[base_state]"
|
||||
item_state = "[base_state]"
|
||||
playsound(src, deactivation_sound, 75, 1)
|
||||
@@ -775,6 +801,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
item_state = "SMzippo"
|
||||
activation_sound = 'sound/items/zippo_on_alt.ogg'
|
||||
deactivation_sound = 'sound/items/zippo_off.ogg'
|
||||
special_variant = TRUE
|
||||
///Special supermatter var used for attack_self chain logic.
|
||||
var/special_supermatter = FALSE
|
||||
|
||||
/obj/item/flame/lighter/supermatter/syndismzippo
|
||||
name = "Phoron Supermatter Zippo" // Syndicate SM Lighter
|
||||
@@ -784,6 +813,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
item_state = "SyndiSMzippo"
|
||||
activation_sound = 'sound/items/zippo_on_alt.ogg'
|
||||
deactivation_sound = 'sound/items/zippo_off.ogg'
|
||||
special_supermatter = TRUE
|
||||
|
||||
/obj/item/flame/lighter/supermatter/expsmzippo
|
||||
name = "Experimental SM Lighter" // Dangerous WIP (admin/event only ATM)
|
||||
@@ -793,9 +823,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
item_state = "ExpSMzippo"
|
||||
activation_sound = 'sound/items/button-open.ogg'
|
||||
deactivation_sound = 'sound/items/button-close.ogg'
|
||||
special_supermatter = TRUE
|
||||
|
||||
// safe smzippo
|
||||
/obj/item/flame/lighter/supermatter/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_supermatter)
|
||||
return FALSE
|
||||
if(!base_state)
|
||||
base_state = icon_state
|
||||
if(!lit)
|
||||
@@ -867,6 +903,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
// syndicate smzippo
|
||||
/obj/item/flame/lighter/supermatter/syndismzippo/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!base_state)
|
||||
base_state = icon_state
|
||||
if(!lit)
|
||||
@@ -938,6 +977,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
// Experimental smzippo
|
||||
/obj/item/flame/lighter/supermatter/expsmzippo/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if (!base_state)
|
||||
base_state = icon_state
|
||||
if (!lit)
|
||||
|
||||
@@ -14,24 +14,3 @@
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the [src.name]",4)
|
||||
|
||||
/*
|
||||
* Bike Horns
|
||||
*/
|
||||
/obj/item/bikehorn
|
||||
var/honk_sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/item/bikehorn/attack_self(mob/user as mob)
|
||||
if(spam_flag == 0)
|
||||
spam_flag = 1
|
||||
playsound(src, honk_sound, 50, 1)
|
||||
src.add_fingerprint(user)
|
||||
spawn(20)
|
||||
spam_flag = 0
|
||||
return
|
||||
|
||||
/obj/item/bikehorn/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(isliving(AM))
|
||||
playsound(src, honk_sound, 50, 1)
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
colour = pick("red","purple","jade","black")
|
||||
name = "[colour] lipstick"
|
||||
|
||||
/obj/item/lipstick/attack_self(mob/user as mob)
|
||||
/obj/item/lipstick/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
to_chat(user, span_notice("You twist \the [src] [open ? "closed" : "open"]."))
|
||||
open = !open
|
||||
if(open)
|
||||
@@ -76,6 +79,9 @@
|
||||
icon_state = "purplecomb"
|
||||
|
||||
/obj/item/haircomb/attack_self(mob/living/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/text = "person"
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
@@ -104,7 +110,10 @@
|
||||
. = ..()
|
||||
M = new(src, null)
|
||||
|
||||
/obj/item/makeover/attack_self(mob/living/carbon/user as mob)
|
||||
/obj/item/makeover/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(ishuman(user))
|
||||
to_chat(user, span_notice("You flip open \the [src] and begin to adjust your appearance."))
|
||||
M.tgui_interact(user)
|
||||
|
||||
@@ -118,17 +118,20 @@
|
||||
update_icon()
|
||||
to_chat(user, span_notice("You insert [I] into [src]."))
|
||||
|
||||
/obj/item/clothing/mask/smokable/ecig/attack_self(mob/user as mob)
|
||||
if (active)
|
||||
active=0
|
||||
/obj/item/clothing/mask/smokable/ecig/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(active)
|
||||
active = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
to_chat(user, span_notice("You turn off \the [src]. "))
|
||||
update_icon()
|
||||
else
|
||||
if (!ec_cartridge)
|
||||
if(!ec_cartridge)
|
||||
to_chat(user, span_notice("You can't use it with no cartridge installed!."))
|
||||
return
|
||||
active=1
|
||||
active = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
to_chat(user, span_notice("You turn on \the [src]. "))
|
||||
update_icon()
|
||||
|
||||
@@ -38,7 +38,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/plastique/attack_self(mob/user as mob)
|
||||
/obj/item/plastique/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/newtime = tgui_input_number(user, "Please set the timer.", "Timer", 10, 60000, 10)
|
||||
if(user.get_active_hand() == src)
|
||||
newtime = CLAMP(newtime, 10, 60000)
|
||||
|
||||
@@ -63,7 +63,10 @@
|
||||
if(get_dist(user, src) == 0)
|
||||
. += "[src] has [src.reagents.total_volume] units of foam left!"
|
||||
|
||||
/obj/item/extinguisher/attack_self(mob/user as mob)
|
||||
/obj/item/extinguisher/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
safety = !safety
|
||||
icon_state = "[sprite_name][!safety]"
|
||||
desc = "The safety is [safety ? "on" : "off"]."
|
||||
|
||||
@@ -155,7 +155,10 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/flamethrower/attack_self(mob/user as mob)
|
||||
/obj/item/flamethrower/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(user.stat || user.restrained() || user.lying)
|
||||
return
|
||||
tgui_interact(user)
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
item_state = "gift1"
|
||||
drop_sound = 'sound/items/drop/cardboardbox.ogg'
|
||||
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
|
||||
///Var used for attack_hand chain.
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/a_gift/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -25,7 +27,10 @@
|
||||
else
|
||||
icon_state = "gift[pick(1, 2, 3)]" + "_[pick("g","r","b","y","p")]"
|
||||
|
||||
/obj/item/gift/attack_self(mob/user as mob)
|
||||
/obj/item/gift/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.drop_item()
|
||||
playsound(src, 'sound/items/package_unwrap.ogg', 50,1)
|
||||
if(gift)
|
||||
@@ -59,7 +64,12 @@
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/item/a_gift/attack_self(mob/M as mob)
|
||||
/obj/item/a_gift/attack_self(mob/M)
|
||||
. = ..(M)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
var/gift_type = pick(
|
||||
/obj/item/storage/wallet,
|
||||
/obj/item/storage/photo_album,
|
||||
@@ -193,6 +203,7 @@
|
||||
item_state = "chomp_present"
|
||||
plane = ABOVE_MOB_PLANE
|
||||
var/chaos
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/a_gift/advanced/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -203,6 +214,9 @@
|
||||
desc = "The casino dev messed up and gave you the wrong present! This one pulses with potential for good or evil!"
|
||||
|
||||
/obj/item/a_gift/advanced/attack_self(mob/M) //WIP - ALWAYS add more items to list! - Jack
|
||||
. = ..(M)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/gift_type_advanced = pick(
|
||||
/obj/item/binoculars/spyglass,
|
||||
/obj/item/bodysnatcher,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/list/beakers = new/list()
|
||||
var/list/allowed_containers = list(/obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)
|
||||
var/affected_area = 3
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/grenade/chem_grenade/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -27,7 +28,10 @@
|
||||
QDEL_LIST_NULL(beakers)
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/chem_grenade/attack_self(mob/user as mob)
|
||||
/obj/item/grenade/chem_grenade/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(!stage || stage==1)
|
||||
if(detonator)
|
||||
// detonator.loc=src.loc
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
var/hud_state = "grenade_he" // TGMC Ammo HUD Port
|
||||
var/hud_state_empty = "grenade_empty" // TGMC Ammo HUD Port
|
||||
|
||||
///Var for special attack_self handling
|
||||
var/special_handling = FALSE
|
||||
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
@@ -55,7 +58,12 @@
|
||||
. += "\The [src] is set for instant detonation."
|
||||
|
||||
|
||||
/obj/item/grenade/attack_self(mob/user as mob)
|
||||
/obj/item/grenade/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
to_chat(user, span_warning("You prime \the [name]! [det_time/10] seconds!"))
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
var/list/item_quants = list()
|
||||
|
||||
/obj/item/seedbag/attack_self(mob/user)
|
||||
. = ..(user) //Not that this file is ticked, but who knows.
|
||||
if(.)
|
||||
return TRUE
|
||||
user.machine = src
|
||||
interact(user)
|
||||
|
||||
|
||||
@@ -202,7 +202,9 @@
|
||||
icon = I
|
||||
|
||||
/obj/item/card_fluff/attack_self(mob/user)
|
||||
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
var/choice = tgui_input_list(user, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset"))
|
||||
if(!choice) return
|
||||
|
||||
|
||||
@@ -370,6 +370,7 @@
|
||||
name = "Syndicate ID"
|
||||
initial_sprite_stack = list("base-stamp-dark", "top-syndicate", "stamp-s")
|
||||
rank = JOB_SYNDICATE
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/card/id/syndicate/officer
|
||||
name = "Syndicate Officer ID"
|
||||
|
||||
@@ -104,12 +104,18 @@
|
||||
|
||||
return data
|
||||
|
||||
/obj/item/card/id/attack_self(mob/user as mob)
|
||||
/obj/item/card/id/attack_self(mob/user, show_id = FALSE)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling && !show_id)
|
||||
return FALSE
|
||||
if(can_configure && !configured)
|
||||
return FALSE
|
||||
user.visible_message("\The [user] shows you: [icon2html(src,viewers(src))] [src.name]. The assignment on the card: [src.assignment]",\
|
||||
"You flash your ID card: [icon2html(src, user.client)] [src.name]. The assignment on the card: [src.assignment]")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/card/id/GetAccess()
|
||||
return access
|
||||
@@ -338,15 +344,75 @@
|
||||
|
||||
//Event IDs
|
||||
/obj/item/card/id/event
|
||||
var/configured = 0
|
||||
can_configure = TRUE
|
||||
var/accessset = 0
|
||||
initial_sprite_stack = list()
|
||||
var/list/title_strings = list()
|
||||
var/preset_rank = FALSE
|
||||
///What type of polymorphic card we have. 0 = none. 1 = take our job state 2 = allow us to select an icon.
|
||||
var/polymorphic_type = 0
|
||||
var/base_icon_state
|
||||
|
||||
/obj/item/card/id/event/attack_self(var/mob/user)
|
||||
if(configured == 1)
|
||||
return ..()
|
||||
/obj/item/card/id/event/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(configured)
|
||||
return FALSE
|
||||
if(polymorphic_type == 1)
|
||||
icon_state = user.job
|
||||
base_icon_state = user.job
|
||||
else if(polymorphic_type == 2)
|
||||
var/list/jobs_to_icon = list( //ITG only has a few kinds of icons so we have to group them up!
|
||||
JOB_PILOT = "itg",
|
||||
JOB_ALT_VISITOR = "itg",
|
||||
JOB_QUARTERMASTER = "itg",
|
||||
JOB_CARGO_TECHNICIAN = "itg",
|
||||
JOB_SHAFT_MINER = "itg",
|
||||
JOB_INTERN = "itg",
|
||||
JOB_TALON_PILOT = "itg",
|
||||
JOB_TALON_MINER = "itg",
|
||||
JOB_BARTENDER = "itg_green",
|
||||
JOB_BOTANIST = "itg_green",
|
||||
JOB_CHEF = "itg_green",
|
||||
JOB_JANITOR = "itg_green",
|
||||
JOB_CHAPLAIN = "itg_green",
|
||||
JOB_ENTERTAINER = "itg_green",
|
||||
JOB_LIBRARIAN = "itg_green",
|
||||
JOB_WARDEN = "itg_red",
|
||||
JOB_DETECTIVE = "itg_red",
|
||||
JOB_SECURITY_OFFICER = "itg_red",
|
||||
JOB_TALON_GUARD = "itg_red",
|
||||
JOB_ROBOTICIST = "itg_purple",
|
||||
JOB_SCIENTIST = "itg_purple",
|
||||
JOB_XENOBIOLOGIST = "itg_purple",
|
||||
JOB_XENOBOTANIST = "itg_purple",
|
||||
JOB_PATHFINDER = "itg_purple",
|
||||
JOB_EXPLORER = "itg_purple",
|
||||
JOB_CHEMIST = "itg_white",
|
||||
JOB_MEDICAL_DOCTOR = "itg_white",
|
||||
JOB_PARAMEDIC = "itg_white",
|
||||
JOB_PSYCHIATRIST = "itg_white",
|
||||
JOB_FIELD_MEDIC = "itg_white",
|
||||
JOB_TALON_DOCTOR = "itg_white",
|
||||
JOB_ATMOSPHERIC_TECHNICIAN = "itg_orange",
|
||||
JOB_ENGINEER = "itg_orange",
|
||||
JOB_OFFDUTY_OFFICER = "itg_red",
|
||||
JOB_OFFDUTY_ENGINEER = "itg_orange",
|
||||
JOB_OFFDUTY_MEDIC = "itg_white",
|
||||
JOB_OFFDUTY_SCIENTIST = "itg_purple",
|
||||
JOB_OFFDUTY_CARGO = "itg",
|
||||
JOB_OFFDUTY_EXPLORER = "itg_purple",
|
||||
JOB_OFFDUTY_WORKER = "itg_green"
|
||||
)
|
||||
var/guess = jobs_to_icon[user.job]
|
||||
|
||||
if(!guess)
|
||||
to_chat(user, span_notice("ITG Cards do not seem to be able to accept the access codes for your ID."))
|
||||
return
|
||||
else
|
||||
icon_state = guess
|
||||
base_icon_state = guess
|
||||
|
||||
if(!preset_rank)
|
||||
var/title
|
||||
@@ -361,10 +427,12 @@
|
||||
if(title_strings.len)
|
||||
var/tempname = pick(title_strings)
|
||||
name = tempname + " ([assignment])"
|
||||
else if(polymorphic_type == 2)
|
||||
name = user.name + "'s ITG ID card" + " ([assignment])"
|
||||
else
|
||||
name = user.name + "'s ID card" + " ([assignment])"
|
||||
|
||||
configured = 1
|
||||
configured = TRUE
|
||||
to_chat(user, span_notice("Card settings set."))
|
||||
|
||||
/obj/item/card/id/event/attackby(obj/item/I, var/mob/user)
|
||||
@@ -511,7 +579,7 @@
|
||||
icon_state = "pinkGold"
|
||||
|
||||
/obj/item/card/id/event/polymorphic
|
||||
var/base_icon_state
|
||||
polymorphic_type = 1
|
||||
|
||||
/obj/item/card/id/event/polymorphic/digest_act(atom/movable/item_storage = null)
|
||||
var/gimmeicon = icon
|
||||
@@ -519,76 +587,13 @@
|
||||
icon = gimmeicon
|
||||
icon_state = base_icon_state + "_digested"
|
||||
|
||||
/obj/item/card/id/event/polymorphic/altcard/attack_self(var/mob/user)
|
||||
if(configured == 1)
|
||||
return ..()
|
||||
else
|
||||
icon_state = user.job
|
||||
base_icon_state = user.job
|
||||
return ..()
|
||||
|
||||
/obj/item/card/id/event/polymorphic/altcard
|
||||
icon = 'icons/obj/card_alt.dmi'
|
||||
base_icon = 'icons/obj/card_alt.dmi'
|
||||
icon_state = "blank"
|
||||
name = "contractor identification card"
|
||||
desc = "An ID card typically used by contractors."
|
||||
|
||||
/obj/item/card/id/event/polymorphic/itg/attack_self(var/mob/user)
|
||||
if(!configured)
|
||||
var/list/jobs_to_icon = list( //ITG only has a few kinds of icons so we have to group them up!
|
||||
JOB_PILOT = "itg",
|
||||
JOB_ALT_VISITOR = "itg",
|
||||
JOB_QUARTERMASTER = "itg",
|
||||
JOB_CARGO_TECHNICIAN = "itg",
|
||||
JOB_SHAFT_MINER = "itg",
|
||||
JOB_INTERN = "itg",
|
||||
JOB_TALON_PILOT = "itg",
|
||||
JOB_TALON_MINER = "itg",
|
||||
JOB_BARTENDER = "itg_green",
|
||||
JOB_BOTANIST = "itg_green",
|
||||
JOB_CHEF = "itg_green",
|
||||
JOB_JANITOR = "itg_green",
|
||||
JOB_CHAPLAIN = "itg_green",
|
||||
JOB_ENTERTAINER = "itg_green",
|
||||
JOB_LIBRARIAN = "itg_green",
|
||||
JOB_WARDEN = "itg_red",
|
||||
JOB_DETECTIVE = "itg_red",
|
||||
JOB_SECURITY_OFFICER = "itg_red",
|
||||
JOB_TALON_GUARD = "itg_red",
|
||||
JOB_ROBOTICIST = "itg_purple",
|
||||
JOB_SCIENTIST = "itg_purple",
|
||||
JOB_XENOBIOLOGIST = "itg_purple",
|
||||
JOB_XENOBOTANIST = "itg_purple",
|
||||
JOB_PATHFINDER = "itg_purple",
|
||||
JOB_EXPLORER = "itg_purple",
|
||||
JOB_CHEMIST = "itg_white",
|
||||
JOB_MEDICAL_DOCTOR = "itg_white",
|
||||
JOB_PARAMEDIC = "itg_white",
|
||||
JOB_PSYCHIATRIST = "itg_white",
|
||||
JOB_FIELD_MEDIC = "itg_white",
|
||||
JOB_TALON_DOCTOR = "itg_white",
|
||||
JOB_ATMOSPHERIC_TECHNICIAN = "itg_orange",
|
||||
JOB_ENGINEER = "itg_orange",
|
||||
JOB_OFFDUTY_OFFICER = "itg_red",
|
||||
JOB_OFFDUTY_ENGINEER = "itg_orange",
|
||||
JOB_OFFDUTY_MEDIC = "itg_white",
|
||||
JOB_OFFDUTY_SCIENTIST = "itg_purple",
|
||||
JOB_OFFDUTY_CARGO = "itg",
|
||||
JOB_OFFDUTY_EXPLORER = "itg_purple",
|
||||
JOB_OFFDUTY_WORKER = "itg_green"
|
||||
)
|
||||
var/guess = jobs_to_icon[user.job]
|
||||
|
||||
if(!guess)
|
||||
to_chat(user, span_notice("ITG Cards do not seem to be able to accept the access codes for your ID."))
|
||||
return
|
||||
else
|
||||
icon_state = guess
|
||||
base_icon_state = guess
|
||||
. = ..()
|
||||
name = user.name + "'s ITG ID card" + " ([assignment])"
|
||||
|
||||
polymorphic_type = 1
|
||||
|
||||
/obj/item/card/id/event/polymorphic/itg/attackby(obj/item/I as obj, var/mob/user)
|
||||
if(istype(I, /obj/item/card/id) && !accessset)
|
||||
@@ -607,3 +612,4 @@
|
||||
icon_state = "itg"
|
||||
name = "\improper ITG identification card"
|
||||
desc = "A small card designating affiliation with the Ironcrest Transport Group. It has a NanoTrasen insignia and a lot of very small print on the back to do with practices and regulations for contractors to use."
|
||||
polymorphic_type = 2
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
if(player_is_antag(user.mind) || registered_user == user)
|
||||
to_chat(user, span_notice("The microscanner activates as you pass it over the ID, copying its access."))
|
||||
|
||||
/obj/item/card/id/syndicate/attack_self(mob/user as mob)
|
||||
/obj/item/card/id/syndicate/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
// We use the fact that registered_name is not unset should the owner be vaporized, to ensure the id doesn't magically become unlocked.
|
||||
if(!registered_user && register_user(user))
|
||||
to_chat(user, span_notice("The microscanner marks you as its owner, preventing others from accessing its internals."))
|
||||
@@ -44,9 +47,7 @@
|
||||
if("Edit")
|
||||
agentcard_module.tgui_interact(user)
|
||||
if("Show")
|
||||
..()
|
||||
else
|
||||
..()
|
||||
..(user, TRUE)
|
||||
|
||||
|
||||
/obj/item/card/id/syndicate/proc/register_user(var/mob/user)
|
||||
|
||||
@@ -151,6 +151,7 @@ Due to the small chemical capacity of the implant, the life of the implant is re
|
||||
entities to perform espionage and in some parts of space are used off the books for interrogation. Most of the makers of these modified implants have put in \
|
||||
safeties to prevent lethal or actively harmful commands from being input to lessen the severity of the crime if they are caught. This one has a golden stamp \
|
||||
with the shape of a star on it, the letters 'KE' in black text on it."
|
||||
special_handling = TRUE
|
||||
|
||||
/obj/item/implanter/compliance/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -158,6 +159,9 @@ Due to the small chemical capacity of the implant, the life of the implant is re
|
||||
update()
|
||||
|
||||
/obj/item/implanter/compliance/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(istype(imp,/obj/item/implant/compliance))
|
||||
var/obj/item/implant/compliance/implant = imp
|
||||
var/newlaws = tgui_input_text(user, "Please Input Laws", "Compliance Laws", "", multiline = TRUE, prevent_enter = TRUE)
|
||||
|
||||
@@ -46,4 +46,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/implant/integrated_circuit/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
IC.attack_self(user)
|
||||
|
||||
@@ -9,8 +9,15 @@
|
||||
matter = list(MAT_STEEL = 1000, MAT_GLASS = 1000)
|
||||
var/obj/item/implant/imp = null
|
||||
var/active = 1
|
||||
///Var for attack_self chain
|
||||
var/special_handling = FALSE
|
||||
|
||||
/obj/item/implanter/attack_self(var/mob/user)
|
||||
/obj/item/implanter/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(special_handling)
|
||||
return FALSE
|
||||
active = !active
|
||||
to_chat(user, span_notice("You [active ? "" : "de"]activate \the [src]."))
|
||||
update()
|
||||
|
||||
@@ -47,7 +47,10 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/implantpad/attack_self(mob/user as mob)
|
||||
/obj/item/implantpad/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
user.set_machine(src)
|
||||
var/dat = span_bold("Implant Mini-Computer:") + "<HR>"
|
||||
if (src.case)
|
||||
|
||||
@@ -184,6 +184,9 @@
|
||||
recharging = FALSE
|
||||
|
||||
/obj/item/inducer/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(opened && cell)
|
||||
user.visible_message(span_notice("[user] removes [cell] from [src]!"), span_notice("You remove [cell]."))
|
||||
cell.update_icon()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user