mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts: code/game/objects/items/weapons/storage/briefcase.dm html/changelogs/.all_changelog.yml
This commit is contained in:
@@ -29,7 +29,7 @@ var/global/list/GlobalPool = list()
|
||||
if(!D)
|
||||
// So the GC knows we're pooling this type.
|
||||
if(!GlobalPool[get_type])
|
||||
GlobalPool[get_type] = list(new get_type)
|
||||
GlobalPool[get_type] = list()
|
||||
if(islist(second_arg))
|
||||
return new get_type (arglist(second_arg))
|
||||
else
|
||||
@@ -58,7 +58,10 @@ var/global/list/GlobalPool = list()
|
||||
#ifdef DEBUG_ATOM_POOL
|
||||
world << text("DEBUG_DATUM_POOL: PlaceInPool([]) exceeds []. Discarding.", D.type, ATOM_POOL_COUNT)
|
||||
#endif
|
||||
del(D)
|
||||
if(garbage_collector)
|
||||
garbage_collector.AddTrash(D)
|
||||
else
|
||||
del(D)
|
||||
return
|
||||
|
||||
if(D in GlobalPool[D.type])
|
||||
|
||||
@@ -85,14 +85,8 @@ var/list/delayed_garbage = list()
|
||||
/proc/qdel(var/datum/A)
|
||||
if(!A)
|
||||
return
|
||||
if(istype(A, /list))
|
||||
var/list/L = A
|
||||
for(var/E in L)
|
||||
qdel(E)
|
||||
return
|
||||
|
||||
if(!istype(A))
|
||||
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||
warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||
del(A)
|
||||
if(garbage_collector)
|
||||
garbage_collector.dels++
|
||||
|
||||
@@ -23,18 +23,6 @@
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
/atom/Destroy()
|
||||
. = ..()
|
||||
density = 0
|
||||
set_opacity(0)
|
||||
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
reagents = null
|
||||
for(var/atom/movable/AM in contents)
|
||||
qdel(AM)
|
||||
invisibility = 101
|
||||
|
||||
/atom/proc/assume_air(datum/gas_mixture/giver)
|
||||
return null
|
||||
|
||||
@@ -501,4 +489,4 @@ its easier to just keep the beam vertical.
|
||||
O.show_message( message, 2, deaf_message, 1)
|
||||
else if(ismob(I))
|
||||
var/mob/M = I
|
||||
M.show_message( message, 2, deaf_message, 1)
|
||||
M.show_message( message, 2, deaf_message, 1)
|
||||
|
||||
@@ -31,8 +31,15 @@
|
||||
|
||||
/atom/movable/Destroy()
|
||||
. = ..()
|
||||
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
for(var/atom/movable/AM in contents)
|
||||
qdel(AM)
|
||||
loc = null
|
||||
if (pulledby)
|
||||
if (pulledby.pulling == src)
|
||||
pulledby.pulling = null
|
||||
pulledby = null
|
||||
|
||||
/atom/movable/proc/initialize()
|
||||
return
|
||||
|
||||
@@ -17,17 +17,20 @@
|
||||
if(!target)
|
||||
return
|
||||
for(var/i = 1 to step_count)
|
||||
if(!loc)
|
||||
return
|
||||
step_towards(src, target)
|
||||
var/turf/T = get_turf(src)
|
||||
reagents.touch_turf(T)
|
||||
var/mob/M = locate() in T
|
||||
if(M)
|
||||
reagents.splash_mob(M, reagents.total_volume)
|
||||
break
|
||||
for(var/atom/A in T)
|
||||
reagents.touch(A)
|
||||
if(T == get_turf(target))
|
||||
break
|
||||
if(T && reagents)
|
||||
reagents.touch_turf(T)
|
||||
var/mob/M = locate() in T
|
||||
if(M)
|
||||
reagents.splash_mob(M, reagents.total_volume)
|
||||
break
|
||||
for(var/atom/A in T)
|
||||
reagents.touch(A)
|
||||
if(T == get_turf(target))
|
||||
break
|
||||
sleep(delay)
|
||||
sleep(10)
|
||||
qdel(src)
|
||||
|
||||
@@ -255,6 +255,7 @@
|
||||
var/orig_amount = src.amount
|
||||
if (transfer && src.use(transfer))
|
||||
var/obj/item/stack/newstack = new src.type(loc, transfer)
|
||||
newstack.color = color
|
||||
if (prob(transfer/orig_amount * 100))
|
||||
transfer_fingerprints_to(newstack)
|
||||
if(blood_DNA)
|
||||
|
||||
@@ -10,40 +10,3 @@
|
||||
w_class = 4
|
||||
max_w_class = 3
|
||||
max_storage_space = 16
|
||||
|
||||
/obj/item/weapon/storage/briefcase/New()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/briefcase/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
//..()
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "<span class='warning'>\The [src] slips out of your hand and hits your head.</span>"
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
return
|
||||
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>)")
|
||||
|
||||
if (M.stat < 2 && M.health < 50 && prob(90))
|
||||
var/mob/H = M
|
||||
// ******* Check
|
||||
if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))
|
||||
M << "<span class='warning'>The helmet protects you from being hit hard in the head!</span>"
|
||||
return
|
||||
var/time = rand(2, 6)
|
||||
if (prob(75))
|
||||
M.Paralyse(time)
|
||||
else
|
||||
M.Stun(time)
|
||||
if(M.stat != 2) M.stat = 1
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message("<span class='warning'>\The [M] has been knocked unconscious!</span>", 1, "<span class='warning'>You hear someone fall.</span>", 2)
|
||||
else
|
||||
M << "<span class='warning'>\The [user] tried to knock you unconcious!</span>"
|
||||
M.eye_blurry += 3
|
||||
|
||||
return
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
else if (R_MOD & C.holder.rights || R_MENTOR & C.holder.rights)
|
||||
modmsg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_mods_online++
|
||||
|
||||
if(config.admin_irc)
|
||||
src << "<span class='info'>Adminhelps are also sent to IRC. If no admins are available in game try anyway and an admin on IRC may see it and respond.</span>"
|
||||
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg + "\n<b> Current [config.mods_are_mentors ? "Mentors" : "Moderators"]([num_mods_online]):</b>\n" + modmsg
|
||||
|
||||
src << msg
|
||||
|
||||
@@ -613,6 +613,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
// - Cable coil : merge cables
|
||||
/obj/item/stack/cable_coil/proc/can_merge(var/obj/item/stack/cable_coil/C)
|
||||
return color == C.color
|
||||
|
||||
/obj/item/stack/cable_coil/cyborg/can_merge()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if( istype(W, /obj/item/weapon/wirecutters) && src.get_amount() > 1)
|
||||
@@ -623,6 +629,11 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
if(!can_merge(C))
|
||||
user << "These coils do not go together."
|
||||
return
|
||||
|
||||
if(C.get_amount() >= get_max_amount())
|
||||
user << "The coil is too long, you cannot add any more cable to it."
|
||||
return
|
||||
|
||||
@@ -289,6 +289,7 @@
|
||||
SortP.sortType = sortType
|
||||
SortP.updatedir()
|
||||
SortP.updatedesc()
|
||||
SortP.updatename()
|
||||
|
||||
else if(ptype==6) // Disposal bin
|
||||
var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc)
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
for(var/turf/O in covered_turfs)
|
||||
var/obj/effect/energy_field/E = new(O)
|
||||
field.Add(E)
|
||||
qdel(covered_turfs)
|
||||
covered_turfs = null
|
||||
|
||||
for(var/mob/M in view(5,src))
|
||||
M << "\icon[src] You hear heavy droning start up."
|
||||
|
||||
Reference in New Issue
Block a user