mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 18:47:20 +01:00
Merge remote-tracking branch 'upstream/master' into IPC-buffs
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
/atom/movable/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs())
|
||||
if(buckled_mobs.len > 1)
|
||||
if(length(buckled_mobs) > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
return TRUE
|
||||
@@ -26,15 +26,12 @@
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(!buckled_mobs)
|
||||
return FALSE
|
||||
if(buckled_mobs.len)
|
||||
return TRUE
|
||||
return length(buckled_mobs)
|
||||
|
||||
/atom/movable/attack_robot(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
|
||||
if(buckled_mobs.len > 1)
|
||||
if(length(buckled_mobs) > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
return TRUE
|
||||
@@ -54,7 +51,7 @@
|
||||
if(check_loc && M.loc != loc)
|
||||
return FALSE
|
||||
|
||||
if((!can_buckle && !force) || M.buckled || (buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
|
||||
if((!can_buckle && !force) || M.buckled || (length(buckled_mobs) >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
|
||||
return FALSE
|
||||
M.buckling = src
|
||||
if(!M.can_buckle() && !force)
|
||||
@@ -69,6 +66,9 @@
|
||||
if(buckle_prevents_pull)
|
||||
M.pulledby.stop_pulling()
|
||||
|
||||
for(var/obj/item/grab/G in M.grabbed_by)
|
||||
qdel(G)
|
||||
|
||||
if(!check_loc && M.loc != loc)
|
||||
M.forceMove(loc)
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(splatter_cache)
|
||||
user.blood_DNA |= blood_DNA.Copy()
|
||||
user.bloody_hands += taken
|
||||
user.hand_blood_color = basecolor
|
||||
user.update_inv_gloves(1)
|
||||
user.update_inv_gloves()
|
||||
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||
|
||||
/obj/effect/decal/cleanable/blood/can_bloodcrawl_in()
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
name = "horrific experiment"
|
||||
desc = "Some sort of pod filled with blood and vicerea. You swear you can see it moving..."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "pod_g"
|
||||
icon_state = "pod_mess"
|
||||
|
||||
|
||||
//Makes a tile fully lit no matter what
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
||||
|
||||
/obj/effect/spawner/lootdrop/New()
|
||||
..()
|
||||
if(loot && loot.len)
|
||||
for(var/i = lootcount, i > 0, i--)
|
||||
if(!loot.len) break
|
||||
@@ -15,7 +16,7 @@
|
||||
loot.Remove(lootspawn)
|
||||
|
||||
if(lootspawn)
|
||||
new lootspawn(get_turf(src))
|
||||
new lootspawn(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
|
||||
new /turf/simulated/wall/vault(locate(i,j,z),type)
|
||||
else
|
||||
new /turf/simulated/floor/vault(locate(i,j,z),type)
|
||||
var/turf/T = new /turf/simulated/floor/vault(locate(i, j, z))
|
||||
T.icon_state = "[type]vault"
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/obj/structure/spider/spiderling/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(atom/A)
|
||||
if(!A || !ismovableatom(A))
|
||||
if(!A || !ismovable(A))
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
var/turf/T = A
|
||||
if(!T)
|
||||
continue
|
||||
var/dist = hypotenuse(T.x, T.y, x0, y0)
|
||||
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
var/turf/Trajectory = T
|
||||
@@ -209,7 +209,7 @@
|
||||
var/list/wipe_colours = list()
|
||||
for(var/turf/T in spiral_range_turfs(max_range, epicenter))
|
||||
wipe_colours += T
|
||||
var/dist = hypotenuse(T.x, T.y, x0, y0)
|
||||
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
|
||||
|
||||
if(newmode == "Yes")
|
||||
var/turf/TT = T
|
||||
|
||||
@@ -19,6 +19,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
can_be_hit = FALSE
|
||||
suicidal_hands = TRUE
|
||||
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/hitsound = null
|
||||
var/usesound = null
|
||||
var/throwhitsound
|
||||
@@ -59,7 +60,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
var/put_on_delay = DEFAULT_ITEM_PUTON_DELAY
|
||||
var/breakouttime = 0
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/flags_size = 0 //flag, primarily used for clothing to determine if a fatty can wear something or not.
|
||||
|
||||
var/block_chance = 0
|
||||
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
|
||||
@@ -99,15 +99,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
|
||||
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
|
||||
|
||||
var/trip_verb = TV_TRIP
|
||||
var/trip_chance = 0
|
||||
|
||||
var/trip_stun = 0
|
||||
var/trip_weaken = 0
|
||||
var/trip_any = FALSE
|
||||
var/trip_walksafe = TRUE
|
||||
var/trip_tiles = 0
|
||||
|
||||
//Tooltip vars
|
||||
var/in_inventory = FALSE //is this item equipped into an inventory slot or hand of a mob?
|
||||
var/tip_timer = 0
|
||||
@@ -134,10 +125,10 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
return ..()
|
||||
|
||||
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
|
||||
if(((src in target) && !target_self) || ((!istype(target.loc, /turf)) && (!istype(target, /turf)) && (not_inside)))
|
||||
return 0
|
||||
if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
|
||||
return FALSE
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/blob_act(obj/structure/blob/B)
|
||||
if(B && B.loc == loc)
|
||||
@@ -607,16 +598,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
|
||||
/obj/item/proc/is_equivalent(obj/item/I)
|
||||
return I == src
|
||||
|
||||
/obj/item/Crossed(atom/movable/AM, oldloc)
|
||||
. = ..()
|
||||
if(prob(trip_chance) && ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
on_trip(H)
|
||||
|
||||
/obj/item/proc/on_trip(mob/living/carbon/human/H)
|
||||
if(H.slip(src, trip_stun, trip_weaken, trip_tiles, trip_walksafe, trip_any, trip_verb))
|
||||
return TRUE
|
||||
|
||||
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
return
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
desc = "Huh."
|
||||
allow_wrap = FALSE
|
||||
|
||||
/obj/item/storage/pill_bottle/random_drug_bottle/New()
|
||||
..()
|
||||
/obj/item/storage/pill_bottle/random_drug_bottle/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/food/pill/random_drugs(src)
|
||||
|
||||
@@ -54,21 +54,21 @@
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/item/camera_bug/check_eye(var/mob/user as mob)
|
||||
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
|
||||
user.reset_perspective(null)
|
||||
/obj/item/camera_bug/check_eye(mob/user)
|
||||
if(loc != user || user.incapacitated() || !user.has_vision() || !current)
|
||||
user.unset_machine()
|
||||
return null
|
||||
|
||||
var/turf/T = get_turf(user.loc)
|
||||
if(T.z != current.z || !current.can_use())
|
||||
return FALSE
|
||||
var/turf/T_user = get_turf(user.loc)
|
||||
var/turf/T_current = get_turf(current)
|
||||
if(!atoms_share_level(T_user, T_current) || !current.can_use())
|
||||
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
|
||||
current = null
|
||||
user.reset_perspective(null)
|
||||
user.unset_machine()
|
||||
return null
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
return 1
|
||||
/obj/item/camera_bug/on_unset_machine(mob/user)
|
||||
user.reset_perspective(null)
|
||||
|
||||
/obj/item/camera_bug/proc/get_cameras()
|
||||
if(world.time > (last_net_update + 100))
|
||||
@@ -182,7 +182,6 @@
|
||||
/obj/item/camera_bug/Topic(var/href,var/list/href_list)
|
||||
if(usr != loc)
|
||||
usr.unset_machine()
|
||||
usr.reset_perspective(null)
|
||||
usr << browse(null, "window=camerabug")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
@@ -233,7 +232,6 @@
|
||||
interact()
|
||||
else
|
||||
usr.unset_machine()
|
||||
usr.reset_perspective(null)
|
||||
usr << browse(null, "window=camerabug")
|
||||
return
|
||||
else
|
||||
|
||||
@@ -241,6 +241,7 @@
|
||||
user.base_icon = disguise
|
||||
user.icon_state = disguise
|
||||
user.cham_proj = src
|
||||
user.bubble_icon = "robot"
|
||||
active = TRUE
|
||||
user.update_icons()
|
||||
|
||||
@@ -249,6 +250,7 @@
|
||||
S = user
|
||||
user.base_icon = initial(user.base_icon)
|
||||
user.icon_state = initial(user.icon_state)
|
||||
user.bubble_icon = "syndibot"
|
||||
active = FALSE
|
||||
user.update_icons()
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
new G(T) //Spawns the switch-selected engine on the chosen beacon's turf
|
||||
|
||||
var/ailist[] = list()
|
||||
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
|
||||
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
|
||||
ailist += A
|
||||
if(ailist.len)
|
||||
var/mob/living/silicon/ai/announcer = pick(ailist)
|
||||
|
||||
@@ -67,20 +67,22 @@
|
||||
times_used = max(0, times_used) //sanity
|
||||
|
||||
|
||||
/obj/item/flash/proc/try_use_flash(var/mob/user = null)
|
||||
/obj/item/flash/proc/try_use_flash(mob/user = null)
|
||||
flash_recharge(user)
|
||||
|
||||
if(broken)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
playsound(src.loc, use_sound, 100, 1)
|
||||
playsound(loc, use_sound, 100, 1)
|
||||
flick("[initial(icon_state)]2", src)
|
||||
set_light(2, 1, COLOR_WHITE)
|
||||
addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2)
|
||||
times_used++
|
||||
|
||||
if(user && !clown_check(user))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
|
||||
@@ -111,7 +113,6 @@
|
||||
/obj/item/flash/attack(mob/living/M, mob/user)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
|
||||
if(iscarbon(M))
|
||||
flash_carbon(M, user, 5, 1)
|
||||
if(overcharged)
|
||||
@@ -119,22 +120,12 @@
|
||||
M.IgniteMob()
|
||||
burn_out()
|
||||
return 1
|
||||
|
||||
else if(issilicon(M))
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.module) // Perhaps they didn't choose a module yet
|
||||
for(var/obj/item/borg/combat/shield/S in R.module.modules)
|
||||
if(R.activated(S))
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!</span>")
|
||||
return 1
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Weaken(rand(5,10))
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
if(istype(H)) //robots and aliens are unaffected
|
||||
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
if(M.stat == DEAD || !eyes || (BLINDNESS in M.mutations)) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
|
||||
else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/lightreplacer/proc/AddUses(amount = 1)
|
||||
uses = Clamp(uses + amount, 0, max_uses)
|
||||
uses = clamp(uses + amount, 0, max_uses)
|
||||
|
||||
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
|
||||
bulb_shards += amount
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
desc = "A box suited for pizzas."
|
||||
icon_state = "pizzabox1"
|
||||
return
|
||||
timer = Clamp(timer, 10, 100)
|
||||
timer = clamp(timer, 10, 100)
|
||||
icon_state = "pizzabox1"
|
||||
to_chat(user, "<span class='notice'>You set the timer to [timer / 10] before activating the payload and closing \the [src].")
|
||||
message_admins("[key_name_admin(usr)] has set a timer on a pizza bomb to [timer/10] seconds at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
|
||||
@@ -52,7 +52,7 @@
|
||||
if(disarmed)
|
||||
visible_message("<span class='danger'>[bicon(src)] Sparks briefly jump out of the [correct_wire] wire on \the [src], but it's disarmed!")
|
||||
return
|
||||
src.audible_message("[bicon(src)] <b>[src]</b> beeps, \"Enjoy the pizza!\"")
|
||||
atom_say("Enjoy the pizza!")
|
||||
src.visible_message("<span class='userdanger'>\The [src] violently explodes!</span>")
|
||||
explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb
|
||||
qdel(src)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
else if(href_list["code"])
|
||||
code += text2num(href_list["code"])
|
||||
code = round(code)
|
||||
code = Clamp(code, 1, 100)
|
||||
code = clamp(code, 1, 100)
|
||||
|
||||
else if(href_list["power"])
|
||||
on = !on
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/ks1type = null
|
||||
var/ks2type = null
|
||||
dog_fashion = null
|
||||
requires_tcomms = TRUE
|
||||
|
||||
/obj/item/radio/headset/New()
|
||||
..()
|
||||
@@ -88,6 +89,8 @@
|
||||
/obj/item/radio/headset/syndicate
|
||||
origin_tech = "syndicate=3"
|
||||
ks1type = /obj/item/encryptionkey/syndicate/nukeops
|
||||
requires_tcomms = FALSE
|
||||
instant = TRUE // Work instantly if there are no comms
|
||||
|
||||
/obj/item/radio/headset/syndicate/alt //undisguised bowman with flash protection
|
||||
name = "syndicate headset"
|
||||
|
||||
@@ -46,16 +46,15 @@
|
||||
name = "station intercom (Security)"
|
||||
frequency = SEC_I_FREQ
|
||||
|
||||
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
|
||||
..()
|
||||
/obj/item/radio/intercom/New(turf/loc, direction, building = 3)
|
||||
. = ..()
|
||||
buildstage = building
|
||||
if(buildstage)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
|
||||
dir=ndir
|
||||
if(direction)
|
||||
setDir(direction)
|
||||
set_pixel_offsets_from_dir(28, -28, 28, -28)
|
||||
b_stat=1
|
||||
on = 0
|
||||
GLOB.global_intercoms.Add(src)
|
||||
@@ -204,7 +203,7 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
if(!buildstage)
|
||||
if(buildstage != 0)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 3))
|
||||
|
||||
@@ -58,6 +58,9 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/list/datum/radio_frequency/secure_radio_connections = new
|
||||
|
||||
var/requires_tcomms = FALSE // Does this device require tcomms to work.If TRUE it wont function at all without tcomms. If FALSE, it will work without tcomms, just slowly
|
||||
var/instant = FALSE // Should this device instantly communicate if there isnt tcomms
|
||||
|
||||
|
||||
/obj/item/radio/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
@@ -233,7 +236,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/item/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels, var/role = "Unknown") //BS12 EDIT
|
||||
/obj/item/radio/proc/autosay(message, from, channel, role = "Unknown") //BS12 EDIT
|
||||
var/datum/radio_frequency/connection = null
|
||||
if(channel && channels && channels.len > 0)
|
||||
if(channel == "department")
|
||||
@@ -258,10 +261,29 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
if(jammed)
|
||||
message = Gibberish(message, 100)
|
||||
var/list/message_pieces = message_to_multilingual(message)
|
||||
Broadcast_Message(connection, A,
|
||||
0, "*garbled automated announcement*", src,
|
||||
message_pieces, from, "Automated Announcement", from, "synthesized voice",
|
||||
4, 0, zlevel, connection.frequency, follow_target = follow_target)
|
||||
|
||||
// Make us a message datum!
|
||||
var/datum/tcomms_message/tcm = new
|
||||
tcm.connection = connection
|
||||
tcm.sender = A
|
||||
tcm.radio = src
|
||||
tcm.sender_name = from
|
||||
tcm.message_pieces = message_pieces
|
||||
tcm.sender_job = "Automated Announcement"
|
||||
tcm.vname = "synthesized voice"
|
||||
tcm.data = SIGNALTYPE_AINOTRACK
|
||||
// Datum radios dont have a location (obviously
|
||||
if(loc && loc.z)
|
||||
tcm.source_level = loc.z // For anyone that reads this: This used to pull from a LIST from the CONFIG DATUM. WHYYYYYYYYY!!!!!!!! -aa
|
||||
else
|
||||
tcm.source_level = 1 // Assume Z1 if we dont have an actual Z level available to us.
|
||||
tcm.freq = connection.frequency
|
||||
tcm.follow_target = follow_target
|
||||
|
||||
// Now put that through the stuff
|
||||
for(var/obj/machinery/tcomms/core/C in GLOB.tcomms_machines)
|
||||
C.handle_message(tcm)
|
||||
qdel(tcm) // Delete the message datum
|
||||
qdel(A)
|
||||
|
||||
// Just a dummy mob used for making announcements, so we don't create AIs to do this
|
||||
@@ -273,7 +295,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
universal_speak = 1
|
||||
|
||||
/mob/living/automatedannouncer/New()
|
||||
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), SecondsToTicks(10), TIMER_STOPPABLE)
|
||||
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), 10 SECONDS, TIMER_STOPPABLE)
|
||||
..()
|
||||
|
||||
/mob/living/automatedannouncer/Destroy()
|
||||
@@ -318,48 +340,32 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
if(!M.IsVocal())
|
||||
return 0
|
||||
|
||||
/* Quick introduction:
|
||||
This new radio system uses a very robust FTL signaling technology unoriginally
|
||||
dubbed "subspace" which is somewhat similar to 'blue-space' but can't
|
||||
actually transmit large mass. Headsets are the only radio devices capable
|
||||
of sending subspace transmissions to the Communications Satellite.
|
||||
|
||||
A headset sends a signal to a subspace listener/receiver elsewhere in space,
|
||||
the signal gets processed and logged, and an audible transmission gets sent
|
||||
to each individual headset.
|
||||
*/
|
||||
|
||||
//#### Grab the connection datum ####//
|
||||
var/message_mode = handle_message_mode(M, message_pieces, channel)
|
||||
switch(message_mode) //special cases
|
||||
if(RADIO_CONNECTION_FAIL)
|
||||
return 0
|
||||
if(RADIO_CONNECTION_NON_SUBSPACE)
|
||||
return 1
|
||||
|
||||
if(!istype(message_mode, /datum/radio_frequency)) //if not a special case, it should be returning a radio connection
|
||||
return 0
|
||||
|
||||
var/datum/radio_frequency/connection = message_mode
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
var/jammed = FALSE
|
||||
for(var/obj/item/jammer/jammer in GLOB.active_jammers)
|
||||
var/turf/position = get_turf(src)
|
||||
for(var/J in GLOB.active_jammers)
|
||||
var/obj/item/jammer/jammer = J
|
||||
if(get_dist(position, get_turf(jammer)) < jammer.range)
|
||||
jammed = TRUE
|
||||
break
|
||||
|
||||
//#### Tagging the signal with all appropriate identity values ####//
|
||||
var/message_mode = handle_message_mode(M, message_pieces, channel)
|
||||
switch(message_mode) //special cases
|
||||
// This is if the connection fails
|
||||
if(RADIO_CONNECTION_FAIL)
|
||||
return 0
|
||||
// This is if were using either a binary key, or a hivemind through a headset somehow. Dont ask.
|
||||
if(RADIO_CONNECTION_NON_SUBSPACE)
|
||||
return 1
|
||||
|
||||
if(!istype(message_mode, /datum/radio_frequency)) //if not a special case, it should be returning a radio connection
|
||||
return
|
||||
|
||||
var/datum/radio_frequency/connection = message_mode
|
||||
|
||||
|
||||
// ||-- The mob's name identity --||
|
||||
var/displayname = M.name // grab the display name (name you get when you hover over someone's icon)
|
||||
var/real_name = M.real_name // mob's real name
|
||||
var/mobkey = "none" // player key associated with mob
|
||||
var/voicemask = 0 // the speaker is wearing a voice mask
|
||||
if(M.client)
|
||||
mobkey = M.key // assign the mob's key
|
||||
|
||||
|
||||
var/jobname // the mob's "job"
|
||||
|
||||
if(jammed)
|
||||
@@ -397,7 +403,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
displayname = H.voice
|
||||
if(H.voice != real_name)
|
||||
if(H.voice != M.real_name)
|
||||
voicemask = TRUE
|
||||
|
||||
if(syndiekey && syndiekey.change_voice && connection.frequency == SYND_FREQ)
|
||||
@@ -405,124 +411,45 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
jobname = "Unknown"
|
||||
voicemask = TRUE
|
||||
|
||||
// Make us a message datum!
|
||||
var/datum/tcomms_message/tcm = new
|
||||
tcm.sender_name = displayname
|
||||
tcm.sender_job = jobname
|
||||
tcm.message_pieces = message_pieces
|
||||
tcm.source_level = position.z
|
||||
tcm.freq = connection.frequency
|
||||
tcm.vmask = voicemask
|
||||
tcm.needs_tcomms = requires_tcomms
|
||||
tcm.connection = connection
|
||||
tcm.vname = M.voice_name
|
||||
tcm.sender = M
|
||||
// Now put that through the stuff
|
||||
var/handled = FALSE
|
||||
if(connection)
|
||||
for(var/obj/machinery/tcomms/core/C in GLOB.tcomms_machines)
|
||||
if(C.handle_message(tcm))
|
||||
handled = TRUE
|
||||
qdel(tcm) // Delete the message datum
|
||||
return TRUE
|
||||
|
||||
/* ###### Radio headsets can only broadcast through subspace ###### */
|
||||
// If we dont need tcomms and we have no connection
|
||||
if(!requires_tcomms && !handled)
|
||||
// If they dont need tcomms for their signal, set the type to intercoms
|
||||
tcm.data = SIGNALTYPE_INTERCOM_SBR
|
||||
tcm.zlevels = list(position.z)
|
||||
if(!instant)
|
||||
// Simulate two seconds of lag
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/broadcast_message, tcm), 20)
|
||||
QDEL_IN(tcm, 20)
|
||||
else
|
||||
// Nukeops + Deathsquad headsets are instant and should work the same, whether there is comms or not
|
||||
broadcast_message(tcm)
|
||||
qdel(tcm) // Delete the message datum
|
||||
return TRUE
|
||||
|
||||
if(subspace_transmission)
|
||||
// First, we want to generate a new radio signal
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2 // 2 would be a subspace transmission.
|
||||
// transmission_method could probably be enumerated through #define. Would be neater.
|
||||
|
||||
// --- Finally, tag the actual signal with the appropriate values ---
|
||||
signal.data = list(
|
||||
// Identity-associated tags:
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"race" = signal.get_race(M),
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = displayname, // the mob's display name
|
||||
"job" = jobname, // the mob's job
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmessage" = pick(M.speak_emote), // the message to display if the voice wasn't understood
|
||||
"vname" = M.voice_name, // the name to display if the voice wasn't understood
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mask
|
||||
|
||||
// We store things that would otherwise be kept in the actual mob
|
||||
// so that they can be logged even AFTER the mob is deleted or something
|
||||
|
||||
// Other tags:
|
||||
"compression" = rand(45,50), // compressed radio signal
|
||||
"message" = message_pieces, // the actual sent message
|
||||
"connection" = connection, // the radio connection to use
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
|
||||
"traffic" = 0, // dictates the total traffic sum that the signal went through
|
||||
"type" = 0, // determines what type of radio input it is: normal broadcast
|
||||
"server" = null, // the last server to log this signal
|
||||
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
|
||||
"level" = position.z, // The source's z level
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
|
||||
spawn(0)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Allinone can act as receivers.
|
||||
for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list)
|
||||
spawn(0)
|
||||
R.receive_signal(signal)
|
||||
|
||||
// Receiving code can be located in Telecommunications.dm
|
||||
return signal.data["done"] && (position.z in signal.data["level"])
|
||||
|
||||
|
||||
/* ###### Intercoms and station-bounced radios ###### */
|
||||
|
||||
var/filter_type = 2
|
||||
|
||||
/* --- Intercoms can only broadcast to other intercoms, but bounced radios can broadcast to bounced radios and intercoms --- */
|
||||
if(istype(src, /obj/item/radio/intercom))
|
||||
filter_type = 1
|
||||
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2
|
||||
|
||||
|
||||
/* --- Try to send a normal subspace broadcast first */
|
||||
|
||||
signal.data = list(
|
||||
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"race" = signal.get_race(M), // text to show next to mob in comms log console
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = displayname, // the mob's display name
|
||||
"job" = jobname, // the mob's job
|
||||
"key" = mobkey, // the mob's key
|
||||
"vmessage" = pick(M.speak_emote), // the message to display if the voice wasn't understood
|
||||
"vname" = M.voice_name, // the name to display if the voice wasn't understood
|
||||
"vmask" = voicemask, // 1 if the mob is using a voice gas mas
|
||||
|
||||
"compression" = 0, // uncompressed radio signal
|
||||
"message" = message_pieces, // the actual sent message
|
||||
"connection" = connection, // the radio connection to use
|
||||
"radio" = src, // stores the radio used for transmission
|
||||
"slow" = 0,
|
||||
"traffic" = 0,
|
||||
"type" = 0,
|
||||
"server" = null,
|
||||
"reject" = 0,
|
||||
"level" = position.z,
|
||||
"verb" = verb
|
||||
)
|
||||
signal.frequency = connection.frequency // Quick frequency set
|
||||
|
||||
for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
|
||||
spawn(0)
|
||||
R.receive_signal(signal)
|
||||
|
||||
|
||||
sleep(rand(10,25)) // wait a little...
|
||||
|
||||
if(signal.data["done"] && (position.z in signal.data["level"]))
|
||||
// we're done here.
|
||||
return 1
|
||||
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level.
|
||||
// Send a mundane broadcast with limited targets:
|
||||
|
||||
//THIS IS TEMPORARY. YEAH RIGHT
|
||||
if(!connection) return 0 //~Carn
|
||||
|
||||
return Broadcast_Message(connection, M, voicemask, pick(M.speak_emote),
|
||||
src, message_pieces, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], list(position.z), connection.frequency,verb)
|
||||
// If we didnt get here, oh fuck
|
||||
qdel(tcm) // Delete the message datum
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/radio/hear_talk(mob/M as mob, list/message_pieces, var/verb = "says")
|
||||
@@ -696,6 +623,9 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
..()
|
||||
set_frequency(ERT_FREQ)
|
||||
|
||||
/obj/item/radio/borg/ert/specops
|
||||
keyslot = new /obj/item/encryptionkey/centcom
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -141,7 +141,7 @@ REAGENT SCANNER
|
||||
|
||||
// Used by the PDA medical scanner too
|
||||
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
|
||||
if(!ishuman(M) || M.isSynthetic())
|
||||
if(!ishuman(M) || ismachineperson(M))
|
||||
//these sensors are designed for organic life
|
||||
to_chat(user, "<span class='notice'>Analyzing Results for ERROR:\n\t Overall Status: ERROR</span>")
|
||||
to_chat(user, "\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>")
|
||||
@@ -859,11 +859,11 @@ REAGENT SCANNER
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
if(target.disabilities & BLIND)
|
||||
if(BLINDNESS in target.mutations)
|
||||
dat += "<font color='red'>Cataracts detected.</font><BR>"
|
||||
if(target.disabilities & COLOURBLIND)
|
||||
if(COLOURBLIND in target.mutations)
|
||||
dat += "<font color='red'>Photoreceptor abnormalities detected.</font><BR>"
|
||||
if(target.disabilities & NEARSIGHTED)
|
||||
if(NEARSIGHTED in target.mutations)
|
||||
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
|
||||
|
||||
return dat
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=3;materials=3;magnets=3"
|
||||
var/datum/nano_module/crew_monitor/crew_monitor
|
||||
var/datum/tgui_module/crew_monitor/crew_monitor
|
||||
|
||||
/obj/item/sensor_device/New()
|
||||
..()
|
||||
@@ -17,7 +17,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/sensor_device/attack_self(mob/user as mob)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
crew_monitor.ui_interact(user, ui_key, ui, force_open)
|
||||
/obj/item/sensor_device/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
crew_monitor.tgui_interact(user, ui_key, ui, force_open)
|
||||
|
||||
@@ -131,7 +131,6 @@ GLOBAL_LIST_EMPTY(world_uplinks)
|
||||
else
|
||||
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
|
||||
return buy(UI, UI ? UI.reference : "")
|
||||
return 0
|
||||
|
||||
/obj/item/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
|
||||
if(!UI)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
/obj/item/mixing_bowl/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if("dispose")
|
||||
if(href_list["dispose"])
|
||||
dispose()
|
||||
return
|
||||
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
mount_reqs = list("simfloor", "nospace")
|
||||
|
||||
/obj/item/mounted/frame/firealarm/do_build(turf/on_wall, mob/user)
|
||||
new /obj/machinery/firealarm(get_turf(src), get_dir(on_wall, user), 1)
|
||||
new /obj/machinery/firealarm(get_turf(src), get_dir(user, on_wall), 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -9,23 +9,23 @@
|
||||
origin_tech = "programming=2"
|
||||
var/locked = 0
|
||||
var/installed = 0
|
||||
var/require_module = 0
|
||||
var/require_module = FALSE
|
||||
var/module_type = null
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
if(module_type && !istype(R.module, module_type))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(usr, "There's no mounting point for the module!")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/reset
|
||||
name = "cyborg module reset board"
|
||||
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
|
||||
icon_state = "cyborg_upgrade1"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/reset/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
@@ -55,7 +55,7 @@
|
||||
R.custom_name = heldname
|
||||
R.real_name = heldname
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/restart
|
||||
name = "cyborg emergency reboot module"
|
||||
@@ -74,17 +74,17 @@
|
||||
|
||||
R.stat = CONSCIOUS
|
||||
GLOB.dead_mob_list -= R //please never forget this ever kthx
|
||||
GLOB.living_mob_list += R
|
||||
GLOB.alive_mob_list += R
|
||||
R.notify_ai(1)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/vtec
|
||||
name = "robotic VTEC Module"
|
||||
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
|
||||
icon_state = "cyborg_upgrade2"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
origin_tech = "engineering=4;materials=5;programming=4"
|
||||
|
||||
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
|
||||
@@ -97,14 +97,14 @@
|
||||
|
||||
R.speed = -1 // Gotta go fast.
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler
|
||||
name = "cyborg rapid disabler cooling module"
|
||||
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
origin_tech = "engineering=4;powerstorage=4;combat=4"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
module_type = /obj/item/robot_module/security
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
T.charge_delay = max(2 , T.charge_delay - 4)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/thrusters
|
||||
name = "ion thruster upgrade"
|
||||
@@ -139,14 +139,14 @@
|
||||
return
|
||||
|
||||
R.ionpulse = 1
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/ddrill
|
||||
name = "mining cyborg diamond drill"
|
||||
desc = "A diamond drill replacement for the mining module's standard drill."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
origin_tech = "engineering=4;materials=5"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
module_type = /obj/item/robot_module/miner
|
||||
|
||||
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
|
||||
@@ -161,14 +161,14 @@
|
||||
R.module.modules += new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
|
||||
R.module.rebuild()
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/soh
|
||||
name = "mining cyborg satchel of holding"
|
||||
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
origin_tech = "engineering=4;materials=4;bluespace=4"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
module_type = /obj/item/robot_module/miner
|
||||
|
||||
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
|
||||
@@ -181,35 +181,46 @@
|
||||
R.module.modules += new /obj/item/storage/bag/ore/holding(R.module)
|
||||
R.module.rebuild()
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/syndicate
|
||||
name = "illegal equipment module"
|
||||
name = "safety override module"
|
||||
desc = "Unlocks the hidden, deadlier functions of a cyborg. Also prevents emag subversion."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
origin_tech = "combat=4;syndicate=1"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(R.emagged)
|
||||
return
|
||||
|
||||
if(R.weapons_unlock)
|
||||
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
|
||||
return
|
||||
|
||||
R.emagged = 1
|
||||
return TRUE
|
||||
|
||||
return 1
|
||||
/obj/item/borg/upgrade/lavaproof
|
||||
name = "mining cyborg lavaproof chassis"
|
||||
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to a mining cyborg's chassis, enabling them to withstand exposure to molten rock."
|
||||
icon_state = "ash_plating"
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
require_module = TRUE
|
||||
module_type = /obj/item/robot_module/miner
|
||||
|
||||
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
if(istype(R))
|
||||
R.weather_immunities += "lava"
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair
|
||||
name = "self-repair module"
|
||||
desc = "This module will repair the cyborg over time."
|
||||
icon_state = "cyborg_upgrade5"
|
||||
require_module = 1
|
||||
require_module = TRUE
|
||||
var/repair_amount = -1
|
||||
var/repair_tick = 1
|
||||
var/msg_cooldown = 0
|
||||
@@ -230,7 +241,7 @@
|
||||
icon_state = "selfrepair_off"
|
||||
var/datum/action/A = new /datum/action/item_action/toggle(src)
|
||||
A.Grant(R)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/Destroy()
|
||||
cyborg = null
|
||||
|
||||
@@ -4,24 +4,23 @@
|
||||
desc = "A shooting target."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_h"
|
||||
density = 0
|
||||
density = FALSE
|
||||
var/hp = 1800
|
||||
var/icon/virtualIcon
|
||||
var/list/bulletholes = list()
|
||||
|
||||
/obj/item/target/Destroy()
|
||||
cut_overlays()
|
||||
// if a target is deleted and associated with a stake, force stake to forget
|
||||
for(var/obj/structure/target_stake/T in view(3,src))
|
||||
for(var/obj/structure/target_stake/T in view(3, src))
|
||||
if(T.pinned_target == src)
|
||||
T.pinned_target = null
|
||||
T.density = 1
|
||||
T.density = TRUE
|
||||
break
|
||||
return ..() // delete target
|
||||
|
||||
/obj/item/target/Move()
|
||||
..()
|
||||
// After target moves, check for nearby stakes. If associated, move to target
|
||||
for(var/obj/structure/target_stake/M in view(3,src))
|
||||
for(var/obj/structure/target_stake/M in view(3, src))
|
||||
if(M.density == 0 && M.pinned_target == src)
|
||||
M.loc = loc
|
||||
|
||||
@@ -33,12 +32,12 @@
|
||||
|
||||
/obj/item/target/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!use_tool(src, user, 0,, volume = I.tool_volume))
|
||||
if(!use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
overlays.Cut()
|
||||
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
|
||||
/obj/item/target/attack_hand(mob/user as mob)
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
// taking pinned targets off!
|
||||
var/obj/structure/target_stake/stake
|
||||
for(var/obj/structure/target_stake/T in view(3,src))
|
||||
@@ -48,8 +47,8 @@
|
||||
|
||||
if(stake)
|
||||
if(stake.pinned_target)
|
||||
stake.density = 1
|
||||
density = 0
|
||||
stake.density = TRUE
|
||||
density = FALSE
|
||||
layer = OBJ_LAYER
|
||||
|
||||
loc = user.loc
|
||||
@@ -77,101 +76,37 @@
|
||||
desc = "A shooting target that looks like a xenomorphic alien."
|
||||
hp = 2350 // alium onest too kinda
|
||||
|
||||
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
|
||||
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
|
||||
var/p_y = Proj.p_y + pick(0,0,0,0,0,-1,1)
|
||||
var/decaltype = 1 // 1 - scorch, 2 - bullet
|
||||
#define DECALTYPE_SCORCH 1
|
||||
#define DECALTYPE_BULLET 2
|
||||
|
||||
if(istype(/obj/item/projectile/bullet, Proj))
|
||||
decaltype = 2
|
||||
/obj/item/target/bullet_act(obj/item/projectile/P)
|
||||
var/p_x = P.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset P.p_x!"
|
||||
var/p_y = P.p_y + pick(0,0,0,0,0,-1,1)
|
||||
var/decaltype = DECALTYPE_SCORCH
|
||||
if(istype(P, /obj/item/projectile/bullet))
|
||||
decaltype = DECALTYPE_BULLET
|
||||
|
||||
|
||||
virtualIcon = new(icon, icon_state)
|
||||
|
||||
if( virtualIcon.GetPixel(p_x, p_y) ) // if the located pixel isn't blank (null)
|
||||
|
||||
hp -= Proj.damage
|
||||
var/icon/C = icon(icon, icon_state)
|
||||
if(LAZYLEN(overlays) <= 35 && C.GetPixel(p_x, p_y)) // if the located pixel isn't blank (null)
|
||||
hp -= P.damage
|
||||
if(hp <= 0)
|
||||
visible_message("<span class='warning'>[src] breaks into tiny pieces and collapses!</span>")
|
||||
visible_message("<span class='danger'>[src] breaks into tiny pieces and collapses!</span>")
|
||||
qdel(src)
|
||||
|
||||
// Create a temporary object to represent the damage
|
||||
var/obj/bmark = new
|
||||
bmark.pixel_x = p_x
|
||||
bmark.pixel_y = p_y
|
||||
bmark.icon = 'icons/effects/effects.dmi'
|
||||
bmark.layer = 3.5
|
||||
bmark.icon_state = "scorch"
|
||||
|
||||
if(decaltype == 1)
|
||||
// Energy weapons are hot. they scorch!
|
||||
|
||||
// offset correction
|
||||
bmark.pixel_x--
|
||||
bmark.pixel_y--
|
||||
|
||||
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/beam/practice))
|
||||
bmark.icon_state = "scorch"
|
||||
bmark.dir = pick(NORTH,SOUTH,EAST,WEST) // random scorch design
|
||||
|
||||
|
||||
return
|
||||
var/image/bullet_hole = image('icons/effects/effects.dmi', "scorch", OBJ_LAYER + 0.5)
|
||||
bullet_hole.pixel_x = p_x - 1 //offset correction
|
||||
bullet_hole.pixel_y = p_y - 1
|
||||
if(decaltype == DECALTYPE_SCORCH)
|
||||
if(P.damage >= 20 || istype(P, /obj/item/projectile/beam/practice))
|
||||
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))// random scorch design. light_scorch does not have different directions
|
||||
else
|
||||
bmark.icon_state = "light_scorch"
|
||||
bullet_hole.icon_state = "light_scorch"
|
||||
else
|
||||
|
||||
// Bullets are hard. They make dents!
|
||||
bmark.icon_state = "dent"
|
||||
|
||||
if(Proj.damage >= 10 && bulletholes.len <= 35) // maximum of 35 bullet holes
|
||||
if(decaltype == 2) // bullet
|
||||
if(prob(Proj.damage+30)) // bullets make holes more commonly!
|
||||
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y) // create new bullet hole
|
||||
else // Lasers!
|
||||
if(prob(Proj.damage-10)) // lasers make holes less commonly
|
||||
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y) // create new bullet hole
|
||||
|
||||
// draw bullet holes
|
||||
for(var/datum/bullethole/B in bulletholes)
|
||||
|
||||
virtualIcon.DrawBox(null, B.b1x1, B.b1y, B.b1x2, B.b1y) // horizontal line, left to right
|
||||
virtualIcon.DrawBox(null, B.b2x, B.b2y1, B.b2x, B.b2y2) // vertical line, top to bottom
|
||||
|
||||
overlays += bmark // add the decal
|
||||
|
||||
icon = virtualIcon // apply bulletholes over decals
|
||||
|
||||
bullet_hole.icon_state = "dent"
|
||||
add_overlay(bullet_hole)
|
||||
return
|
||||
|
||||
return -1 // the bullet/projectile goes through the target! Ie, you missed
|
||||
|
||||
|
||||
// Small memory holder entity for transparent bullet holes
|
||||
/datum/bullethole
|
||||
// First box
|
||||
var/b1x1 = 0
|
||||
var/b1x2 = 0
|
||||
var/b1y = 0
|
||||
|
||||
// Second box
|
||||
var/b2x = 0
|
||||
var/b2y1 = 0
|
||||
var/b2y2 = 0
|
||||
|
||||
/datum/bullethole/New(obj/item/target/Target, pixel_x = 0, pixel_y = 0)
|
||||
if(!Target) return
|
||||
|
||||
// Randomize the first box
|
||||
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
|
||||
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
|
||||
b1y = pixel_y
|
||||
if(prob(35))
|
||||
b1y += rand(-4,4)
|
||||
|
||||
// Randomize the second box
|
||||
b2x = pixel_x
|
||||
if(prob(35))
|
||||
b2x += rand(-4,4)
|
||||
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
|
||||
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
|
||||
|
||||
Target.bulletholes.Add(src)
|
||||
#undef DECALTYPE_SCORCH
|
||||
#undef DECALTYPE_BULLET
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
E.heal_damage(0, remheal, 0, 1) //Healing Burn
|
||||
remheal = nremheal
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at \the [M]'s [E.name] with \the [src].</span>")
|
||||
if(H.bleed_rate && H.isSynthetic())
|
||||
if(H.bleed_rate && ismachineperson(H))
|
||||
H.bleed_rate = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Nothing to fix here.</span>")
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
icon_state = "sheet-hide"
|
||||
|
||||
GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/bloated_human, 5, on_floor = 1), \
|
||||
new/datum/stack_recipe("bloated human costume head", /obj/item/clothing/head/human_head, 5, on_floor = 1), \
|
||||
new/datum/stack_recipe("bloated human costume", /obj/item/clothing/suit/bloated_human, 5, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bloated human costume head", /obj/item/clothing/head/human_head, 5, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/human/New(var/loc, var/amount=null)
|
||||
@@ -48,6 +48,14 @@ GLOBAL_LIST_INIT(human_recipes, list( \
|
||||
singular_name = "lizard skin piece"
|
||||
icon_state = "sheet-lizard"
|
||||
|
||||
GLOBAL_LIST_INIT(lizard_recipes, list( \
|
||||
new/datum/stack_recipe("lizard skin handbag", /obj/item/storage/backpack/satchel/lizard, 5, on_floor = TRUE), \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/lizard/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.lizard_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/xeno
|
||||
name = "alien hide"
|
||||
desc = "The skin of a terrible creature."
|
||||
@@ -161,9 +169,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
return
|
||||
if(is_type_in_typecache(target, goliath_platable_armor_typecache))
|
||||
var/obj/item/clothing/C = target
|
||||
var/list/current_armor = C.armor
|
||||
if(current_armor["melee"] < 60)
|
||||
current_armor["melee"] = min(current_armor["melee"] + 10, 60)
|
||||
var/datum/armor/current_armor = C.armor
|
||||
if(current_armor.getRating("melee") < 60)
|
||||
C.armor = current_armor.setRating(melee_value = min(current_armor.getRating("melee") + 10, 60))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
use(1)
|
||||
else
|
||||
@@ -172,9 +180,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.hides < 3)
|
||||
D.hides++
|
||||
D.armor["melee"] = min(D.armor["melee"] + 10, 70)
|
||||
D.armor["bullet"] = min(D.armor["bullet"] + 5, 50)
|
||||
D.armor["laser"] = min(D.armor["laser"] + 5, 50)
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating("melee") + 10, 70))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating("bullet") + 5, 50))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating("laser") + 5, 50))
|
||||
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
|
||||
D.update_icon()
|
||||
if(D.hides == 3)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
|
||||
// Run the start check here so we wouldn't have to call it manually.
|
||||
target.add_fingerprint(user)
|
||||
if(!tool_start_check(user, amount) && !delay)
|
||||
if(!tool_start_check(target, user, amount) && !delay)
|
||||
return
|
||||
delay *= toolspeed
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
// Called before use_tool if there is a delay, or by use_tool if there isn't.
|
||||
// Only ever used by welding tools and stacks, so it's not added on any other use_tool checks.
|
||||
/obj/item/proc/tool_start_check(mob/living/user, amount=0)
|
||||
/obj/item/proc/tool_start_check(atom/target, mob/living/user, amount=0)
|
||||
return tool_use_check(user, amount)
|
||||
|
||||
// A check called by tool_start_check once, and by use_tool on every tick of delay.
|
||||
|
||||
@@ -35,10 +35,12 @@
|
||||
..()
|
||||
create_reagents(maximum_fuel)
|
||||
reagents.add_reagent("fuel", maximum_fuel)
|
||||
if(refills_over_time)
|
||||
reagents.reagents_generated_per_cycle += list("fuel" = 1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 0)
|
||||
@@ -49,11 +51,15 @@
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T) // Implants for instance won't find a turf
|
||||
T.hotspot_expose(2500, 5)
|
||||
if(prob(5))
|
||||
remove_fuel(1)
|
||||
if(tool_enabled)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T) // Implants for instance won't find a turf
|
||||
T.hotspot_expose(2500, 5)
|
||||
if(prob(5))
|
||||
remove_fuel(1)
|
||||
if(refills_over_time)
|
||||
if(GET_FUEL < maximum_fuel)
|
||||
reagents.add_reagent("fuel", 1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
@@ -77,7 +83,8 @@
|
||||
playsound(loc, activation_sound, 50, 1)
|
||||
set_light(light_intensity)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(!refills_over_time)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
damtype = BRUTE
|
||||
force = 3
|
||||
hitsound = "swing_hit"
|
||||
@@ -101,9 +108,9 @@
|
||||
return FALSE
|
||||
|
||||
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
|
||||
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
|
||||
/obj/item/weldingtool/tool_start_check(atom/target, mob/living/user, amount=0)
|
||||
. = tool_use_check(user, amount)
|
||||
if(. && user)
|
||||
if(. && user && !ismob(target)) // Don't flash the user if they're repairing robo limbs or repairing a borg etc. Only flash them if the target is an object
|
||||
user.flash_eyes(light_intensity)
|
||||
|
||||
/obj/item/weldingtool/use(amount)
|
||||
@@ -160,7 +167,7 @@
|
||||
/obj/item/weldingtool/update_icon()
|
||||
if(low_fuel_changes_icon)
|
||||
var/ratio = GET_FUEL / maximum_fuel
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
if(ratio == 100)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
|
||||
@@ -1023,6 +1023,18 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
name = "orange fox plushie"
|
||||
icon_state = "orangefox"
|
||||
|
||||
/obj/item/toy/plushie/orange_fox/grump
|
||||
name = "grumpy fox"
|
||||
desc = "An ancient plushie that seems particularly grumpy."
|
||||
|
||||
/obj/item/toy/plushie/orange_fox/grump/ComponentInitialize()
|
||||
. = ..()
|
||||
var/static/list/grumps = list("Ahh, yes, you're so clever, var editing that.", "Really?", "If you make a runtime with var edits, it's your own damn fault.",
|
||||
"Don't you dare post issues on the git when you don't even know how this works.", "Was that necessary?", "Ohhh, setting admin edited var must be your favorite pastime!",
|
||||
"Oh, so you have time to var edit, but you don't have time to ban that greytider?", "Oh boy, is this another one of those 'events'?", "Seriously, just stop.", "You do realize this is incurring proc call overhead.",
|
||||
"Congrats, you just left a reference with your dirty client and now that thing you edited will never garbage collect properly.", "Is it that time of day, again, for unecessary adminbus?")
|
||||
AddComponent(/datum/component/edit_complainer, grumps)
|
||||
|
||||
/obj/item/toy/plushie/coffee_fox
|
||||
name = "coffee fox plushie"
|
||||
icon_state = "coffeefox"
|
||||
@@ -1087,6 +1099,21 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/toy/plushie/ipcplushie
|
||||
name = "IPC plushie"
|
||||
desc = "An adorable IPC plushie, straight from New Canaan. Arguably more durable than the real deal. Toaster functionality included."
|
||||
icon_state = "plushie_ipc"
|
||||
item_state = "plushie_ipc"
|
||||
|
||||
/obj/item/toy/plushie/ipcplushie/attackby(obj/item/B, mob/user, params)
|
||||
if(istype(B, /obj/item/reagent_containers/food/snacks/breadslice))
|
||||
new /obj/item/reagent_containers/food/snacks/toast(get_turf(loc))
|
||||
to_chat(user, "<span class='notice'> You insert bread into the toaster. </span>")
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
qdel(B)
|
||||
else
|
||||
return ..()
|
||||
|
||||
//New generation TG plushies
|
||||
|
||||
/obj/item/toy/plushie/lizardplushie
|
||||
@@ -1117,15 +1144,15 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
* Foam Armblade
|
||||
*/
|
||||
|
||||
/obj/item/toy/foamblade
|
||||
name = "foam armblade"
|
||||
desc = "it says \"Sternside Changs #1 fan\" on it. "
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "foamblade"
|
||||
item_state = "arm_blade"
|
||||
attack_verb = list("pricked", "absorbed", "gored")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
/obj/item/toy/foamblade
|
||||
name = "foam armblade"
|
||||
desc = "it says \"Sternside Changs #1 fan\" on it. "
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "foamblade"
|
||||
item_state = "arm_blade"
|
||||
attack_verb = list("pricked", "absorbed", "gored")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/*
|
||||
* Toy/fake flash
|
||||
@@ -1220,7 +1247,6 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
spawn(20)
|
||||
cooldown = FALSE
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/toy/owl
|
||||
name = "owl action figure"
|
||||
@@ -1382,6 +1408,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
name = "xenomorph action figure"
|
||||
desc = "MEGA presents the new Xenos Isolated action figure! Comes complete with realistic sounds! Pull back string to use."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
bubble_icon = "alien"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/toy_xeno/attack_self(mob/user)
|
||||
@@ -1390,7 +1417,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
user.visible_message("<span class='notice'>[user] pulls back the string on [src].</span>")
|
||||
icon_state = "[initial(icon_state)]_used"
|
||||
sleep(5)
|
||||
audible_message("<span class='danger'>[bicon(src)] Hiss!</span>")
|
||||
atom_say("Hiss!")
|
||||
var/list/possible_sounds = list('sound/voice/hiss1.ogg', 'sound/voice/hiss2.ogg', 'sound/voice/hiss3.ogg', 'sound/voice/hiss4.ogg')
|
||||
playsound(get_turf(src), pick(possible_sounds), 50, 1)
|
||||
spawn(45)
|
||||
|
||||
@@ -477,9 +477,7 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
|
||||
return R.cell.charge >= (amount * use_multiplier)
|
||||
|
||||
/obj/item/rcd/proc/detonate_pulse()
|
||||
audible_message("<span class='danger'><b>[src] begins to vibrate and \
|
||||
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
|
||||
vibrating violently!</b></span>")
|
||||
audible_message("<span class='danger'><b>[src] begins to vibrate and buzz loudly!</b></span>", "<span class='danger'><b>[src] begins vibrating violently!</b></span>")
|
||||
// 5 seconds to get rid of it
|
||||
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
/obj/structure/chrono_field/update_icon()
|
||||
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
|
||||
ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT)
|
||||
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
|
||||
if(ttk_frame != RPpos)
|
||||
RPpos = ttk_frame
|
||||
mob_underlay.icon_state = "frame[RPpos]"
|
||||
|
||||
@@ -360,7 +360,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
lit = FALSE
|
||||
icon_state = icon_off
|
||||
item_state = icon_off
|
||||
M.update_inv_wear_mask(0)
|
||||
M.update_inv_wear_mask()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
smoke()
|
||||
|
||||
@@ -27,10 +27,12 @@
|
||||
throwforce = 2.0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
var/next_gavel_hit
|
||||
|
||||
/obj/item/gavelblock/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/gavelhammer))
|
||||
playsound(loc, 'sound/items/gavel.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] strikes \the [src] with \the [I].</span>")
|
||||
else
|
||||
if(!istype(I, /obj/item/gavelhammer))
|
||||
return
|
||||
if(world.time > next_gavel_hit)
|
||||
playsound(loc, 'sound/items/gavel.ogg', 100, 1)
|
||||
next_gavel_hit = world.time + 5 SECONDS
|
||||
user.visible_message("<span class='warning'>[user] strikes \the [src] with \the [I].</span>")
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(powered) //so it doesn't show charge if it's unpowered
|
||||
if(cell)
|
||||
var/ratio = cell.charge / cell.maxcharge
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
overlays += "[icon_state]-charge[ratio]"
|
||||
|
||||
/obj/item/defibrillator/CheckParts(list/parts_list)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/item/dice/proc/diceroll(mob/user)
|
||||
result = roll(sides)
|
||||
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
|
||||
if(rigged == DICE_BASICALLY_RIGGED && prob(Clamp(1/(sides - 1) * 100, 25, 80)))
|
||||
if(rigged == DICE_BASICALLY_RIGGED && prob(clamp(1/(sides - 1) * 100, 25, 80)))
|
||||
result = rigged_value
|
||||
else if(rigged == DICE_TOTALLY_RIGGED)
|
||||
result = rigged_value
|
||||
|
||||
@@ -147,10 +147,6 @@
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_attack_logs(user, M, attack_log, ATKLOG_ALL)
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
inject(M, user)
|
||||
used = TRUE
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
scramble(1, H, 100)
|
||||
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
|
||||
H.sync_organ_dna(assimilate = 1)
|
||||
H.update_body(0)
|
||||
H.update_body()
|
||||
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
|
||||
H.reset_markings() //...Or markings.
|
||||
H.dna.ResetUIFrom(H)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return
|
||||
var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num
|
||||
if(user.is_in_active_hand(src))
|
||||
newtime = Clamp(newtime, 10, 60000)
|
||||
newtime = clamp(newtime, 10, 60000)
|
||||
det_time = newtime
|
||||
to_chat(user, "Timer set for [det_time] seconds.")
|
||||
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
to_chat(user, "<span class='notice'>You cut open the present.</span>")
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.loc = src.loc
|
||||
M.reset_perspective(null)
|
||||
M.forceMove(loc)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -13,22 +13,12 @@
|
||||
/obj/item/grenade/clown_grenade/prime()
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
|
||||
/*
|
||||
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
|
||||
if(prob(75))
|
||||
banana(T)
|
||||
*/
|
||||
var/i = 0
|
||||
var/number = 0
|
||||
for(var/direction in GLOB.alldirs)
|
||||
for(i = 0; i < 2; i++)
|
||||
number++
|
||||
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
|
||||
/* var/direction = pick(alldirs)
|
||||
var/spaces = pick(1;150, 2)
|
||||
var/a = 0
|
||||
for(a = 0; a < spaces; a++)
|
||||
step(peel,direction)*/
|
||||
var/a = 1
|
||||
if(number & 2)
|
||||
for(a = 1; a <= 2; a++)
|
||||
@@ -39,21 +29,17 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel
|
||||
trip_stun = 0
|
||||
trip_weaken = 7
|
||||
trip_tiles = 4
|
||||
trip_walksafe = FALSE
|
||||
|
||||
trip_chance = 100
|
||||
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
|
||||
/obj/item/grown/bananapeel/traitorpeel/New(newloc, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
if(.)
|
||||
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
|
||||
H.take_overall_damage(0, rand(2,8))
|
||||
H.take_organ_damage(2) // Was 5 -- TLE
|
||||
// The reason this AddComponent is here and not in ComponentInitialize() is because if it's put there, it will be ran before the parent New proc for /grown types.
|
||||
// And then be overriden by the generic component placed onto it by the `/datum/plant_gene/trait/slip`.
|
||||
AddComponent(/datum/component/slippery, src, 0, 7, 100, 4, FALSE)
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/after_slip(mob/living/carbon/human/H)
|
||||
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
|
||||
H.take_overall_damage(0, rand(2,8))
|
||||
H.take_organ_damage(2)
|
||||
return ..()
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
|
||||
var/burned = rand(1,3)
|
||||
|
||||
@@ -40,14 +40,13 @@
|
||||
L.adjustBrainLoss(20)
|
||||
removed(mindslave_target)
|
||||
qdel(src)
|
||||
return -1
|
||||
return -1
|
||||
if(ismindshielded(mindslave_target))
|
||||
mindslave_target.visible_message("<span class='warning'>[mindslave_target] seems to resist the implant!</span>", "<span class='warning'>You feel a strange sensation in your head that quickly dissipates.</span>")
|
||||
removed(mindslave_target)
|
||||
qdel(src)
|
||||
return -1
|
||||
|
||||
mindslave_target.implanting = 1
|
||||
to_chat(mindslave_target, "<span class='danger'>You feel completely loyal to [user.name].</span>")
|
||||
if(!(user.mind in SSticker.mode.implanter))
|
||||
SSticker.mode.implanter[user.mind] = list()
|
||||
@@ -56,7 +55,7 @@
|
||||
SSticker.mode.implanted.Add(mindslave_target.mind)
|
||||
SSticker.mode.implanted[mindslave_target.mind] = user.mind
|
||||
SSticker.mode.implanter[user.mind] = implanters
|
||||
|
||||
|
||||
to_chat(mindslave_target, "<span class='danger'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect [user.p_them()] and assist in [user.p_their()] goals at any cost.</span>")
|
||||
|
||||
var/datum/objective/protect/mindslave/MS = new
|
||||
|
||||
@@ -1,29 +1,19 @@
|
||||
/////////
|
||||
//ZIPPO//
|
||||
/////////
|
||||
// Basic lighters
|
||||
/obj/item/lighter
|
||||
name = "cheap lighter"
|
||||
desc = "A cheap-as-free lighter."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "lighter-g"
|
||||
item_state = "lighter-g"
|
||||
var/icon_on = "lighter-g-on"
|
||||
var/icon_off = "lighter-g"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 4
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = null
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/lit = 0
|
||||
|
||||
/obj/item/lighter/zippo
|
||||
name = "zippo lighter"
|
||||
desc = "The zippo."
|
||||
icon_state = "zippo"
|
||||
item_state = "zippo"
|
||||
icon_on = "zippoon"
|
||||
icon_off = "zippo"
|
||||
var/lit = FALSE
|
||||
var/icon_on = "lighter-g-on"
|
||||
var/icon_off = "lighter-g"
|
||||
|
||||
/obj/item/lighter/random/New()
|
||||
..()
|
||||
@@ -33,54 +23,51 @@
|
||||
icon_state = icon_off
|
||||
|
||||
/obj/item/lighter/attack_self(mob/living/user)
|
||||
if(user.r_hand == src || user.l_hand == src || isrobot(user))
|
||||
if(!lit)
|
||||
lit = 1
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
force = 5
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
attack_verb = list("burnt", "singed")
|
||||
if(istype(src, /obj/item/lighter/zippo) )
|
||||
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
|
||||
playsound(src.loc, 'sound/items/zippolight.ogg', 25, 1)
|
||||
else
|
||||
if(prob(75))
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You burn yourself while lighting the lighter.</span>")
|
||||
var/mob/living/M = user
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
if(affecting.receive_damage( 0, 5 )) //INFERNO
|
||||
H.UpdateDamageIcon()
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], [user.p_they()] however burn[user.p_s()] [user.p_their()] finger in the process.</span>")
|
||||
|
||||
set_light(2)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
lit = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon_state = icon_off
|
||||
item_state = icon_off
|
||||
hitsound = "swing_hit"
|
||||
force = 0
|
||||
attack_verb = null //human_defense.dm takes care of it
|
||||
if(istype(src, /obj/item/lighter/zippo) )
|
||||
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.")
|
||||
playsound(src.loc, 'sound/items/zippoclose.ogg', 25, 1)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
|
||||
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
if(!lit)
|
||||
turn_on_lighter(user)
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
turn_off_lighter(user)
|
||||
|
||||
/obj/item/lighter/proc/turn_on_lighter(mob/living/user)
|
||||
lit = TRUE
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
force = 5
|
||||
damtype = BURN
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
attack_verb = list("burnt", "singed")
|
||||
|
||||
attempt_light(user)
|
||||
set_light(2)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/lighter/proc/attempt_light(mob/living/user)
|
||||
if(prob(75) || issilicon(user)) // Robots can never burn themselves trying to light it.
|
||||
to_chat(user, "<span class='notice'>You light [src].</span>")
|
||||
else
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
if(affecting.receive_damage( 0, 5 )) //INFERNO
|
||||
H.UpdateDamageIcon()
|
||||
to_chat(user,"<span class='notice'>You light [src], but you burn your hand in the process.</span>")
|
||||
|
||||
/obj/item/lighter/proc/turn_off_lighter(mob/living/user)
|
||||
lit = FALSE
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon_state = icon_off
|
||||
item_state = icon_off
|
||||
hitsound = "swing_hit"
|
||||
force = 0
|
||||
attack_verb = null //human_defense.dm takes care of it
|
||||
|
||||
show_off_message(user)
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/lighter/proc/show_off_message(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You shut off [src].")
|
||||
|
||||
/obj/item/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!isliving(M))
|
||||
@@ -108,6 +95,41 @@
|
||||
location.hotspot_expose(700, 5)
|
||||
return
|
||||
|
||||
// Zippo lighters
|
||||
/obj/item/lighter/zippo
|
||||
name = "zippo lighter"
|
||||
desc = "The zippo."
|
||||
icon_state = "zippo"
|
||||
item_state = "zippo"
|
||||
icon_on = "zippoon"
|
||||
icon_off = "zippo"
|
||||
var/next_on_message
|
||||
var/next_off_message
|
||||
|
||||
/obj/item/lighter/zippo/turn_on_lighter(mob/living/user)
|
||||
. = ..()
|
||||
if(world.time > next_on_message)
|
||||
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
|
||||
playsound(src.loc, 'sound/items/zippolight.ogg', 25, 1)
|
||||
next_on_message = world.time + 5 SECONDS
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You light [src].</span>")
|
||||
|
||||
/obj/item/lighter/zippo/turn_off_lighter(mob/living/user)
|
||||
. = ..()
|
||||
if(world.time > next_off_message)
|
||||
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.")
|
||||
playsound(src.loc, 'sound/items/zippoclose.ogg', 25, 1)
|
||||
next_off_message = world.time + 5 SECONDS
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You shut off [src].")
|
||||
|
||||
/obj/item/lighter/zippo/show_off_message(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/item/lighter/zippo/attempt_light(mob/living/user)
|
||||
return
|
||||
|
||||
//EXTRA LIGHTERS
|
||||
/obj/item/lighter/zippo/nt_rep
|
||||
name = "gold engraved zippo"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
var/icon_state_on = "axe1"
|
||||
var/icon_state_on
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
|
||||
usesound = 'sound/weapons/blade1.ogg'
|
||||
@@ -37,7 +37,7 @@
|
||||
return BRUTELOSS|FIRELOSS
|
||||
|
||||
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_organ_damage(5,5)
|
||||
active = !active
|
||||
@@ -48,9 +48,9 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
if(icon_state_on)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
@@ -80,6 +80,7 @@
|
||||
name = "energy axe"
|
||||
desc = "An energised battle axe."
|
||||
icon_state = "axe0"
|
||||
icon_state_on = "axe1"
|
||||
force = 40
|
||||
force_on = 150
|
||||
throwforce = 25
|
||||
@@ -290,7 +291,7 @@
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.disabilities & CLUMSY && prob(50))
|
||||
if((CLUMSY in H.mutations) && prob(50))
|
||||
to_chat(H, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
H.take_organ_damage(10,10)
|
||||
active = !active
|
||||
@@ -301,9 +302,9 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
if(icon_state_on)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
return
|
||||
|
||||
if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
|
||||
to_chat(user, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
|
||||
to_chat(user, "<span class='warning'>A mysterious force disrupts your arcane spell matrix, and you remain where you are.</span>")
|
||||
return
|
||||
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
@@ -79,7 +79,7 @@
|
||||
L+=T
|
||||
|
||||
if(!L.len)
|
||||
to_chat(user, "The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.")
|
||||
to_chat(user, "<span class='warning'>The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.</span>")
|
||||
return
|
||||
|
||||
if(user && user.buckled)
|
||||
@@ -100,7 +100,8 @@
|
||||
break
|
||||
|
||||
if(!success)
|
||||
user.loc = pick(L)
|
||||
user.forceMove(pick(L))
|
||||
|
||||
smoke.start()
|
||||
src.uses -= 1
|
||||
user.update_action_buttons_icon() //Update action buttons as some spells might now be castable
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
return (active)
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
|
||||
user.take_organ_damage(5)
|
||||
active = !active
|
||||
|
||||
@@ -11,15 +11,11 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
discrete = 1
|
||||
|
||||
trip_stun = 4
|
||||
trip_weaken = 2
|
||||
trip_chance = 100
|
||||
trip_walksafe = FALSE
|
||||
trip_verb = TV_SLIP
|
||||
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
|
||||
/obj/item/soap/ComponentInitialize()
|
||||
AddComponent(/datum/component/slippery, src, 4, 2, 100, 0, FALSE)
|
||||
|
||||
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
|
||||
@@ -235,57 +235,6 @@
|
||||
rating = 4
|
||||
materials = list(MAT_METAL=80)
|
||||
|
||||
// Subspace stock parts
|
||||
|
||||
/obj/item/stock_parts/subspace/ansible
|
||||
name = "subspace ansible"
|
||||
icon_state = "subspace_ansible"
|
||||
desc = "A compact module capable of sensing extradimensional activity."
|
||||
origin_tech = "programming=2;magnets=2;materials=2;bluespace=1"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
|
||||
/obj/item/stock_parts/subspace/filter
|
||||
name = "hyperwave filter"
|
||||
icon_state = "hyperwave_filter"
|
||||
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
|
||||
origin_tech = "programming=2;magnets=2"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
|
||||
/obj/item/stock_parts/subspace/amplifier
|
||||
name = "subspace amplifier"
|
||||
icon_state = "subspace_amplifier"
|
||||
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
|
||||
origin_tech = "programming=2;magnets=2;materials=2;bluespace=2"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
|
||||
/obj/item/stock_parts/subspace/treatment
|
||||
name = "subspace treatment disk"
|
||||
icon_state = "treatment_disk"
|
||||
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
|
||||
origin_tech = "programming=2;magnets=2;materials=2;bluespace=2"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
|
||||
/obj/item/stock_parts/subspace/analyzer
|
||||
name = "subspace wavelength analyzer"
|
||||
icon_state = "wavelength_analyzer"
|
||||
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
|
||||
origin_tech = "programming=2;magnets=2;materials=2;bluespace=2"
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
|
||||
/obj/item/stock_parts/subspace/crystal
|
||||
name = "ansible crystal"
|
||||
icon_state = "ansible_crystal"
|
||||
desc = "A crystal made from pure glass used to transmit laser databursts to subspace."
|
||||
origin_tech = "magnets=2;materials=2;bluespace=2;plasmatech=2"
|
||||
materials = list(MAT_GLASS=50)
|
||||
|
||||
/obj/item/stock_parts/subspace/transmitter
|
||||
name = "subspace transmitter"
|
||||
icon_state = "subspace_transmitter"
|
||||
desc = "A large piece of equipment used to open a window into the subspace dimension."
|
||||
origin_tech = "magnets=2;materials=2;bluespace=2"
|
||||
materials = list(MAT_METAL=50)
|
||||
|
||||
/obj/item/research//Makes testing much less of a pain -Sieve
|
||||
name = "research"
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
|
||||
@@ -230,6 +230,11 @@
|
||||
desc = "An NT Deluxe satchel, with the finest quality leather and the company logo in a thin gold stitch"
|
||||
icon_state = "nt_deluxe"
|
||||
|
||||
/obj/item/storage/backpack/satchel/lizard
|
||||
name = "lizard skin handbag"
|
||||
desc = "A handbag made out of what appears to be supple green Unathi skin. A face can be vaguely seen on the front."
|
||||
icon_state = "satchel-lizard"
|
||||
|
||||
/obj/item/storage/backpack/satchel/withwallet/New()
|
||||
..()
|
||||
new /obj/item/storage/wallet/random(src)
|
||||
|
||||
@@ -33,9 +33,11 @@
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = null
|
||||
storage_slots = 30
|
||||
max_combined_w_class = 30
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
|
||||
@@ -45,18 +47,15 @@
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
switch(contents.len)
|
||||
if(20 to INFINITY)
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
if(11 to 20)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
if(1 to 11)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
|
||||
|
||||
@@ -1124,6 +1124,11 @@
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
user.visible_message("<span class='notice'>[user] hugs \the [src].</span>","<span class='notice'>You hug \the [src].</span>")
|
||||
|
||||
/obj/item/storage/box/wizard
|
||||
name = "magical box"
|
||||
desc = "It's just an ordinary magical box."
|
||||
icon_state = "box_wizard"
|
||||
|
||||
#undef NODESIGN
|
||||
#undef NANOTRASEN
|
||||
#undef SYNDI
|
||||
|
||||
@@ -83,13 +83,14 @@
|
||||
return
|
||||
|
||||
/obj/item/storage/AltClick(mob/user)
|
||||
if(Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
|
||||
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
|
||||
orient2hud(user)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
show_to(user)
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
add_fingerprint(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/proc/return_inv()
|
||||
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
|
||||
if(user)
|
||||
user.lastattacked = L
|
||||
L.lastattacker = user
|
||||
L.lastattacker = user.real_name
|
||||
L.lastattackerckey = user.ckey
|
||||
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
add_attack_logs(user, L, "stunned")
|
||||
|
||||
@@ -53,13 +53,8 @@ obj/item/tank/oxygen/empty/New()
|
||||
|
||||
/obj/item/tank/anesthetic/New()
|
||||
..()
|
||||
|
||||
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
|
||||
var/datum/gas/sleeping_agent/trace_gas = new()
|
||||
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
|
||||
air_contents.trace_gases += trace_gas
|
||||
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
|
||||
air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
|
||||
|
||||
/*
|
||||
* Air
|
||||
|
||||
@@ -115,7 +115,7 @@ Frequency:
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
var/list/L = list( )
|
||||
for(var/obj/machinery/computer/teleporter/com in world)
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
L["[com.id] (Active)"] = com.target
|
||||
|
||||
@@ -1,785 +0,0 @@
|
||||
#define HEALPERWELD 15
|
||||
|
||||
/* Tools!
|
||||
* Note: Multitools are in devices
|
||||
*
|
||||
* Contains:
|
||||
* Wrench
|
||||
* Screwdriver
|
||||
* Wirecutters
|
||||
* Welding Tool
|
||||
* Crowbar
|
||||
* Revolver Conversion Kit
|
||||
*/
|
||||
|
||||
//Wrench
|
||||
/obj/item/wrench
|
||||
name = "wrench"
|
||||
desc = "A wrench with common uses. Can be found in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "wrench"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
usesound = 'sound/items/ratchet.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
/obj/item/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/cyborg
|
||||
name = "automatic wrench"
|
||||
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/brass
|
||||
name = "brass wrench"
|
||||
desc = "A brass wrench. It's faintly warm to the touch."
|
||||
icon_state = "wrench_brass"
|
||||
toolspeed = 0.5
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/wrench/abductor
|
||||
name = "alien wrench"
|
||||
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "wrench"
|
||||
usesound = 'sound/effects/empulse.ogg'
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=5;abductor=3"
|
||||
|
||||
/obj/item/wrench/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered drill with a bolt bit."
|
||||
icon_state = "drill_bolt"
|
||||
item_state = "drill"
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
throwforce = 8
|
||||
attack_verb = list("drilled", "screwed", "jabbed")
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/wrench/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
|
||||
to_chat(user, "<span class='notice'>You attach the screwdriver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
|
||||
/obj/item/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/medical
|
||||
name = "medical wrench"
|
||||
desc = "A medical wrench with common (medical?) uses. Can be found in your hand."
|
||||
icon_state = "wrench_medical"
|
||||
force = 2 //MEDICAL
|
||||
throwforce = 4
|
||||
origin_tech = "materials=1;engineering=1;biotech=3"
|
||||
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
|
||||
|
||||
/obj/item/wrench/medical/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
// TODO Make them glow with the power of the M E D I C A L W R E N C H
|
||||
// during their ascension
|
||||
|
||||
// Stun stops them from wandering off
|
||||
user.Stun(5)
|
||||
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
|
||||
|
||||
// Let the sound effect finish playing
|
||||
sleep(20)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
for(var/obj/item/W in user)
|
||||
user.unEquip(W)
|
||||
|
||||
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
|
||||
W.add_fingerprint(user)
|
||||
W.desc += " For some reason, it reminds you of [user.name]."
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
user.dust()
|
||||
return OBLITERATION
|
||||
|
||||
//Screwdriver
|
||||
/obj/item/screwdriver
|
||||
name = "screwdriver"
|
||||
desc = "You can be totally screwy with this."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "screwdriver_map"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=75)
|
||||
attack_verb = list("stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = 'sound/items/screwdriver.ogg'
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/random_color = TRUE //if the screwdriver uses random coloring
|
||||
|
||||
/obj/item/screwdriver/nuke
|
||||
name = "screwdriver"
|
||||
desc = "A screwdriver with an ultra thin tip."
|
||||
icon_state = "screwdriver_nuke"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/New(loc, var/param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
|
||||
icon_state = "screwdriver_[param_color]"
|
||||
|
||||
if (prob(75))
|
||||
src.pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M) || user.a_intent == INTENT_HELP)
|
||||
return ..()
|
||||
if(user.zone_selected != "eyes" && user.zone_selected != "head")
|
||||
return ..()
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
|
||||
return
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/screwdriver/brass
|
||||
name = "brass screwdriver"
|
||||
desc = "A screwdriver made of brass. The handle feels freezing cold."
|
||||
icon_state = "screwdriver_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/screwdriver/abductor
|
||||
name = "alien screwdriver"
|
||||
desc = "An ultrasonic screwdriver."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "screwdriver"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power
|
||||
name = "hand drill"
|
||||
desc = "A simple hand drill with a screwdriver bit attached."
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
|
||||
attack_verb = list("drilled", "screwed", "jabbed","whacked")
|
||||
hitsound = 'sound/items/drill_hit.ogg'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
|
||||
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
|
||||
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
|
||||
/obj/item/screwdriver/cyborg
|
||||
name = "powered screwdriver"
|
||||
desc = "An electrical screwdriver, designed to be both precise and quick."
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.5
|
||||
|
||||
//Wirecutters
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "cutters"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
sharp = 1
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/random_color = TRUE
|
||||
|
||||
/obj/item/wirecutters/New(loc, param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("yellow", "red")
|
||||
icon_state = "cutters_[param_color]"
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
QDEL_NULL(C.handcuffed)
|
||||
if(C.buckled && C.buckled.buckle_requires_restraints)
|
||||
C.buckled.unbuckle_mob(C)
|
||||
C.update_handcuffed()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
|
||||
icon_state = "cutters_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/wirecutters/abductor
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=4;abductor=3"
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
|
||||
if(head)
|
||||
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
//Welding Tool
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
hitsound = "swing_hit"
|
||||
usesound = 'sound/items/welder.ogg'
|
||||
var/acti_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deac_sound = 'sound/items/welderdeactivate.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=30)
|
||||
origin_tech = "engineering=1;plasmatech=1"
|
||||
toolspeed = 1
|
||||
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
|
||||
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
var/nextrefueltick = 0
|
||||
|
||||
/obj/item/weldingtool/New()
|
||||
..()
|
||||
create_reagents(max_fuel)
|
||||
reagents.add_reagent("fuel", max_fuel)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 0)
|
||||
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
overlays.Cut()
|
||||
if(welding)
|
||||
overlays += "[initial(icon_state)]-on"
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
if(ratio == 100)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)][ratio]"
|
||||
update_torch()
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
update_icon()
|
||||
if(!can_off_process)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
if(prob(5))
|
||||
remove_fuel(1)
|
||||
update_icon()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
var/turf/location = loc
|
||||
if(ismob(location))
|
||||
var/mob/M = location
|
||||
if(M.l_hand == src || M.r_hand == src)
|
||||
location = get_turf(M)
|
||||
if(isturf(location))
|
||||
location.hotspot_expose(700, 5)
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(isscrewdriver(I))
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_selected]
|
||||
|
||||
if(!S)
|
||||
return
|
||||
|
||||
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
|
||||
return ..()
|
||||
|
||||
if(!isOn()) //why wasn't this being checked already?
|
||||
to_chat(user, "<span class='warning'>Turn on [src] before attempting repairs!</span>")
|
||||
return 1
|
||||
|
||||
if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP)
|
||||
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
|
||||
return
|
||||
|
||||
if(!S.brute_dam)
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
return
|
||||
|
||||
if(get_fuel() >= 1)
|
||||
if(H == user)
|
||||
if(!do_mob(user, H, 10))
|
||||
return 1
|
||||
if(!remove_fuel(1,null))
|
||||
to_chat(user, "<span class='warning'>Need more welding fuel!</span>")
|
||||
var/rembrute = HEALPERWELD
|
||||
var/nrembrute = 0
|
||||
var/childlist
|
||||
if(!isnull(S.children))
|
||||
childlist = S.children.Copy()
|
||||
var/parenthealed = FALSE
|
||||
while(rembrute > 0)
|
||||
var/obj/item/organ/external/E
|
||||
if(S.brute_dam)
|
||||
E = S
|
||||
else if(LAZYLEN(childlist))
|
||||
E = pick_n_take(childlist)
|
||||
if(!E.brute_dam || !E.is_robotic())
|
||||
continue
|
||||
else if(S.parent && !parenthealed)
|
||||
E = S.parent
|
||||
parenthealed = TRUE
|
||||
if(!E.brute_dam || !E.is_robotic())
|
||||
break
|
||||
else
|
||||
break
|
||||
playsound(src.loc, usesound, 50, 1)
|
||||
nrembrute = max(rembrute - E.brute_dam, 0)
|
||||
E.heal_damage(rembrute,0,0,1)
|
||||
rembrute = nrembrute
|
||||
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [M]'s [E.name] with \the [src].</span>")
|
||||
if(H.bleed_rate && H.isSynthetic())
|
||||
H.bleed_rate = 0
|
||||
user.visible_message("<span class='alert'>\The [user] patches some leaks on [M] with \the [src].</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(welding)
|
||||
remove_fuel(1)
|
||||
var/turf/location = get_turf(user)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
if(get_fuel() <= 0)
|
||||
set_light(0)
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
if(L.IgniteMob())
|
||||
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
|
||||
log_game("[key_name(user)] set [key_name(L)] on fire")
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
switched_on(user)
|
||||
if(welding)
|
||||
set_light(light_intensity)
|
||||
|
||||
update_icon()
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
/obj/item/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("fuel")
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
|
||||
/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
|
||||
if(!welding || !check_fuel())
|
||||
return FALSE
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
check_fuel()
|
||||
if(M)
|
||||
M.flash_eyes(light_intensity)
|
||||
return TRUE
|
||||
else
|
||||
if(M)
|
||||
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return FALSE
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||
/obj/item/weldingtool/proc/check_fuel(mob/user)
|
||||
if(get_fuel() <= 0 && welding)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
//mob icon update
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_r_hand(0)
|
||||
M.update_inv_l_hand(0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Switches the welder on
|
||||
/obj/item/weldingtool/proc/switched_on(mob/user)
|
||||
if(!status)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
return
|
||||
welding = !welding
|
||||
if(welding)
|
||||
if(get_fuel() >= 1)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
playsound(loc, acti_sound, 50, 1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more fuel!</span>")
|
||||
switched_off(user)
|
||||
else
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
|
||||
playsound(loc, deac_sound, 50, 1)
|
||||
switched_off(user)
|
||||
|
||||
//Switches the welder off
|
||||
/obj/item/weldingtool/proc/switched_off(mob/user)
|
||||
welding = 0
|
||||
set_light(0)
|
||||
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
to_chat(user, "<span class='warning'>Turn it off first!</span>")
|
||||
return
|
||||
status = !status
|
||||
if(status)
|
||||
to_chat(user, "<span class='notice'>You resecure [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can now be attached and modified.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
if(R.use(1))
|
||||
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.unEquip(src)
|
||||
loc = F
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
|
||||
user.put_in_hands(F)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "Industrial Welding Tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=60)
|
||||
origin_tech = "engineering=2;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg
|
||||
name = "integrated welding tool"
|
||||
desc = "An advanced welder designed to be used in robotic systems."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
max_fuel = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/mini/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/abductor
|
||||
name = "alien welding tool"
|
||||
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.1
|
||||
light_intensity = 0
|
||||
change_icons = 0
|
||||
origin_tech = "plasmatech=5;engineering=5;abductor=3"
|
||||
can_off_process = 1
|
||||
|
||||
/obj/item/weldingtool/abductor/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent("fuel", 1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/hugetank
|
||||
name = "Upgraded Welding Tool"
|
||||
desc = "An upgraded welder based off the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
max_fuel = 80
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "engineering=3;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/experimental
|
||||
name = "Experimental Welding Tool"
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
light_intensity = 1
|
||||
toolspeed = 0.5
|
||||
var/last_gen = 0
|
||||
|
||||
/obj/item/weldingtool/experimental/brass
|
||||
name = "brass welding tool"
|
||||
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
|
||||
icon_state = "brasswelder"
|
||||
item_state = "brasswelder"
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
obj/item/weldingtool/experimental/process()
|
||||
..()
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("fuel", 1)
|
||||
|
||||
//Crowbar
|
||||
/obj/item/crowbar
|
||||
name = "pocket crowbar"
|
||||
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "crowbar"
|
||||
item_state = "crowbar"
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
item_state = "crowbar"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "engineering=1;combat=1"
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
/obj/item/crowbar/red
|
||||
icon_state = "crowbar_red"
|
||||
item_state = "crowbar_red"
|
||||
force = 8
|
||||
|
||||
/obj/item/crowbar/brass
|
||||
name = "brass crowbar"
|
||||
desc = "A brass crowbar. It feels faintly warm to the touch."
|
||||
icon_state = "crowbar_brass"
|
||||
item_state = "crowbar_brass"
|
||||
toolspeed = 0.5
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/crowbar/abductor
|
||||
name = "alien crowbar"
|
||||
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
icon_state = "crowbar"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "combat=4;engineering=4;abductor=3"
|
||||
|
||||
/obj/item/crowbar/large
|
||||
name = "crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
materials = list(MAT_METAL=70)
|
||||
icon_state = "crowbar_large"
|
||||
item_state = "crowbar_large"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/cyborg
|
||||
name = "hydraulic crowbar"
|
||||
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 10
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 15
|
||||
toolspeed = 0.25
|
||||
var/airlock_open_time = 100 // Time required to open powered airlocks
|
||||
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/crowbar/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
|
||||
// Conversion kit
|
||||
/obj/item/conversion_kit
|
||||
name = "\improper Revolver Conversion Kit"
|
||||
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
|
||||
icon_state = "kit"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "combat=2"
|
||||
var/open = 0
|
||||
|
||||
/obj/item/conversion_kit/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/conversion_kit/update_icon()
|
||||
icon_state = "[initial(icon_state)]_[open]"
|
||||
|
||||
/obj/item/conversion_kit/attack_self(mob/user)
|
||||
open = !open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
|
||||
update_icon()
|
||||
@@ -179,6 +179,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
force_unwielded = 5
|
||||
force_wielded = 24
|
||||
toolspeed = 0.25
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
if(TH.force_wielded > initial(TH.force_wielded))
|
||||
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
TH.force_wielded = Clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
|
||||
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
|
||||
if(I.force > initial(I.force))
|
||||
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
|
||||
if(!requires_sharpness)
|
||||
I.sharp = 1
|
||||
I.force = Clamp(I.force + increment, 0, max)
|
||||
I.throwforce = Clamp(I.throwforce + increment, 0, max)
|
||||
I.force = clamp(I.force + increment, 0, max)
|
||||
I.throwforce = clamp(I.throwforce + increment, 0, max)
|
||||
I.name = "[prefix] [I.name]"
|
||||
playsound(get_turf(src), usesound, 50, 1)
|
||||
name = "worn out [name]"
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
return 0
|
||||
var/armor_protection = 0
|
||||
if(damage_flag)
|
||||
armor_protection = armor[damage_flag]
|
||||
armor_protection = armor.getRating(damage_flag)
|
||||
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
|
||||
armor_protection = Clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
|
||||
armor_protection = clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
|
||||
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
|
||||
|
||||
///the sound played when the obj is damaged.
|
||||
@@ -201,7 +201,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
return
|
||||
..()
|
||||
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
|
||||
take_damage(Clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
|
||||
take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
|
||||
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
|
||||
resistance_flags |= ON_FIRE
|
||||
SSfires.processing[src] = src
|
||||
|
||||
+59
-54
@@ -1,15 +1,14 @@
|
||||
/obj
|
||||
//var/datum/module/mod //not used
|
||||
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
|
||||
var/crit_fail = 0
|
||||
var/crit_fail = FALSE
|
||||
animate_movement = 2
|
||||
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
var/sharp = 0 // whether this object cuts
|
||||
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
var/sharp = FALSE // whether this object cuts
|
||||
var/in_use = FALSE // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||
var/damtype = "brute"
|
||||
var/force = 0
|
||||
var/list/armor
|
||||
var/datum/armor/armor
|
||||
var/obj_integrity //defaults to max_integrity
|
||||
var/max_integrity = 500
|
||||
var/integrity_failure = 0 //0 if we have no special broken behavior
|
||||
@@ -22,9 +21,9 @@
|
||||
|
||||
var/can_be_hit = TRUE //can this be bludgeoned by items?
|
||||
|
||||
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
|
||||
var/Mtoollink = FALSE // variable to decide if an object should show the multitool menu linking menu, not all objects use it
|
||||
|
||||
var/being_shocked = 0
|
||||
var/being_shocked = FALSE
|
||||
var/speed_process = FALSE
|
||||
|
||||
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
|
||||
@@ -33,8 +32,6 @@
|
||||
|
||||
/obj/New()
|
||||
..()
|
||||
if(!armor)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
if(obj_integrity == null)
|
||||
obj_integrity = max_integrity
|
||||
if(on_blueprints && isturf(loc))
|
||||
@@ -44,25 +41,34 @@
|
||||
else
|
||||
T.add_blueprints_preround(src)
|
||||
|
||||
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = GLOB.default_state)
|
||||
/obj/Initialize(mapload)
|
||||
. = ..()
|
||||
if(islist(armor))
|
||||
armor = getArmor(arglist(armor))
|
||||
else if(!armor)
|
||||
armor = getArmor()
|
||||
else if(!istype(armor, /datum/armor))
|
||||
stack_trace("Invalid type [armor.type] found in .armor during /obj Initialize()")
|
||||
|
||||
/obj/Topic(href, href_list, nowindow = FALSE, datum/topic_state/state = GLOB.default_state)
|
||||
// Calling Topic without a corresponding window open causes runtime errors
|
||||
if(!nowindow && ..())
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
|
||||
// Instead any such checks are made in CanUseTopic()
|
||||
if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE)
|
||||
CouldUseTopic(usr)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
CouldNotUseTopic(usr)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/proc/CouldUseTopic(var/mob/user)
|
||||
/obj/proc/CouldUseTopic(mob/user)
|
||||
var/atom/host = nano_host()
|
||||
host.add_fingerprint(user)
|
||||
|
||||
/obj/proc/CouldNotUseTopic(var/mob/user)
|
||||
/obj/proc/CouldNotUseTopic(mob/user)
|
||||
// Nada
|
||||
|
||||
/obj/Destroy()
|
||||
@@ -110,23 +116,23 @@
|
||||
// null if object handles breathing logic for lifeform
|
||||
// datum/air_group to tell lifeform to process using that breath return
|
||||
//DEFAULT: Take air from turf to give to have mob process
|
||||
if(breath_request>0)
|
||||
if(breath_request > 0)
|
||||
return remove_air(breath_request)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/proc/updateUsrDialog()
|
||||
if(in_use)
|
||||
var/is_in_use = 0
|
||||
var/is_in_use = FALSE
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
is_in_use = TRUE
|
||||
src.attack_hand(M)
|
||||
if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = 1
|
||||
is_in_use = TRUE
|
||||
src.attack_ai(usr)
|
||||
|
||||
// check for TK users
|
||||
@@ -134,8 +140,8 @@
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
is_in_use = 1
|
||||
if(usr.client && usr.machine == src)
|
||||
is_in_use = TRUE
|
||||
src.attack_hand(usr)
|
||||
in_use = is_in_use
|
||||
|
||||
@@ -143,15 +149,15 @@
|
||||
// Check that people are actually using the machine. If not, don't update anymore.
|
||||
if(in_use)
|
||||
var/list/nearby = viewers(1, src)
|
||||
var/is_in_use = 0
|
||||
var/is_in_use = FALSE
|
||||
for(var/mob/M in nearby)
|
||||
if((M.client && M.machine == src))
|
||||
is_in_use = 1
|
||||
is_in_use = TRUE
|
||||
src.interact(M)
|
||||
var/ai_in_use = AutoUpdateAI(src)
|
||||
|
||||
if(!ai_in_use && !is_in_use)
|
||||
in_use = 0
|
||||
in_use = FALSE
|
||||
|
||||
/obj/proc/interact(mob/user)
|
||||
return
|
||||
@@ -168,12 +174,12 @@
|
||||
/atom/movable/proc/on_unset_machine(mob/user)
|
||||
return
|
||||
|
||||
/mob/proc/set_machine(var/obj/O)
|
||||
/mob/proc/set_machine(obj/O)
|
||||
if(src.machine)
|
||||
unset_machine()
|
||||
src.machine = O
|
||||
if(istype(O))
|
||||
O.in_use = 1
|
||||
O.in_use = TRUE
|
||||
|
||||
/obj/item/proc/updateSelfDialog()
|
||||
var/mob/M = src.loc
|
||||
@@ -183,48 +189,48 @@
|
||||
/obj/proc/hide(h)
|
||||
return
|
||||
|
||||
|
||||
/obj/proc/hear_talk(mob/M, list/message_pieces)
|
||||
return
|
||||
|
||||
/obj/proc/hear_message(mob/M as mob, text)
|
||||
/obj/proc/hear_message(mob/M, text)
|
||||
|
||||
/obj/proc/multitool_menu(var/mob/user,var/obj/item/multitool/P)
|
||||
/obj/proc/multitool_menu(mob/user, obj/item/multitool/P)
|
||||
return "<b>NO MULTITOOL_MENU!</b>"
|
||||
|
||||
/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/context)
|
||||
return 0
|
||||
/obj/proc/linkWith(mob/user, obj/buffer, context)
|
||||
return FALSE
|
||||
|
||||
/obj/proc/unlinkFrom(var/mob/user, var/obj/buffer)
|
||||
return 0
|
||||
/obj/proc/unlinkFrom(mob/user, obj/buffer)
|
||||
return FALSE
|
||||
|
||||
/obj/proc/canLink(var/obj/O, var/context)
|
||||
return 0
|
||||
/obj/proc/canLink(obj/O, list/context)
|
||||
return FALSE
|
||||
|
||||
/obj/proc/isLinkedWith(var/obj/O)
|
||||
return 0
|
||||
/obj/proc/isLinkedWith(obj/O)
|
||||
return FALSE
|
||||
|
||||
/obj/proc/getLink(var/idx)
|
||||
/obj/proc/getLink(idx)
|
||||
return null
|
||||
|
||||
/obj/proc/linkMenu(var/obj/O)
|
||||
var/dat=""
|
||||
/obj/proc/linkMenu(obj/O)
|
||||
var/dat = ""
|
||||
if(canLink(O, list()))
|
||||
dat += " <a href='?src=[UID()];link=1'>\[Link\]</a> "
|
||||
return dat
|
||||
|
||||
/obj/proc/format_tag(var/label,var/varname, var/act="set_tag")
|
||||
/obj/proc/format_tag(label, varname, act = "set_tag")
|
||||
var/value = vars[varname]
|
||||
if(!value || value=="")
|
||||
value="-----"
|
||||
if(!value || value == "")
|
||||
value = "-----"
|
||||
return "<b>[label]:</b> <a href=\"?src=[UID()];[act]=[varname]\">[value]</a>"
|
||||
|
||||
|
||||
/obj/proc/update_multitool_menu(mob/user as mob)
|
||||
/obj/proc/update_multitool_menu(mob/user)
|
||||
var/obj/item/multitool/P = get_multitool(user)
|
||||
|
||||
if(!istype(P))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/dat = {"<html>
|
||||
<head>
|
||||
<title>[name] Configuration</title>
|
||||
@@ -246,15 +252,13 @@ a {
|
||||
<h3>[name]</h3>
|
||||
"}
|
||||
if(allowed(user))//no, assistants, you're not ruining all vents on the station with just a multitool
|
||||
dat += multitool_menu(user,P)
|
||||
dat += multitool_menu(user, P)
|
||||
if(Mtoollink)
|
||||
if(P)
|
||||
if(P.buffer)
|
||||
var/id = null
|
||||
if(istype(P.buffer, /obj/machinery/telecomms))
|
||||
id=P.buffer:id
|
||||
else if("id_tag" in P.buffer.vars)
|
||||
id=P.buffer:id_tag
|
||||
if("id_tag" in P.buffer.vars)
|
||||
id = P.buffer:id_tag
|
||||
dat += "<p><b>MULTITOOL BUFFER:</b> [P.buffer] [id ? "([id])" : ""]"
|
||||
|
||||
dat += linkMenu(P.buffer)
|
||||
@@ -311,12 +315,12 @@ a {
|
||||
/obj/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
step_towards(src, S)
|
||||
|
||||
/obj/proc/container_resist(var/mob/living)
|
||||
/obj/proc/container_resist(mob/living)
|
||||
return
|
||||
|
||||
/obj/proc/CanAStarPass()
|
||||
/obj/proc/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
|
||||
/obj/proc/on_mob_move(dir, mob/user)
|
||||
@@ -343,6 +347,7 @@ a {
|
||||
.["Make speed process"] = "?_src_=vars;makespeedy=[UID()]"
|
||||
else
|
||||
.["Make normal process"] = "?_src_=vars;makenormalspeed=[UID()]"
|
||||
.["Modify armor values"] = "?_src_=vars;modifyarmor=[UID()]"
|
||||
|
||||
/obj/proc/check_uplink_validity()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
var/broken = FALSE
|
||||
|
||||
/obj/structure/New()
|
||||
if (!armor)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
..()
|
||||
if(smooth)
|
||||
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
|
||||
@@ -20,6 +18,11 @@
|
||||
if(SSticker)
|
||||
GLOB.cameranet.updateVisibility(src)
|
||||
|
||||
/obj/structure/Initialize(mapload)
|
||||
if(!armor)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
return ..()
|
||||
|
||||
/obj/structure/Destroy()
|
||||
if(SSticker)
|
||||
GLOB.cameranet.updateVisibility(src)
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/alien/weeds/proc/Life()
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
if(istype(U, /turf/space))
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/large = TRUE
|
||||
var/can_be_emaged = FALSE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/lastbang
|
||||
var/sound = 'sound/machines/click.ogg'
|
||||
@@ -143,84 +145,21 @@
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs) && !opened)
|
||||
if(user in contents) //to prevent self-teleporting.
|
||||
return
|
||||
var/obj/item/rcs/E = W
|
||||
if(E.rcell && (E.rcell.charge >= E.chargecost))
|
||||
if(!is_level_reachable(z))
|
||||
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
|
||||
return
|
||||
if(E.mode == 0)
|
||||
if(!E.teleporting)
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
for(var/obj/machinery/telepad_cargo/R in world)
|
||||
if(R.stage == 0)
|
||||
var/turf/T = get_turf(R)
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
var/desc = input("Please select a telepad.", "RCS") in L
|
||||
E.pad = L[desc]
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
|
||||
E.teleporting = 1
|
||||
if(!do_after(user, 50 * E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(user in contents)
|
||||
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
|
||||
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, E.pad, 0)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
E.rand_x = rand(50,200)
|
||||
E.rand_y = rand(50,200)
|
||||
var/L = locate(E.rand_x, E.rand_y, 6)
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
|
||||
E.teleporting = 1
|
||||
if(!do_after(user, 50, E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(user in contents)
|
||||
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
|
||||
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, L)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Out of charges.</span>")
|
||||
return
|
||||
E.try_send_container(user, src)
|
||||
return
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
var/obj/item/grab/G = W
|
||||
if(large)
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is too small to stuff [G.affecting] into!</span>")
|
||||
if(istype(W, /obj/item/tk_grab))
|
||||
return FALSE
|
||||
if(user.a_intent != INTENT_HELP) // Stops you from putting your baton in the closet on accident
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
@@ -228,13 +167,20 @@
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
return TRUE // It's resolved. No afterattack needed. Stops you from emagging lockers when putting in an emag
|
||||
else if(can_be_emaged && (istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade) && !broken))
|
||||
emag_act(user)
|
||||
else if(istype(W, /obj/item/stack/packageWrap))
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
closed_item_click(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// What happens when the closet is attacked by a random item not on harm mode
|
||||
/obj/structure/closet/proc/closed_item_click(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!opened && user.loc == src)
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/big(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/big(src)
|
||||
new /obj/item/clothing/accessory/lawyers_badge(src)
|
||||
new /obj/item/clothing/accessory/lawyers_badge(src)
|
||||
|
||||
//Paramedic
|
||||
|
||||
|
||||
@@ -54,36 +54,33 @@
|
||||
new /obj/item/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if(W) W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/card/id))
|
||||
if(src.broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return
|
||||
var/obj/item/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
if(src == user.loc)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked)
|
||||
src.icon_state = src.icon_locked
|
||||
else
|
||||
src.icon_state = src.icon_closed
|
||||
registered_name = null
|
||||
desc = initial(desc)
|
||||
|
||||
if(!src.registered_name && src.locked)
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params)
|
||||
if(opened || !istype(W, /obj/item/card/id))
|
||||
return ..()
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return
|
||||
|
||||
var/obj/item/card/id/I = W
|
||||
if(!I || !I.registered_name)
|
||||
return
|
||||
|
||||
if(src == user.loc)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
|
||||
else if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
locked = !locked
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
registered_name = null
|
||||
desc = initial(desc)
|
||||
|
||||
if(!registered_name && locked)
|
||||
registered_name = I.registered_name
|
||||
desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
opened = 0
|
||||
locked = 1
|
||||
broken = 0
|
||||
can_be_emaged = TRUE
|
||||
max_integrity = 250
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 20
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
icon_opened = "secureopen"
|
||||
@@ -66,31 +66,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
return ..()
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
if(large)
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool))
|
||||
return ..(W, user)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
togglelock(user)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/closet/secure_closet/closed_item_click(mob/user)
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/emag_act(mob/user)
|
||||
if(!broken)
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
icon_off = "wall-lockeroff"
|
||||
|
||||
//too small to put a man in
|
||||
large = 0
|
||||
large = FALSE
|
||||
|
||||
/obj/structure/closet/secure_closet/wall/update_icon()
|
||||
if(broken)
|
||||
@@ -466,3 +466,4 @@
|
||||
new /obj/item/gavelhammer(src)
|
||||
new /obj/item/clothing/head/justice_wig(src)
|
||||
new /obj/item/clothing/accessory/medal/legal(src)
|
||||
new /obj/item/clothing/accessory/lawyers_badge(src)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
L.buckled = 0
|
||||
L.anchored = 0
|
||||
L.forceMove(src)
|
||||
L.disabilities += MUTE
|
||||
L.mutations |= MUTE
|
||||
max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
intialFire = L.getFireLoss()
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
M.forceMove(loc)
|
||||
M.disabilities -= MUTE
|
||||
M.mutations -= MUTE
|
||||
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
|
||||
..()
|
||||
|
||||
@@ -79,111 +79,42 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs) && !src.opened)
|
||||
var/obj/item/rcs/E = W
|
||||
if(E.rcell && (E.rcell.charge >= E.chargecost))
|
||||
if(!is_level_reachable(src.z)) // This is inconsistent with the closet sending code
|
||||
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
|
||||
return
|
||||
if(E.mode == 0)
|
||||
if(!E.teleporting)
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
for(var/obj/machinery/telepad_cargo/R in world)
|
||||
if(R.stage == 0)
|
||||
var/turf/T = get_turf(R)
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
var/desc = input("Please select a telepad.", "RCS") in L
|
||||
E.pad = L[desc]
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [src.name]...</span>")
|
||||
E.teleporting = TRUE
|
||||
if(!do_after(user, 50 * E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, E.pad, 0)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
|
||||
else
|
||||
E.rand_x = rand(50,200)
|
||||
E.rand_y = rand(50,200)
|
||||
var/L = locate(E.rand_x, E.rand_y, 6)
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [src.name]...</span>")
|
||||
E.teleporting = TRUE
|
||||
if(!do_after(user, 50 * E.toolspeed, target = src))
|
||||
E.teleporting = FALSE
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, L)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Out of charges.</span>")
|
||||
return
|
||||
|
||||
if(opened)
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/stack/packageWrap))
|
||||
if(!opened && try_rig(W, user))
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/proc/try_rig(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(rigged)
|
||||
to_chat(user, "<span class='notice'>[src] is already rigged!</span>")
|
||||
return
|
||||
return TRUE
|
||||
if(C.use(15))
|
||||
to_chat(user, "<span class='notice'>You rig [src].</span>")
|
||||
rigged = TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need atleast 15 wires to rig [src]!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/radio/electropack))
|
||||
return TRUE
|
||||
if(istype(W, /obj/item/radio/electropack))
|
||||
if(rigged)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[W] seems to be stuck to your hand!</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You attach [W] to [src].</span>")
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
return
|
||||
else if(istype(W, /obj/item/wirecutters))
|
||||
if(rigged)
|
||||
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
rigged = FALSE
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
/obj/structure/closet/crate/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(opened)
|
||||
return
|
||||
if(!rigged)
|
||||
return
|
||||
|
||||
if(I.use_tool(src, user))
|
||||
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
rigged = FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/welder_act()
|
||||
return
|
||||
@@ -229,9 +160,10 @@
|
||||
max_integrity = 500
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 25
|
||||
var/tamperproof = 0
|
||||
broken = 0
|
||||
locked = 1
|
||||
var/tamperproof = FALSE
|
||||
broken = FALSE
|
||||
locked = TRUE
|
||||
can_be_emaged = TRUE
|
||||
|
||||
/obj/structure/closet/crate/secure/update_icon()
|
||||
..()
|
||||
@@ -306,17 +238,8 @@
|
||||
else
|
||||
src.toggle(user)
|
||||
|
||||
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(is_type_in_list(W, list(/obj/item/stack/packageWrap, /obj/item/stack/cable_coil, /obj/item/radio/electropack, /obj/item/wirecutters,/obj/item/rcs)))
|
||||
return ..()
|
||||
if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)))
|
||||
emag_act(user)
|
||||
return
|
||||
if(!opened)
|
||||
src.togglelock(user)
|
||||
return
|
||||
return ..()
|
||||
/obj/structure/closet/crate/secure/closed_item_click(mob/user)
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/crate/secure/emag_act(mob/user)
|
||||
if(locked)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
/obj/structure/curtain/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(user, 0))
|
||||
if(!I.tool_start_check(src, user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
@@ -65,7 +65,7 @@
|
||||
if(anchored)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(user, 0))
|
||||
if(!I.tool_start_check(src, user, 0))
|
||||
return
|
||||
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/obj/structure/decor/machinery/telecomms/processor
|
||||
name = "Processor Unit"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "processor"
|
||||
desc = "This machine is used to process large quantities of information."
|
||||
|
||||
/obj/structure/decor/machinery/telecomms/hub
|
||||
name = "Telecommunication Hub"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "hub"
|
||||
desc = "A mighty piece of hardware used to send/receive massive amounts of data."
|
||||
|
||||
/obj/structure/decor/machinery/telecomms/server
|
||||
name = "Telecommunication Server"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "comm_server"
|
||||
desc = "A machine used to store data and network statistics."
|
||||
|
||||
/obj/structure/decor/machinery/telecomms/relay
|
||||
name = "Telecommunication Relay"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "relay"
|
||||
desc = "A mighty piece of hardware used to send massive amounts of data far away."
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/structure/dresser/crowbar_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(user, 0))
|
||||
if(!I.tool_start_check(src, user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
var/opened = 0
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/extinguisher_cabinet/New(turf/loc, ndir = null)
|
||||
/obj/structure/extinguisher_cabinet/New(turf/loc, direction = null)
|
||||
..()
|
||||
if(ndir)
|
||||
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
|
||||
pixel_y = (ndir & NORTH|SOUTH)? (ndir == WEST ? 28 : -28) : 0
|
||||
if(direction)
|
||||
setDir(direction)
|
||||
set_pixel_offsets_from_dir(28, -28, 30, -30)
|
||||
switch(extinguishertype)
|
||||
if(NO_EXTINGUISHER)
|
||||
return
|
||||
@@ -165,9 +165,8 @@
|
||||
else
|
||||
icon_state = "extinguisher_empty"
|
||||
|
||||
/obj/structure/extinguisher_cabinet/empty/New(turf/loc, ndir = null)
|
||||
/obj/structure/extinguisher_cabinet/empty
|
||||
extinguishertype = NO_EXTINGUISHER
|
||||
..()
|
||||
|
||||
#undef NO_EXTINGUISHER
|
||||
#undef NORMAL_EXTINGUISHER
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
|
||||
/obj/structure/girder/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
/obj/structure/grille/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
|
||||
@@ -130,16 +130,18 @@
|
||||
release_mob(M)
|
||||
|
||||
/obj/structure/kitchenspike/proc/release_mob(mob/living/M)
|
||||
var/matrix/m180 = matrix(M.transform)
|
||||
m180.Turn(180)
|
||||
animate(M, transform = m180, time = 3)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(180)
|
||||
M.adjustBruteLoss(30)
|
||||
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
|
||||
unbuckle_mob(M, force = TRUE)
|
||||
M.emote("scream")
|
||||
M.AdjustWeakened(10)
|
||||
|
||||
/obj/structure/kitchenspike/post_unbuckle_mob(mob/living/M)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(0)
|
||||
var/matrix/m180 = matrix(M.transform)
|
||||
m180.Turn(180)
|
||||
animate(M, transform = m180, time = 3)
|
||||
|
||||
/obj/structure/kitchenspike/Destroy()
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
AC.ui_interact(user)
|
||||
|
||||
if("Voice")
|
||||
var/voice_choice = input(user, "Perhaps...", "Voice effects") as null|anything in list("Comic Sans", "Wingdings", "Swedish", "Chav")
|
||||
var/voice_choice = input(user, "Perhaps...", "Voice effects") as null|anything in list("Comic Sans", "Wingdings", "Swedish", "Chav", "Mute")
|
||||
var/voice_mutation
|
||||
switch(voice_choice)
|
||||
if("Comic Sans")
|
||||
@@ -142,6 +142,8 @@
|
||||
voice_mutation = GLOB.swedeblock
|
||||
if("Chav")
|
||||
voice_mutation = GLOB.chavblock
|
||||
if("Mute")
|
||||
voice_mutation = GLOB.muteblock
|
||||
if(voice_mutation)
|
||||
if(H.dna.GetSEState(voice_mutation))
|
||||
H.dna.SetSEState(voice_mutation, FALSE)
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
|
||||
var/ticks = text2num(href_list["turnright"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial - 1, 0, 100)
|
||||
dial = WRAP(dial - 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
@@ -274,7 +274,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
|
||||
var/ticks = text2num(href_list["turnleft"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial + 1, 0, 100)
|
||||
dial = WRAP(dial + 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 != 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
@@ -373,6 +373,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
info = "<div style='text-align:center;'><img src='ntlogo.png'><center><h3>Safe Codes</h3></center>"
|
||||
|
||||
/obj/item/paper/safe_code/Initialize(mapload)
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/item/paper/safe_code/LateInitialize(mapload)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/obj/structure/table/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
@@ -224,8 +224,8 @@
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
item_placed(I)
|
||||
else
|
||||
return ..()
|
||||
@@ -666,7 +666,7 @@
|
||||
|
||||
/obj/structure/rack/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define MAX_TANK_STORAGE 10
|
||||
|
||||
/obj/structure/dispenser
|
||||
name = "tank storage unit"
|
||||
desc = "A simple yet bulky storage device for gas tanks. Has room for up to ten oxygen tanks, and ten plasma tanks."
|
||||
@@ -5,29 +7,51 @@
|
||||
icon_state = "dispenser"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/oxygentanks = 10
|
||||
var/plasmatanks = 10
|
||||
var/list/oxytanks = list() //sorry for the similar var names
|
||||
var/list/platanks = list()
|
||||
var/starting_oxygen_tanks = MAX_TANK_STORAGE // The starting amount of oxygen tanks the dispenser gets when it's spawned
|
||||
var/starting_plasma_tanks = MAX_TANK_STORAGE // Starting amount of plasma tanks
|
||||
var/list/stored_oxygen_tanks = list() // List of currently stored oxygen tanks
|
||||
var/list/stored_plasma_tanks = list() // And plasma tanks
|
||||
|
||||
/obj/structure/dispenser/oxygen
|
||||
plasmatanks = 0
|
||||
starting_plasma_tanks = 0
|
||||
|
||||
/obj/structure/dispenser/plasma
|
||||
oxygentanks = 0
|
||||
starting_oxygen_tanks = 0
|
||||
|
||||
/obj/structure/dispenser/New()
|
||||
..()
|
||||
initialize_tanks()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/dispenser/Destroy()
|
||||
QDEL_LIST(stored_plasma_tanks)
|
||||
QDEL_LIST(stored_oxygen_tanks)
|
||||
return ..()
|
||||
|
||||
/obj/structure/dispenser/proc/initialize_tanks()
|
||||
for(var/I in 1 to starting_plasma_tanks)
|
||||
var/obj/item/tank/plasma/P = new(src)
|
||||
stored_plasma_tanks.Add(P)
|
||||
|
||||
for(var/I in 1 to starting_oxygen_tanks)
|
||||
var/obj/item/tank/oxygen/O = new(src)
|
||||
stored_oxygen_tanks.Add(O)
|
||||
|
||||
/obj/structure/dispenser/update_icon()
|
||||
overlays.Cut()
|
||||
switch(oxygentanks)
|
||||
if(1 to 3) overlays += "oxygen-[oxygentanks]"
|
||||
if(4 to INFINITY) overlays += "oxygen-4"
|
||||
switch(plasmatanks)
|
||||
if(1 to 4) overlays += "plasma-[plasmatanks]"
|
||||
if(5 to INFINITY) overlays += "plasma-5"
|
||||
cut_overlays()
|
||||
var/oxy_tank_amount = LAZYLEN(stored_oxygen_tanks)
|
||||
switch(oxy_tank_amount)
|
||||
if(1 to 3)
|
||||
overlays += "oxygen-[oxy_tank_amount]"
|
||||
if(4 to INFINITY)
|
||||
overlays += "oxygen-4"
|
||||
|
||||
var/pla_tank_amount = LAZYLEN(stored_plasma_tanks)
|
||||
switch(pla_tank_amount)
|
||||
if(1 to 4)
|
||||
overlays += "plasma-[pla_tank_amount]"
|
||||
if(5 to INFINITY)
|
||||
overlays += "plasma-5"
|
||||
|
||||
/obj/structure/dispenser/attack_hand(mob/user)
|
||||
if(..())
|
||||
@@ -38,7 +62,7 @@
|
||||
/obj/structure/dispenser/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
|
||||
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, master_ui = null, datum/topic_state/state = GLOB.default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
@@ -47,35 +71,19 @@
|
||||
|
||||
/obj/structure/dispenser/ui_data(user)
|
||||
var/list/data = list()
|
||||
data["o_tanks"] = oxygentanks
|
||||
data["p_tanks"] = plasmatanks
|
||||
data["o_tanks"] = LAZYLEN(stored_oxygen_tanks)
|
||||
data["p_tanks"] = LAZYLEN(stored_plasma_tanks)
|
||||
return data
|
||||
|
||||
/obj/structure/dispenser/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/tank/oxygen) || istype(I, /obj/item/tank/air) || istype(I, /obj/item/tank/anesthetic))
|
||||
if(oxygentanks < 10)
|
||||
user.drop_item()
|
||||
I.forceMove(src)
|
||||
oxytanks.Add(I)
|
||||
oxygentanks++
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
try_insert_tank(user, stored_oxygen_tanks, I)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/tank/plasma))
|
||||
if(plasmatanks < 10)
|
||||
user.drop_item()
|
||||
I.forceMove(src)
|
||||
platanks.Add(I)
|
||||
plasmatanks++
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
try_insert_tank(user, stored_plasma_tanks, I)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
|
||||
@@ -88,40 +96,55 @@
|
||||
|
||||
/obj/structure/dispenser/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(Adjacent(usr))
|
||||
usr.set_machine(src)
|
||||
|
||||
// The oxygen tank button
|
||||
if(href_list["oxygen"])
|
||||
if(oxygentanks > 0)
|
||||
var/obj/item/tank/oxygen/O
|
||||
if(oxytanks.len == oxygentanks)
|
||||
O = oxytanks[1]
|
||||
oxytanks.Remove(O)
|
||||
else
|
||||
O = new /obj/item/tank/oxygen(loc)
|
||||
O.loc = loc
|
||||
to_chat(usr, "<span class='notice'>You take [O] out of [src].</span>")
|
||||
oxygentanks--
|
||||
update_icon()
|
||||
try_remove_tank(usr, stored_oxygen_tanks)
|
||||
|
||||
// The plasma tank button
|
||||
if(href_list["plasma"])
|
||||
if(plasmatanks > 0)
|
||||
var/obj/item/tank/plasma/P
|
||||
if(platanks.len == plasmatanks)
|
||||
P = platanks[1]
|
||||
platanks.Remove(P)
|
||||
else
|
||||
P = new /obj/item/tank/plasma(loc)
|
||||
P.loc = loc
|
||||
to_chat(usr, "<span class='notice'>You take [P] out of [src].</span>")
|
||||
plasmatanks--
|
||||
update_icon()
|
||||
try_remove_tank(usr, stored_plasma_tanks)
|
||||
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
SSnanoui.update_uis(src)
|
||||
SSnanoui.try_update_ui(usr, src)
|
||||
else
|
||||
SSnanoui.close_user_uis(usr,src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/// Called when the user clicks on the oxygen or plasma tank UI buttons, and tries to withdraw a tank.
|
||||
/obj/structure/dispenser/proc/try_remove_tank(mob/living/user, list/tank_list)
|
||||
if(!LAZYLEN(tank_list))
|
||||
return // There are no tanks left to withdraw.
|
||||
|
||||
var/obj/item/tank/T = tank_list[1]
|
||||
tank_list.Remove(T)
|
||||
|
||||
if(!user.put_in_hands(T))
|
||||
T.forceMove(loc) // If the user's hands are full, place it on the tile of the dispenser.
|
||||
|
||||
to_chat(user, "<span class='notice'>You take [T] out of [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/// Called when the user clicks on the dispenser with a tank. Tries to insert the tank into the dispenser, and updates the UI if successful.
|
||||
/obj/structure/dispenser/proc/try_insert_tank(mob/living/user, list/tank_list, obj/item/tank/T)
|
||||
if(LAZYLEN(tank_list) >= MAX_TANK_STORAGE)
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
if(!user.drop_item()) // Antidrop check
|
||||
to_chat(user, "<span class='warning'>[T] is stuck to your hand!</span>")
|
||||
return
|
||||
|
||||
T.forceMove(src)
|
||||
tank_list.Add(T)
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [T] in [src].</span>")
|
||||
SSnanoui.try_update_ui(user, src)
|
||||
|
||||
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
@@ -130,3 +153,5 @@
|
||||
I.forceMove(loc)
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
qdel(src)
|
||||
|
||||
#undef MAX_TANK_STORAGE
|
||||
|
||||
@@ -144,9 +144,7 @@
|
||||
if(istype(mob, /mob) && mob.client)
|
||||
// If the pod is not in a tube at all, you can get out at any time.
|
||||
if(!(locate(/obj/structure/transit_tube) in loc))
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_perspective(null)
|
||||
mob.forceMove(loc)
|
||||
|
||||
//if(moving && istype(loc, /turf/space))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
@@ -158,9 +156,7 @@
|
||||
if(!station.pod_moving)
|
||||
if(direction == station.dir)
|
||||
if(station.icon_state == "open")
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_perspective(null)
|
||||
mob.forceMove(loc)
|
||||
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
@@ -403,75 +403,7 @@
|
||||
L.ExtinguishMob()
|
||||
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
|
||||
to_chat(L, "<span class='warning'>You've been drenched in water!</span>")
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/M = O
|
||||
if(M.r_hand)
|
||||
M.r_hand.clean_blood()
|
||||
if(M.l_hand)
|
||||
M.l_hand.clean_blood()
|
||||
if(M.back)
|
||||
if(M.back.clean_blood())
|
||||
M.update_inv_back(0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/washgloves = 1
|
||||
var/washshoes = 1
|
||||
var/washmask = 1
|
||||
var/washears = 1
|
||||
var/washglasses = 1
|
||||
|
||||
if(H.wear_suit)
|
||||
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
|
||||
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
|
||||
|
||||
if(H.head)
|
||||
washmask = !(H.head.flags_inv & HIDEMASK)
|
||||
washglasses = !(H.head.flags_inv & HIDEEYES)
|
||||
washears = !(H.head.flags_inv & HIDEEARS)
|
||||
|
||||
if(H.wear_mask)
|
||||
if(washears)
|
||||
washears = !(H.wear_mask.flags_inv & HIDEEARS)
|
||||
if(washglasses)
|
||||
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
|
||||
|
||||
if(H.head)
|
||||
if(H.head.clean_blood())
|
||||
H.update_inv_head(0,0)
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.clean_blood())
|
||||
H.update_inv_wear_suit(0,0)
|
||||
else if(H.w_uniform)
|
||||
if(H.w_uniform.clean_blood())
|
||||
H.update_inv_w_uniform(0,0)
|
||||
if(H.gloves && washgloves)
|
||||
if(H.gloves.clean_blood())
|
||||
H.update_inv_gloves(0,0)
|
||||
if(H.shoes && washshoes)
|
||||
if(H.shoes.clean_blood())
|
||||
H.update_inv_shoes(0,0)
|
||||
if(H.wear_mask && washmask)
|
||||
if(H.wear_mask.clean_blood())
|
||||
H.update_inv_wear_mask(0)
|
||||
if(H.glasses && washglasses)
|
||||
if(H.glasses.clean_blood())
|
||||
H.update_inv_glasses(0)
|
||||
if(H.l_ear && washears)
|
||||
if(H.l_ear.clean_blood())
|
||||
H.update_inv_ears(0)
|
||||
if(H.r_ear && washears)
|
||||
if(H.r_ear.clean_blood())
|
||||
H.update_inv_ears(0)
|
||||
if(H.belt)
|
||||
if(H.belt.clean_blood())
|
||||
H.update_inv_belt(0)
|
||||
else
|
||||
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
|
||||
if(M.wear_mask.clean_blood())
|
||||
M.update_inv_wear_mask(0)
|
||||
|
||||
else
|
||||
O.clean_blood()
|
||||
L.clean_blood()
|
||||
|
||||
if(isturf(loc))
|
||||
var/turf/tile = loc
|
||||
|
||||
Reference in New Issue
Block a user