mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
merging upstream master into local repo
This commit is contained in:
@@ -7,6 +7,19 @@
|
||||
else return dy + (0.5*dx)
|
||||
|
||||
|
||||
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
|
||||
if(Center==null) return
|
||||
|
||||
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
|
||||
//var/y1=((Center.y-Dist)<1 ? 1 : Center.y-Dist)
|
||||
//var/x2=((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist)
|
||||
//var/y2=((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist)
|
||||
|
||||
var/turf/x1y1 = locate(((Center.x-Dist)<1 ? 1 : Center.x-Dist),((Center.y-Dist)<1 ? 1 : Center.y-Dist),Center.z)
|
||||
var/turf/x2y2 = locate(((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist),((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist),Center.z)
|
||||
return block(x1y1,x2y2)
|
||||
|
||||
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0)
|
||||
src = null //so we don't abort once src is deleted
|
||||
epicenter = get_turf(epicenter)
|
||||
@@ -86,7 +99,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
var/y0 = epicenter.y
|
||||
var/z0 = epicenter.z
|
||||
|
||||
for(var/turf/T in range(epicenter, max_range))
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
|
||||
var/dist = cheap_pythag(T.x - x0,T.y - y0)
|
||||
var/flame_dist = 0
|
||||
var/hotspot_exists
|
||||
@@ -100,15 +114,19 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
else dist = 0
|
||||
|
||||
|
||||
//------- TURF FIRES -------\\
|
||||
//------- TURF FIRES -------
|
||||
|
||||
if(T)
|
||||
if(flame_dist && prob(40) && !istype(T, /turf/space))
|
||||
new/obj/effect/hotspot(T) //Mostly for ambience!
|
||||
spawn()
|
||||
new/obj/effect/hotspot(T) //Mostly for ambience!
|
||||
hotspot_exists = 1
|
||||
if(dist)
|
||||
T.ex_act(dist)
|
||||
spawn()
|
||||
if(T)
|
||||
T.ex_act(dist)
|
||||
|
||||
//------- THINGS IN TURFS FIRES -------\\
|
||||
//------- THINGS IN TURFS FIRES -------
|
||||
|
||||
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
|
||||
var/atom/movable/AM = atom_movable
|
||||
@@ -116,10 +134,14 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
if(AM) //Something is inside T (We have already checked T exists above) - RR
|
||||
if(flame_dist) //if it has flame distance, run this - RR
|
||||
if(isliving(AM) && !hotspot_exists && !istype(T, /turf/space))
|
||||
new /obj/effect/hotspot(AM.loc)
|
||||
spawn()
|
||||
if(AM && AM.loc!=null)
|
||||
new /obj/effect/hotspot(AM.loc)
|
||||
//Just in case we missed a mob while they were in flame_range, but a hotspot didn't spawn on them, otherwise it looks weird when you just burst into flame out of nowhere
|
||||
if(dist) //if no flame_dist, run this - RR
|
||||
AM.ex_act(dist)
|
||||
spawn()
|
||||
if(AM)
|
||||
AM.ex_act(dist)
|
||||
|
||||
|
||||
|
||||
@@ -145,5 +167,5 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
|
||||
|
||||
proc/secondaryexplosion(turf/epicenter, range)
|
||||
for(var/turf/tile in range(range, epicenter))
|
||||
for(var/turf/tile in trange(range, epicenter))
|
||||
tile.ex_act(2)
|
||||
@@ -9,31 +9,12 @@
|
||||
/obj
|
||||
var/explosion_resistance
|
||||
|
||||
/datum/explosion_turf
|
||||
var/turf/turf //The turf which will get ex_act called on it
|
||||
var/max_power //The largest amount of power the turf sustained
|
||||
|
||||
New()
|
||||
..()
|
||||
max_power = 0
|
||||
|
||||
proc/save_power_if_larger(power)
|
||||
if(power > max_power)
|
||||
max_power = power
|
||||
return 1
|
||||
return 0
|
||||
var/list/explosion_turfs = list()
|
||||
|
||||
var/list/datum/explosion_turf/explosion_turfs = list()
|
||||
var/explosion_in_progress = 0
|
||||
|
||||
proc/get_explosion_turf(var/turf/T)
|
||||
for( var/datum/explosion_turf/ET in explosion_turfs )
|
||||
if( T == ET.turf )
|
||||
return ET
|
||||
var/datum/explosion_turf/ET = new()
|
||||
ET.turf = T
|
||||
explosion_turfs += ET
|
||||
return ET
|
||||
|
||||
proc/explosion_rec(turf/epicenter, power)
|
||||
|
||||
@@ -55,9 +36,8 @@ proc/explosion_rec(turf/epicenter, power)
|
||||
|
||||
explosion_in_progress = 1
|
||||
explosion_turfs = list()
|
||||
var/datum/explosion_turf/ETE = get_explosion_turf()
|
||||
ETE.turf = epicenter
|
||||
ETE.max_power = power
|
||||
|
||||
explosion_turfs[epicenter] = power
|
||||
|
||||
//This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it.
|
||||
for(var/direction in cardinal)
|
||||
@@ -65,22 +45,21 @@ proc/explosion_rec(turf/epicenter, power)
|
||||
T.explosion_spread(power - epicenter.explosion_resistance, direction)
|
||||
|
||||
//This step applies the ex_act effects for the explosion, as planned in the previous step.
|
||||
for( var/datum/explosion_turf/ET in explosion_turfs )
|
||||
if(ET.max_power <= 0) continue
|
||||
if(!ET.turf) continue
|
||||
for(var/turf/T in explosion_turfs)
|
||||
if(explosion_turfs[T] <= 0) continue
|
||||
if(!T) continue
|
||||
|
||||
//Wow severity looks confusing to calculate... Fret not, I didn't leave you with any additional instructions or help. (just kidding, see the line under the calculation)
|
||||
var/severity = 4 - round(max(min( 3, ((ET.max_power - ET.turf.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1)
|
||||
//sanity effective power on tile divided by either 3 or one third the total explosion power
|
||||
var/severity = 4 - round(max(min( 3, ((explosion_turfs[T] - T.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1) //sanity effective power on tile divided by either 3 or one third the total explosion power
|
||||
// One third because there are three power levels and I
|
||||
// want each one to take up a third of the crater
|
||||
var/x = ET.turf.x
|
||||
var/y = ET.turf.y
|
||||
var/z = ET.turf.z
|
||||
ET.turf.ex_act(severity)
|
||||
if(!ET.turf)
|
||||
ET.turf = locate(x,y,z)
|
||||
for( var/atom/A in ET.turf )
|
||||
var/x = T.x
|
||||
var/y = T.y
|
||||
var/z = T.z
|
||||
T.ex_act(severity)
|
||||
if(!T)
|
||||
T = locate(x,y,z)
|
||||
for(var/atom/A in T)
|
||||
A.ex_act(severity)
|
||||
|
||||
explosion_in_progress = 0
|
||||
@@ -126,10 +105,9 @@ proc/explosion_rec(turf/epicenter, power)
|
||||
new/obj/effect/debugging/marker(src)
|
||||
*/
|
||||
|
||||
var/datum/explosion_turf/ET = get_explosion_turf(src)
|
||||
if(ET.max_power >= power)
|
||||
if(explosion_turfs[src] >= power)
|
||||
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
|
||||
ET.max_power = power
|
||||
explosion_turfs[src] = power
|
||||
|
||||
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
|
||||
var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
/obj/item/attack_hand(mob/user as mob)
|
||||
if (!user) return
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
//If the item is in a storage item, take it out
|
||||
var/obj/item/weapon/storage/S = src.loc
|
||||
S.remove_from_storage(src)
|
||||
|
||||
@@ -171,6 +172,13 @@
|
||||
return
|
||||
attack_paw(A)
|
||||
|
||||
/obj/item/attack_ai(mob/user as mob)
|
||||
if (istype(src.loc, /obj/item/weapon/robot_module))
|
||||
//If the item is part of a cyborg module, equip it
|
||||
if(!isrobot(user)) return
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.activate_module(src)
|
||||
R.hud_used.update_robot_modules_display()
|
||||
|
||||
// Due to storage type consolidation this should get used more now.
|
||||
// I have cleaned it up a little, but it could probably use more. -Sayu
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/device/laser_pointer
|
||||
name = "laser pointer"
|
||||
desc = "Don't shine it in your eyes!"
|
||||
@@ -10,14 +9,17 @@
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 500
|
||||
g_amt = 500
|
||||
w_class = 1.0
|
||||
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
|
||||
origin_tech = "combat=1"
|
||||
origin_tech = "magnets=2"
|
||||
var/turf/pointer_loc
|
||||
var/energy = 5
|
||||
var/max_energy = 5
|
||||
var/effectchance = 33
|
||||
var/recharging = 0
|
||||
var/recharge_locked = 0
|
||||
var/obj/item/weapon/stock_parts/micro_laser/diode //used for upgrading!
|
||||
|
||||
|
||||
/obj/item/device/laser_pointer/red
|
||||
pointer_icon_state = "red_laser"
|
||||
@@ -30,12 +32,39 @@
|
||||
|
||||
/obj/item/device/laser_pointer/New()
|
||||
..()
|
||||
diode = new(src)
|
||||
if(!pointer_icon_state)
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
/obj/item/device/laser_pointer/upgraded/New()
|
||||
..()
|
||||
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
|
||||
|
||||
|
||||
|
||||
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
|
||||
laser_act(M, user)
|
||||
|
||||
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
|
||||
if(!diode)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
diode = W
|
||||
user << "<span class='notice'>You install a [diode.name] in [src].</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a diode installed.</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(diode)
|
||||
user << "<span class='notice'>You remove the [diode.name] from the [src].</span>"
|
||||
diode.loc = get_turf(src.loc)
|
||||
diode = null
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/device/laser_pointer/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
if(flag) //we're placing the object on a table or in backpack
|
||||
return
|
||||
@@ -44,6 +73,9 @@
|
||||
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user)
|
||||
if( !(user in (viewers(7,target))) )
|
||||
return
|
||||
if (!diode)
|
||||
user << "<span class='notice'>You point [src] at [target], but nothing happens!</span>"
|
||||
return
|
||||
if (!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
@@ -72,7 +104,7 @@
|
||||
var/mob/living/carbon/C = target
|
||||
|
||||
//20% chance to actually hit the eyes
|
||||
if(prob(20))
|
||||
if(prob(effectchance * diode.rating))
|
||||
add_logs(user, C, "shone in the eyes", object="laser pointer")
|
||||
|
||||
//eye target check
|
||||
@@ -121,7 +153,7 @@
|
||||
else if(issilicon(target))
|
||||
var/mob/living/silicon/S = target
|
||||
//20% chance to actually hit the sensors
|
||||
if(prob(20))
|
||||
if(prob(effectchance * diode.rating))
|
||||
S.Weaken(rand(5,10))
|
||||
S << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
@@ -132,7 +164,7 @@
|
||||
//cameras
|
||||
else if(istype(target, /obj/machinery/camera))
|
||||
var/obj/machinery/camera/C = target
|
||||
if(prob(20))
|
||||
if(prob(effectchance * diode.rating))
|
||||
C.emp_act(1)
|
||||
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
|
||||
add_logs(user, C, "EMPed", object="laser pointer")
|
||||
@@ -173,4 +205,4 @@
|
||||
energy = max_energy
|
||||
recharging = 0
|
||||
recharge_locked = 0
|
||||
..()
|
||||
..()
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
/obj/item/device/radio/headset/headset_srv
|
||||
name = "service radio headset"
|
||||
desc = "Headset used by the foodservice staff, tasked with keeping the station full and happy. To access the service channel, use :v."
|
||||
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. To access the service channel, use :v."
|
||||
icon_state = "srv_headset"
|
||||
item_state = "headset"
|
||||
keyslot2 = new /obj/item/device/encryptionkey/headset_service
|
||||
@@ -265,4 +265,4 @@
|
||||
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if (O.client)
|
||||
O.show_message("\red <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2)
|
||||
add_logs(user, M, "stunned", object="[src.name]", addition="(INTENT: [uppertext(user.a_intent)])")
|
||||
|
||||
/obj/item/borg/overdrive
|
||||
name = "overdrive"
|
||||
|
||||
@@ -11,70 +11,62 @@
|
||||
var/heal_burn = 0
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if (M.stat == 2)
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is dead, you cannot help [t_him]!"
|
||||
return
|
||||
|
||||
if(affecting.status == ORGAN_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if (M.stat == 2)
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is dead, you cannot help [t_him]!"
|
||||
return
|
||||
if (!istype(M))
|
||||
user << "\red \The [src] cannot be applied to [M]!"
|
||||
return 1
|
||||
|
||||
if (!istype(M))
|
||||
user << "\red \The [src] cannot be applied to [M]!"
|
||||
return 1
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon) || \
|
||||
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon) || \
|
||||
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
if (user)
|
||||
if (M != user)
|
||||
user.visible_message( \
|
||||
"\blue [M] has been applied with [src] by [user].", \
|
||||
"\blue You apply \the [src] to [M]." \
|
||||
)
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if (user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if (user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
|
||||
if (user)
|
||||
if (M != user)
|
||||
user.visible_message( \
|
||||
"\blue [M] has been applied with [src] by [user].", \
|
||||
"\blue You apply \the [src] to [M]." \
|
||||
)
|
||||
else
|
||||
var/t_himself = "itself"
|
||||
if (user.gender == MALE)
|
||||
t_himself = "himself"
|
||||
else if (user.gender == FEMALE)
|
||||
t_himself = "herself"
|
||||
user.visible_message( \
|
||||
"\blue [M] applied [src] on [t_himself].", \
|
||||
"\blue You apply \the [src] on yourself." \
|
||||
)
|
||||
|
||||
user.visible_message( \
|
||||
"\blue [M] applied [src] on [t_himself].", \
|
||||
"\blue You apply \the [src] on yourself." \
|
||||
)
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/user2 = user
|
||||
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
|
||||
else
|
||||
if(!istype(affecting, /obj/item/organ/limb) || affecting:burn_dam <= 0)
|
||||
affecting = H.get_organ("head")
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
|
||||
|
||||
if(affecting.status == ORGAN_ORGANIC) //Limb must be organic to be healed - RR
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn, 0))
|
||||
H.update_damage_overlays(0)
|
||||
|
||||
M.updatehealth()
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
|
||||
use(1)
|
||||
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
|
||||
else
|
||||
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
|
||||
use(1)
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/medical/bruise_pack
|
||||
|
||||
@@ -851,7 +851,23 @@ obj/item/toy/singlecard/attack_self(mob/user)
|
||||
Flip()
|
||||
|
||||
|
||||
|
||||
/obj/item/toy/nuke
|
||||
name = "\improper Nuclear Fission Explosive toy"
|
||||
desc = "A plastic model of a Nuclear Fission Explosive."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "nuketoyidle"
|
||||
w_class = 2.0
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/nuke/attack_self(mob/user)
|
||||
if (cooldown < world.time)
|
||||
cooldown = world.time + 3000 //5 minutes
|
||||
user.visible_message("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
|
||||
spawn(5) //gia said so
|
||||
icon_state = "nuketoy"
|
||||
playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0)
|
||||
sleep(135)
|
||||
icon_state = "nuketoyidle"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -56,12 +56,40 @@
|
||||
new /obj/item/stack/sheet/wood( user.loc )
|
||||
del(src)
|
||||
|
||||
if (istype(W, /obj/item/stack/tile/grass))
|
||||
var/obj/item/stack/tile/grass/Grass = W
|
||||
if(Grass.amount > 1)
|
||||
Grass.amount -= 1
|
||||
else
|
||||
del(Grass)
|
||||
new /obj/item/weapon/table_parts/wood/poker( src.loc )
|
||||
visible_message("<span class='notice'>[user] adds grass to the wooden table parts</span>")
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
|
||||
new /obj/structure/table/woodentable( user.loc )
|
||||
user.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Poker Table Parts
|
||||
*/
|
||||
|
||||
/obj/item/weapon/table_parts/wood/poker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/wood( user.loc )
|
||||
new /obj/item/stack/tile/grass( user.loc )
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/table_parts/wood/poker/attack_self(mob/user as mob)
|
||||
new /obj/structure/table/woodentable/poker( user.loc )
|
||||
user.drop_item()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = "waterbackpack"
|
||||
w_class = 4.0
|
||||
slot_flags = SLOT_BACK
|
||||
slowdown = 3
|
||||
slowdown = 1
|
||||
action_button_name = "Toggle Mister"
|
||||
|
||||
var/obj/item/weapon/reagent_containers/glass/mister/noz
|
||||
|
||||
@@ -130,3 +130,13 @@
|
||||
mo.show_message(rendered, 2)
|
||||
*/
|
||||
return
|
||||
|
||||
|
||||
|
||||
//If a mob logouts/logins in side of an object you can use this proc
|
||||
/obj/proc/on_log()
|
||||
..()
|
||||
if(isobj(loc))
|
||||
var/obj/Loc=loc
|
||||
Loc.on_log()
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
if(num) //No more matriarchy for cargo
|
||||
content_mob = /mob/living/simple_animal/corgi/Lisa
|
||||
new content_mob(loc)
|
||||
else if(content_mob == /mob/living/simple_animal/cat)
|
||||
if(prob(50))
|
||||
content_mob = /mob/living/simple_animal/cat/Proc
|
||||
else
|
||||
new content_mob(loc)
|
||||
already_opened = 1
|
||||
|
||||
@@ -48,4 +48,5 @@
|
||||
new /obj/item/clothing/suit/armor/reactive(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/device/laser_pointer(src)
|
||||
new /obj/item/clothing/under/rank/research_director/alt(src)
|
||||
return
|
||||
@@ -10,6 +10,7 @@
|
||||
* Morgue
|
||||
*/
|
||||
|
||||
|
||||
/obj/structure/morgue
|
||||
name = "morgue"
|
||||
desc = "Used to keep bodies in untill someone fetches them."
|
||||
@@ -19,14 +20,32 @@
|
||||
var/obj/structure/m_tray/connected = null
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/morgue/on_log()
|
||||
update()
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
if (src.connected)
|
||||
src.icon_state = "morgue0"
|
||||
else
|
||||
if (src.contents.len)
|
||||
src.icon_state = "morgue2"
|
||||
else
|
||||
if(!src.contents.len)
|
||||
src.icon_state = "morgue1"
|
||||
else
|
||||
|
||||
src.icon_state = "morgue2"//default dead no-client mob
|
||||
|
||||
var/list/compiled = recursive_mob_check(src)//run through contents
|
||||
|
||||
if(!length(compiled))//no mobs at all, but objects inside
|
||||
src.icon_state = "morgue3"
|
||||
return
|
||||
|
||||
for(var/mob/living/M in compiled)
|
||||
if(M.client)
|
||||
src.icon_state = "morgue4"//clone that mofo
|
||||
break
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/morgue/ex_act(severity)
|
||||
@@ -185,12 +204,19 @@
|
||||
if (src.connected)
|
||||
src.icon_state = "crema0"
|
||||
else
|
||||
if (src.contents.len)
|
||||
|
||||
if(src.contents.len)
|
||||
src.icon_state = "crema2"
|
||||
else
|
||||
src.icon_state = "crema1"
|
||||
|
||||
if(cremating)
|
||||
src.icon_state = "crema_active"
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/crematorium/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -310,6 +336,7 @@
|
||||
|
||||
cremating = 1
|
||||
locked = 1
|
||||
update()
|
||||
|
||||
for(var/mob/living/M in contents)
|
||||
if (M.stat!=2)
|
||||
@@ -329,6 +356,7 @@
|
||||
sleep(30)
|
||||
cremating = 0
|
||||
locked = 0
|
||||
update()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return
|
||||
|
||||
|
||||
@@ -7,27 +7,23 @@
|
||||
icon_state = "nest"
|
||||
var/health = 100
|
||||
|
||||
/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[user.name] pulls [buckled_mob.name] free from the sticky nest!</span>",\
|
||||
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
|
||||
"<span class='warning'>You struggle to break free from the gelatinous resin...</span>",\
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
spawn(1200)
|
||||
if(user && buckled_mob && user.buckled == src)
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
/obj/structure/stool/bed/nest/unbuckle_other(mob/user as mob)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[user.name] pulls [buckled_mob.name] free from the sticky nest!</span>",\
|
||||
"[user.name] pulls you free from the gelatinous resin.",\
|
||||
"You hear squelching...")
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
|
||||
/obj/structure/stool/bed/nest/unbuckle_myself(mob/user as mob)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
|
||||
"<span class='warning'>You struggle to break free from the gelatinous resin...</span>",\
|
||||
"You hear squelching...")
|
||||
spawn(1200)
|
||||
if(user && buckled_mob && user.buckled == src)
|
||||
buckled_mob.pixel_y = 0
|
||||
unbuckle()
|
||||
|
||||
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
|
||||
@@ -48,19 +48,30 @@
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
|
||||
"You were unbuckled from [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
if(!(user.buckled))
|
||||
unbuckle_other(user)
|
||||
else
|
||||
user << "<span class='notice'>You can't reach [src]!</span>"
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] unbuckled \himself!",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking")
|
||||
unbuckle()
|
||||
unbuckle_myself(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle_other(mob/user as mob)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[buckled_mob.name] was unbuckled by [user.name]!</span>",\
|
||||
"You were unbuckled from [src] by [user.name].",\
|
||||
"You hear metal clanking.")
|
||||
unbuckle()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle_myself(mob/user as mob)
|
||||
buckled_mob.visible_message(\
|
||||
"<span class='notice'>[buckled_mob.name] unbuckled \himself!</span>",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking.")
|
||||
unbuckle()
|
||||
|
||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.")
|
||||
var/parts = /obj/item/weapon/table_parts
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
@@ -277,9 +278,9 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W, mob/user)
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src, user) < 2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user)
|
||||
if (istype(I, /obj/item/weapon/grab) && get_dist(src, user) < 2)
|
||||
var/obj/item/weapon/grab/G = I
|
||||
if(G.affecting.buckled)
|
||||
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
|
||||
return
|
||||
@@ -292,36 +293,59 @@
|
||||
G.affecting.Weaken(5)
|
||||
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
|
||||
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
|
||||
del(W)
|
||||
del(I)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
if (istype(I, /obj/item/weapon/wrench))
|
||||
table_destroy(2, user)
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
if(istype(I, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/SS = new /datum/effect/effect/system/spark_spread()
|
||||
SS.set_up(5, 0, src.loc)
|
||||
SS.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
table_destroy(1, user)
|
||||
|
||||
user.drop_item(src)
|
||||
|
||||
/obj/structure/table/proc/table_destroy(var/destroy_type, var/mob/user as mob)
|
||||
|
||||
/*
|
||||
Destroy type values:
|
||||
1 = Destruction, Actually destroyed
|
||||
2 = Deconstruction.
|
||||
*/
|
||||
|
||||
if(destroy_type == 1)
|
||||
user.visible_message("<span class='notice'>The table was sliced apart by [user]!</span>")
|
||||
new parts( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
return 1
|
||||
if(destroy_type == 2)
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
var/obj/structure/table/reinforced/RT = src
|
||||
if(RT.status == 1)
|
||||
user << "<span class='notice'>Now disassembling the reinforced table</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
new parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>Now disassembling table</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
new parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -331,52 +355,14 @@
|
||||
name = "wooden table"
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon_state = "woodtable"
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
|
||||
|
||||
/obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.affecting.buckled)
|
||||
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
|
||||
return
|
||||
if(G.state < GRAB_AGGRESSIVE)
|
||||
user << "<span class='notice'>You need a better grip to do that!</span>"
|
||||
return
|
||||
if(!G.confirm())
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling the wooden table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
sleep(50)
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return 1
|
||||
|
||||
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
|
||||
name = "gambling table"
|
||||
desc = "A seedy table for seedy dealings in seedy places."
|
||||
icon_state = "pokertable"
|
||||
parts = /obj/item/weapon/table_parts/wood/poker
|
||||
|
||||
/*
|
||||
* Reinforced tables
|
||||
@@ -385,27 +371,11 @@
|
||||
name = "reinforced table"
|
||||
desc = "A version of the four legged table. It is stronger."
|
||||
icon_state = "reinftable"
|
||||
parts = /obj/item/weapon/table_parts/reinforced
|
||||
var/status = 2
|
||||
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.affecting.buckled)
|
||||
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
|
||||
return
|
||||
if(G.state < GRAB_AGGRESSIVE)
|
||||
user << "<span class='notice'>You need a better grip to do that!</span>"
|
||||
return
|
||||
if(!G.confirm())
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
@@ -424,40 +394,7 @@
|
||||
user << "\blue Table strengthened"
|
||||
src.status = 2
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(src.status == 1)
|
||||
user << "\blue Now disassembling the reinforced table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return 1
|
||||
|
||||
..()
|
||||
|
||||
/*
|
||||
* Racks
|
||||
@@ -562,3 +499,4 @@
|
||||
del(src)
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user