Tg 1 28 sync testing/confirmation (#5178)
* maps, tgui, tools * defines and helpers * onclick and controllers * datums fucking caught that hulk reversal too. * game and shuttle modular * module/admin * oh god they fucking moved antag shit again * haaaaate. Haaaaaaaaaate. * enables moff wings * more modules things * tgstation.dme before I forget something important * some mob stuff * s'more mob/living stuff * some carbon stuff * ayy lmaos and kitchen meat * Human stuff * species things moff wings have a 'none' version too * the rest of the module stuff. * some strings * misc * mob icons * some other icons. * It compiles FUCK BORERS FUCK BORERS
This commit is contained in:
+21
-31
@@ -26,7 +26,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
max_integrity = 200
|
||||
|
||||
can_be_hit = FALSE
|
||||
obj_flags = NONE
|
||||
var/item_flags = NONE
|
||||
|
||||
var/hitsound = null
|
||||
var/usesound = null
|
||||
@@ -61,37 +62,22 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/equip_delay_other = 20 //In deciseconds, how long an item takes to put on another person
|
||||
var/strip_delay = 40 //In deciseconds, how long an item takes to remove from another person
|
||||
var/breakouttime = 0
|
||||
var/being_removed = FALSE
|
||||
var/list/materials
|
||||
var/needs_permit = 0 //Used by security bots to determine if this item is safe for public use.
|
||||
var/emagged = FALSE
|
||||
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
|
||||
var/suittoggled = FALSE
|
||||
var/hooded = 0
|
||||
|
||||
var/mob/thrownby = null
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
|
||||
|
||||
//So items can have custom embedd values
|
||||
//Because customisation is king
|
||||
var/embed_chance = EMBED_CHANCE
|
||||
var/embedded_fall_chance = EMBEDDED_ITEM_FALLOUT
|
||||
var/embedded_pain_chance = EMBEDDED_PAIN_CHANCE
|
||||
var/embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
|
||||
var/embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
|
||||
var/embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
|
||||
var/embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
|
||||
var/datum/embedding_behavior/embedding
|
||||
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/heat = 0
|
||||
var/sharpness = IS_BLUNT
|
||||
|
||||
var/tool_behaviour = TOOL_NONE
|
||||
var/tool_behaviour = NONE
|
||||
var/toolspeed = 1
|
||||
|
||||
var/block_chance = 0
|
||||
@@ -109,16 +95,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
|
||||
//Tooltip vars
|
||||
var/in_inventory = FALSE//is this item equipped into an inventory slot or hand of a mob?
|
||||
var/force_string //string form of an item's force. Edit this var only to set a custom force string
|
||||
var/last_force_string_check = 0
|
||||
var/tip_timer
|
||||
var/force_string_override
|
||||
var/icon_override //CIT CHANGE - adds icon_override var. Will be removed with #4322
|
||||
|
||||
var/trigger_guard = TRIGGER_GUARD_NONE
|
||||
|
||||
var/icon_override //CIT CHANGE - adds icon_override var. Will be removed with #4322
|
||||
|
||||
//Grinder vars
|
||||
var/list/grind_results //A reagent list containing the reagents this item produces when ground up in a grinder - this can be an empty list to allow for reagent transferring only
|
||||
var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder!
|
||||
@@ -135,7 +118,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
rpg_loot = new(src)
|
||||
|
||||
if(force_string)
|
||||
force_string_override = TRUE
|
||||
item_flags |= FORCE_STRING_OVERRIDE
|
||||
|
||||
if(!hitsound)
|
||||
if(damtype == "fire")
|
||||
@@ -143,6 +126,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
if (!embedding)
|
||||
embedding = getEmbeddingBehavior()
|
||||
else if (islist(embedding))
|
||||
embedding = getEmbeddingBehavior(arglist(embedding))
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||
if(ismob(loc))
|
||||
@@ -413,12 +403,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
A.Remove(user)
|
||||
if(DROPDEL_1 & flags_1)
|
||||
qdel(src)
|
||||
in_inventory = FALSE
|
||||
item_flags &= ~IN_INVENTORY
|
||||
SendSignal(COMSIG_ITEM_DROPPED,user)
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
in_inventory = TRUE
|
||||
item_flags |= IN_INVENTORY
|
||||
return
|
||||
|
||||
|
||||
@@ -446,7 +436,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
SendSignal(COMSIG_ITEM_EQUIPPED,user,slot)
|
||||
in_inventory = TRUE
|
||||
item_flags |= IN_INVENTORY
|
||||
|
||||
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user)
|
||||
@@ -547,7 +537,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
M.adjust_blurriness(15)
|
||||
if(M.stat != DEAD)
|
||||
to_chat(M, "<span class='danger'>Your eyes start to bleed profusely!</span>")
|
||||
if(!(M.has_disability(DISABILITY_BLIND) || M.has_disability(DISABILITY_NEARSIGHT)))
|
||||
if(!(M.has_trait(TRAIT_BLIND) || M.has_trait(TRAIT_NEARSIGHT)))
|
||||
to_chat(M, "<span class='danger'>You become nearsighted!</span>")
|
||||
M.become_nearsighted(EYE_DAMAGE)
|
||||
if(prob(50))
|
||||
@@ -588,7 +578,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if (callback) //call the original callback
|
||||
. = callback.Invoke()
|
||||
throw_speed = initial(throw_speed) //explosions change this.
|
||||
in_inventory = FALSE
|
||||
item_flags &= ~IN_INVENTORY
|
||||
|
||||
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage
|
||||
if(!newLoc)
|
||||
@@ -737,15 +727,15 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
last_force_string_check = force
|
||||
|
||||
/obj/item/proc/openTip(location, control, params, user)
|
||||
if(last_force_string_check != force && !force_string_override)
|
||||
if(last_force_string_check != force && !(item_flags & FORCE_STRING_OVERRIDE))
|
||||
set_force_string()
|
||||
if(!force_string_override)
|
||||
if(!(item_flags & FORCE_STRING_OVERRIDE))
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br>[force ? "<b>Force:</b> [force_string]" : ""]",theme = "")
|
||||
else
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [force_string]",theme = "")
|
||||
|
||||
/obj/item/MouseEntered(location, control, params)
|
||||
if(in_inventory && usr.client.prefs.enable_tips)
|
||||
if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips)
|
||||
var/timedelay = usr.client.prefs.tip_delay/100
|
||||
var/user = usr
|
||||
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
|
||||
Reference in New Issue
Block a user