mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge branch 'master' into surgery
This commit is contained in:
@@ -421,19 +421,19 @@
|
||||
|
||||
if(!item) return //Grab processing has a chance of returning null
|
||||
|
||||
item.layer = initial(item.layer)
|
||||
u_equip(item)
|
||||
update_icons()
|
||||
if(src.client)
|
||||
src.client.screen -= item
|
||||
//if(src.client)
|
||||
//src.client.screen -= item
|
||||
|
||||
item.loc = src.loc
|
||||
//item.loc = src.loc
|
||||
|
||||
if(istype(item, /obj/item))
|
||||
item:dropped(src) // let it know it's been dropped
|
||||
//if(istype(item, /obj/item))
|
||||
//item:dropped(src) // let it know it's been dropped
|
||||
|
||||
//actually throw it!
|
||||
if (item)
|
||||
item.layer = initial(item.layer)
|
||||
src.visible_message("\red [src] has thrown [item].")
|
||||
|
||||
if(!src.lastarea)
|
||||
|
||||
@@ -159,9 +159,8 @@
|
||||
client.screen -= W
|
||||
W.loc = loc
|
||||
W.dropped(src)
|
||||
if(W)
|
||||
W.layer = initial(W.layer)
|
||||
|
||||
//if(W)
|
||||
//W.layer = initial(W.layer)
|
||||
update_action_buttons()
|
||||
return 1
|
||||
|
||||
@@ -592,7 +591,15 @@ It can still be worn/put on as normal.
|
||||
target.internals.icon_state = "internal1"
|
||||
if(slot_to_process)
|
||||
if(strip_item) //Stripping an item from the mob
|
||||
target.u_equip(strip_item)
|
||||
var/obj/item/W = strip_item
|
||||
target.u_equip(W)
|
||||
if (target.client)
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
|
||||
if(target.r_store)
|
||||
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
|
||||
@@ -601,6 +608,7 @@ It can still be worn/put on as normal.
|
||||
if(item.mob_can_equip(target, slot_to_process, 0))
|
||||
source.u_equip(item)
|
||||
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
||||
item.dropped(source)
|
||||
source.update_icons()
|
||||
target.update_icons()
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
if(D.data["donor"] == src)
|
||||
B = D
|
||||
break
|
||||
var/datum/reagent/nutriment/F = locate() in vessel.reagent_list
|
||||
var/datum/reagent/nutriment/F = locate() in reagents.reagent_list
|
||||
if(F != null)
|
||||
if(F.volume >= 1)
|
||||
// nutriment speeds it up quite a bit
|
||||
@@ -274,7 +274,7 @@
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
emote("custom v drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
|
||||
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
@@ -284,7 +284,7 @@
|
||||
else if(E.name == "r_hand" || E.name == "r_arm")
|
||||
if(!hand && equipped())
|
||||
drop_item()
|
||||
emote("custom v drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
|
||||
emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
@@ -112,6 +112,8 @@
|
||||
item.layer = 20
|
||||
target.l_hand = item
|
||||
item.loc = target
|
||||
item.dropped(source)
|
||||
item.equipped(target,target.l_hand)
|
||||
if("r_hand")
|
||||
if (target.r_hand)
|
||||
var/obj/item/W = target.r_hand
|
||||
@@ -120,8 +122,8 @@
|
||||
target.client.screen -= W
|
||||
if (W)
|
||||
W.loc = target.loc
|
||||
W.dropped(target)
|
||||
W.layer = initial(W.layer)
|
||||
W.dropped(target)
|
||||
W.add_fingerprint(source)
|
||||
else
|
||||
if (istype(item, /obj/item))
|
||||
@@ -130,6 +132,8 @@
|
||||
item.layer = 20
|
||||
target.r_hand = item
|
||||
item.loc = target
|
||||
item.dropped(source)
|
||||
item.equipped(target,target.r_hand)
|
||||
if("back")
|
||||
if (target.back)
|
||||
var/obj/item/W = target.back
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
// A special tray for the service droid. Allow droid to pick up and drop items as if they were using the tray normally
|
||||
// Click on table to unload, click on item to load. Otherwise works identically to a tray.
|
||||
// Unlike the base item "tray", robotrays ONLY pick up food, drinks and condiments.
|
||||
|
||||
/obj/item/weapon/tray/robotray
|
||||
name = "RoboTray"
|
||||
desc = "An autoloading tray specialized for carrying refreshments."
|
||||
|
||||
/obj/item/weapon/tray/robotray/afterattack(atom/target, mob/user as mob)
|
||||
if ( !target )
|
||||
return
|
||||
// pick up items, mostly copied from base tray pickup proc
|
||||
// see code\game\objects\items\weapons\kitchen.dm line 241
|
||||
if ( istype(target,/obj/item))
|
||||
if ( !isturf(target.loc) ) // Don't load up stuff if it's inside a container or mob!
|
||||
return
|
||||
var turf/pickup = target.loc
|
||||
|
||||
var addedSomething = 0
|
||||
|
||||
for(var/obj/item/weapon/reagent_containers/food/I in pickup)
|
||||
|
||||
|
||||
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
|
||||
var/add = 0
|
||||
if(I.w_class == 1.0)
|
||||
add = 1
|
||||
else if(I.w_class == 2.0)
|
||||
add = 3
|
||||
else
|
||||
add = 5
|
||||
if(calc_carry() + add >= max_carry)
|
||||
break
|
||||
|
||||
I.loc = src
|
||||
carrying.Add(I)
|
||||
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
|
||||
addedSomething = 1
|
||||
if ( addedSomething )
|
||||
user.visible_message("\blue [user] load some items onto their service tray.")
|
||||
|
||||
return
|
||||
|
||||
// Unloads the tray, copied from base item's proc dropped() and altered
|
||||
// see code\game\objects\items\weapons\kitchen.dm line 263
|
||||
|
||||
if ( isturf(target) || istype(target,/obj/structure/table) )
|
||||
var foundtable = istype(target,/obj/structure/table/)
|
||||
if ( !foundtable ) //it must be a turf!
|
||||
for(var/obj/structure/table/T in target)
|
||||
foundtable = 1
|
||||
break
|
||||
|
||||
var turf/dropspot
|
||||
if ( !foundtable ) // don't unload things onto walls or other silly places.
|
||||
dropspot = user.loc
|
||||
else if ( isturf(target) ) // they clicked on a turf with a table in it
|
||||
dropspot = target
|
||||
else // they clicked on a table
|
||||
dropspot = target.loc
|
||||
|
||||
|
||||
overlays = null
|
||||
|
||||
var droppedSomething = 0
|
||||
|
||||
for(var/obj/item/I in carrying)
|
||||
I.loc = dropspot
|
||||
carrying.Remove(I)
|
||||
droppedSomething = 1
|
||||
if(!foundtable && isturf(dropspot))
|
||||
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
|
||||
spawn()
|
||||
for(var/i = 1, i <= rand(1,2), i++)
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
if ( droppedSomething )
|
||||
if ( foundtable )
|
||||
user.visible_message("\blue [user] unloads their service tray.")
|
||||
else
|
||||
user.visible_message("\blue [user] drops all the items on their tray.")
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
// A special pen for service droids. Can be toggled to switch between normal writting mode, and paper rename mode
|
||||
// Allows service droids to rename paper items.
|
||||
|
||||
/obj/item/weapon/pen/robopen
|
||||
desc = "A black ink printing attachment with a paper naming mode."
|
||||
name = "Printing Pen"
|
||||
var/mode = 1
|
||||
|
||||
/obj/item/weapon/pen/robopen/attack_self(mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if (mode == 1)
|
||||
mode = 2
|
||||
user << "Changed printing mode to 'Rename Paper'"
|
||||
return
|
||||
if (mode == 2)
|
||||
mode = 1
|
||||
user << "Changed printing mode to 'Write Paper'"
|
||||
|
||||
// Copied over from paper's rename verb
|
||||
// see code\modules\paperwork\paper.dm line 62
|
||||
|
||||
/obj/item/weapon/pen/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
|
||||
if ( !user || !paper )
|
||||
return
|
||||
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
if ( !user || !paper )
|
||||
return
|
||||
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if(( get_dist(user,paper) <= 1 && user.stat == 0))
|
||||
paper.name = "paper[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
..()
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
src.modules += new /obj/item/weapon/pen(src)
|
||||
src.modules += new /obj/item/weapon/pen/robopen(src)
|
||||
|
||||
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
|
||||
M.matter = 30
|
||||
@@ -179,10 +179,10 @@
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
|
||||
var/obj/item/weapon/lighter/zippo/L = new /obj/item/weapon/lighter/zippo(src)
|
||||
L.lit = 1
|
||||
L.light_on = 1
|
||||
src.modules += L
|
||||
|
||||
src.modules += new /obj/item/weapon/tray(src)
|
||||
src.modules += new /obj/item/weapon/tray/robotray(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
dna = null
|
||||
O.dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
//O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
|
||||
O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*13)]BB8"
|
||||
O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8"
|
||||
O.loc = loc
|
||||
O.viruses = viruses
|
||||
viruses = list()
|
||||
|
||||
Reference in New Issue
Block a user