12/21 modernizations from TG live (#103)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
This commit is contained in:
Poojawa
2016-12-22 03:57:55 -06:00
committed by GitHub
parent f5e143a452
commit cf59ac1c3d
2215 changed files with 707445 additions and 87041 deletions
@@ -8,12 +8,12 @@
/obj/item/weapon/storage
name = "storage"
icon = 'icons/obj/storage.dmi'
w_class = 3
w_class = WEIGHT_CLASS_NORMAL
var/silent = 0 // No message on putting items in
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_w_class = WEIGHT_CLASS_SMALL //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
@@ -24,10 +24,11 @@
var/allow_quick_gather //Set this variable to allow the object to have the 'toggle mode' verb, which quickly collects all items from a tile.
var/collection_mode = 1; //0 = pick one at a time, 1 = pick all on tile, 2 = pick all of a type
var/preposition = "in" // You put things 'in' a bag, but trays need 'on'.
var/rustle_jimmies = TRUE //Play the rustle sound on insertion
/obj/item/weapon/storage/MouseDrop(atom/over_object)
if(iscarbon(usr) || isdrone(usr)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
if(ismob(usr)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
var/mob/M = usr
if(!over_object)
@@ -36,8 +37,9 @@
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
orient2hud(M) // dunno why it wasn't before
// this must come before the screen objects only block, dunno why it wasn't before
if(over_object == M && (src.ClickAccessible(M, depth=STORAGE_VIEW_DEPTH) || Adjacent(M)))
orient2hud(M)
if(M.s_active)
M.s_active.close(M)
show_to(M)
@@ -57,14 +59,21 @@
var/obj/screen/inventory/hand/H = over_object
if(!M.unEquip(src))
return
switch(H.slot_id)
if(slot_r_hand)
M.put_in_r_hand(src)
if(slot_l_hand)
M.put_in_l_hand(src)
M.put_in_hand(src,H.held_index)
add_fingerprint(usr)
/obj/item/weapon/storage/MouseDrop_T(atom/movable/O, mob/user)
if(istype(O, /obj/item))
var/obj/item/I = O
if(iscarbon(user) || isdrone(user))
var/mob/living/L = user
if(!L.incapacitated() && I == L.get_active_held_item())
if(can_be_inserted(I, 0))
handle_item_insertion(I, 0 , L)
//Check if this storage can dump the items
/obj/item/weapon/storage/proc/content_can_dump(atom/dest_object, mob/user)
if(Adjacent(user) && dest_object.Adjacent(user))
@@ -80,7 +89,7 @@
if(I.on_found(user))
return
if(can_be_inserted(I,0,user))
src_object.remove_from_storage(I, src)
handle_item_insertion(I, TRUE, user)
orient2hud(user)
src_object.orient2hud(user)
if(user.s_active) //refresh the HUD to show the transfered contents
@@ -113,7 +122,7 @@
is_seeing |= user
/obj/item/weapon/storage/throw_at(atom/target, range, speed, mob/thrower, spin)
/obj/item/weapon/storage/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0)
close_all()
return ..()
@@ -158,6 +167,7 @@
for(var/obj/O in contents)
O.screen_loc = "[cx],[cy]"
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
cx++
if(cx > mx)
cx = tx
@@ -177,6 +187,7 @@
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = ABOVE_HUD_LAYER
ND.sample_object.plane = ABOVE_HUD_PLANE
cx++
if(cx > (4+cols))
cx = 4
@@ -187,6 +198,7 @@
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
cx++
if(cx > (4+cols))
cx = 4
@@ -205,7 +217,7 @@
number = 1
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
//This proc determines the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/weapon/storage/proc/orient2hud(mob/user)
var/adjusted_contents = contents.len
@@ -308,8 +320,15 @@
if(usr)
if(usr.client && usr.s_active != src)
usr.client.screen -= W
if(usr.observers && usr.observers.len)
for(var/M in usr.observers)
var/mob/dead/observe = M
if(observe.client && observe.s_active != src)
observe.client.screen -= W
add_fingerprint(usr)
if(rustle_jimmies)
playsound(src.loc, "rustle", 50, 1, -5)
if(!prevent_warning)
for(var/mob/M in viewers(usr, null))
@@ -329,7 +348,7 @@
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W, atom/new_location)
if(!istype(W))
return 0
@@ -345,37 +364,43 @@
var/mob/M = loc
W.dropped(M)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
W.loc = new_location
if(usr)
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
for(var/mob/M in can_see_contents())
orient2hud(M)
show_to(M)
if(W.maptext)
W.maptext = ""
W.on_exit_storage(src)
update_icon()
W.mouse_opacity = initial(W.mouse_opacity)
if(burn)
W.fire_act()
return 1
/obj/item/weapon/storage/empty_object_contents(burn, src.loc)
for(var/obj/item/Item in contents)
remove_from_storage(Item, src.loc, burn)
/obj/item/weapon/storage/deconstruct(disassembled = TRUE)
var/drop_loc = loc
if(ismob(loc))
drop_loc = get_turf(src)
for(var/obj/item/I in contents)
remove_from_storage(I, drop_loc)
qdel(src)
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/hand_labeler))
var/obj/item/weapon/hand_labeler/labeler = W
if(labeler.mode)
return 0
. = 1 //no afterattack
if(isrobot(user))
if(iscyborg(user))
return //Robots can't interact with storage items.
if(!can_be_inserted(W, 0 , user))
return
if(!istype(W, /obj/item/device/boobytrap))
handle_item_insertion(W, 0 , user)
handle_item_insertion(W, 0 , user)
/obj/item/weapon/storage/attack_hand(mob/user)
@@ -388,11 +413,11 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.l_store == src && !H.get_active_hand()) //Prevents opening if it's in a pocket.
if(H.l_store == src && !H.get_active_held_item()) //Prevents opening if it's in a pocket.
H.put_in_hands(src)
H.l_store = null
return
if(H.r_store == src && !H.get_active_hand())
if(H.r_store == src && !H.get_active_held_item())
H.put_in_hands(src)
H.r_store = null
return
@@ -465,10 +490,12 @@
boxes.icon_state = "block"
boxes.screen_loc = "7,7 to 10,8"
boxes.layer = HUD_LAYER
boxes.plane = HUD_PLANE
closer = new /obj/screen/close()
closer.master = src
closer.icon_state = "backpack_close"
closer.layer = ABOVE_HUD_LAYER
closer.plane = ABOVE_HUD_PLANE
orient2hud()
@@ -483,7 +510,7 @@
/obj/item/weapon/storage/emp_act(severity)
if(!istype(loc, /mob/living))
if(!isliving(loc))
for(var/obj/O in contents)
O.emp_act(severity)
..()
@@ -491,7 +518,7 @@
/obj/item/weapon/storage/attack_self(mob/user)
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(user.get_active_held_item() == src)
if(verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
quick_empty()
@@ -499,3 +526,8 @@
if(A in contents)
usr = null
remove_from_storage(A, loc)
/obj/item/weapon/storage/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity, target)
CHECK_TICK