Remove drop_item, drop_item_v, put_in_hands_or_del
This commit is contained in:
committed by
CitadelStationBot
parent
5f4b3594d0
commit
075cb673c0
@@ -89,22 +89,20 @@
|
||||
var/mob/M = user
|
||||
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
|
||||
return
|
||||
if(!M.drop_item()) //Remove the assembly from your hands
|
||||
if(!M.temporarilyRemoveItemFromInventory(src)) //Remove the assembly from your hands
|
||||
return
|
||||
|
||||
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
|
||||
var/obj/item/device/onetankbomb/R = new
|
||||
|
||||
M.temporarilyRemoveItemFromInventory(src, TRUE) //Remove the tank from your character,in case you were holding it
|
||||
if(!M.put_in_hands(R)) //Equips the bomb if possible, or puts it on the floor.
|
||||
forceMove(get_turf(M))
|
||||
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
|
||||
|
||||
R.bombassembly = S //Tell the bomb about its assembly part
|
||||
S.master = R //Tell the assembly about its new owner
|
||||
S.loc = R //Move the assembly out of the fucking way
|
||||
S.forceMove(R) //Move the assembly out of the fucking way
|
||||
|
||||
R.bombtank = src //Same for tank
|
||||
master = R
|
||||
loc = R
|
||||
forceMove(R)
|
||||
R.update_icon()
|
||||
return
|
||||
|
||||
|
||||
@@ -276,10 +276,9 @@
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A beaker is already loaded into [src]!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
beaker = I
|
||||
I.loc = src
|
||||
user.visible_message("[user] places [I] in [src].", \
|
||||
"<span class='notice'>You place [I] in [src].</span>")
|
||||
var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list)
|
||||
|
||||
@@ -80,9 +80,8 @@
|
||||
if(istype(W, /obj/item/tank))
|
||||
if(!(stat & BROKEN))
|
||||
var/obj/item/tank/T = W
|
||||
if(holding || !user.drop_item())
|
||||
if(holding || !user.transferItemToLoc(T, src))
|
||||
return
|
||||
T.loc = src
|
||||
holding = T
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
/obj/item/dice/d20/fate/equipped(mob/user, slot)
|
||||
if(!ishuman(user) || !user.mind || (user.mind in SSticker.mode.wizards))
|
||||
to_chat(user, "<span class='warning'>You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.</span>")
|
||||
user.drop_item()
|
||||
user.dropItemToGround(src)
|
||||
|
||||
|
||||
/obj/item/dice/d20/fate/proc/effect(var/mob/living/carbon/human/user,roll)
|
||||
|
||||
@@ -592,7 +592,7 @@ BLIND // can't see anything
|
||||
to_chat(user, "<span class='warning'>[src] already has an accessory.</span>")
|
||||
return
|
||||
else
|
||||
if(user && !user.drop_item())
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(I))
|
||||
return
|
||||
if(!A.attach(src, user))
|
||||
return
|
||||
|
||||
@@ -22,13 +22,10 @@
|
||||
/obj/item/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target, mob/living/user, ranged = 0)
|
||||
|
||||
//Creates a shattering noise and replaces the bottle with a broken_bottle
|
||||
var/new_location = get_turf(loc)
|
||||
var/new_location = get_turf(src)
|
||||
var/obj/item/broken_bottle/B = new /obj/item/broken_bottle(new_location)
|
||||
if(ranged)
|
||||
B.loc = new_location
|
||||
else
|
||||
user.drop_item()
|
||||
user.put_in_active_hand(B)
|
||||
if(!ranged)
|
||||
user.put_in_hands(B)
|
||||
B.icon_state = src.icon_state
|
||||
|
||||
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
|
||||
|
||||
@@ -58,10 +58,9 @@ insert ascii eagle on american flag background here
|
||||
else
|
||||
if(is_type_in_typecache(I, deepfry_blacklisted_items))
|
||||
. = ..()
|
||||
else if(user.drop_item() && !frying)
|
||||
else if(!frying && user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
frying = I
|
||||
frying.forceMove(src)
|
||||
icon_state = "fryer_on"
|
||||
|
||||
/obj/machinery/deepfryer/process()
|
||||
|
||||
@@ -68,8 +68,6 @@
|
||||
if(istype(O, /obj/item/reagent_containers/food/drinks/drinkingglass))
|
||||
var/obj/item/reagent_containers/food/drinks/drinkingglass/DG = O
|
||||
if(!DG.reagents.total_volume) //glass is empty
|
||||
if(!user.drop_item())
|
||||
return
|
||||
qdel(DG)
|
||||
glasses++
|
||||
to_chat(user, "<span class='notice'>The [src] accepts the drinking glass, sterilizing it.</span>")
|
||||
@@ -78,9 +76,8 @@
|
||||
to_chat(user, "<span class='warning'>The [src] is at full capacity.</span>")
|
||||
else
|
||||
var/obj/item/reagent_containers/food/snacks/S = O
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(S, src))
|
||||
return
|
||||
S.loc = src
|
||||
if(stored_food[sanitize(S.name)])
|
||||
stored_food[sanitize(S.name)]++
|
||||
else
|
||||
|
||||
@@ -142,11 +142,10 @@
|
||||
to_chat(user, "<span class='warning'>[src] is full, you can't put anything in!</span>")
|
||||
return 1
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='warning'>\the [O] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return 0
|
||||
|
||||
O.loc = src
|
||||
user.visible_message( \
|
||||
"[user] has added \the [O] to \the [src].", \
|
||||
"<span class='notice'>You add \the [O] to \the [src].</span>")
|
||||
|
||||
@@ -195,8 +195,7 @@
|
||||
if(P)
|
||||
user.visible_message("[user] put [O] into [src].", \
|
||||
"You put [O] into [src].")
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
user.transferItemToLoc(O, src, TRUE)
|
||||
return 1
|
||||
else
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
|
||||
@@ -178,20 +178,18 @@
|
||||
if(pizza)
|
||||
to_chat(user, "<span class='warning'>[src] already has \a [pizza.name]!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
pizza = I
|
||||
I.loc = src
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(I, /obj/item/bombcore/pizza))
|
||||
if(open && !bomb)
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
wires = new /datum/wires/explosive/pizza(src)
|
||||
bomb = I
|
||||
I.loc = src
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src]. Sneeki breeki...</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
/obj/structure/holohoop/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(get_dist(src,user)<2)
|
||||
if(user.drop_item(src))
|
||||
if(user.transferItemToLoc(W, drop_location()))
|
||||
visible_message("<span class='warning'> [user] dunks [W] into \the [src]!</span>")
|
||||
|
||||
/obj/structure/holohoop/attack_hand(mob/user)
|
||||
@@ -211,9 +211,7 @@
|
||||
/obj/machinery/conveyor/holodeck
|
||||
|
||||
/obj/machinery/conveyor/holodeck/attackby(obj/item/I, mob/user, params)
|
||||
if(user.drop_item())
|
||||
I.loc = src.loc
|
||||
else
|
||||
if(!user.transferItemToLoc(I, drop_location()))
|
||||
return ..()
|
||||
|
||||
/obj/item/paper/fluff/holodeck/trek_diploma
|
||||
|
||||
@@ -95,9 +95,8 @@
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into the machine.</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
O.loc = src
|
||||
beaker = O
|
||||
to_chat(user, "<span class='notice'>You add the container to the machine.</span>")
|
||||
update_icon()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(seed)
|
||||
to_chat(user, "<span class='warning'>A sample is already loaded into the machine!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory())
|
||||
return
|
||||
insert_seed(I)
|
||||
to_chat(user, "<span class='notice'>You add [I] to the machine.</span>")
|
||||
@@ -90,10 +90,9 @@
|
||||
if(disk)
|
||||
to_chat(user, "<span class='warning'>A data disk is already loaded into the machine!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
disk = I
|
||||
disk.loc = src
|
||||
to_chat(user, "<span class='notice'>You add [I] to the machine.</span>")
|
||||
interact(user)
|
||||
else
|
||||
@@ -269,7 +268,7 @@
|
||||
else
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if (istype(I, /obj/item/seeds))
|
||||
if(!usr.drop_item())
|
||||
if(!usr.temporarilyRemoveItemFromInventory(I))
|
||||
return
|
||||
insert_seed(I)
|
||||
to_chat(usr, "<span class='notice'>You add [I] to the machine.</span>")
|
||||
@@ -283,10 +282,9 @@
|
||||
else
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if(istype(I, /obj/item/disk/plantgene))
|
||||
if(!usr.drop_item())
|
||||
if(!usr.transferItemToLoc(I, src))
|
||||
return
|
||||
disk = I
|
||||
disk.loc = src
|
||||
to_chat(usr, "<span class='notice'>You add [I] to the machine.</span>")
|
||||
else if(href_list["op"] == "insert" && disk && disk.gene && seed)
|
||||
if(!operation) // Wait for confirmation
|
||||
|
||||
@@ -87,8 +87,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/grown/meatwheat/attack_self(mob/living/user)
|
||||
user.visible_message("<span class='notice'>[user] crushes [src] into meat.</span>", "<span class='notice'>You crush [src] into something that resembles meat.</span>")
|
||||
playsound(user, 'sound/effects/blobattack.ogg', 50, 1)
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/meatwheat/M = new(get_turf(user))
|
||||
user.drop_item()
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/meatwheat/M = new
|
||||
qdel(src)
|
||||
user.put_in_hands(M)
|
||||
return 1
|
||||
|
||||
@@ -114,4 +114,4 @@
|
||||
if(prob(20))
|
||||
M.Unconscious(force / 0.3)
|
||||
M.Knockdown(force / 0.75)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
|
||||
var/t_amount = 0
|
||||
if(t_max == -1)
|
||||
@@ -42,6 +43,52 @@
|
||||
desc = "Extracts and bags seeds from produce."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "sextractor"
|
||||
=======
|
||||
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
|
||||
var/t_amount = 0
|
||||
if(t_max == -1)
|
||||
if(extractor)
|
||||
t_max = rand(1,4) * extractor.seed_multiplier
|
||||
else
|
||||
t_max = rand(1,4)
|
||||
|
||||
var/seedloc = O.loc
|
||||
if(extractor)
|
||||
seedloc = extractor.loc
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers/food/snacks/grown/))
|
||||
var/obj/item/reagent_containers/food/snacks/grown/F = O
|
||||
if(F.seed)
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(O)) //couldn't drop the item
|
||||
return
|
||||
while(t_amount < t_max)
|
||||
var/obj/item/seeds/t_prod = F.seed.Copy()
|
||||
t_prod.loc = seedloc
|
||||
t_amount++
|
||||
qdel(O)
|
||||
return 1
|
||||
|
||||
else if(istype(O, /obj/item/grown))
|
||||
var/obj/item/grown/F = O
|
||||
if(F.seed)
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(O))
|
||||
return
|
||||
while(t_amount < t_max)
|
||||
var/obj/item/seeds/t_prod = F.seed.Copy()
|
||||
t_prod.loc = seedloc
|
||||
t_amount++
|
||||
qdel(O)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/seed_extractor
|
||||
name = "seed extractor"
|
||||
desc = "Extracts and bags seeds from produce."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "sextractor"
|
||||
>>>>>>> b6d349e... Remove drop_item, drop_item_v, put_in_hands_or_del (#31386)
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
circuit = /obj/item/circuitboard/machine/seed_extractor
|
||||
@@ -90,6 +137,7 @@
|
||||
to_chat(user, "<span class='notice'>You extract some seeds.</span>")
|
||||
return
|
||||
else if (istype(O, /obj/item/seeds))
|
||||
<<<<<<< HEAD
|
||||
if(add_seed(O))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src.name].</span>")
|
||||
updateUsrDialog()
|
||||
@@ -196,3 +244,110 @@
|
||||
|
||||
piles += new /datum/seed_pile(O.plantname, O.lifespan, O.endurance, O.maturation, O.production, O.yield, O.potency)
|
||||
return
|
||||
=======
|
||||
if(add_seed(O))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src.name].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
to_chat(user, "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/datum/seed_pile
|
||||
var/name = ""
|
||||
var/lifespan = 0 //Saved stats
|
||||
var/endurance = 0
|
||||
var/maturation = 0
|
||||
var/production = 0
|
||||
var/yield = 0
|
||||
var/potency = 0
|
||||
var/amount = 0
|
||||
|
||||
/datum/seed_pile/New(var/name, var/life, var/endur, var/matur, var/prod, var/yie, var/poten, var/am = 1)
|
||||
src.name = name
|
||||
src.lifespan = life
|
||||
src.endurance = endur
|
||||
src.maturation = matur
|
||||
src.production = prod
|
||||
src.yield = yie
|
||||
src.potency = poten
|
||||
src.amount = am
|
||||
|
||||
/obj/machinery/seed_extractor/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/seed_extractor/interact(mob/user)
|
||||
if (stat)
|
||||
return 0
|
||||
|
||||
var/dat = "<b>Stored seeds:</b><br>"
|
||||
|
||||
if (contents.len == 0)
|
||||
dat += "<font color='red'>No seeds</font>"
|
||||
else
|
||||
dat += "<table cellpadding='3' style='text-align:center;'><tr><td>Name</td><td>Lifespan</td><td>Endurance</td><td>Maturation</td><td>Production</td><td>Yield</td><td>Potency</td><td>Stock</td></tr>"
|
||||
for (var/datum/seed_pile/O in piles)
|
||||
dat += "<tr><td>[O.name]</td><td>[O.lifespan]</td><td>[O.endurance]</td><td>[O.maturation]</td>"
|
||||
dat += "<td>[O.production]</td><td>[O.yield]</td><td>[O.potency]</td><td>"
|
||||
dat += "<a href='byond://?src=\ref[src];name=[O.name];li=[O.lifespan];en=[O.endurance];ma=[O.maturation];pr=[O.production];yi=[O.yield];pot=[O.potency]'>Vend</a> ([O.amount] left)</td></tr>"
|
||||
dat += "</table>"
|
||||
var/datum/browser/popup = new(user, "seed_ext", name, 700, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/seed_extractor/Topic(var/href, var/list/href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
|
||||
href_list["li"] = text2num(href_list["li"])
|
||||
href_list["en"] = text2num(href_list["en"])
|
||||
href_list["ma"] = text2num(href_list["ma"])
|
||||
href_list["pr"] = text2num(href_list["pr"])
|
||||
href_list["yi"] = text2num(href_list["yi"])
|
||||
href_list["pot"] = text2num(href_list["pot"])
|
||||
|
||||
for (var/datum/seed_pile/N in piles)//Find the pile we need to reduce...
|
||||
if (href_list["name"] == N.name && href_list["li"] == N.lifespan && href_list["en"] == N.endurance && href_list["ma"] == N.maturation && href_list["pr"] == N.production && href_list["yi"] == N.yield && href_list["pot"] == N.potency)
|
||||
if(N.amount <= 0)
|
||||
return
|
||||
N.amount = max(N.amount - 1, 0)
|
||||
if (N.amount <= 0)
|
||||
piles -= N
|
||||
qdel(N)
|
||||
break
|
||||
|
||||
for (var/obj/T in contents)//Now we find the seed we need to vend
|
||||
var/obj/item/seeds/O = T
|
||||
if (O.plantname == href_list["name"] && O.lifespan == href_list["li"] && O.endurance == href_list["en"] && O.maturation == href_list["ma"] && O.production == href_list["pr"] && O.yield == href_list["yi"] && O.potency == href_list["pot"])
|
||||
O.loc = src.loc
|
||||
break
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/seed_extractor/proc/add_seed(obj/item/seeds/O)
|
||||
if(contents.len >= 999)
|
||||
to_chat(usr, "<span class='notice'>\The [src] is full.</span>")
|
||||
return 0
|
||||
|
||||
if(ismob(O.loc))
|
||||
var/mob/M = O.loc
|
||||
if(!M.transferItemToLoc(O, src))
|
||||
return 0
|
||||
else if(istype(O.loc, /obj/item/storage))
|
||||
var/obj/item/storage/S = O.loc
|
||||
S.remove_from_storage(O,src)
|
||||
|
||||
. = 1
|
||||
for (var/datum/seed_pile/N in piles)
|
||||
if (O.plantname == N.name && O.lifespan == N.lifespan && O.endurance == N.endurance && O.maturation == N.maturation && O.production == N.production && O.yield == N.yield && O.potency == N.potency)
|
||||
++N.amount
|
||||
return
|
||||
|
||||
piles += new /datum/seed_pile(O.plantname, O.lifespan, O.endurance, O.maturation, O.production, O.yield, O.potency)
|
||||
return
|
||||
>>>>>>> b6d349e... Remove drop_item, drop_item_v, put_in_hands_or_del (#31386)
|
||||
|
||||
@@ -84,9 +84,8 @@
|
||||
|
||||
if(2)
|
||||
if(is_type_in_list(I, allowed_books))
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
I.loc = src
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/storage/bag/books))
|
||||
var/obj/item/storage/bag/books/B = I
|
||||
|
||||
@@ -507,9 +507,8 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
|
||||
/obj/machinery/libraryscanner/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/book))
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
O.loc = src
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -576,9 +575,8 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>The book binder is busy. Please wait for completion of previous operation.</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
P.loc = src
|
||||
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
|
||||
audible_message("[src] begins to hum as it warms up its printing drums.")
|
||||
busy = TRUE
|
||||
|
||||
@@ -67,8 +67,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
B.handle_item_insertion(src)
|
||||
uses_left--
|
||||
if(uses_left <= 0)
|
||||
user.drop_item(src)
|
||||
loc = A
|
||||
user.transferItemToLoc(src, A, TRUE)
|
||||
var/mutable_appearance/balloon
|
||||
var/mutable_appearance/balloon2
|
||||
var/mutable_appearance/balloon3
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
Radio = new/obj/item/device/radio(src)
|
||||
Radio.listening = FALSE
|
||||
locate_stacking_machine()
|
||||
<<<<<<< HEAD
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id/prisoner))
|
||||
@@ -122,6 +123,108 @@
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
=======
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id/prisoner))
|
||||
if(!inserted_id)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
inserted_id = I
|
||||
to_chat(user, "<span class='notice'>You insert [I].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "labor_claim_console", name, 450, 475, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/can_go_home = FALSE
|
||||
|
||||
data["emagged"] = emagged
|
||||
if(inserted_id)
|
||||
data["id"] = inserted_id
|
||||
data["id_name"] = inserted_id.registered_name
|
||||
data["points"] = inserted_id.points
|
||||
data["goal"] = inserted_id.goal
|
||||
if(check_auth())
|
||||
can_go_home = TRUE
|
||||
|
||||
var/list/ores = list()
|
||||
if(stacking_machine)
|
||||
data["unclaimed_points"] = stacking_machine.points
|
||||
for(var/ore in stacking_machine.ore_values)
|
||||
var/list/O = list()
|
||||
O["ore"] = ore
|
||||
O["value"] = stacking_machine.ore_values[ore]
|
||||
ores += list(O)
|
||||
|
||||
data["ores"] = ores
|
||||
data["can_go_home"] = can_go_home
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("handle_id")
|
||||
if(inserted_id)
|
||||
if(!usr.get_active_held_item())
|
||||
usr.put_in_hands(inserted_id)
|
||||
inserted_id = null
|
||||
else
|
||||
inserted_id.forceMove(get_turf(src))
|
||||
inserted_id = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if(istype(I, /obj/item/card/id/prisoner))
|
||||
if(!usr.transferItemToLoc(I, src))
|
||||
return
|
||||
inserted_id = I
|
||||
if("claim_points")
|
||||
inserted_id.points += stacking_machine.points
|
||||
stacking_machine.points = 0
|
||||
to_chat(usr, "Points transferred.")
|
||||
if("move_shuttle")
|
||||
if(!alone_in_area(get_area(src), usr))
|
||||
to_chat(usr, "<span class='warning'>Prisoners are only allowed to be released while alone.</span>")
|
||||
else
|
||||
switch(SSshuttle.moveShuttle("laborcamp","laborcamp_home"))
|
||||
if(1)
|
||||
to_chat(usr, "<span class='notice'>Shuttle not found</span>")
|
||||
if(2)
|
||||
to_chat(usr, "<span class='notice'>Shuttle already at station</span>")
|
||||
if(3)
|
||||
to_chat(usr, "<span class='notice'>No permission to dock could be granted.</span>")
|
||||
else
|
||||
if(!emagged)
|
||||
Radio.set_frequency(GLOB.SEC_FREQ)
|
||||
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", GLOB.SEC_FREQ, get_spans(), get_default_language())
|
||||
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
|
||||
if(emagged)
|
||||
return 1 //Shuttle is emagged, let any ol' person through
|
||||
return (istype(inserted_id) && inserted_id.points >= inserted_id.goal) //Otherwise, only let them out if the prisoner's reached his quota.
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/locate_stacking_machine()
|
||||
stacking_machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
|
||||
if(stacking_machine)
|
||||
stacking_machine.CONSOLE = src
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
>>>>>>> b6d349e... Remove drop_item, drop_item_v, put_in_hands_or_del (#31386)
|
||||
emagged = TRUE
|
||||
to_chat(user, "<span class='warning'>PZZTTPFFFT</span>")
|
||||
|
||||
|
||||
@@ -1005,7 +1005,7 @@
|
||||
if(H == L)
|
||||
continue
|
||||
to_chat(H, "<span class='userdanger'>You have an overwhelming desire to kill [L]. [L.p_they(TRUE)] [L.p_have()] been marked red! Go kill [L.p_them()]!</span>")
|
||||
H.put_in_hands_or_del(new /obj/item/kitchen/knife/butcher(H))
|
||||
H.put_in_hands(new /obj/item/kitchen/knife/butcher(H), TRUE)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -166,9 +166,8 @@
|
||||
if(istype(W, /obj/item/card/id))
|
||||
var/obj/item/card/id/I = user.get_active_held_item()
|
||||
if(istype(I) && !istype(inserted_id))
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
I.forceMove(src)
|
||||
inserted_id = I
|
||||
interact(user)
|
||||
return
|
||||
|
||||
@@ -116,9 +116,8 @@
|
||||
else if(href_list["choice"] == "insert")
|
||||
var/obj/item/card/id/I = usr.get_active_held_item()
|
||||
if(istype(I))
|
||||
if(!usr.drop_item())
|
||||
if(!usr.transferItemToLoc(I, src))
|
||||
return
|
||||
I.loc = src
|
||||
inserted_id = I
|
||||
to_chat(usr, "<span class='notice'>You insert the ID into [src]'s card slot.</span>")
|
||||
else
|
||||
@@ -155,9 +154,8 @@
|
||||
if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/C = usr.get_active_held_item()
|
||||
if(istype(C) && !istype(inserted_id))
|
||||
if(!usr.drop_item())
|
||||
if(!usr.transferItemToLoc(C, src))
|
||||
return
|
||||
C.loc = src
|
||||
inserted_id = C
|
||||
to_chat(usr, "<span class='notice'>You insert the ID into [src]'s card slot.</span>")
|
||||
interact(user)
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
|
||||
/obj/structure/ore_box/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/ore))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
W.forceMove(src)
|
||||
user.transferItemToLoc(W, src)
|
||||
else if (istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
for(var/obj/item/ore/O in S.contents)
|
||||
|
||||
@@ -222,26 +222,10 @@
|
||||
I.dropped(src)
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/proc/put_in_hands_or_del(obj/item/I)
|
||||
return put_in_hands(I, TRUE)
|
||||
|
||||
|
||||
/mob/proc/drop_item_v() //this is dumb.
|
||||
if(stat == CONSCIOUS && isturf(loc))
|
||||
return drop_item()
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/proc/drop_all_held_items()
|
||||
. = FALSE
|
||||
for(var/obj/item/I in held_items)
|
||||
dropItemToGround(I)
|
||||
|
||||
//Drops the item in our active hand.
|
||||
/mob/proc/drop_item()
|
||||
var/obj/item/held = get_active_held_item()
|
||||
return dropItemToGround(held)
|
||||
|
||||
. |= dropItemToGround(I)
|
||||
|
||||
//Here lie drop_from_inventory and before_item_take, already forgotten and not missed.
|
||||
|
||||
|
||||
@@ -115,9 +115,8 @@
|
||||
//since these people will be dead M != usr
|
||||
|
||||
if(!C.getorgan(/obj/item/organ/brain))
|
||||
if(!C.get_bodypart("head"))
|
||||
if(!C.get_bodypart("head") || !C.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
user.drop_item()
|
||||
var/msg = "[C] has [src] inserted into [C.p_their()] head by [user]."
|
||||
if(C == user)
|
||||
msg = "[user] inserts [src] into [user.p_their()] head!"
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>")
|
||||
else
|
||||
if (prob(50))
|
||||
drop_item()
|
||||
dropItemToGround(get_active_held_item())
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
return 0
|
||||
|
||||
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
|
||||
if(get_active_held_item() && drop_item())
|
||||
if(dropItemToGround(get_active_held_item()))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarmed [src]!</span>")
|
||||
@@ -259,7 +259,7 @@
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
|
||||
if(get_active_held_item() && drop_item())
|
||||
if(dropItemToGround(get_active_held_item()))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarmed [src]!</span>")
|
||||
|
||||
@@ -657,7 +657,7 @@
|
||||
insert_into_backpack()
|
||||
//---------FASHION
|
||||
if(istype(TARGET, /obj/item/clothing))
|
||||
drop_item()
|
||||
temporarilyRemoveItemFromInventory(TARGET, TRUE)
|
||||
dressup(TARGET)
|
||||
update_hands = 1
|
||||
if(MYPDA in src.loc || MYID in src.loc)
|
||||
|
||||
@@ -1373,7 +1373,7 @@
|
||||
target.stop_pulling()
|
||||
else
|
||||
I = target.get_active_held_item()
|
||||
if(target.drop_item())
|
||||
if(target.dropItemToGround(I))
|
||||
target.visible_message("<span class='danger'>[user] has disarmed [target]!</span>", \
|
||||
"<span class='userdanger'>[user] has disarmed [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
else
|
||||
|
||||
@@ -74,11 +74,9 @@
|
||||
add_logs(M, src, "pushed")
|
||||
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has pushed down [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
else
|
||||
if(drop_item())
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
else if(dropItemToGround(get_active_held_item()))
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", "<span class='userdanger'>[M] has disarmed [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
if(..()) //if harm or disarm intent.
|
||||
@@ -119,12 +117,10 @@
|
||||
"<span class='userdanger'>[M] has tackled down [name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
else
|
||||
I = get_active_held_item()
|
||||
if(drop_item())
|
||||
visible_message("<span class='danger'>[M] has disarmed [name]!</span>", \
|
||||
"<span class='userdanger'>[M] has disarmed [name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
if(dropItemToGround(I))
|
||||
visible_message("<span class='danger'>[M] has disarmed [name]!</span>", "<span class='userdanger'>[M] has disarmed [name]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
else
|
||||
I = null//did not manage to actually disarm the item, gross but no time to refactor
|
||||
|
||||
I = null
|
||||
add_logs(M, src, "disarmed", "[I ? " removing \the [I]" : ""]")
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -427,9 +427,8 @@
|
||||
else if(cell)
|
||||
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
cell = W
|
||||
to_chat(user, "<span class='notice'>You insert the power cell.</span>")
|
||||
update_icons()
|
||||
@@ -518,7 +517,7 @@
|
||||
else if(U.locked)
|
||||
to_chat(user, "<span class='warning'>The upgrade is locked and cannot be used yet!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(U))
|
||||
return
|
||||
if(U.action(src))
|
||||
to_chat(user, "<span class='notice'>You apply the upgrade to [src].</span>")
|
||||
@@ -529,12 +528,13 @@
|
||||
upgrades += U
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Upgrade error.</span>")
|
||||
U.forceMove(drop_location())
|
||||
|
||||
else if(istype(W, /obj/item/device/toner))
|
||||
if(toner >= tonermax)
|
||||
to_chat(user, "<span class='warning'>The toner level of [src] is at its highest level possible!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
toner = tonermax
|
||||
qdel(W)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
@@ -384,3 +385,388 @@
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
=======
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
voice_name = "synthesized voice"
|
||||
has_unlimited_silicon_privilege = 1
|
||||
verb_say = "states"
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "declares"
|
||||
verb_yell = "alarms"
|
||||
initial_language_holder = /datum/language_holder/synthetic
|
||||
see_in_dark = 8
|
||||
bubble_icon = "machine"
|
||||
weather_immunities = list("ash")
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
|
||||
var/syndicate = 0
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
var/designation = ""
|
||||
var/radiomod = "" //Radio character used before state laws/arrivals announce to allow department transmissions, default, or none at all.
|
||||
var/obj/item/device/camera/siliconcam/aicamera = null //photography
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/obj/item/device/radio/borg/radio = null //AIs dont use this but this is at the silicon level to advoid copypasta in say()
|
||||
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
|
||||
var/lawcheck[1]
|
||||
var/ioncheck[1]
|
||||
var/devillawcheck[5]
|
||||
|
||||
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
|
||||
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
|
||||
var/d_hud = DATA_HUD_DIAGNOSTIC //There is only one kind of diag hud
|
||||
|
||||
var/law_change_counter = 0
|
||||
var/obj/machinery/camera/builtInCamera = null
|
||||
var/updating = FALSE //portable camera camerachunk update
|
||||
|
||||
/mob/living/silicon/Initialize()
|
||||
. = ..()
|
||||
GLOB.silicon_mobs += src
|
||||
var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC]
|
||||
diag_hud.add_to_hud(src)
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
/mob/living/silicon/med_hud_set_health()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/med_hud_set_status()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
radio = null
|
||||
aicamera = null
|
||||
QDEL_NULL(builtInCamera)
|
||||
GLOB.silicon_mobs -= src
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/contents_explosion(severity, target)
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/triggerAlarm()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/queueAlarm(message, type, incoming = 1)
|
||||
var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0)
|
||||
if(incoming)
|
||||
alarms_to_show += message
|
||||
alarm_types_show[type] += 1
|
||||
else
|
||||
alarms_to_clear += message
|
||||
alarm_types_clear[type] += 1
|
||||
|
||||
if(!in_cooldown)
|
||||
spawn(3 * 10) // 3 seconds
|
||||
|
||||
if(alarms_to_show.len < 5)
|
||||
for(var/msg in alarms_to_show)
|
||||
to_chat(src, msg)
|
||||
else if(alarms_to_show.len)
|
||||
|
||||
var/msg = "--- "
|
||||
|
||||
if(alarm_types_show["Burglar"])
|
||||
msg += "BURGLAR: [alarm_types_show["Burglar"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Motion"])
|
||||
msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Fire"])
|
||||
msg += "FIRE: [alarm_types_show["Fire"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Atmosphere"])
|
||||
msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Power"])
|
||||
msg += "POWER: [alarm_types_show["Power"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - "
|
||||
|
||||
msg += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
|
||||
to_chat(src, msg)
|
||||
|
||||
if(alarms_to_clear.len < 3)
|
||||
for(var/msg in alarms_to_clear)
|
||||
to_chat(src, msg)
|
||||
|
||||
else if(alarms_to_clear.len)
|
||||
var/msg = "--- "
|
||||
|
||||
if(alarm_types_clear["Motion"])
|
||||
msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Fire"])
|
||||
msg += "FIRE: [alarm_types_clear["Fire"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Atmosphere"])
|
||||
msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Power"])
|
||||
msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - "
|
||||
|
||||
msg += "<A href=?src=\ref[src];showalerts=1'>\[Show Alerts\]</a>"
|
||||
to_chat(src, msg)
|
||||
|
||||
|
||||
alarms_to_show = list()
|
||||
alarms_to_clear = list()
|
||||
for(var/key in alarm_types_show)
|
||||
alarm_types_show[key] = 0
|
||||
for(var/key in alarm_types_clear)
|
||||
alarm_types_clear[key] = 0
|
||||
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>Their outer shell is too tough.</span>")
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return 1
|
||||
|
||||
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if (bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/Topic(href, href_list)
|
||||
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawc"])
|
||||
switch(lawcheck[L+1])
|
||||
if ("Yes")
|
||||
lawcheck[L+1] = "No"
|
||||
if ("No")
|
||||
lawcheck[L+1] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(ioncheck[L])
|
||||
if ("Yes")
|
||||
ioncheck[L] = "No"
|
||||
if ("No")
|
||||
ioncheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawdevil"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawdevil"])
|
||||
switch(devillawcheck[L])
|
||||
if ("Yes")
|
||||
devillawcheck[L] = "No"
|
||||
if ("No")
|
||||
devillawcheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
|
||||
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
|
||||
statelaws()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/proc/statelaws(force = 0)
|
||||
|
||||
//"radiomod" is inserted before a hardcoded message to change if and how it is handled by an internal radio.
|
||||
src.say("[radiomod] Current Active Laws:")
|
||||
//src.laws_sanity_check()
|
||||
//src.laws.show_laws(world)
|
||||
var/number = 1
|
||||
sleep(10)
|
||||
|
||||
if (src.laws.devillaws && src.laws.devillaws.len)
|
||||
for(var/index = 1, index <= src.laws.devillaws.len, index++)
|
||||
if (force || src.devillawcheck[index] == "Yes")
|
||||
src.say("[radiomod] 666. [src.laws.devillaws[index]]")
|
||||
sleep(10)
|
||||
|
||||
|
||||
if (src.laws.zeroth)
|
||||
if (force || src.lawcheck[1] == "Yes")
|
||||
src.say("[radiomod] 0. [src.laws.zeroth]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.ion.len, index++)
|
||||
var/law = src.laws.ion[index]
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (force || src.ioncheck[index] == "Yes")
|
||||
src.say("[radiomod] [num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.inherent.len, index++)
|
||||
var/law = src.laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (force || src.lawcheck[index+1] == "Yes")
|
||||
src.say("[radiomod] [number]. [law]")
|
||||
number++
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= src.laws.supplied.len, index++)
|
||||
var/law = src.laws.supplied[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if(src.lawcheck.len >= number+1)
|
||||
if (force || src.lawcheck[number+1] == "Yes")
|
||||
src.say("[radiomod] [number]. [law]")
|
||||
number++
|
||||
sleep(10)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
|
||||
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
|
||||
|
||||
if (src.laws.devillaws && src.laws.devillaws.len)
|
||||
for(var/index = 1, index <= src.laws.devillaws.len, index++)
|
||||
if (!src.devillawcheck[index])
|
||||
src.devillawcheck[index] = "No"
|
||||
list += {"<A href='byond://?src=\ref[src];lawdevil=[index]'>[src.devillawcheck[index]] 666:</A> [src.laws.devillaws[index]]<BR>"}
|
||||
|
||||
if (src.laws.zeroth)
|
||||
if (!src.lawcheck[1])
|
||||
src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=0'>[src.lawcheck[1]] 0:</A> [src.laws.zeroth]<BR>"}
|
||||
|
||||
for (var/index = 1, index <= src.laws.ion.len, index++)
|
||||
var/law = src.laws.ion[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (!src.ioncheck[index])
|
||||
src.ioncheck[index] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawi=[index]'>[src.ioncheck[index]] [ionnum()]:</A> [law]<BR>"}
|
||||
src.ioncheck.len += 1
|
||||
|
||||
var/number = 1
|
||||
for (var/index = 1, index <= src.laws.inherent.len, index++)
|
||||
var/law = src.laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
src.lawcheck.len += 1
|
||||
|
||||
if (!src.lawcheck[number+1])
|
||||
src.lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
|
||||
for (var/index = 1, index <= src.laws.supplied.len, index++)
|
||||
var/law = src.laws.supplied[index]
|
||||
if (length(law) > 0)
|
||||
src.lawcheck.len += 1
|
||||
if (!src.lawcheck[number+1])
|
||||
src.lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
list += {"<br><br><A href='byond://?src=\ref[src];laws=1'>State Laws</A>"}
|
||||
|
||||
usr << browse(list, "window=laws")
|
||||
|
||||
/mob/living/silicon/proc/set_autosay() //For allowing the AI and borgs to set the radio behavior of auto announcements (state laws, arrivals).
|
||||
if(!radio)
|
||||
to_chat(src, "Radio not detected.")
|
||||
return
|
||||
|
||||
//Ask the user to pick a channel from what it has available.
|
||||
var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels
|
||||
|
||||
if(!Autochan)
|
||||
return
|
||||
if(Autochan == "Default") //Autospeak on whatever frequency to which the radio is set, usually Common.
|
||||
radiomod = ";"
|
||||
Autochan += " ([radio.frequency])"
|
||||
else if(Autochan == "None") //Prevents use of the radio for automatic annoucements.
|
||||
radiomod = ""
|
||||
else //For department channels, if any, given by the internal radio.
|
||||
for(var/key in GLOB.department_radio_keys)
|
||||
if(GLOB.department_radio_keys[key] == Autochan)
|
||||
radiomod = ":" + key
|
||||
break
|
||||
|
||||
to_chat(src, "<span class='notice'>Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]</span>")
|
||||
|
||||
/mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands.
|
||||
return 0
|
||||
|
||||
// The src mob is trying to place an item on someone
|
||||
// But the src mob is a silicon!! Disable.
|
||||
/mob/living/silicon/stripPanelEquip(obj/item/what, mob/who, slot)
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/silicon/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt silicon units
|
||||
return -10
|
||||
|
||||
/mob/living/silicon/proc/remove_med_sec_hud()
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
|
||||
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
|
||||
secsensor.remove_hud_from(src)
|
||||
medsensor.remove_hud_from(src)
|
||||
diagsensor.remove_hud_from(src)
|
||||
|
||||
/mob/living/silicon/proc/add_sec_hud()
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
|
||||
secsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/add_med_hud()
|
||||
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
|
||||
medsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/add_diag_hud()
|
||||
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
|
||||
diagsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/sensor_mode()
|
||||
if(incapacitated())
|
||||
return
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Diagnostic","Disable")
|
||||
remove_med_sec_hud()
|
||||
switch(sensor_type)
|
||||
if ("Security")
|
||||
add_sec_hud()
|
||||
to_chat(src, "<span class='notice'>Security records overlay enabled.</span>")
|
||||
if ("Medical")
|
||||
add_med_hud()
|
||||
to_chat(src, "<span class='notice'>Life signs monitor overlay enabled.</span>")
|
||||
if ("Diagnostic")
|
||||
add_diag_hud()
|
||||
to_chat(src, "<span class='notice'>Robotics diagnostic overlay enabled.</span>")
|
||||
if ("Disable")
|
||||
to_chat(src, "Sensor augmentations disabled.")
|
||||
|
||||
|
||||
/mob/living/silicon/proc/GetPhoto()
|
||||
if (aicamera)
|
||||
return aicamera.selectpicture(aicamera)
|
||||
|
||||
/mob/living/silicon/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/changed = 0
|
||||
if(resize != RESIZE_DEFAULT_SIZE)
|
||||
changed++
|
||||
ntransform.Scale(resize)
|
||||
resize = RESIZE_DEFAULT_SIZE
|
||||
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2,easing = EASE_IN|EASE_OUT)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
>>>>>>> b6d349e... Remove drop_item, drop_item_v, put_in_hands_or_del (#31386)
|
||||
|
||||
@@ -846,9 +846,8 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
else if(allow_pai && !key)
|
||||
if(!locked && !open)
|
||||
if(card.pai && card.pai.mind)
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(card, src))
|
||||
return
|
||||
card.forceMove(src)
|
||||
paicard = card
|
||||
user.visible_message("[user] inserts [card] into [src]!","<span class='notice'>You insert [card] into [src].</span>")
|
||||
paicard.pai.mind.transfer_to(src)
|
||||
|
||||
@@ -223,10 +223,9 @@
|
||||
if(!isnull(reagent_glass))
|
||||
to_chat(user, "<span class='warning'>There is already a beaker loaded!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
|
||||
W.loc = src
|
||||
reagent_glass = W
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
show_controls(user)
|
||||
|
||||
@@ -84,11 +84,9 @@
|
||||
if(open)
|
||||
on = FALSE
|
||||
else if(istype(I, /obj/item/stock_parts/cell) && open && !cell)
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
var/obj/item/stock_parts/cell/C = I
|
||||
C.loc = src
|
||||
cell = C
|
||||
cell = I
|
||||
visible_message("[user] inserts a cell into [src].",
|
||||
"<span class='notice'>You insert the new cell into [src].</span>")
|
||||
else if(istype(I, /obj/item/crowbar) && open && cell)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
usr.visible_message("[usr] pets [src].","<span class='notice'>You rest your hand on [src]'s back for a moment.</span>")
|
||||
return
|
||||
|
||||
if(!usr.drop_item())
|
||||
if(!usr.temporarilyRemoveItemFromInventory(item_to_add))
|
||||
to_chat(usr, "<span class='warning'>\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s back!</span>")
|
||||
return
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
if(!allowed)
|
||||
to_chat(usr, "<span class='warning'>You set [item_to_add] on [src]'s back, but it falls off!</span>")
|
||||
item_to_add.loc = loc
|
||||
item_to_add.forceMove(drop_location())
|
||||
if(prob(25))
|
||||
step_rand(item_to_add)
|
||||
for(var/i in list(1,2,4,8,4,8,4,dir))
|
||||
@@ -197,8 +197,7 @@
|
||||
sleep(1)
|
||||
return
|
||||
|
||||
usr.drop_item()
|
||||
item_to_add.loc = src
|
||||
item_to_add.forceMove(src)
|
||||
src.inventory_back = item_to_add
|
||||
update_corgi_fluff()
|
||||
regenerate_icons()
|
||||
@@ -226,7 +225,7 @@
|
||||
user.visible_message("[user] pets [src].","<span class='notice'>You rest your hand on [src]'s head for a moment.</span>")
|
||||
return
|
||||
|
||||
if(user && !user.drop_item())
|
||||
if(user && !user.temporarilyRemoveItemFromInventory(item_to_add))
|
||||
to_chat(user, "<span class='warning'>\The [item_to_add] is stuck to your hand, you cannot put it on [src]'s head!</span>")
|
||||
return 0
|
||||
|
||||
@@ -243,13 +242,13 @@
|
||||
user.visible_message("[user] puts [item_to_add] on [real_name]'s head. [src] looks at [user] and barks once.",
|
||||
"<span class='notice'>You put [item_to_add] on [real_name]'s head. [src] gives you a peculiar look, then wags [p_their()] tail once and barks.</span>",
|
||||
"<span class='italics'>You hear a friendly-sounding bark.</span>")
|
||||
item_to_add.loc = src
|
||||
item_to_add.forceMove(src)
|
||||
src.inventory_head = item_to_add
|
||||
update_corgi_fluff()
|
||||
regenerate_icons()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You set [item_to_add] on [src]'s head, but it falls off!</span>")
|
||||
item_to_add.loc = loc
|
||||
item_to_add.forceMove(drop_location())
|
||||
if(prob(25))
|
||||
step_rand(item_to_add)
|
||||
for(var/i in list(1,2,4,8,4,8,4,dir))
|
||||
|
||||
@@ -275,7 +275,6 @@
|
||||
if(!stat && eggsleft < 8)
|
||||
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
|
||||
user.visible_message(feedmsg)
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
eggsleft += rand(1, 4)
|
||||
else
|
||||
|
||||
@@ -246,8 +246,8 @@
|
||||
|
||||
var/obj/item/device/radio/headset/headset_to_add = item_to_add
|
||||
|
||||
usr.drop_item()
|
||||
headset_to_add.loc = src
|
||||
if(!usr.transferItemToLoc(headset_to_add, src))
|
||||
return
|
||||
src.ears = headset_to_add
|
||||
to_chat(usr, "<span class='notice'>You fit the headset onto [src].</span>")
|
||||
|
||||
@@ -340,7 +340,6 @@
|
||||
drop_held_item(0)
|
||||
else if(istype(O, /obj/item/reagent_containers/food/snacks/cracker)) //Poly wants a cracker.
|
||||
qdel(O)
|
||||
user.drop_item()
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-10)
|
||||
speak_chance *= 1.27 // 20 crackers to go from 1% to 100%
|
||||
|
||||
@@ -53,10 +53,11 @@
|
||||
|
||||
|
||||
/client/Northwest()
|
||||
if(!usr.get_active_held_item())
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if(!I)
|
||||
to_chat(usr, "<span class='warning'>You have nothing to drop in your hand!</span>")
|
||||
return
|
||||
usr.drop_item()
|
||||
usr.dropItemToGround(I)
|
||||
|
||||
//This gets called when you press the delete button.
|
||||
/client/verb/delete_key_pressed()
|
||||
@@ -85,8 +86,8 @@
|
||||
|
||||
/client/verb/drop_item()
|
||||
set hidden = 1
|
||||
if(!iscyborg(mob))
|
||||
mob.drop_item_v()
|
||||
if(!iscyborg(mob) && mob.stat == CONSCIOUS)
|
||||
mob.dropItemToGround(mob.get_active_held_item())
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -175,9 +175,8 @@
|
||||
else
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if (istype(I, /obj/item/card/id))
|
||||
if(!usr.drop_item())
|
||||
if(!usr.transferItemToLoc(I, computer))
|
||||
return
|
||||
I.forceMove(computer)
|
||||
card_slot.stored_card = I
|
||||
if("auth")
|
||||
if(auth_card)
|
||||
@@ -191,9 +190,8 @@
|
||||
else
|
||||
var/obj/item/I = usr.get_active_held_item()
|
||||
if (istype(I, /obj/item/card/id))
|
||||
if(!usr.drop_item())
|
||||
if(!usr.transferItemToLoc(I, computer))
|
||||
return
|
||||
I.forceMove(computer)
|
||||
card_slot.stored_card2 = I
|
||||
if("PRG_terminate")
|
||||
if(computer && ((id_card.assignment in head_subordinates) || id_card.assignment == "Assistant"))
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
if(istype(I, /obj/item/stack/spacecash))
|
||||
var/obj/item/stack/spacecash/c = I
|
||||
|
||||
if(!user.drop_item(c))
|
||||
if(!user.temporarilyRemoveItemFromInventory(c))
|
||||
return
|
||||
credits += c.value
|
||||
visible_message("<span class='info'><span class='name'>[usr]</span> inserts [c.value] credits into the [src].</span>")
|
||||
|
||||
@@ -47,10 +47,9 @@
|
||||
|
||||
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/paper) || istype(P, /obj/item/folder) || istype(P, /obj/item/photo) || istype(P, /obj/item/documents))
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
|
||||
P.loc = src
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
sleep(5)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -44,16 +44,15 @@
|
||||
|
||||
/obj/item/papercutter/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/paper) && !storedpaper)
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
playsound(loc, "pageturn", 60, 1)
|
||||
to_chat(user, "<span class='notice'>You place [P] in [src].</span>")
|
||||
P.loc = src
|
||||
storedpaper = P
|
||||
update_icon()
|
||||
return
|
||||
if(istype(P, /obj/item/hatchet/cutterblade) && !storedcutter)
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You replace [src]'s [P].</span>")
|
||||
P.loc = src
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
|
||||
O.loc = src
|
||||
O.forceMove(src)
|
||||
to_chat(user, "<span class ='notice'>You insert [O] into [src].</span>")
|
||||
flick("photocopier1", src)
|
||||
updateUsrDialog()
|
||||
@@ -261,7 +261,7 @@
|
||||
resistance_flags |= FLAMMABLE
|
||||
fire_act()
|
||||
else
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(O))
|
||||
return
|
||||
copy = O
|
||||
do_insertion(O, user)
|
||||
@@ -270,7 +270,7 @@
|
||||
|
||||
else if(istype(O, /obj/item/photo))
|
||||
if(copier_empty())
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(O))
|
||||
return
|
||||
photocopy = O
|
||||
do_insertion(O, user)
|
||||
@@ -279,7 +279,7 @@
|
||||
|
||||
else if(istype(O, /obj/item/documents))
|
||||
if(copier_empty())
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(O))
|
||||
return
|
||||
doccopy = O
|
||||
do_insertion(O, user)
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
else if(istype(O, /obj/item/device/toner))
|
||||
if(toner <= 0)
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(O))
|
||||
return
|
||||
qdel(O)
|
||||
toner = 40
|
||||
|
||||
@@ -449,9 +449,8 @@
|
||||
if (stat & MAINT)
|
||||
to_chat(user, "<span class='warning'>There is no connector for your power cell!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.forceMove(src)
|
||||
cell = W
|
||||
user.visible_message(\
|
||||
"[user.name] has inserted the power cell to [src.name]!",\
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
src.add_fingerprint(user)
|
||||
var/obj/item/light/L = W
|
||||
if(istype(L, light_type))
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory())
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -87,10 +87,9 @@ GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
if(loaded_tank)
|
||||
to_chat(user, "<span class='warning'>There's already a plasma tank loaded!</span>")
|
||||
return TRUE
|
||||
if(!user.drop_item())
|
||||
return TRUE
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
loaded_tank = W
|
||||
W.forceMove(src)
|
||||
update_icons()
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
if(loaded_tank)
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
|
||||
if(!tracker)
|
||||
if(istype(W, /obj/item/electronics/tracker))
|
||||
if(!user.drop_item())
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
return
|
||||
tracker = 1
|
||||
qdel(W)
|
||||
|
||||
@@ -81,8 +81,7 @@
|
||||
if(istype(A, /obj/item/ammo_casing))
|
||||
var/obj/item/ammo_casing/AC = A
|
||||
if(give_round(AC, replace_spent))
|
||||
user.drop_item()
|
||||
AC.forceMove(src)
|
||||
user.transferItemToLoc(AC, src, TRUE)
|
||||
num_loaded++
|
||||
|
||||
if(num_loaded)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
to_chat(user, "<span class='userdanger'>You shoot yourself in the foot with [src]!</span>")
|
||||
var/shot_leg = pick("l_leg", "r_leg")
|
||||
process_fire(user,user,0,params, zone_override = shot_leg)
|
||||
user.drop_item()
|
||||
user.dropItemToGround(src, TRUE)
|
||||
return
|
||||
|
||||
if(weapon_weight == WEAPON_HEAVY && user.get_inactive_held_item())
|
||||
|
||||
@@ -358,5 +358,5 @@
|
||||
if(process_fire(user, user, 0, zone_override = "head"))
|
||||
user.visible_message("<span class='warning'>[user] somehow manages to shoot [user.p_them()]self in the face!</span>", "<span class='userdanger'>You somehow shoot yourself in the face! How the hell?!</span>")
|
||||
user.emote("scream")
|
||||
user.drop_item()
|
||||
user.drop_all_held_items()
|
||||
user.Knockdown(80)
|
||||
|
||||
@@ -172,11 +172,11 @@
|
||||
if(guns_left)
|
||||
var/obj/item/gun/ballistic/shotgun/boltaction/enchanted/GUN = new gun_type
|
||||
GUN.guns_left = guns_left - 1
|
||||
user.drop_item()
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.swap_hand()
|
||||
user.put_in_hands(GUN)
|
||||
else
|
||||
user.drop_item()
|
||||
user.dropItemToGround(src, TRUE)
|
||||
discard_gun(user)
|
||||
|
||||
// Automatic Shotguns//
|
||||
|
||||
@@ -49,12 +49,11 @@
|
||||
if(!T.tank_one || !T.tank_two)
|
||||
to_chat(user, "<span class='warning'>What good would an incomplete bomb do?</span>")
|
||||
return FALSE
|
||||
if(!user.drop_item(O))
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='warning'>The [O] seems to be stuck to your hand!</span>")
|
||||
return FALSE
|
||||
user.visible_message("<span class='warning'>[user] attaches the [O] to the [src]!</span>")
|
||||
bomb = O
|
||||
O.forceMove(src)
|
||||
update_icon()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -189,9 +189,7 @@
|
||||
M.emote("laugh")
|
||||
if(prob(33))
|
||||
M.visible_message("<span class='danger'>[M]'s hands flip out and flail everywhere!</span>")
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
..()
|
||||
M.adjustToxLoss(1, 0)
|
||||
M.adjustBrainLoss(pick(0.5, 0.6, 0.7, 0.8, 0.9, 1))
|
||||
@@ -268,9 +266,7 @@
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
if(prob(33))
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
|
||||
|
||||
@@ -256,7 +256,6 @@
|
||||
victim.confused = max(M.confused, 3)
|
||||
victim.damageoverlaytemp = 60
|
||||
victim.Knockdown(60)
|
||||
victim.drop_item()
|
||||
return
|
||||
else if ( eyes_covered ) // Eye cover is better than mouth cover
|
||||
victim.blur_eyes(3)
|
||||
@@ -270,7 +269,6 @@
|
||||
victim.confused = max(M.confused, 6)
|
||||
victim.damageoverlaytemp = 75
|
||||
victim.Knockdown(100)
|
||||
victim.drop_item()
|
||||
victim.update_damage_hud()
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/M)
|
||||
|
||||
@@ -626,27 +626,20 @@
|
||||
|
||||
/datum/reagent/medicine/morphine/overdose_process(mob/living/M)
|
||||
if(prob(33))
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
M.Dizzy(2)
|
||||
M.Jitter(2)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/morphine/addiction_act_stage1(mob/living/M)
|
||||
if(prob(33))
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.Dizzy(2)
|
||||
M.drop_all_held_items()
|
||||
M.Jitter(2)
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/morphine/addiction_act_stage2(mob/living/M)
|
||||
if(prob(33))
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
M.adjustToxLoss(1*REM, 0)
|
||||
. = 1
|
||||
M.Dizzy(3)
|
||||
@@ -655,9 +648,7 @@
|
||||
|
||||
/datum/reagent/medicine/morphine/addiction_act_stage3(mob/living/M)
|
||||
if(prob(33))
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
M.adjustToxLoss(2*REM, 0)
|
||||
. = 1
|
||||
M.Dizzy(4)
|
||||
@@ -666,9 +657,7 @@
|
||||
|
||||
/datum/reagent/medicine/morphine/addiction_act_stage4(mob/living/M)
|
||||
if(prob(33))
|
||||
var/obj/item/I = M.get_active_held_item()
|
||||
if(I)
|
||||
M.drop_item()
|
||||
M.drop_all_held_items()
|
||||
M.adjustToxLoss(3*REM, 0)
|
||||
. = 1
|
||||
M.Dizzy(5)
|
||||
|
||||
@@ -141,8 +141,7 @@
|
||||
to_chat(user, "<span class='notice'>You reverse [src]'s direction.</span>")
|
||||
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
if(user.drop_item())
|
||||
I.loc = src.loc
|
||||
user.transferItemToLoc(I, drop_location())
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(!user.drop_item() || (I.flags_1 & ABSTRACT_1))
|
||||
if((I.flags_1 & ABSTRACT_1) || !user.temporarilyRemoveItemFromInventory(I))
|
||||
return
|
||||
place_item_in_disposal(I, user)
|
||||
update_icon()
|
||||
|
||||
@@ -43,12 +43,11 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
if (temp_tech.len == 0)
|
||||
to_chat(user, "<span class='warning'>You cannot deconstruct this item!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='warning'>\The [O] is stuck to your hand, you cannot put it in the [src.name]!</span>")
|
||||
return
|
||||
busy = TRUE
|
||||
loaded_item = O
|
||||
O.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You add the [O.name] to the [src.name]!</span>")
|
||||
flick("d_analyzer_la", src)
|
||||
addtimer(CALLBACK(src, .proc/finish_loading), 10)
|
||||
|
||||
@@ -122,10 +122,9 @@
|
||||
if (temp_tech.len == 0)
|
||||
to_chat(user, "<span class='warning'>You cannot experiment on this item!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
loaded_item = O
|
||||
O.loc = src
|
||||
to_chat(user, "<span class='notice'>You add the [O.name] to the machine.</span>")
|
||||
flick("h_lathe_load", src)
|
||||
|
||||
|
||||
@@ -127,9 +127,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Machine cannot accept disks in that format.</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(D, src))
|
||||
return
|
||||
D.loc = src
|
||||
to_chat(user, "<span class='notice'>You add the disk to the machine!</span>")
|
||||
else if(!(linked_destroy && linked_destroy.busy) && !(linked_lathe && linked_lathe.busy) && !(linked_imprinter && linked_imprinter.busy))
|
||||
. = ..()
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
if(istype(O, /obj/item/reagent_containers/food/snacks/monkeycube))
|
||||
monkeys++
|
||||
to_chat(user, "<span class='notice'>You feed [O] to [src]. It now has [monkeys] monkey cubes stored.</span>")
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
return
|
||||
else if(istype(O, /obj/item/storage/bag))
|
||||
|
||||
@@ -75,9 +75,8 @@
|
||||
item = null
|
||||
else
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(C.drop_item())
|
||||
item = make_item()
|
||||
C.put_in_hands(item)
|
||||
if(C.dropItemToGround(C.get_active_held_item()))
|
||||
C.put_in_hands(make_item(), TRUE)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/Destroy()
|
||||
if(item)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(C.mind && user.mind)
|
||||
if(C.stat == DEAD)
|
||||
if(user.drop_item())
|
||||
if(user.dropItemToGround(user.get_active_held_item()))
|
||||
var/obj/item/paper/contract/infernal/revive/contract = new(user.loc, C.mind, user.mind)
|
||||
user.put_in_hands(contract)
|
||||
else
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_wealth/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(user.drop_item())
|
||||
if(user.dropItemToGround(user.get_active_held_item()))
|
||||
var/obj/item = pick(
|
||||
new /obj/item/coin/gold(user.loc),
|
||||
new /obj/item/coin/diamond(user.loc),
|
||||
|
||||
@@ -14,12 +14,9 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infinite_guns/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
C.drop_item()
|
||||
C.swap_hand()
|
||||
C.drop_item()
|
||||
C.drop_all_held_items()
|
||||
var/GUN = new summon_path
|
||||
C.put_in_hands(GUN)
|
||||
C.swap_hand(C.get_held_index_of_item(GUN))
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infinite_guns/gun
|
||||
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
return 0
|
||||
else
|
||||
user.visible_message("[user] stuffs [tool] into [target]'s [target_zone]!", "<span class='notice'>You stuff [tool] into [target]'s [target_zone].</span>")
|
||||
user.drop_item()
|
||||
user.transferItemToLoc(tool, target, TRUE)
|
||||
CH.cavity_item = tool
|
||||
tool.loc = target
|
||||
return 1
|
||||
else
|
||||
if(IC)
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
if(!istype(tool))
|
||||
return 0
|
||||
|
||||
user.drop_item()
|
||||
tool.loc = target
|
||||
user.transferItemToLoc(tool, target, TRUE)
|
||||
|
||||
var/datum/action/item_action/hands_free/activate_pill/P = new(tool)
|
||||
P.button.name = "Activate [tool.name]"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
|
||||
/////AUGMENTATION SURGERIES//////
|
||||
|
||||
@@ -57,6 +58,66 @@
|
||||
qdel(tool)
|
||||
target.update_body_parts()
|
||||
target.updatehealth()
|
||||
=======
|
||||
|
||||
/////AUGMENTATION SURGERIES//////
|
||||
|
||||
|
||||
//SURGERY STEPS
|
||||
|
||||
/datum/surgery_step/replace
|
||||
name = "sever muscles"
|
||||
implements = list(/obj/item/scalpel = 100, /obj/item/wirecutters = 55)
|
||||
time = 32
|
||||
|
||||
|
||||
/datum/surgery_step/replace/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
user.visible_message("[user] begins to sever the muscles on [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to sever the muscles on [target]'s [parse_zone(user.zone_selected)]...</span>")
|
||||
|
||||
|
||||
/datum/surgery_step/add_limb
|
||||
name = "replace limb"
|
||||
implements = list(/obj/item/bodypart = 100)
|
||||
time = 32
|
||||
var/obj/item/bodypart/L = null // L because "limb"
|
||||
|
||||
|
||||
/datum/surgery_step/add_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
var/obj/item/bodypart/aug = tool
|
||||
if(aug.status != BODYPART_ROBOTIC)
|
||||
to_chat(user, "<span class='warning'>that's not an augment silly!</span>")
|
||||
return -1
|
||||
if(aug.body_zone != target_zone)
|
||||
to_chat(user, "<span class='warning'>[tool] isn't the right type for [parse_zone(target_zone)].</span>")
|
||||
return -1
|
||||
L = surgery.operated_bodypart
|
||||
if(L)
|
||||
user.visible_message("[user] begins to augment [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You begin to augment [target]'s [parse_zone(user.zone_selected)]...</span>")
|
||||
else
|
||||
user.visible_message("[user] looks for [target]'s [parse_zone(user.zone_selected)].", "<span class ='notice'>You look for [target]'s [parse_zone(user.zone_selected)]...</span>")
|
||||
|
||||
|
||||
//ACTUAL SURGERIES
|
||||
|
||||
/datum/surgery/augmentation
|
||||
name = "augmentation"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/replace, /datum/surgery_step/saw, /datum/surgery_step/add_limb)
|
||||
species = list(/mob/living/carbon/human)
|
||||
possible_locs = list("r_arm","l_arm","r_leg","l_leg","chest","head")
|
||||
requires_real_bodypart = TRUE
|
||||
|
||||
//SURGERY STEP SUCCESSES
|
||||
|
||||
/datum/surgery_step/add_limb/success(mob/user, mob/living/carbon/target, target_zone, obj/item/bodypart/tool, datum/surgery/surgery)
|
||||
if(L)
|
||||
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
|
||||
L.change_bodypart_status(BODYPART_ROBOTIC, TRUE)
|
||||
L.icon = tool.icon
|
||||
L.max_damage = tool.max_damage
|
||||
qdel(tool)
|
||||
target.update_body_parts()
|
||||
target.updatehealth()
|
||||
>>>>>>> b6d349e... Remove drop_item, drop_item_v, put_in_hands_or_del (#31386)
|
||||
target.update_hair()
|
||||
add_logs(user, target, "augmented", addition="by giving him new [parse_zone(target_zone)] INTENT: [uppertext(user.a_intent)]")
|
||||
else
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
tool = I
|
||||
else
|
||||
I = tool
|
||||
user.drop_item()
|
||||
user.temporarilyRemoveItemFromInventory(I, TRUE)
|
||||
I.Insert(target)
|
||||
user.visible_message("[user] inserts [tool] into [target]'s [parse_zone(target_zone)]!",
|
||||
"<span class='notice'>You insert [tool] into [target]'s [parse_zone(target_zone)].</span>")
|
||||
|
||||
@@ -49,9 +49,8 @@
|
||||
else if(!uses)
|
||||
to_chat(user, "<span class='notice'>[src] has already been used up.</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
I.forceMove(src)
|
||||
storedorgan = I
|
||||
to_chat(user, "<span class='notice'>You insert the [I] into [src].</span>")
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
/obj/item/organ/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target)
|
||||
if(H == user && istype(H))
|
||||
playsound(user,'sound/effects/singlebeat.ogg',40,1)
|
||||
user.drop_item()
|
||||
user.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
Insert(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -92,10 +92,9 @@
|
||||
if(status == ORGAN_ORGANIC)
|
||||
var/obj/item/reagent_containers/food/snacks/S = prepare_eat()
|
||||
if(S)
|
||||
H.drop_item()
|
||||
H.put_in_active_hand(S)
|
||||
S.attack(H, H)
|
||||
qdel(src)
|
||||
if(H.put_in_active_hand(S))
|
||||
S.attack(H, H)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -63,9 +63,8 @@
|
||||
tool.desc = "A container for holding body parts."
|
||||
tool.cut_overlays()
|
||||
tool = tool.contents[1]
|
||||
if(istype(tool, /obj/item/bodypart))
|
||||
if(istype(tool, /obj/item/bodypart) && user.temporarilyRemoveItemFromInventory(tool))
|
||||
var/obj/item/bodypart/L = tool
|
||||
user.drop_item()
|
||||
L.attach_limb(target)
|
||||
if(organ_rejection_dam)
|
||||
target.adjustToxLoss(organ_rejection_dam)
|
||||
|
||||
@@ -47,10 +47,9 @@
|
||||
if(mybag)
|
||||
to_chat(user, "<span class='warning'>[src] already has a trashbag hooked!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You hook the trashbag onto [src].</span>")
|
||||
I.loc = src
|
||||
mybag = I
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/janiupgrade))
|
||||
|
||||
Reference in New Issue
Block a user